diff --git a/.github/workflows/redhat-certify.yml b/.github/workflows/redhat-certify.yml index 2b5b1a09d0..8f03a73979 100644 --- a/.github/workflows/redhat-certify.yml +++ b/.github/workflows/redhat-certify.yml @@ -6,7 +6,7 @@ on: version: description: "EDDI version (e.g. 6.1.1)" required: true - default: "6.1.1" + default: "6.2.0" release: description: "Release number (e.g. 1, 2, 3)" required: true diff --git a/AGENTS.md b/AGENTS.md index 90a96d8f6c..92099907e3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -105,7 +105,8 @@ Follow this order unless the user explicitly requests something different. | 7 | Security & Compliance | Secrets Vault, Audit Ledger (EU AI Act), tenant quota stub | | 8 | MCP Integration | MCP Server (33 tools), MCP Client, agent discovery, managed conversations | | 8c | RAG Foundation | Config-driven vector store retrieval, pgvector, httpCall RAG | -| 10 | Group Conversations | Multi-agent debate orchestration, 5 styles, group-of-groups | +| 10 | Group Conversations | Multi-agent debate orchestration, 6 styles (incl. Task Force), group-of-groups | +| 10b | Dynamic Agents | Runtime agent creation/recruitment/delegation, DynamicAgentConfig guardrails, lifecycle policies, SharedTaskList | | — | A2A Protocol | Agent-to-Agent peer communication, Agent Cards, skill discovery | | — | Multi-Model Cascading | Sequential model escalation with confidence routing | | — | LLM Provider Expansion | 7 → 12 providers (Mistral, Azure OpenAI, Bedrock, Oracle GenAI) | diff --git a/HANDOFF.md b/HANDOFF.md index 69d0c07652..8ec6f66652 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -555,18 +555,18 @@ All hooks are **non-fatal** — if schedule operations fail, the primary agent o ### Phase 10: Group Conversations — Multi-Agent Debate Orchestration ✅ -Phase-based orchestration engine enabling structured multi-agent discussions with 5 preset styles, nested group-of-groups support, and moderator synthesis. +Phase-based orchestration engine enabling structured multi-agent discussions with 6 preset styles, nested group-of-groups support, and moderator synthesis. | Sub-Phase | Deliverables | |---|---| | **10.1** Data Models + Stores | `AgentGroupConfiguration`, `GroupConversation`, group/conversation stores (DB-agnostic) | | **10.2** Orchestration Service | `GroupConversationService` (~680 lines) — phases, context scoping, templates | | **10.3** REST + SSE + MCP | REST endpoints, SSE streaming, `McpGroupTools` (9 tools) | -| **10.5** Discussion Styles | `DiscussionPhase`, `DiscussionStylePresets` — 5 styles + custom phases | +| **10.5** Discussion Styles | `DiscussionPhase`, `DiscussionStylePresets` — 6 styles + custom phases | | **10.5b** MCP/REST Usability | `describe_discussion_styles`, `list_group_conversations`, `GET /styles` | | **10.6** Group-of-Groups | `MemberType.GROUP`, recursive `executeGroupMemberTurn()`, `memberTypes` param | -**Discussion styles:** `ROUND_TABLE`, `PEER_REVIEW`, `DEVIL_ADVOCATE`, `DELPHI`, `DEBATE` (+ fully custom phases) +**Discussion styles:** `ROUND_TABLE`, `PEER_REVIEW`, `DEVIL_ADVOCATE`, `DELPHI`, `DEBATE`, `TASK_FORCE` (+ fully custom phases) **Group-of-Groups:** Members can be other groups — sub-group synthesized answer becomes member's response. Depth tracking prevents infinite recursion (`eddi.groups.max-depth`, default: 3). diff --git a/README.md b/README.md index cb7ffa7faa..9079689661 100644 --- a/README.md +++ b/README.md @@ -249,9 +249,10 @@ Most multi-agent frameworks (LangGraph, CrewAI, AutoGen) are Python/Node librari ### 🤖 Multi-Agent Orchestration - 🔀 **Intelligent Routing** — Direct conversations to different agents based on context, rules, and intent -- 🗣️ **Group Conversations** — Multi-agent debates with 5 built-in discussion styles: Round Table, Peer Review, Devil's Advocate, Delphi, and Debate +- 🗣️ **Group Conversations** — Multi-agent debates with 6 built-in discussion styles: Round Table, Peer Review, Devil's Advocate, Delphi, Debate, and Task Force - 💬 **Slack Integration** — Deploy agents to Slack channels and run multi-agent debates directly in threads - 🪆 **Nested Groups** — Compose groups of groups for tournament brackets, red-team vs blue-team, and panel reviews +- 🤖 **Dynamic Agents** — Create, recruit, and delegate to new agents at runtime during group discussions with configurable guardrails - 👥 **Managed Conversations** — Intent-based auto-routing with one conversation per user per intent - 🎯 **Capability Matching** — Discover and route to agents by skill, confidence score, and custom attributes - 🧙 **Agent Father** — Meta-agent that creates other agents through conversation (ships out of the box) @@ -271,7 +272,7 @@ EDDI implements open standards — not proprietary APIs: | Standard | Role | What It Enables | | -------------------------------------------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------- | -| **[MCP](https://modelcontextprotocol.io/)** (Model Context Protocol) | Server (42 tools) + Client | Control EDDI from Claude Desktop, Cursor, or any MCP client. Connect agents to external MCP tool servers | +| **[MCP](https://modelcontextprotocol.io/)** (Model Context Protocol) | Server (55 tools) + Client | Control EDDI from Claude Desktop, Cursor, or any MCP client. Connect agents to external MCP tool servers | | **[A2A](https://google.github.io/A2A/)** (Agent-to-Agent Protocol) | Full implementation | Cross-platform agent communication, Agent Cards, and skill discovery | | **[OpenAPI](https://www.openapis.org/)** 3.1 | Native generation + consumption | Auto-generated spec. Paste any OpenAPI spec → get a fully deployed API-calling agent | | **OAuth 2.0 / OIDC** | Keycloak integration | Authentication, authorization, and multi-tenant isolation | @@ -426,7 +427,7 @@ Features: Dev Services (auto-starts EDDI in dev mode), fluent API, SSE streaming | **[Behavior Rules](docs/behavior-rules.md)** | Configuring agent routing logic | | **[HTTP Calls](docs/httpcalls.md)** | External API integration | | **[RAG](docs/rag.md)** | Knowledge base retrieval setup | -| **[MCP Server](docs/mcp-server.md)** | 42 tools for AI-assisted agent management | +| **[MCP Server](docs/mcp-server.md)** | 55 tools for AI-assisted agent management | | **[A2A Protocol](docs/a2a-protocol.md)** | Agent-to-Agent peer communication | | **[Slack Integration](docs/slack-integration.md)** | Deploy agents to Slack and run group discussions | | **[Group Conversations](docs/group-conversations.md)** | Multi-agent debate orchestration | diff --git a/docs/architecture.md b/docs/architecture.md index 30ec82b518..1d58fe2c98 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,6 +1,6 @@ # EDDI Architecture -**Version: 6.0.0** +**Version: 6.2.0** This document provides a comprehensive overview of EDDI's architecture, design principles, and internal workflow. @@ -868,10 +868,11 @@ A `GroupConversationService` orchestrates discussions through configurable phase **Key capabilities:** -- **5 built-in discussion styles**: Round Table, Peer Review, Devil's Advocate, Delphi, and Debate — each with distinct phase flows and turn-taking rules +- **6 built-in discussion styles**: Round Table, Peer Review, Devil's Advocate, Delphi, Debate, and Task Force — each with distinct phase flows and turn-taking rules. Task Force uses a 4-phase pipeline (PLAN→EXECUTE→VERIFY→SYNTHESIS) for structured task decomposition and parallel execution - **Custom phases**: Define your own phase sequences with configurable context scopes (independent, full transcript, anonymous, own-feedback-only) - **Group-of-groups**: Members can themselves be groups, enabling hierarchical multi-agent composition with configurable depth limits - **Fault tolerance**: Per-agent timeouts, configurable failure policies (skip, retry, abort), and graceful degradation when members are unavailable +- **Dynamic agents**: Agents can create, recruit, delegate to, and teardown new agents at runtime during discussions, with configurable guardrails (provider/model whitelists, per-discussion caps, lifecycle policies) See [Group Conversations](group-conversations.md) for full configuration reference, and [A2A Protocol](a2a-protocol.md) for peer-to-peer agent communication. diff --git a/docs/changelog.md b/docs/changelog.md index a07f4df69f..5bb7fd1822 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,10 +2,216 @@ > **Purpose:** Living document tracking all changes, decisions, and reasoning during implementation. Updated as work progresses for easy reference and review. + +--- + +## 🔒 PR Review Fixes — DynamicAgentConfig Propagation, Null Safety, Code Dedup (2026-06-26) + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** 5 fixes addressing Copilot PR review findings. + +### Fixes + +1. **HIGH: DynamicAgentConfig propagation** — Group-level guardrails were silently ignored. Fix: GCS stores config on GC (transient), passes via context to AgentOrchestrator which reads it from memory. +2. **MEDIUM: Null-safe DynamicAgentConfig** — Constructor defaults null to disabled config. +3. **MEDIUM: Null-safe provider allow-list** — `Objects::nonNull` filter before `equalsIgnoreCase()`. +4. **MEDIUM: Null-safe model allow-list** — Filters for both null map values and null list entries. +5. **LOW: extractResponse() deduplication** — Shared `ConversationOutputExtractor` utility replacing 3 copies. + +### Files Changed +- `GroupConversation.java` — Transient `dynamicAgentConfig` field (`@JsonIgnore`) +- `GroupConversationService.java` — Config propagation + `extractResponse()` delegation +- `AgentOrchestrator.java` — `resolveDynamicAgentConfig()` reads group config from context +- `CreateSubAgentTool.java` — Null-safe constructor + allow-lists + `extractResponse()` delegation +- `ConverseWithAgentTool.java` — `extractResponse()` delegation +- `ConversationOutputExtractor.java` — **[NEW]** Shared utility + +### Tests Added +- `ConversationOutputExtractorTest` — 11 tests +- `DynamicAgentToolsTest` — 7 new null-safety tests + +--- + +## 🔧 MCP Group Tools — Async Discussion, Delete, @Blocking Fix (2026-06-26) + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** 3 MCP improvements for Task Force group discussions. + +### Changes +- **Bug fix**: `discuss_with_group` was missing `@Blocking` — a multi-minute TASK_FORCE discussion would block the Vert.x event loop thread, potentially freezing the MCP server. Now correctly annotated (matches `talk_to_agent` pattern in McpConversationTools). +- **New tool**: `start_group_discussion` — async variant that returns immediately with `groupConversationId` + `IN_PROGRESS` state. Client polls with `read_group_conversation`. Uses existing `startAndDiscussAsync()` backend method. +- **New tool**: `delete_group_conversation` — REST-MCP parity gap. DELETE endpoint existed in REST API but had no MCP equivalent. +- **Improved docs**: Tool descriptions now document what data `read_group_conversation` returns (task list, tracking lists, state) so MCP clients know they don't need separate tools for task inspection. + +### Design Decision +Rejected adding 5 separate tools (read_task_list, list_dynamic_agents, discuss_task, clone_group, describe_task_force_syntax) — all proposed data is already available via existing tools. Avoided tool sprawl (project already has 63 MCP tools). + +### Coverage +- McpGroupTools: 91.79% instruction, 81.25% branch, 100% methods +- 9 new tests (31 total in McpGroupToolsTest): async success/defaults/blank/error, delete success/confirmation/error, @Blocking annotation reflection tests +- Full suite: 9,611 tests, 0 failures + +--- + +## 🧪 Comprehensive Branch Coverage for Dynamic Agent System (2026-06-25) + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** Added 60+ targeted unit tests to cover all uncovered branches in the Task Force / Dynamic Agent feature. Coverage improved from 0.88→0.89 instructions (unit tests only; CI with integration tests will exceed 0.90/0.80 thresholds). + +### Files Modified (Tests) +- **DynamicAgentToolsTest** (+25 tests): initialMessage flow, extractResponse all branches, blank params, empty allow-lists, retain=false, general exceptions +- **TaskListParserTest** (+22 tests): all JSON key aliases, null/empty members, markdown formats, long text truncation, null displayName safety +- **SharedTaskListTest** (+12 tests): findTasksForAgent(null), wrong status transitions, nonexistent ID exceptions, failTask from various states, setTasks(null) +- **AgentGroupConfigurationTest** (+12 tests): LifecyclePolicy toJson/fromJson, TaskDefinition constructors, DiscussionPhase requiresApproval + +### Notes +- Local `mvnw verify` shows 0.89/0.78 because ITs are skipped. CI runs `-DskipITs=false` → exceeds thresholds. +- Total test count: 9,573 (0 failures, 0 errors) + +--- + +## 🔧 Dynamic Agent System — Critical Code Review Fixes (2026-06-25) + + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** 3-reviewer code review uncovered 6 critical bugs and 8 medium issues. All critical and key medium issues fixed. + +### Critical Fixes +- **C1: Shared tracking lists** — `AgentOrchestrator` was creating separate `createdAgentIds`/`retainedAgentIds` per whitelist tool call. TeardownAgentTool couldn't see agents created by CreateSubAgentTool. Fixed: shared lists created once, passed to all tools. +- **C2: Retain flag non-functional** — `CreateSubAgentTool` accepted `retain=true` but never populated `retainedAgentIds`. Agents were auto-deleted despite LLM requesting retention. Fixed: wired `Set retainedAgentIds` to constructor + `retainedAgentIds.add(agentId)` when retain=true. +- **C3: Double quota counting** — `CreateSubAgentTool` called `acquireConversationSlot()` then `startConversation()` also called it internally. Each creation burned 2 quota slots. Fixed: removed explicit quota call from tool. +- **C4: Transcript race condition** — `GroupConversation.transcript` was a plain `ArrayList` accessed from parallel virtual threads. Fixed: `Collections.synchronizedList(new ArrayList<>())` + null-safe setter. +- **C5: Dead ERROR detection** — `ConverseWithAgentTool.extractResponse()` returned `""` instead of `null`, making `response == null` check dead code. Fixed: returns `null` for empty/missing outputs. +- **C6: Zero test coverage** — `ConverseWithAgentTool` had 154 lines of untested code. Added 8 tests covering new conversation, existing conversation, validation, timeout, error state, empty response. + +### Medium Fixes +- **M1: LifecyclePolicy enum** — `lifecyclePolicy` changed from `String` to `LifecyclePolicy` enum with `@JsonValue`/`@JsonCreator` for kebab-case JSON. Typos now fail at deserialization instead of silently skipping cleanup. +- **M2: synchronizedList streaming** — `findMemberIncludingDynamic()` now wraps `findMember(dynamicMembers)` in `synchronized(dynamicMembers)` block. +- **M3: Cycle detection** — `SharedTaskList.detectCycles()` now called after task list dependency resolution. Circular deps throw `GroupDiscussionException` fail-fast. +- **M5: unretainAgent()** — New `@Tool` method on `TeardownAgentTool` to remove retention flags. +- **M6: Agent removal after teardown** — `createdAgentIds.remove(agentId)` after successful undeploy, so counter accurately reflects active agents. +- **M10: Case-insensitive guardrails** — Provider/model allow-list checks now use `equalsIgnoreCase()`. + +### Test Updates +- `DynamicAgentToolsTest`: +8 ConverseWithAgentTool tests, updated quota test, updated enum assertions +- `GroupConversationTest`: Updated enum count assertions (TranscriptEntryType 11→14, GroupConversationState 5→6) +- **9,486 tests pass, 0 failures** + +--- + +## ✨ Dynamic Agent System — Create, Recruit, Delegate (2026-06-25) + + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** LLM agents in TASK_FORCE group conversations can now dynamically create, recruit, converse with, and teardown other agents at runtime. This enables agentic patterns where a moderator or specialist agent can spin up sub-agents on-the-fly to accomplish tasks. + +### Config Model +- **`DynamicAgentConfig`** — new inner class on `AgentGroupConfiguration` with config switches for creation, recruitment, delegation, guardrails (provider/model whitelists, per-discussion caps), and lifecycle policy (ephemeral/keep-deployed/undeploy-only/agent-decides) +- **`GroupConversation`** — added `dynamicMembers`, `createdAgentIds`, `retainedAgentIds` fields for runtime tracking + +### 4 LLM Tools (all `@Vetoed`, per-invocation constructed) +- **`CreateSubAgentTool`** — creates + deploys agent via `AgentSetupService`, quota-gated, guardrail-validated, optional initial message +- **`ConverseWithAgentTool`** — send messages to any deployed agent, supports multi-turn via conversationId +- **`FindAgentsByCapabilityTool`** — discover agents by skill via `CapabilityRegistryService` +- **`TeardownAgentTool`** — undeploy/delete created agents + `retainAgent` for lifecycle override + +### Wiring +- `AgentOrchestrator` + `LlmTask` — 5 new CDI dependencies, whitelist-gated tool names: `create_sub_agent`, `converse_with_agent`, `find_agents_by_capability`, `teardown_agent` +- `GroupConversationService` — `findMemberIncludingDynamic()` for task assignment to dynamic members, `cleanupEphemeralAgents()` in finally block with lifecycle policy enforcement + +### Tests +- **`DynamicAgentToolsTest`** — 22 tests: CreateSubAgent (8), FindAgents (4), Teardown (5), DynamicAgentConfig (2), GroupConversation fields (6) +- All existing test files updated for new constructor signatures (11 files) + +--- + +## 🐛 Fix: Tenant Quota Enforcement in Group Conversations (2026-06-25) + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** `QuotaExceededException` from `ConversationService` was being silently caught and treated as a per-agent skip/retry. Now detected at 4 levels and causes immediate abort — prevents burning N round-trips when quota is exhausted. + +- `executeAgentTurn` → `startConversation()`: immediate `GroupDiscussionException` +- `executeAgentTurn` → `say()`: unwrap from `ExecutionException`, abort (bypasses retry policy) +- Task execution loop: quota error exits the agent's `CompletableFuture` immediately +- Parallel phase: quota propagates through `CompletionException`, cancels remaining futures +- Review fix: quota errors in task loop now propagate regardless of `onAgentFailure` policy (was silently lost with SKIP policy) +- +3 regression tests (startConversation quota, say() quota, no-retry-even-with-RETRY-policy). Total: 112 tests, 0 failures. + +--- + +## 🐛 Fix: Final Review — Duplicate Task Bug, Regression Tests (2026-06-25) + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** Second review pass found 3 remaining issues (1 CRITICAL, 1 MEDIUM, 1 dead code). All fixed. Added comprehensive regression tests. + +- **C1-final**: `addTask→updateTask` — pre-configured dependency resolution was APPENDING tasks with same ID instead of REPLACING, silently breaking dependency ordering +- **M1-final**: `setMemberConversationIds` defensively wraps in `ConcurrentHashMap` (MongoDB deserialization was replacing with `LinkedHashMap`) +- **Dead code**: Removed unused `snapshotTranscript` from `executeTaskExecutionPhase` +- **New**: `SharedTaskList.updateTask()` public synchronized method +- **Regression tests**: +20 tests covering `resolveTaskAssignment` (7), `tryParseVerificationJson` (6), `handleTaskFailure` (2), `setMemberConversationIds` (2), `updateTask` (3). Total: 109 tests, 0 failures. + +--- + +## 🐛 Fix: TASK_FORCE Code Review — Thread Safety, Verification Parser, Error Handling (2026-06-25) + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** Three-pass code review identified 4 CRITICAL, 6 HIGH, and 4 MEDIUM issues. All fixed. + +### Critical Fixes (C1–C4) +- **Thread safety**: All `SharedTaskList` public methods now `synchronized` — prevents race conditions during parallel EXECUTE phase +- **ConcurrentHashMap**: `GroupConversation.memberConversationIds` changed from `LinkedHashMap` to `ConcurrentHashMap` +- **Dependency resolution**: Pre-configured `TaskDefinition.dependsOn` subjects now resolved to actual task IDs (was silently dropped) +- **Null guard**: `resolveTaskAssignment` null returns no longer crash `assignTask` + +### High Fixes (H1–H6) +- **Transcript snapshot**: EXECUTE phase now takes `List.copyOf(gc.getTranscript())` before launching parallel futures (consistent with `executeParallelPhase`) +- **Timeout semantics**: Changed from `timeout × agentCount` to `timeout × maxTasksPerAgent` (agents run in parallel, tasks per agent are sequential) +- **Round-robin assignment**: `resolveTaskAssignment("ALL")` now distributes evenly across non-moderator members (was always picking first) +- **Verification parser**: Dedicated JSON parser reads `passed` boolean directly (was using heuristic `contains("fail")`) +- **IllegalStateException**: Now caught alongside `GroupDiscussionException` in parallel EXECUTE lambda +- **Error events**: New `handleTaskFailure()` method emits transcript entry + SSE event for failed tasks + +### Medium Fixes (M1–M4) +- **Slack**: `TASK_FORCE` added to `EXPANDED_STYLES` set +- **Cycle detection**: Changed from `ArrayList.contains()` O(n) to `HashSet.contains()` O(1) +- **Fallback**: `singleTaskFallback` now preserves LLM output as task description (was discarding it) +- **HITL placeholders**: `BLOCKED` and `AWAITING_APPROVAL` statuses documented as Phase 9b placeholders + +### Documentation Updates (6 files) +- `architecture.md`, `group-conversations.md`, `README.md`, `AGENTS.md`, `mcp-server.md`, `slack-integration.md`, `HANDOFF.md` — all updated from "5 styles" to "6 styles" with TASK_FORCE entries + +### New Tests (+18 tests) +- `SharedTaskListTest`: +11 tests (null findById, nonexistent IDs, verified deps, multiple deps, self-ref cycles, defensive copy, concurrent stress) +- `TaskListParserTest`: +7 tests (empty array, code-fenced JSON, empty members, missing fields, round-robin, tier-3 output preservation) + +--- + +## ✨ Feature: TASK_FORCE Group Orchestration — Collaborative Task Accomplishment (2026-06-25) + +**Repo:** EDDI (`feat/group-task-orchestration`) +**What changed:** Added a new `TASK_FORCE` discussion style to group conversations. Instead of debating, agents collaborate to accomplish concrete tasks together via a PLAN → EXECUTE → VERIFY → SYNTHESIS pipeline. + +### Key Design Decisions + +1. **Config-driven**: Tasks can be pre-configured in `AgentGroupConfiguration.tasks[]` (skips PLAN phase) or dynamically generated by the LLM via `TaskListParser` (three-tier fallback: JSON → Markdown → single task). +2. **Reuses existing infrastructure**: Task execution goes through normal agent pipelines. No new REST endpoints. +3. **State embedded in GroupConversation**: `SharedTaskList` is a field on `GroupConversation`, persisted as part of the MongoDB document. +4. **HITL forward-compatible**: `AWAITING_APPROVAL` state added to both `GroupConversationState` and `TaskStatus` for Phase 9b. +5. **Parallel execution**: Tasks for different agents run in parallel; tasks for the same agent run sequentially. + +### Files Changed (4 new, 12 modified) + +- **New**: `SharedTaskList.java`, `TaskListParser.java`, `SharedTaskListTest.java` (18 tests), `TaskListParserTest.java` (12 tests) +- **Model**: `AgentGroupConfiguration.java` (TASK_FORCE style + enums), `GroupConversation.java` (taskList field + entry types) +- **Orchestration**: `GroupConversationService.java` (~400 LOC task phase logic), `DiscussionStylePresets.java` (expansion + templates) +- **API**: `GroupConversationEventSink.java`, `IGroupConversationService.java`, `RestGroupConversation.java`, `RestAgentGroupStore.java`, `McpGroupTools.java`, `SlackGroupDiscussionListener.java` +- **Tests**: `DiscussionStylePresetsTest.java` (+5 tests), `McpGroupToolsTest.java` (fixed for new param) + --- ## 🐛 Fix: Swagger UI CSP Regression — Duplicate Header Causes Inline Script Block (2026-06-23) + **Repo:** EDDI (`fix/swagger-csp-duplicate-header`) **What changed:** Swagger UI showed a blank page on Docker with `Content-Security-Policy` blocking inline scripts (`script-src-elem` violation). diff --git a/docs/group-conversations.md b/docs/group-conversations.md index 4ef22cf2fb..47b08bede6 100644 --- a/docs/group-conversations.md +++ b/docs/group-conversations.md @@ -15,6 +15,7 @@ Group Conversations enable multiple agents to discuss a question. Each agent par | `DEVIL_ADVOCATE` | Opinion → Challenge → Defense → Synthesis | Risk assessment, stress-testing | | `DELPHI` | Anonymous rounds → convergence → Synthesis | Forecasting, reducing groupthink | | `DEBATE` | Pro → Con → Rebuttals → Judge | Trade-off analysis, comparisons | +| `TASK_FORCE` | Plan → Execute → Verify → Synthesis | Structured task decomposition, parallel execution | | `CUSTOM` | Define your own phases | Any workflow | ## Quick Start (MCP) @@ -144,6 +145,9 @@ For full control, define phases directly: | `DEFENSE` | Defend position against challenges | | `ARGUE` | Present argument for a side (debate) | | `REBUTTAL` | Counter opposing arguments | +| `PLAN` | Decompose the question into sub-tasks | +| `EXECUTE` | Work on assigned sub-task | +| `VERIFY` | Review and validate another member's work | | `SYNTHESIS` | Moderator produces balanced conclusion | ### Context Scopes @@ -155,6 +159,126 @@ For full control, define phases directly: | `LAST_PHASE` | Only the previous phase's entries | | `ANONYMOUS` | Previous entries with speaker names removed | | `OWN_FEEDBACK` | Only feedback addressed to this agent | +| `TASK_ONLY` | Only this agent's assigned task from the plan | +| `TASK_WITH_DEPS` | Assigned task plus outputs from dependency tasks | + +### TASK_FORCE Configuration + +The TASK_FORCE style uses a 4-phase pipeline: **Plan → Execute → Verify → Synthesize**. + +1. **PLAN** — The moderator decomposes the goal into actionable tasks and assigns each to an agent +2. **EXECUTE** — Agents execute their assigned tasks in parallel (each sees only `TASK_ONLY` or `TASK_WITH_DEPS` context) +3. **VERIFY** — The moderator reviews each task result against the original goal +4. **SYNTHESIS** — The moderator combines all verified results into a coherent final deliverable + +#### Pre-Configured Tasks + +Pass a `tasks` array to skip the PLAN phase entirely — useful for deterministic, repeatable workflows: + +```json +{ + "name": "Documentation Team", + "style": "TASK_FORCE", + "moderatorAgentId": "moderator-id", + "members": [ + {"agentId": "researcher-id", "displayName": "Researcher"}, + {"agentId": "writer-id", "displayName": "Writer"} + ], + "tasks": [ + { + "subject": "Research topic", + "description": "Research the key trends and data points.", + "assignToRole": "Researcher", + "priority": 0 + }, + { + "subject": "Write article", + "description": "Using the research findings, write a 500-word article.", + "assignToRole": "Writer", + "dependsOn": ["Research topic"], + "priority": 1 + } + ] +} +``` + +When `tasks` is provided, the system posts `[System] "Pre-configured task plan: N tasks"` instead of invoking the moderator's LLM. + +#### Task Dependencies + +Use `dependsOn` to create sequential execution chains. Each entry references a task `subject`: + +- Tasks with no dependencies execute in **parallel** +- Tasks with dependencies wait for their predecessors to complete +- Dependent tasks receive their predecessor's output via the `TASK_WITH_DEPS` context scope +- **Cycle detection** prevents circular dependency chains (fails fast at planning time) + +#### Task Statuses + +| Status | Meaning | +|---|---| +| `PENDING` | Waiting for dependencies or execution | +| `ASSIGNED` | Assigned to an agent, waiting to start | +| `IN_PROGRESS` | Currently being executed by an agent | +| `COMPLETED` | Agent produced output | +| `VERIFIED` | Moderator verified the result | +| `FAILED` | Agent or verification failed | + +### Dynamic Agents + +During TASK_FORCE (or any group) discussions, agents with the appropriate LLM tools can **create, recruit, and delegate to new agents at runtime**: + +| Tool | Purpose | +|---|---| +| `CreateSubAgentTool` | Create a new ephemeral agent with a specific system prompt | +| `ConverseWithAgentTool` | Delegate a sub-task to an existing deployed agent | +| `FindAgentsByCapabilityTool` | Discover agents by capability keywords | +| `TeardownAgentTool` | Clean up dynamically created agents | + +#### DynamicAgentConfig + +Guardrails for dynamic agent creation are configured per-group via `AgentGroupConfiguration.dynamicAgents`: + +```json +{ + "dynamicAgents": { + "enabled": true, + "allowCreation": true, + "allowRecruitment": true, + "allowDelegation": true, + "maxCreatedAgentsPerDiscussion": 5, + "maxRecruitedAgentsPerDiscussion": 10, + "maxDelegationsPerTask": 3, + "lifecyclePolicy": "ephemeral", + "inheritParentModel": true, + "allowedProviders": ["anthropic", "openai"], + "allowedModels": { + "anthropic": ["claude-sonnet-4-6"], + "openai": ["gpt-4o"] + } + } +} +``` + +| Setting | Default | Purpose | +|---|---|---| +| `enabled` | `false` | Master switch for dynamic agent capabilities | +| `allowCreation` | `false` | Allow creating new agents (vs. only recruiting existing) | +| `allowRecruitment` | `false` | Allow recruiting already-deployed agents into the discussion | +| `allowDelegation` | `true` | Allow delegating sub-tasks to other agents | +| `maxCreatedAgentsPerDiscussion` | `5` | Cap on new agents created per discussion | +| `maxRecruitedAgentsPerDiscussion` | `10` | Cap on recruited agents per discussion | +| `maxDelegationsPerTask` | `3` | Cap on delegations per task | +| `lifecyclePolicy` | `EPHEMERAL` | `EPHEMERAL`, `KEEP_DEPLOYED`, `UNDEPLOY_ONLY`, or `AGENT_DECIDES` | +| `inheritParentModel` | `true` | Created agents inherit the parent agent's model | +| `allowedProviders` | `null` (any) | Whitelist of LLM providers | +| `allowedModels` | `null` (any) | Per-provider model whitelist | + +Dynamic agents are tracked in `GroupConversation.dynamicMembers`, `createdAgentIds`, and `retainedAgentIds`. + +### Tenant Quota Enforcement + +If tenant quotas are enabled, `QuotaExceededException` is propagated regardless of the group's `onAgentFailure` policy — quota violations always abort the discussion to prevent runaway resource consumption. ## Protocol Configuration @@ -203,7 +327,9 @@ For full control, define phases directly: | `delete_group` | Delete group config | | `discuss_with_group` | Start discussion, return transcript | | `read_group_conversation` | Read conversation transcript | -| `list_group_conversations` | List past discussions | +| `list_group_conversations` | List past discussions for a group, with state and timestamps | +| `start_group_discussion` | Start a discussion asynchronously (returns immediately). Poll with `read_group_conversation` | +| `delete_group_conversation` | Delete a group conversation and cascade-delete all member conversations | ## Slack Integration @@ -229,6 +355,7 @@ All discussion styles use the same rendering pattern in Slack: | **DEVIL_ADVOCATE** | Agent posts → Challenger threads challenges → Agent threads defense → Synthesis | | **DEBATE** | PRO agent posts → CON agent posts → Rebuttals thread under opponents → Judge synthesizes | | **DELPHI** | Round 1 agents post → Round 2 agents post (convergence) → Synthesis | +| **TASK_FORCE** | Moderator posts plan → Agents post task results → Verifiers thread under targets → Synthesis | ### Trigger Keywords diff --git a/docs/mcp-server.md b/docs/mcp-server.md index 171575ad73..de4139db18 100644 --- a/docs/mcp-server.md +++ b/docs/mcp-server.md @@ -10,7 +10,7 @@ EDDI uses **Streamable HTTP** transport, served by the Quarkus MCP Server extens | --------------------------- | ------------------------------------- | | `http://localhost:7070/mcp` | MCP server endpoint (default + admin) | -## Available Tools (48) +## Available Tools (55) ### Conversation Tools (11) @@ -81,22 +81,34 @@ EDDI uses **Streamable HTTP** transport, served by the Quarkus MCP Server extens | `fire_schedule_now` | Manually trigger a schedule fire immediately. Useful for testing or one-off executions | | `retry_failed_schedule` | Re-queue a dead-lettered schedule for another fire attempt after fixing the cause of failure | -### Group Conversation Tools (9) +### Group Conversation Tools (11) | Tool | Description | | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `describe_discussion_styles` | Rich descriptions of all 5 discussion styles with phase flows, member roles, and use cases | +| `describe_discussion_styles` | Rich descriptions of all 6 discussion styles with phase flows, member roles, and use cases | | `list_groups` | List all group configurations with name, style, member count | | `read_group` | Read a group configuration's full details | -| `create_group` | Create a group (members, moderator, style, roles, member types). Supports nested groups via `memberTypes=GROUP` | +| `create_group` | Create a group (members, moderator, style, roles, member types, tasks). Supports nested groups via `memberTypes=GROUP` and pre-configured TASK_FORCE tasks via `tasks` param | | `update_group` | Update a group configuration (full JSON replacement) | | `delete_group` | Delete a group configuration | | `discuss_with_group` | Start a multi-agent discussion on a question. Returns full transcript + synthesized answer | | `read_group_conversation` | Read a group conversation transcript | | `list_group_conversations` | List past group discussions for a group, with state and timestamps | +| `start_group_discussion` | Start a discussion asynchronously (returns immediately with groupConversationId). Poll with `read_group_conversation` | +| `delete_group_conversation` | Delete a group conversation and cascade-delete all member conversations | See [Group Conversations](group-conversations.md) for full style details, custom phases, and nested groups. +### Channel Integration Tools (5) + +| Tool | Description | +| ------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `list_channel_integrations` | List all channel integrations with name, type, and target count | +| `read_channel_integration` | Read a channel integration's full configuration | +| `create_channel_integration` | Create a new channel integration (Slack, Teams, etc.) with platform config and agent targets | +| `update_channel_integration` | Update an existing channel integration | +| `delete_channel_integration` | Delete a channel integration (soft or permanent) | + ## MCP Resources EDDI also exposes its documentation as MCP **resources**, allowing AI agents to browse and read the docs programmatically. diff --git a/docs/slack-integration.md b/docs/slack-integration.md index 9bfab71563..f12b5a6bab 100644 --- a/docs/slack-integration.md +++ b/docs/slack-integration.md @@ -276,6 +276,18 @@ Each style produces a distinct phase flow, but all use the same header+thread UX | **DEVIL'S ADVOCATE** | Opinion → Challenge → Defense → Synthesis | Challenger threads under the original agent's header | | **DEBATE** | Pro Arguments → Con Arguments → Rebuttals → Judge | PRO and CON agents post separate headers; rebuttals thread under opponents | | **DELPHI** | Anonymous Round 1 → Round 2 (convergence) → Synthesis | Each round's opinions post as headers; convergence visible across rounds | +| **TASK FORCE** | Plan → Execute → Verify → Synthesis | Moderator posts plan; agents post task results; verifiers thread under targets; synthesis | + +#### TASK_FORCE Events in Slack + +The `SlackGroupDiscussionListener` handles TASK_FORCE-specific events: + +| Event | Slack Rendering | +|-------|----------------| +| `onTaskPlanCreated` | Posts "📝 *Task plan created*" (or "pre-configured") with numbered task list and assignments | +| `onSpeakerComplete` (EXECUTE phase) | Each agent's task result posts as a channel-level header + thread reply | +| `onTaskVerified` | Posts ✅/❌ with task subject, pass/fail status, and moderator feedback | +| `onGroupComplete` | Posts "📋 *Panel Synthesis*" with preview + full content in thread | #### Peer Feedback Threading diff --git a/helm/eddi/Chart.yaml b/helm/eddi/Chart.yaml index 182468d832..fc6123ba81 100644 --- a/helm/eddi/Chart.yaml +++ b/helm/eddi/Chart.yaml @@ -6,7 +6,7 @@ description: >- and integrate with LLM providers via a unified REST API. type: application version: 1.0.0 -appVersion: "6.1.1" +appVersion: "6.2.0" home: https://eddi.labs.ai sources: - https://github.com/labsai/EDDI diff --git a/k8s/base/eddi-deployment.yaml b/k8s/base/eddi-deployment.yaml index b78d94ee2a..ef1c11d61e 100644 --- a/k8s/base/eddi-deployment.yaml +++ b/k8s/base/eddi-deployment.yaml @@ -5,7 +5,7 @@ metadata: name: eddi labels: app.kubernetes.io/name: eddi - app.kubernetes.io/version: "6.1.1" + app.kubernetes.io/version: "6.2.0" app.kubernetes.io/component: server app.kubernetes.io/part-of: eddi spec: @@ -23,7 +23,7 @@ spec: metadata: labels: app.kubernetes.io/name: eddi - app.kubernetes.io/version: "6.1.1" + app.kubernetes.io/version: "6.2.0" app.kubernetes.io/component: server app.kubernetes.io/part-of: eddi annotations: diff --git a/k8s/quickstart.yaml b/k8s/quickstart.yaml index 19e663b860..28efbc4170 100644 --- a/k8s/quickstart.yaml +++ b/k8s/quickstart.yaml @@ -169,7 +169,7 @@ metadata: namespace: eddi labels: app.kubernetes.io/name: eddi - app.kubernetes.io/version: "6.1.1" + app.kubernetes.io/version: "6.2.0" app.kubernetes.io/component: server app.kubernetes.io/part-of: eddi spec: @@ -187,7 +187,7 @@ spec: metadata: labels: app.kubernetes.io/name: eddi - app.kubernetes.io/version: "6.1.1" + app.kubernetes.io/version: "6.2.0" app.kubernetes.io/component: server app.kubernetes.io/part-of: eddi annotations: diff --git a/pom.xml b/pom.xml index 3bb31d4f70..d4ff380b2c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 ai.labs eddi - 6.1.1 + 6.2.0 3.15.0 25 diff --git a/src/main/java/ai/labs/eddi/configs/OpenApiConfig.java b/src/main/java/ai/labs/eddi/configs/OpenApiConfig.java index 295c45782b..3319e2afee 100644 --- a/src/main/java/ai/labs/eddi/configs/OpenApiConfig.java +++ b/src/main/java/ai/labs/eddi/configs/OpenApiConfig.java @@ -19,7 +19,7 @@ * * @since 6.0.0 */ -@OpenAPIDefinition(info = @Info(title = "EDDI API", version = "6.1.1"), tags = { +@OpenAPIDefinition(info = @Info(title = "EDDI API", version = "6.2.0"), tags = { // ── Agents ─────────────────────────────────────────────────────── @Tag(name = "Agents", description = "Agent configuration CRUD"), @Tag(name = "Agents / Administration", description = "Deploy, undeploy, trigger, and monitor agents"), diff --git a/src/main/java/ai/labs/eddi/configs/groups/model/AgentGroupConfiguration.java b/src/main/java/ai/labs/eddi/configs/groups/model/AgentGroupConfiguration.java index 19d965a2bb..d73b9c3bc9 100644 --- a/src/main/java/ai/labs/eddi/configs/groups/model/AgentGroupConfiguration.java +++ b/src/main/java/ai/labs/eddi/configs/groups/model/AgentGroupConfiguration.java @@ -6,6 +6,8 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.Objects; /** * Versioned configuration for a group of agents that can participate in @@ -23,6 +25,10 @@ public class AgentGroupConfiguration { private int maxRounds = 2; private List phases; private ProtocolConfig protocol; + /** Pre-configured task list. If non-empty, skips the PLAN phase. */ + private List tasks; + /** Dynamic agent creation and recruitment configuration. */ + private DynamicAgentConfig dynamicAgents; /** * A member of the group. Members can be individual agents or nested groups. @@ -70,6 +76,8 @@ public enum DiscussionStyle { DELPHI, /** Pro team argues → Con team argues → rebuttals → judge decides. */ DEBATE, + /** Collaborative task accomplishment: plan → execute → verify → synthesis. */ + TASK_FORCE, /** User defines phases manually. */ CUSTOM } @@ -85,20 +93,34 @@ public enum DiscussionStyle { * "ROLE:<roleName>" (e.g. "ROLE:DEVIL_ADVOCATE"). */ public record DiscussionPhase(String name, PhaseType type, String participants, TurnOrder turnOrder, ContextScope contextScope, - boolean targetEachPeer, String inputTemplate, int repeats) { + boolean targetEachPeer, String inputTemplate, int repeats, boolean requiresApproval) { /** * Convenience constructor with defaults: participants=ALL, * turnOrder=SEQUENTIAL, contextScope=FULL, no peer targeting, no custom - * template, 1 repeat. + * template, 1 repeat, no approval required. */ public DiscussionPhase(String name, PhaseType type) { - this(name, type, "ALL", TurnOrder.SEQUENTIAL, ContextScope.FULL, false, null, 1); + this(name, type, "ALL", TurnOrder.SEQUENTIAL, ContextScope.FULL, false, null, 1, false); + } + + /** + * Backward-compatible constructor without requiresApproval. + */ + public DiscussionPhase(String name, PhaseType type, String participants, TurnOrder turnOrder, ContextScope contextScope, + boolean targetEachPeer, String inputTemplate, int repeats) { + this(name, type, participants, turnOrder, contextScope, targetEachPeer, inputTemplate, repeats, false); } } public enum PhaseType { - OPINION, CRITIQUE, REVISION, CHALLENGE, DEFENSE, ARGUE, REBUTTAL, SYNTHESIS + OPINION, CRITIQUE, REVISION, CHALLENGE, DEFENSE, ARGUE, REBUTTAL, SYNTHESIS, + /** Task decomposition and assignment. */ + PLAN, + /** Task execution by assigned agents. */ + EXECUTE, + /** Verification of task results. */ + VERIFY } public enum TurnOrder { @@ -118,7 +140,11 @@ public enum ContextScope { /** Agent sees content from prior phases but not who said it. */ ANONYMOUS, /** Agent sees only entries targeted AT them (for REVISION phase). */ - OWN_FEEDBACK + OWN_FEEDBACK, + /** Agent sees only its assigned task description. */ + TASK_ONLY, + /** Agent sees its task plus results of dependency tasks. */ + TASK_WITH_DEPS } // --- Protocol (error handling / timeouts) --- @@ -227,4 +253,185 @@ public ProtocolConfig getProtocol() { public void setProtocol(ProtocolConfig protocol) { this.protocol = protocol; } + + public List getTasks() { + return tasks; + } + + public void setTasks(List tasks) { + this.tasks = tasks; + } + + public DynamicAgentConfig getDynamicAgents() { + return dynamicAgents; + } + + public void setDynamicAgents(DynamicAgentConfig dynamicAgents) { + this.dynamicAgents = dynamicAgents; + } + + // --- Task Definition --- + + /** + * A pre-configured task for config-driven task orchestration. When tasks are + * pre-defined here, the PLAN phase is skipped and these tasks are used + * directly. + * + * @param subject + * short task title + * @param description + * detailed instructions for the assigned agent + * @param assignToRole + * "ALL", "ROLE:", or specific agentId + * @param dependsOn + * subjects of tasks that must complete first + * @param priority + * 0 = highest + */ + public record TaskDefinition( + String subject, + String description, + String assignToRole, + List dependsOn, + int priority) { + + public TaskDefinition(String subject, String description) { + this(subject, description, "ALL", List.of(), 0); + } + + public TaskDefinition { + Objects.requireNonNull(subject, "Task subject must not be null"); + Objects.requireNonNull(description, "Task description must not be null"); + if (dependsOn == null) { + dependsOn = List.of(); + } + if (assignToRole == null) { + assignToRole = "ALL"; + } + } + } + + // --- Dynamic Agent Configuration --- + + /** + * Lifecycle policy for agents created during a discussion. + */ + public enum LifecyclePolicy { + EPHEMERAL, KEEP_DEPLOYED, UNDEPLOY_ONLY, AGENT_DECIDES; + + @com.fasterxml.jackson.annotation.JsonValue + public String toJson() { + return name().toLowerCase().replace('_', '-'); + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecyclePolicy fromJson(String value) { + if (value == null) + return EPHEMERAL; + return valueOf(value.toUpperCase().replace('-', '_')); + } + } + + /** + * Configuration for dynamic agent creation, recruitment, and delegation during + * group discussions. Controls guardrails, allowed providers/models, and + * lifecycle policy for dynamically created agents. + */ + public static class DynamicAgentConfig { + private boolean enabled; + private boolean allowCreation; + private boolean allowRecruitment; + private boolean allowDelegation = true; + + private int maxCreatedAgentsPerDiscussion = 5; + private int maxRecruitedAgentsPerDiscussion = 10; + private int maxDelegationsPerTask = 3; + + /** Allowed LLM providers for created agents. Null = inherit parent. */ + private List allowedProviders; + /** + * Allowed models per provider. Keys are provider names, values are lists of + * model names. Null = inherit parent model. + */ + private Map> allowedModels; + private boolean inheritParentModel = true; + + /** + * Lifecycle policy for agents created during the discussion. + *
    + *
  • {@code ephemeral} — auto-delete after discussion ends
  • + *
  • {@code keep-deployed} — keep deployed for future use
  • + *
  • {@code undeploy-only} — undeploy but keep config
  • + *
  • {@code agent-decides} — default ephemeral, but agent can retain
  • + *
+ */ + private LifecyclePolicy lifecyclePolicy = LifecyclePolicy.EPHEMERAL; + + public boolean isEnabled() { + return enabled; + } + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + public boolean isAllowCreation() { + return allowCreation; + } + public void setAllowCreation(boolean allowCreation) { + this.allowCreation = allowCreation; + } + public boolean isAllowRecruitment() { + return allowRecruitment; + } + public void setAllowRecruitment(boolean allowRecruitment) { + this.allowRecruitment = allowRecruitment; + } + public boolean isAllowDelegation() { + return allowDelegation; + } + public void setAllowDelegation(boolean allowDelegation) { + this.allowDelegation = allowDelegation; + } + public int getMaxCreatedAgentsPerDiscussion() { + return maxCreatedAgentsPerDiscussion; + } + public void setMaxCreatedAgentsPerDiscussion(int max) { + this.maxCreatedAgentsPerDiscussion = max; + } + public int getMaxRecruitedAgentsPerDiscussion() { + return maxRecruitedAgentsPerDiscussion; + } + public void setMaxRecruitedAgentsPerDiscussion(int max) { + this.maxRecruitedAgentsPerDiscussion = max; + } + public int getMaxDelegationsPerTask() { + return maxDelegationsPerTask; + } + public void setMaxDelegationsPerTask(int max) { + this.maxDelegationsPerTask = max; + } + public List getAllowedProviders() { + return allowedProviders; + } + public void setAllowedProviders(List allowedProviders) { + this.allowedProviders = allowedProviders; + } + public Map> getAllowedModels() { + return allowedModels; + } + public void setAllowedModels(Map> allowedModels) { + this.allowedModels = allowedModels; + } + public boolean isInheritParentModel() { + return inheritParentModel; + } + public void setInheritParentModel(boolean inheritParentModel) { + this.inheritParentModel = inheritParentModel; + } + public LifecyclePolicy getLifecyclePolicy() { + return lifecyclePolicy; + } + public void setLifecyclePolicy(LifecyclePolicy lifecyclePolicy) { + this.lifecyclePolicy = lifecyclePolicy != null ? lifecyclePolicy : LifecyclePolicy.EPHEMERAL; + } + } } diff --git a/src/main/java/ai/labs/eddi/configs/groups/model/DiscussionStylePresets.java b/src/main/java/ai/labs/eddi/configs/groups/model/DiscussionStylePresets.java index cee90dc5db..3f3d1b3efe 100644 --- a/src/main/java/ai/labs/eddi/configs/groups/model/DiscussionStylePresets.java +++ b/src/main/java/ai/labs/eddi/configs/groups/model/DiscussionStylePresets.java @@ -142,10 +142,90 @@ private DiscussionStylePresets() { As {displayName}, share your (updated) perspective. Consider the \ anonymous feedback but form your own independent judgment."""; + public static final String TEMPLATE_PLAN = """ + You are the project planner for a team of experts. + + GOAL: "{question}" + + TEAM MEMBERS: + {#for member in members} + - {member.displayName} (ID: {member.agentId}){#if member.capabilities}, skills: {member.capabilities}{/if} + {/for} + + Decompose this goal into concrete, actionable tasks. Assign each task to the most \ + suitable team member based on their expertise. Output a JSON array: + + ```json + [ + { + "subject": "Short task title", + "description": "Detailed instructions for the assigned agent", + "assignedTo": "agent-id or display-name", + "priority": 0 + } + ] + ``` + + Rules: + - Each task must be independently executable + - Assign tasks based on member expertise + - Keep tasks focused — one clear deliverable per task + - Aim for 2-6 tasks for most goals"""; + + public static final String TEMPLATE_EXECUTE = """ + You have been assigned the following task as part of a team effort. + + OVERALL GOAL: "{question}" + + YOUR TASK: {taskSubject} + {taskDescription} + + {#if dependencyResults} + PREREQUISITE RESULTS: + {#for dep in dependencyResults} + - {dep.subject}: {dep.result} + {/for} + {/if} + + Complete this task thoroughly. Provide your result as clear, actionable output."""; + + public static final String TEMPLATE_VERIFY = """ + You are reviewing the results of a collaborative task. + + ORIGINAL GOAL: "{question}" + + COMPLETED TASKS: + {#for task in completedTasks} + --- + TASK: {task.subject} + ASSIGNED TO: {task.assignedDisplayName} + DESCRIPTION: {task.description} + RESULT: {task.result} + --- + {/for} + + For each task, assess whether the result adequately addresses the task description \ + and contributes to the overall goal. Provide your assessment as JSON: + + ```json + [ + {"subject": "task title", "passed": true, "feedback": "assessment"} + ] + ```"""; + // Template lookup by phase type - private static final Map DEFAULT_TEMPLATES = Map.of(PhaseType.OPINION, TEMPLATE_OPINION_INDEPENDENT, PhaseType.CRITIQUE, - TEMPLATE_CRITIQUE, PhaseType.REVISION, TEMPLATE_REVISION, PhaseType.CHALLENGE, TEMPLATE_CHALLENGE, PhaseType.DEFENSE, TEMPLATE_DEFENSE, - PhaseType.ARGUE, TEMPLATE_ARGUE, PhaseType.REBUTTAL, TEMPLATE_REBUTTAL, PhaseType.SYNTHESIS, TEMPLATE_SYNTHESIS); + private static final Map DEFAULT_TEMPLATES = Map.ofEntries( + Map.entry(PhaseType.OPINION, TEMPLATE_OPINION_INDEPENDENT), + Map.entry(PhaseType.CRITIQUE, TEMPLATE_CRITIQUE), + Map.entry(PhaseType.REVISION, TEMPLATE_REVISION), + Map.entry(PhaseType.CHALLENGE, TEMPLATE_CHALLENGE), + Map.entry(PhaseType.DEFENSE, TEMPLATE_DEFENSE), + Map.entry(PhaseType.ARGUE, TEMPLATE_ARGUE), + Map.entry(PhaseType.REBUTTAL, TEMPLATE_REBUTTAL), + Map.entry(PhaseType.SYNTHESIS, TEMPLATE_SYNTHESIS), + Map.entry(PhaseType.PLAN, TEMPLATE_PLAN), + Map.entry(PhaseType.EXECUTE, TEMPLATE_EXECUTE), + Map.entry(PhaseType.VERIFY, TEMPLATE_VERIFY)); /** * Returns the default template for a given phase type. @@ -178,6 +258,7 @@ public static List expand(DiscussionStyle style, int maxRounds) case DEVIL_ADVOCATE -> devilAdvocate(); case DELPHI -> delphi(rounds); case DEBATE -> debate(); + case TASK_FORCE -> taskForce(); case CUSTOM -> List.of(); }; } @@ -250,4 +331,14 @@ private static List debate() { new DiscussionPhase("Rebuttal (Con)", PhaseType.REBUTTAL, "ROLE:CON", TurnOrder.SEQUENTIAL, ContextScope.FULL, false, null, 1), new DiscussionPhase("Judgment", PhaseType.SYNTHESIS, "MODERATOR", TurnOrder.SEQUENTIAL, ContextScope.FULL, false, null, 1)); } + + // --- TASK_FORCE --- + + private static List taskForce() { + return List.of( + new DiscussionPhase("Task Planning", PhaseType.PLAN, "MODERATOR", TurnOrder.SEQUENTIAL, ContextScope.FULL, false, null, 1), + new DiscussionPhase("Task Execution", PhaseType.EXECUTE, "ALL", TurnOrder.PARALLEL, ContextScope.TASK_ONLY, false, null, 1), + new DiscussionPhase("Result Verification", PhaseType.VERIFY, "MODERATOR", TurnOrder.SEQUENTIAL, ContextScope.FULL, false, null, 1), + new DiscussionPhase("Final Synthesis", PhaseType.SYNTHESIS, "MODERATOR", TurnOrder.SEQUENTIAL, ContextScope.FULL, false, null, 1)); + } } diff --git a/src/main/java/ai/labs/eddi/configs/groups/model/GroupConversation.java b/src/main/java/ai/labs/eddi/configs/groups/model/GroupConversation.java index 1d9ec58e70..225dc5deb5 100644 --- a/src/main/java/ai/labs/eddi/configs/groups/model/GroupConversation.java +++ b/src/main/java/ai/labs/eddi/configs/groups/model/GroupConversation.java @@ -4,11 +4,15 @@ */ package ai.labs.eddi.configs.groups.model; +import com.fasterxml.jackson.annotation.JsonIgnore; + import java.time.Instant; import java.util.ArrayList; -import java.util.LinkedHashMap; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; /** * Transcript record for a group conversation. Persisted with a single-version @@ -22,15 +26,31 @@ public class GroupConversation { private String userId; private GroupConversationState state; private String originalQuestion; - private List transcript = new ArrayList<>(); - private Map memberConversationIds = new LinkedHashMap<>(); + private List transcript = Collections.synchronizedList(new ArrayList<>()); + private Map memberConversationIds = new ConcurrentHashMap<>(); private int currentPhaseIndex; private String currentPhaseName; private String synthesizedAnswer; private int depth; + private SharedTaskList taskList; + /** Agents dynamically added during the discussion (recruited or created). */ + private List dynamicMembers = Collections.synchronizedList(new ArrayList<>()); + /** Agent IDs created during this discussion (for lifecycle cleanup). */ + private List createdAgentIds = Collections.synchronizedList(new ArrayList<>()); + /** Agent IDs explicitly retained by the creating agent (skip cleanup). */ + private Set retainedAgentIds = ConcurrentHashMap.newKeySet(); private Instant created; private Instant lastModified; + /** + * Transient reference to the group's dynamic agent configuration. Set by + * {@code GroupConversationService.executeDiscussion()} at the start of a + * discussion so that {@code executeAgentTurn()} can pass it to member agents + * via context. Never persisted to MongoDB or serialized to REST. + */ + @JsonIgnore + private transient AgentGroupConfiguration.DynamicAgentConfig dynamicAgentConfig; + /** * A single entry in the discussion transcript. Each entry records one agent's * contribution during a specific phase. @@ -95,11 +115,19 @@ public boolean hasEnvelopeData() { } public enum TranscriptEntryType { - QUESTION, OPINION, CRITIQUE, REVISION, CHALLENGE, DEFENSE, ARGUMENT, REBUTTAL, SYNTHESIS, ERROR, SKIPPED + QUESTION, OPINION, CRITIQUE, REVISION, CHALLENGE, DEFENSE, ARGUMENT, REBUTTAL, SYNTHESIS, ERROR, SKIPPED, + /** Task plan output from the PLAN phase. */ + PLAN, + /** Task execution result from the EXECUTE phase. */ + TASK_RESULT, + /** Verification assessment from the VERIFY phase. */ + VERIFICATION } public enum GroupConversationState { - CREATED, IN_PROGRESS, SYNTHESIZING, COMPLETED, FAILED + CREATED, IN_PROGRESS, SYNTHESIZING, COMPLETED, FAILED, + /** Paused for human approval — HITL foundation (Phase 9b). */ + AWAITING_APPROVAL } // --- Getters/Setters --- @@ -149,7 +177,9 @@ public List getTranscript() { } public void setTranscript(List transcript) { - this.transcript = transcript; + this.transcript = transcript != null + ? Collections.synchronizedList(new ArrayList<>(transcript)) + : Collections.synchronizedList(new ArrayList<>()); } public Map getMemberConversationIds() { @@ -157,7 +187,9 @@ public Map getMemberConversationIds() { } public void setMemberConversationIds(Map memberConversationIds) { - this.memberConversationIds = memberConversationIds; + this.memberConversationIds = memberConversationIds != null + ? new ConcurrentHashMap<>(memberConversationIds) + : new ConcurrentHashMap<>(); } public int getCurrentPhaseIndex() { @@ -207,4 +239,61 @@ public Instant getLastModified() { public void setLastModified(Instant lastModified) { this.lastModified = lastModified; } + + public SharedTaskList getTaskList() { + return taskList; + } + + public void setTaskList(SharedTaskList taskList) { + this.taskList = taskList; + } + + public List getDynamicMembers() { + return dynamicMembers; + } + + public void setDynamicMembers(List dynamicMembers) { + this.dynamicMembers = dynamicMembers != null + ? Collections.synchronizedList(new ArrayList<>(dynamicMembers)) + : Collections.synchronizedList(new ArrayList<>()); + } + + /** + * Add a dynamically recruited or created member to the conversation. + * Thread-safe. + */ + public void addDynamicMember(AgentGroupConfiguration.GroupMember member) { + dynamicMembers.add(member); + } + + public List getCreatedAgentIds() { + return createdAgentIds; + } + + public void setCreatedAgentIds(List createdAgentIds) { + this.createdAgentIds = createdAgentIds != null + ? Collections.synchronizedList(new ArrayList<>(createdAgentIds)) + : Collections.synchronizedList(new ArrayList<>()); + } + + public Set getRetainedAgentIds() { + return retainedAgentIds; + } + + public void setRetainedAgentIds(Set retainedAgentIds) { + Set newSet = ConcurrentHashMap.newKeySet(); + if (retainedAgentIds != null) { + newSet.addAll(retainedAgentIds); + } + this.retainedAgentIds = newSet; + } + + @JsonIgnore + public AgentGroupConfiguration.DynamicAgentConfig getDynamicAgentConfig() { + return dynamicAgentConfig; + } + + public void setDynamicAgentConfig(AgentGroupConfiguration.DynamicAgentConfig dynamicAgentConfig) { + this.dynamicAgentConfig = dynamicAgentConfig; + } } diff --git a/src/main/java/ai/labs/eddi/configs/groups/model/SharedTaskList.java b/src/main/java/ai/labs/eddi/configs/groups/model/SharedTaskList.java new file mode 100644 index 0000000000..10778bd3c2 --- /dev/null +++ b/src/main/java/ai/labs/eddi/configs/groups/model/SharedTaskList.java @@ -0,0 +1,371 @@ +/* + * Copyright EDDI contributors + * SPDX-License-Identifier: Apache-2.0 + */ +package ai.labs.eddi.configs.groups.model; + +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; + +/** + * Runtime task list for task-oriented group conversations. Embedded in + * {@link GroupConversation} — not a separate collection. + *

+ * Tracks tasks from planning through execution to verification, with + * dependency-aware queries and validated status transitions. + * + * @author ginccc + */ +public class SharedTaskList { + + private List tasks = new ArrayList<>(); + + /** + * A single task in the shared task list. + * + * @param id + * unique task identifier (UUID) + * @param subject + * short title + * @param description + * detailed task description + * @param status + * current status + * @param assignedAgentId + * agent or group responsible + * @param assignedDisplayName + * human-readable agent name + * @param dependsOnIds + * task IDs that must complete first + * @param result + * filled on completion + * @param verificationNote + * filled during VERIFY phase + * @param verified + * true if passed verification + * @param priority + * 0 = highest + * @param createdAt + * when this task was created + * @param completedAt + * when this task was completed + */ + public record TaskItem( + String id, + String subject, + String description, + TaskStatus status, + String assignedAgentId, + String assignedDisplayName, + List dependsOnIds, + String result, + String verificationNote, + boolean verified, + int priority, + Instant createdAt, + Instant completedAt) { + + /** + * Convenience constructor for creating a new pending task. + */ + public TaskItem(String subject, String description, int priority) { + this(UUID.randomUUID().toString(), subject, description, + TaskStatus.PENDING, null, null, List.of(), + null, null, false, priority, Instant.now(), null); + } + } + + /** + * Task lifecycle states. + *

+ * {@code BLOCKED} and {@code AWAITING_APPROVAL} are placeholders for Phase 9b + * (HITL — Human-in-the-Loop). They are recognized by {@link #failTask} as + * non-terminal but no code transitions into them yet. + */ + public enum TaskStatus { + PENDING, ASSIGNED, IN_PROGRESS, COMPLETED, VERIFIED, FAILED, + /** Phase 9b placeholder — task blocked by unmet dependency or resource. */ + BLOCKED, + /** Phase 9b placeholder — task requires human approval before proceeding. */ + AWAITING_APPROVAL + } + + // --- Query methods --- + + /** + * Tasks whose dependencies are all COMPLETED or VERIFIED and that are ready for + * execution (status is PENDING or ASSIGNED). + */ + public synchronized List findExecutableTasks() { + return tasks.stream() + .filter(t -> t.status() == TaskStatus.PENDING || t.status() == TaskStatus.ASSIGNED) + .filter(t -> t.dependsOnIds().isEmpty() || allDependenciesSatisfied(t)) + .toList(); + } + + /** + * Tasks assigned to a specific agent. + */ + public synchronized List findTasksForAgent(String agentId) { + if (agentId == null) { + return List.of(); + } + return tasks.stream() + .filter(t -> agentId.equals(t.assignedAgentId())) + .toList(); + } + + /** + * Check for circular dependencies. Returns the cycle path if found, or an empty + * list if the dependency graph is acyclic. + */ + public synchronized List detectCycles() { + // Simple DFS-based cycle detection + Set visited = new HashSet<>(); + List recursionStack = new ArrayList<>(); + + for (TaskItem task : tasks) { + List cycle = dfs(task.id(), visited, recursionStack); + if (!cycle.isEmpty()) { + return cycle; + } + } + return List.of(); + } + + /** + * All tasks regardless of status. + */ + public synchronized List all() { + return List.copyOf(tasks); + } + + /** + * Returns the number of tasks. + */ + public synchronized int size() { + return tasks.size(); + } + + /** + * Whether the task list is empty. + */ + public synchronized boolean isEmpty() { + return tasks.isEmpty(); + } + + /** + * Find a task by ID, or null if not found. + */ + public synchronized TaskItem findById(String taskId) { + if (taskId == null) { + return null; + } + return tasks.stream() + .filter(t -> t.id().equals(taskId)) + .findFirst() + .orElse(null); + } + + // --- Mutation methods --- + + /** + * Add a task to the list. Returns the added task. + */ + public synchronized TaskItem addTask(TaskItem task) { + tasks.add(task); + return task; + } + + /** + * Assign a task to an agent. Transitions PENDING → ASSIGNED. + * + * @throws IllegalStateException + * if the task is not in PENDING status + */ + public synchronized TaskItem assignTask(String taskId, String agentId, String displayName) { + TaskItem existing = requireTask(taskId); + requireStatus(existing, TaskStatus.PENDING, "assign"); + TaskItem updated = new TaskItem( + existing.id(), existing.subject(), existing.description(), + TaskStatus.ASSIGNED, agentId, displayName, + existing.dependsOnIds(), existing.result(), + existing.verificationNote(), existing.verified(), + existing.priority(), existing.createdAt(), existing.completedAt()); + replaceTask(taskId, updated); + return updated; + } + + /** + * Start a task. Transitions ASSIGNED → IN_PROGRESS. + * + * @throws IllegalStateException + * if the task is not in ASSIGNED status + */ + public synchronized TaskItem startTask(String taskId) { + TaskItem existing = requireTask(taskId); + requireStatus(existing, TaskStatus.ASSIGNED, "start"); + TaskItem updated = new TaskItem( + existing.id(), existing.subject(), existing.description(), + TaskStatus.IN_PROGRESS, existing.assignedAgentId(), existing.assignedDisplayName(), + existing.dependsOnIds(), existing.result(), + existing.verificationNote(), existing.verified(), + existing.priority(), existing.createdAt(), existing.completedAt()); + replaceTask(taskId, updated); + return updated; + } + + /** + * Complete a task with a result. Transitions IN_PROGRESS → COMPLETED. + * + * @throws IllegalStateException + * if the task is not in IN_PROGRESS status + */ + public synchronized TaskItem completeTask(String taskId, String result) { + TaskItem existing = requireTask(taskId); + requireStatus(existing, TaskStatus.IN_PROGRESS, "complete"); + TaskItem updated = new TaskItem( + existing.id(), existing.subject(), existing.description(), + TaskStatus.COMPLETED, existing.assignedAgentId(), existing.assignedDisplayName(), + existing.dependsOnIds(), result, + existing.verificationNote(), existing.verified(), + existing.priority(), existing.createdAt(), Instant.now()); + replaceTask(taskId, updated); + return updated; + } + + /** + * Verify a task. Transitions COMPLETED → VERIFIED (if passed) or FAILED. + */ + public synchronized TaskItem verifyTask(String taskId, boolean passed, String note) { + TaskItem existing = requireTask(taskId); + requireStatus(existing, TaskStatus.COMPLETED, "verify"); + TaskStatus newStatus = passed ? TaskStatus.VERIFIED : TaskStatus.FAILED; + TaskItem updated = new TaskItem( + existing.id(), existing.subject(), existing.description(), + newStatus, existing.assignedAgentId(), existing.assignedDisplayName(), + existing.dependsOnIds(), existing.result(), + note, passed, + existing.priority(), existing.createdAt(), existing.completedAt()); + replaceTask(taskId, updated); + return updated; + } + + /** + * Mark a task as failed. Any non-terminal status (not VERIFIED, not FAILED) can + * transition to FAILED. + */ + public synchronized TaskItem failTask(String taskId, String reason) { + TaskItem existing = requireTask(taskId); + if (existing.status() == TaskStatus.VERIFIED || existing.status() == TaskStatus.FAILED) { + throw new IllegalStateException( + "Cannot fail task '%s' — already in terminal status: %s" + .formatted(taskId, existing.status())); + } + TaskItem updated = new TaskItem( + existing.id(), existing.subject(), existing.description(), + TaskStatus.FAILED, existing.assignedAgentId(), existing.assignedDisplayName(), + existing.dependsOnIds(), existing.result(), + reason, false, + existing.priority(), existing.createdAt(), Instant.now()); + replaceTask(taskId, updated); + return updated; + } + + // --- Internal helpers --- + + private boolean allDependenciesSatisfied(TaskItem task) { + return task.dependsOnIds().stream().allMatch(depId -> { + TaskItem dep = findById(depId); + return dep != null && (dep.status() == TaskStatus.COMPLETED || dep.status() == TaskStatus.VERIFIED); + }); + } + + private TaskItem requireTask(String taskId) { + TaskItem task = findById(taskId); + if (task == null) { + throw new IllegalArgumentException("Task not found: " + taskId); + } + return task; + } + + private void requireStatus(TaskItem task, TaskStatus expected, String operation) { + if (task.status() != expected) { + throw new IllegalStateException( + "Cannot %s task '%s' — expected status %s but was %s" + .formatted(operation, task.id(), expected, task.status())); + } + } + + /** + * Replace a task with an updated version (same ID). Used for updating task + * metadata (e.g., adding dependency IDs) without changing status. + * + * @throws IllegalArgumentException + * if no task with the given ID exists + */ + public synchronized void updateTask(TaskItem replacement) { + boolean found = false; + for (int i = 0; i < tasks.size(); i++) { + if (tasks.get(i).id().equals(replacement.id())) { + tasks.set(i, replacement); + found = true; + break; + } + } + if (!found) { + throw new IllegalArgumentException("Task not found: " + replacement.id()); + } + } + + private void replaceTask(String taskId, TaskItem replacement) { + for (int i = 0; i < tasks.size(); i++) { + if (tasks.get(i).id().equals(taskId)) { + tasks.set(i, replacement); + return; + } + } + } + + private List dfs(String taskId, Set visited, List recursionStack) { + if (recursionStack.contains(taskId)) { + // Found a cycle — return the path + List cycle = new ArrayList<>(recursionStack.subList(recursionStack.indexOf(taskId), recursionStack.size())); + cycle.add(taskId); + return cycle; + } + if (visited.contains(taskId)) { + return List.of(); + } + + visited.add(taskId); + recursionStack.add(taskId); + + TaskItem task = findById(taskId); + if (task != null) { + for (String depId : task.dependsOnIds()) { + List cycle = dfs(depId, visited, recursionStack); + if (!cycle.isEmpty()) { + return cycle; + } + } + } + + recursionStack.remove(taskId); + return List.of(); + } + + // --- Getters/Setters for serialization --- + + public synchronized List getTasks() { + return new ArrayList<>(tasks); + } + + public synchronized void setTasks(List tasks) { + this.tasks = tasks != null ? new ArrayList<>(tasks) : new ArrayList<>(); + } +} diff --git a/src/main/java/ai/labs/eddi/configs/groups/rest/RestAgentGroupStore.java b/src/main/java/ai/labs/eddi/configs/groups/rest/RestAgentGroupStore.java index 6ff06e6651..0a18fcbccc 100644 --- a/src/main/java/ai/labs/eddi/configs/groups/rest/RestAgentGroupStore.java +++ b/src/main/java/ai/labs/eddi/configs/groups/rest/RestAgentGroupStore.java @@ -25,6 +25,7 @@ import java.net.URI; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Map; @@ -78,6 +79,7 @@ private static String describeStyle(DiscussionStyle style) { case DEVIL_ADVOCATE -> "One designated challenger argues against the group consensus"; case DELPHI -> "Anonymous opinion rounds to reduce groupthink and achieve convergence"; case DEBATE -> "Structured pro/con argumentation with rebuttal and judge"; + case TASK_FORCE -> "Collaborative task accomplishment: plan, execute in parallel, verify, synthesize"; case CUSTOM -> "User-defined phases for full control over the discussion flow"; }; } @@ -184,6 +186,9 @@ private void syncDescriptor(String resourceId, AgentGroupConfiguration config) { descriptor = new DocumentDescriptor(); descriptor.setResource(RestUtilities.createURI(resourceURI, resourceId, versionQueryParam, version)); + Date now = new Date(System.currentTimeMillis()); + descriptor.setCreatedOn(now); + descriptor.setLastModifiedOn(now); if (config.getName() != null) { descriptor.setName(config.getName()); } @@ -213,6 +218,7 @@ private void syncDescriptor(String resourceId, AgentGroupConfiguration config) { } if (changed) { + descriptor.setLastModifiedOn(new Date(System.currentTimeMillis())); documentDescriptorStore.setDescriptor(resourceId, descriptorVersion, descriptor); } } catch (Exception e) { diff --git a/src/main/java/ai/labs/eddi/engine/api/IGroupConversationService.java b/src/main/java/ai/labs/eddi/engine/api/IGroupConversationService.java index 8bf9b22507..76d8f3a8f6 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IGroupConversationService.java +++ b/src/main/java/ai/labs/eddi/engine/api/IGroupConversationService.java @@ -85,6 +85,10 @@ default void onGroupComplete(GroupConversationEventSink.GroupCompleteEvent event } default void onGroupError(GroupConversationEventSink.GroupErrorEvent event) { } + default void onTaskPlanCreated(GroupConversationEventSink.TaskPlanCreatedEvent event) { + } + default void onTaskVerified(GroupConversationEventSink.TaskVerifiedEvent event) { + } } // --- Exceptions --- diff --git a/src/main/java/ai/labs/eddi/engine/internal/GroupConversationService.java b/src/main/java/ai/labs/eddi/engine/internal/GroupConversationService.java index cc3886d3c4..02e36b4d48 100644 --- a/src/main/java/ai/labs/eddi/engine/internal/GroupConversationService.java +++ b/src/main/java/ai/labs/eddi/engine/internal/GroupConversationService.java @@ -5,6 +5,7 @@ package ai.labs.eddi.engine.internal; import ai.labs.eddi.configs.agents.AgentSigningService; +import ai.labs.eddi.engine.tenancy.QuotaExceededException; import ai.labs.eddi.configs.agents.IAgentStore; import ai.labs.eddi.configs.agents.crypto.AgentPublicKey; import ai.labs.eddi.configs.agents.crypto.NonceCacheService; @@ -20,20 +21,25 @@ import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.GroupMember; import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.PhaseType; import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.ProtocolConfig; +import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.TaskDefinition; import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.TurnOrder; +import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.LifecyclePolicy; import ai.labs.eddi.configs.groups.model.DiscussionStylePresets; import ai.labs.eddi.configs.groups.model.GroupConversation; import ai.labs.eddi.configs.groups.model.GroupConversation.GroupConversationState; import ai.labs.eddi.configs.groups.model.GroupConversation.TranscriptEntry; import ai.labs.eddi.configs.groups.model.GroupConversation.TranscriptEntryType; +import ai.labs.eddi.configs.groups.model.SharedTaskList; +import ai.labs.eddi.configs.groups.model.SharedTaskList.TaskItem; +import ai.labs.eddi.configs.groups.model.SharedTaskList.TaskStatus; import ai.labs.eddi.datastore.IResourceStore; import ai.labs.eddi.datastore.serialization.IJsonSerialization; import ai.labs.eddi.engine.api.IConversationService; import ai.labs.eddi.engine.api.IGroupConversationService; +import ai.labs.eddi.engine.memory.ConversationOutputExtractor; import ai.labs.eddi.engine.memory.model.ConversationState; import ai.labs.eddi.engine.model.Context; import ai.labs.eddi.engine.model.Deployment.Environment; -import ai.labs.eddi.modules.output.model.OutputItem; import ai.labs.eddi.engine.model.InputData; import ai.labs.eddi.engine.runtime.IAgentFactory; import ai.labs.eddi.modules.templating.ITemplatingEngine; @@ -53,9 +59,9 @@ import java.util.stream.Collectors; /** - * Phase-based orchestrator for multi-agent group conversations. Supports 5 - * discussion styles (ROUND_TABLE, PEER_REVIEW, DEVIL_ADVOCATE, DELPHI, DEBATE) - * plus fully custom phase definitions. + * Phase-based orchestrator for multi-agent group conversations. Supports 6 + * discussion styles (ROUND_TABLE, PEER_REVIEW, DEVIL_ADVOCATE, DELPHI, DEBATE, + * TASK_FORCE) plus fully custom phase definitions. *

* Agents participate through their normal pipelines via * {@link IConversationService#say}. The orchestrator constructs phase-specific @@ -228,6 +234,11 @@ private GroupConversation executeDiscussion(GroupConversation gc, AgentGroupConf ProtocolConfig protocol = resolveProtocol(config); int maxTurns = protocol.maxTurns() > 0 ? protocol.maxTurns() : 50; + // Store the group's DynamicAgentConfig on the GC so executeAgentTurn() + // can pass it to member agents via context variables, allowing + // AgentOrchestrator to enforce group-level guardrails on dynamic tools. + gc.setDynamicAgentConfig(config.getDynamicAgents()); + // AtomicInteger: shared across the phase loop; parallel phases increment // from virtual threads. Mutable counter avoids passing & returning counts. var turnCounter = new java.util.concurrent.atomic.AtomicInteger(0); @@ -276,7 +287,10 @@ private GroupConversation executeDiscussion(GroupConversation gc, AgentGroupConf List speakers = resolveParticipants(phase, config.getMembers(), config.getModeratorAgentId()); - if (phase.targetEachPeer()) { + // --- Task-oriented phase routing --- + if (phase.type() == PhaseType.PLAN || phase.type() == PhaseType.EXECUTE || phase.type() == PhaseType.VERIFY) { + executeTaskPhase(gc, config, speakers, phase, protocol, question, phaseIdx, listener, turnCounter, maxTurns); + } else if (phase.targetEachPeer()) { executePeerTargetedPhase(gc, config, speakers, phase, protocol, question, phaseIdx, listener, turnCounter, maxTurns); } else if (phase.turnOrder() == TurnOrder.PARALLEL) { executeParallelPhase(gc, config, speakers, phase, protocol, question, phaseIdx, listener, turnCounter, maxTurns); @@ -329,6 +343,9 @@ private GroupConversation executeDiscussion(GroupConversation gc, AgentGroupConf timerGroupDiscussion.record(System.nanoTime() - startTime, TimeUnit.NANOSECONDS); // Clean up incremental verification cursor — conversation is done lastVerifiedIndex.remove(gc.getId()); + // Ephemeral agent cleanup — undeploy/delete agents created during this + // discussion + cleanupEphemeralAgents(gc, config); } } @@ -360,6 +377,50 @@ public List listGroupConversations(String groupId, int index, return conversationStore.listByGroupId(groupId, index, limit); } + // ================================================================= + // Ephemeral agent cleanup + // ================================================================= + + /** + * Clean up agents created during a discussion based on the lifecycle policy. + * Called in the {@code executeDiscussion} finally block. + */ + private void cleanupEphemeralAgents(GroupConversation gc, AgentGroupConfiguration config) { + List createdIds = gc.getCreatedAgentIds(); + if (createdIds == null || createdIds.isEmpty()) { + return; + } + + var dynamicConfig = config.getDynamicAgents(); + LifecyclePolicy policy = dynamicConfig != null ? dynamicConfig.getLifecyclePolicy() : LifecyclePolicy.EPHEMERAL; + + for (String agentId : createdIds) { + // 'agent-decides': skip retained agents + if (policy == LifecyclePolicy.AGENT_DECIDES && gc.getRetainedAgentIds().contains(agentId)) { + LOGGER.infof("Ephemeral cleanup: agent '%s' retained by creator — skipping", agentId); + continue; + } + + // 'keep-deployed': no cleanup + if (policy == LifecyclePolicy.KEEP_DEPLOYED) { + continue; + } + + try { + boolean shouldDelete = policy == LifecyclePolicy.EPHEMERAL || policy == LifecyclePolicy.AGENT_DECIDES; + agentFactory.undeployAgent(DEFAULT_ENV, agentId, null); + LOGGER.infof("Ephemeral cleanup: undeployed agent '%s'", agentId); + + if (shouldDelete) { + agentStore.deleteAllPermanently(agentId); + LOGGER.infof("Ephemeral cleanup: deleted agent '%s'", agentId); + } + } catch (Exception e) { + LOGGER.warnf("Ephemeral cleanup failed for agent '%s': %s", agentId, e.getMessage()); + } + } + } + // ================================================================= // Phase resolution // ================================================================= @@ -412,7 +473,623 @@ private List resolveParticipants(DiscussionPhase phase, List speakers, + DiscussionPhase phase, ProtocolConfig protocol, String question, int phaseIdx, + GroupDiscussionEventListener listener, java.util.concurrent.atomic.AtomicInteger turnCounter, int maxTurns) + throws GroupDiscussionException { + + switch (phase.type()) { + case PLAN -> executeTaskPlanPhase(gc, config, speakers, phase, protocol, question, phaseIdx, listener, turnCounter, maxTurns); + case EXECUTE -> executeTaskExecutionPhase(gc, config, speakers, phase, protocol, question, phaseIdx, listener, turnCounter, maxTurns); + case VERIFY -> executeTaskVerificationPhase(gc, config, speakers, phase, protocol, question, phaseIdx, listener, turnCounter, maxTurns); + default -> LOGGER.warnf("Unexpected phase type %s routed to executeTaskPhase", phase.type()); + } + } + + /** + * PLAN phase: Decompose the goal into tasks. If pre-configured tasks exist in + * the group config, uses those directly (skipping LLM planning). Otherwise, the + * moderator agent decomposes the goal via its pipeline and the output is parsed + * with three-tier fallback (JSON → Markdown → single task). + */ + private void executeTaskPlanPhase(GroupConversation gc, AgentGroupConfiguration config, List speakers, + DiscussionPhase phase, ProtocolConfig protocol, String question, int phaseIdx, + GroupDiscussionEventListener listener, java.util.concurrent.atomic.AtomicInteger turnCounter, int maxTurns) + throws GroupDiscussionException { + + if (gc.getTaskList() == null) { + gc.setTaskList(new SharedTaskList()); + } + + boolean preConfigured = config.getTasks() != null && !config.getTasks().isEmpty(); + + if (preConfigured) { + // Config-driven tasks — skip LLM planning + // First pass: create all TaskItems + List createdItems = new ArrayList<>(); + for (TaskDefinition td : config.getTasks()) { + TaskItem task = new TaskItem(td.subject(), td.description(), td.priority()); + gc.getTaskList().addTask(task); + createdItems.add(task); + } + + // Second pass: resolve dependsOn subjects to task IDs + for (int i = 0; i < config.getTasks().size(); i++) { + TaskDefinition td = config.getTasks().get(i); + TaskItem original = createdItems.get(i); + if (td.dependsOn() != null && !td.dependsOn().isEmpty()) { + List resolvedDepIds = td.dependsOn().stream() + .map(depSubject -> createdItems.stream() + .filter(ci -> ci.subject().equalsIgnoreCase(depSubject)) + .map(TaskItem::id) + .findFirst().orElse(null)) + .filter(java.util.Objects::nonNull) + .toList(); + if (!resolvedDepIds.isEmpty()) { + // Replace with dependency-aware TaskItem + TaskItem withDeps = new TaskItem( + original.id(), original.subject(), original.description(), + original.status(), original.assignedAgentId(), original.assignedDisplayName(), + resolvedDepIds, original.result(), original.verificationNote(), + original.verified(), original.priority(), original.createdAt(), original.completedAt()); + gc.getTaskList().updateTask(withDeps); // replace with dependency-aware version + } + } + } + + // Third pass: resolve assignments with round-robin for "ALL" + for (int i = 0; i < createdItems.size(); i++) { + TaskItem task = createdItems.get(i); + TaskDefinition td = config.getTasks().get(i); + String assignedAgentId = resolveTaskAssignment( + td.assignToRole(), config.getMembers(), config.getModeratorAgentId(), i); + if (assignedAgentId != null) { + GroupMember assignedMember = findMember(config.getMembers(), assignedAgentId); + String displayName = assignedMember != null ? assignedMember.displayName() : assignedAgentId; + gc.getTaskList().assignTask(task.id(), assignedAgentId, displayName); + } else { + LOGGER.warnf("Could not resolve assignment for task '%s' with role '%s'", + task.subject(), td.assignToRole()); + } + } + + gc.getTranscript().add(new TranscriptEntry( + "system", "System", + "Pre-configured task plan: " + config.getTasks().size() + " tasks", + phaseIdx, phase.name(), TranscriptEntryType.PLAN, + Instant.now(), null, null)); + + } else { + // LLM-driven planning via moderator + if (speakers.isEmpty()) { + throw new GroupDiscussionException("PLAN phase requires a moderator but no speakers resolved"); + } + + GroupMember planner = speakers.getFirst(); + turnCounter.incrementAndGet(); + + if (listener != null) { + listener.onSpeakerStart( + new GroupConversationEventSink.SpeakerStartEvent(planner.agentId(), planner.displayName(), phaseIdx, phase.name())); + } + + // Build planning input with member info + String planTemplate = DiscussionStylePresets.defaultTemplate(PhaseType.PLAN); + Map data = new LinkedHashMap<>(); + data.put("question", question); + data.put("displayName", planner.displayName()); + List> memberList = config.getMembers().stream() + .filter(m -> !m.agentId().equals(planner.agentId()) || config.getMembers().size() == 1) + .map(m -> { + Map md = new LinkedHashMap<>(); + md.put("agentId", m.agentId()); + md.put("displayName", m.displayName()); + md.put("capabilities", m.role() != null ? m.role() : ""); + return md; + }).collect(Collectors.toList()); + data.put("members", memberList); + + String planInput; + try { + planInput = templatingEngine.processTemplate(planTemplate, data, ITemplatingEngine.TemplateMode.TEXT); + } catch (ITemplatingEngine.TemplateEngineException e) { + planInput = "Decompose this goal into tasks for your team: " + question; + } + + TranscriptEntry planEntry = executeAgentTurn(planner, gc, planInput, protocol, phaseIdx, phase, null); + gc.getTranscript().add(planEntry); + + if (listener != null) { + listener.onSpeakerComplete(new GroupConversationEventSink.SpeakerCompleteEvent( + planner.agentId(), planner.displayName(), planEntry.content(), phaseIdx, phase.name())); + } + + // Parse the plan output + List parsedTasks = TaskListParser.parse(planEntry.content(), config.getMembers()); + + for (int i = 0; i < parsedTasks.size(); i++) { + TaskListParser.ParsedTask pt = parsedTasks.get(i); + TaskItem task = new TaskItem(pt.subject(), pt.description(), pt.priority()); + gc.getTaskList().addTask(task); + + // Resolve assignment — null-safe (C4 fix) + String agentId = TaskListParser.resolveAgent(pt.assignedTo(), config.getMembers()); + if (agentId == null) { + agentId = TaskListParser.roundRobinAssign(i, config.getMembers()); + LOGGER.debugf("Could not resolve assignee '%s', round-robin assigning to %s", pt.assignedTo(), agentId); + } + if (agentId != null) { + GroupMember member = findMember(config.getMembers(), agentId); + String displayName = member != null ? member.displayName() : agentId; + gc.getTaskList().assignTask(task.id(), agentId, displayName); + } else { + LOGGER.warnf("Task '%s' has no assignable agent, will be skipped during execution", pt.subject()); + } + } + } + + // Validate no circular dependencies (covers both pre-configured and LLM-planned + // paths) + List cycles = gc.getTaskList().detectCycles(); + if (!cycles.isEmpty()) { + throw new GroupDiscussionException( + "Circular task dependencies detected: " + String.join(" → ", cycles)); + } + + // Emit task plan event + if (listener != null) { + List summaries = gc.getTaskList().all().stream() + .map(t -> new GroupConversationEventSink.TaskSummary(t.id(), t.subject(), t.assignedDisplayName(), t.priority())) + .toList(); + listener.onTaskPlanCreated(new GroupConversationEventSink.TaskPlanCreatedEvent(summaries, preConfigured)); + } + } + + /** + * EXECUTE phase: Run each assigned task by sending it to the responsible + * agent's pipeline. Tasks for different agents execute in parallel; tasks for + * the same agent execute sequentially within a single CompletableFuture. + */ + private void executeTaskExecutionPhase(GroupConversation gc, AgentGroupConfiguration config, List speakers, + DiscussionPhase phase, ProtocolConfig protocol, String question, int phaseIdx, + GroupDiscussionEventListener listener, java.util.concurrent.atomic.AtomicInteger turnCounter, int maxTurns) + throws GroupDiscussionException { + + if (gc.getTaskList() == null || gc.getTaskList().isEmpty()) { + LOGGER.warn("EXECUTE phase: no tasks to execute"); + return; + } + + // Note: unlike executeParallelPhase, no transcript snapshot is needed here + // because agents receive task-specific input via buildTaskExecutionInput(), + // not transcript context. + + List errors = Collections.synchronizedList(new ArrayList<>()); + int timeout = protocol.agentTimeoutSeconds() > 0 ? protocol.agentTimeoutSeconds() : 60; + int maxWaves = 100; // safety cap to prevent infinite loops + + // Wave loop: re-query executable tasks after each wave completes. + // Tasks that become executable when their dependencies finish are picked up + // in the next wave. This handles dependsOn chains across any depth. + for (int wave = 0; wave < maxWaves; wave++) { + Map> tasksByAgent = gc.getTaskList().findExecutableTasks().stream() + .filter(t -> t.assignedAgentId() != null) + .collect(Collectors.groupingBy(TaskItem::assignedAgentId)); + + if (tasksByAgent.isEmpty()) { + if (wave == 0) { + LOGGER.warn("EXECUTE phase: no assigned tasks found"); + } + break; // no more executable tasks — all waves complete + } + + LOGGER.debugf("EXECUTE phase wave %d: %d agents, %d tasks", + wave + 1, tasksByAgent.size(), + tasksByAgent.values().stream().mapToInt(List::size).sum()); + + // Execute agents in parallel, tasks per agent sequentially + List> futures = new ArrayList<>(); + + for (Map.Entry> agentEntry : tasksByAgent.entrySet()) { + String agentId = agentEntry.getKey(); + List agentTasks = agentEntry.getValue(); + GroupMember member = findMemberIncludingDynamic(config.getMembers(), gc, agentId); + + if (member == null) { + LOGGER.warnf("Task assigned to unknown agent '%s', skipping", agentId); + continue; + } + + CompletableFuture future = CompletableFuture.runAsync(() -> { + for (TaskItem task : agentTasks) { + if (turnCounter.get() >= maxTurns) { + break; + } + try { + turnCounter.incrementAndGet(); + gc.getTaskList().startTask(task.id()); + + if (listener != null) { + listener.onSpeakerStart(new GroupConversationEventSink.SpeakerStartEvent( + member.agentId(), member.displayName(), phaseIdx, phase.name())); + } + + // Build task-specific input + String taskInput = buildTaskExecutionInput(task, question, phase, gc); + TranscriptEntry entry = executeAgentTurn(member, gc, taskInput, protocol, phaseIdx, phase, null); + + synchronized (gc.getTranscript()) { + gc.getTranscript().add(entry); + } + + gc.getTaskList().completeTask(task.id(), entry.content()); + + if (listener != null) { + listener.onSpeakerComplete(new GroupConversationEventSink.SpeakerCompleteEvent( + member.agentId(), member.displayName(), entry.content(), phaseIdx, phase.name())); + } + + } catch (GroupDiscussionException e) { + // Quota errors are non-retryable — abort all tasks immediately + if (e.getCause() instanceof QuotaExceededException) { + errors.add(e); + return; // exit the entire agent's CompletableFuture + } + handleTaskFailure(gc, task, member, e.getMessage(), phaseIdx, phase, listener, errors, e); + if (protocol.onAgentFailure() == ProtocolConfig.MemberFailurePolicy.ABORT) { + break; + } + } catch (IllegalStateException e) { + // H5 fix: catch status transition errors (e.g., double completion) + LOGGER.warnf("Task state error for '%s': %s", task.subject(), e.getMessage()); + handleTaskFailure(gc, task, member, e.getMessage(), phaseIdx, phase, listener, errors, + new GroupDiscussionException(e.getMessage(), e)); + } + } + }, executorService); + futures.add(future); + } + + // Wait for this wave — timeout based on max tasks per agent (H2 fix) + int maxTasksPerAgent = tasksByAgent.values().stream().mapToInt(List::size).max().orElse(1); + try { + CompletableFuture.allOf(futures.toArray(CompletableFuture[]::new)) + .get(timeout * (long) maxTasksPerAgent, TimeUnit.SECONDS); + } catch (TimeoutException e) { + LOGGER.warnf("Task execution timed out for group %s (wave %d)", + LogSanitizer.sanitize(gc.getGroupId()), wave + 1); + futures.forEach(f -> f.cancel(true)); + break; + } catch (ExecutionException | InterruptedException e) { + LOGGER.warnf("Task execution error for group %s: %s", + LogSanitizer.sanitize(gc.getGroupId()), LogSanitizer.sanitize(e.getMessage())); + if (e instanceof InterruptedException) { + Thread.currentThread().interrupt(); + } + break; + } + + // Quota errors always abort, regardless of onAgentFailure policy + for (GroupDiscussionException error : errors) { + if (error.getCause() instanceof QuotaExceededException) { + throw error; + } + } + + // If ABORT policy and there were errors, stop further waves + if (protocol.onAgentFailure() == ProtocolConfig.MemberFailurePolicy.ABORT && !errors.isEmpty()) { + throw errors.getFirst(); + } + + if (turnCounter.get() >= maxTurns) { + break; + } + } + + // Final error propagation after all waves (ABORT policy) + if (protocol.onAgentFailure() == ProtocolConfig.MemberFailurePolicy.ABORT && !errors.isEmpty()) { + throw errors.getFirst(); + } + } + + /** + * VERIFY phase: The moderator reviews all completed tasks and provides + * pass/fail assessments. Results are parsed and applied to the task list. + */ + private void executeTaskVerificationPhase(GroupConversation gc, AgentGroupConfiguration config, List speakers, + DiscussionPhase phase, ProtocolConfig protocol, String question, int phaseIdx, + GroupDiscussionEventListener listener, java.util.concurrent.atomic.AtomicInteger turnCounter, + int maxTurns) + throws GroupDiscussionException { + + if (gc.getTaskList() == null || gc.getTaskList().isEmpty()) { + LOGGER.warn("VERIFY phase: no tasks to verify"); + return; + } + + List completedTasks = gc.getTaskList().all().stream() + .filter(t -> t.status() == TaskStatus.COMPLETED) + .toList(); + + if (completedTasks.isEmpty()) { + LOGGER.warn("VERIFY phase: no completed tasks to verify"); + gc.getTranscript().add(new TranscriptEntry( + "system", "System", "No completed tasks to verify", + phaseIdx, phase.name(), TranscriptEntryType.VERIFICATION, + Instant.now(), null, null)); + return; + } + + if (speakers.isEmpty()) { + LOGGER.warn("VERIFY phase: no verifier available"); + return; + } + + GroupMember verifier = speakers.getFirst(); + turnCounter.incrementAndGet(); + + if (listener != null) { + listener.onSpeakerStart( + new GroupConversationEventSink.SpeakerStartEvent(verifier.agentId(), verifier.displayName(), phaseIdx, phase.name())); + } + + // Build verification input + String verifyTemplate = DiscussionStylePresets.defaultTemplate(PhaseType.VERIFY); + Map data = new LinkedHashMap<>(); + data.put("question", question); + data.put("displayName", verifier.displayName()); + List> taskData = completedTasks.stream().map(t -> { + Map td = new LinkedHashMap<>(); + td.put("subject", t.subject()); + td.put("description", t.description()); + td.put("assignedDisplayName", t.assignedDisplayName()); + td.put("result", t.result() != null ? t.result() : "(no result)"); + return td; + }).collect(Collectors.toList()); + data.put("completedTasks", taskData); + + String verifyInput; + try { + verifyInput = templatingEngine.processTemplate(verifyTemplate, data, ITemplatingEngine.TemplateMode.TEXT); + } catch (ITemplatingEngine.TemplateEngineException e) { + verifyInput = "Review the task results and provide pass/fail for each task."; + } + + TranscriptEntry verifyEntry = executeAgentTurn(verifier, gc, verifyInput, protocol, phaseIdx, phase, null); + gc.getTranscript().add(verifyEntry); + + if (listener != null) { + listener.onSpeakerComplete(new GroupConversationEventSink.SpeakerCompleteEvent( + verifier.agentId(), verifier.displayName(), verifyEntry.content(), phaseIdx, phase.name())); + } + + // Parse verification results — same three-tier fallback + parseAndApplyVerification(gc, completedTasks, verifyEntry.content(), listener); + } + + /** + * Builds the input message for a task execution phase, respecting the + * configured context scope. + */ + private String buildTaskExecutionInput(TaskItem task, String question, DiscussionPhase phase, GroupConversation gc) { + String template = DiscussionStylePresets.defaultTemplate(PhaseType.EXECUTE); + Map data = new LinkedHashMap<>(); + data.put("question", question); + data.put("taskSubject", task.subject()); + data.put("taskDescription", task.description()); + + // Add dependency results if scope is TASK_WITH_DEPS + if (phase.contextScope() == ContextScope.TASK_WITH_DEPS && gc.getTaskList() != null) { + List> depResults = task.dependsOnIds().stream() + .map(depId -> gc.getTaskList().findById(depId)) + .filter(dep -> dep != null && dep.result() != null) + .map(dep -> { + Map dr = new LinkedHashMap<>(); + dr.put("subject", dep.subject()); + dr.put("result", dep.result()); + return dr; + }).collect(Collectors.toList()); + if (!depResults.isEmpty()) { + data.put("dependencyResults", depResults); + } + } + + try { + return templatingEngine.processTemplate(template, data, ITemplatingEngine.TemplateMode.TEXT); + } catch (ITemplatingEngine.TemplateEngineException e) { + LOGGER.warnf("Template processing failed for task execution, using plain text: %s", e.getMessage()); + return "Task: " + task.subject() + "\n" + task.description(); + } + } + + /** + * Parses verification output and applies pass/fail to the task list. Falls back + * to marking all tasks as passed if parsing fails (safe default). + */ + private void parseAndApplyVerification(GroupConversation gc, List completedTasks, + String verifyContent, GroupDiscussionEventListener listener) { + // H4 fix: dedicated verification parser that reads 'passed' boolean from JSON + try { + if (verifyContent != null && verifyContent.contains("[")) { + if (tryParseVerificationJson(gc, completedTasks, verifyContent, listener)) { + return; + } + } + } catch (Exception e) { + LOGGER.debugf("Failed to parse verification output, marking all as passed: %s", e.getMessage()); + } + + // Fallback: mark all completed tasks as verified (safe default) + for (TaskItem task : completedTasks) { + if (task.status() == TaskStatus.COMPLETED) { + gc.getTaskList().verifyTask(task.id(), true, "Auto-verified (verification parse failed)"); + if (listener != null) { + listener.onTaskVerified(new GroupConversationEventSink.TaskVerifiedEvent( + task.id(), task.subject(), true, "Auto-verified")); + } + } + } + } + + /** + * Attempts to parse verification results from JSON. The expected schema is: + * {@code [{"subject": "...", "passed": true, "feedback": "..."}]} + * + * @return true if parsing succeeded and at least one task was verified + */ + @SuppressWarnings("unchecked") + private boolean tryParseVerificationJson(GroupConversation gc, List completedTasks, + String content, GroupDiscussionEventListener listener) { + try { + // Extract JSON array from content (may be wrapped in markdown fences) + int jsonStart = content.indexOf('['); + int jsonEnd = content.lastIndexOf(']'); + if (jsonStart < 0 || jsonEnd <= jsonStart) { + return false; + } + String json = content.substring(jsonStart, jsonEnd + 1); + + var items = jsonSerialization.deserialize(json, List.class); + if (items == null || items.isEmpty()) { + return false; + } + + boolean anyVerified = false; + for (Object item : items) { + if (item instanceof Map map) { + String subject = map.containsKey("subject") ? String.valueOf(map.get("subject")) : null; + // Read 'passed' boolean directly from JSON + boolean passed = true; // default to passed + if (map.containsKey("passed")) { + Object passedVal = map.get("passed"); + passed = Boolean.TRUE.equals(passedVal) || "true".equalsIgnoreCase(String.valueOf(passedVal)); + } + String feedback = map.containsKey("feedback") ? String.valueOf(map.get("feedback")) : null; + + if (subject != null) { + for (TaskItem task : completedTasks) { + if (task.subject().equalsIgnoreCase(subject) && task.status() == TaskStatus.COMPLETED) { + gc.getTaskList().verifyTask(task.id(), passed, feedback); + if (listener != null) { + listener.onTaskVerified(new GroupConversationEventSink.TaskVerifiedEvent( + task.id(), task.subject(), passed, feedback)); + } + anyVerified = true; + break; + } + } + } + } + } + return anyVerified; + } catch (Exception e) { + LOGGER.debugf("Verification JSON parse failed: %s", e.getMessage()); + return false; + } + } + + // --- Task assignment helpers --- + + /** + * Resolves task assignment. For "ALL" role, uses round-robin across + * non-moderator members to distribute tasks evenly (H3 fix). + * + * @param taskIndex + * index of the task in the list, used for round-robin distribution + */ + private String resolveTaskAssignment(String assignToRole, List members, + String moderatorAgentId, int taskIndex) { + if (assignToRole == null || "ALL".equalsIgnoreCase(assignToRole)) { + // Round-robin across non-moderator members (H3 fix) + List eligible = members.stream() + .filter(m -> !m.agentId().equals(moderatorAgentId)) + .toList(); + if (eligible.isEmpty()) { + return members.isEmpty() ? null : members.getFirst().agentId(); + } + return eligible.get(taskIndex % eligible.size()).agentId(); + } + if (assignToRole.toUpperCase().startsWith("ROLE:")) { + String role = assignToRole.substring(5).trim(); + return members.stream() + .filter(m -> role.equalsIgnoreCase(m.role())) + .map(GroupMember::agentId) + .findFirst() + .orElse(null); + } + // Direct agentId reference + return TaskListParser.resolveAgent(assignToRole, members); + } + + /** + * Centralized error handling for task failures during EXECUTE phase (H6 fix). + * Marks the task as failed, adds an error transcript entry, emits SSE events, + * and collects the error for potential ABORT propagation. + */ + private void handleTaskFailure(GroupConversation gc, TaskItem task, GroupMember member, + String errorMessage, int phaseIdx, DiscussionPhase phase, + GroupDiscussionEventListener listener, + List errors, GroupDiscussionException ex) { + try { + gc.getTaskList().failTask(task.id(), errorMessage); + } catch (IllegalStateException ise) { + LOGGER.debugf("Could not fail task '%s' (already terminal): %s", task.id(), ise.getMessage()); + } + + // Add error transcript entry + synchronized (gc.getTranscript()) { + gc.getTranscript().add(new TranscriptEntry( + member.agentId(), member.displayName(), + "[ERROR] Task '%s' failed: %s".formatted(task.subject(), errorMessage), + phaseIdx, phase.name(), TranscriptEntryType.TASK_RESULT, + Instant.now(), null, null)); + } + + // Emit error event so SSE clients see the failure + if (listener != null) { + listener.onSpeakerComplete(new GroupConversationEventSink.SpeakerCompleteEvent( + member.agentId(), member.displayName(), + "[ERROR] " + errorMessage, phaseIdx, phase.name())); + } + + errors.add(ex); + } + + private GroupMember findMember(List members, String agentId) { + if (agentId == null) + return null; + return members.stream() + .filter(m -> agentId.equals(m.agentId())) + .findFirst() + .orElse(null); + } + + /** + * Find a member by agentId, searching both static config members and + * dynamically added members from the conversation. + */ + private GroupMember findMemberIncludingDynamic(List configMembers, GroupConversation gc, String agentId) { + GroupMember member = findMember(configMembers, agentId); + if (member == null && gc.getDynamicMembers() != null) { + List dynamicMembers = gc.getDynamicMembers(); + synchronized (dynamicMembers) { + member = findMember(dynamicMembers, agentId); + } + } + return member; + } + + // ================================================================= + // Phase execution (debate styles) // ================================================================= private void executeSequentialPhase(GroupConversation gc, AgentGroupConfiguration config, List speakers, DiscussionPhase phase, @@ -467,6 +1144,12 @@ private void executeParallelPhase(GroupConversation gc, AgentGroupConfiguration try { String input = buildPhaseInput(phase, speaker, question, snapshotTranscript, phaseIdx, null); return executeAgentTurn(speaker, gc, input, protocol, phaseIdx, phase, null); + } catch (GroupDiscussionException e) { + if (e.getCause() instanceof QuotaExceededException) { + throw new java.util.concurrent.CompletionException(e); + } + LOGGER.errorf("Parallel phase failed for %s: %s", speaker.agentId(), e.getMessage()); + return errorEntry(speaker, phaseIdx, phase, e.getMessage()); } catch (Exception e) { LOGGER.errorf("Parallel phase failed for %s: %s", speaker.agentId(), e.getMessage()); return errorEntry(speaker, phaseIdx, phase, e.getMessage()); @@ -486,6 +1169,22 @@ private void executeParallelPhase(GroupConversation gc, AgentGroupConfiguration futures.get(i).cancel(true); gc.getTranscript().add(new TranscriptEntry("unknown", "Unknown", null, phaseIdx, phase.name(), TranscriptEntryType.SKIPPED, Instant.now(), "Timeout", null)); + } catch (ExecutionException e) { + // Unwrap: CompletionException → GroupDiscussionException → + // QuotaExceededException + Throwable cause = e.getCause(); + if (cause instanceof java.util.concurrent.CompletionException ce) { + cause = ce.getCause(); + } + if (cause instanceof GroupDiscussionException gde + && gde.getCause() instanceof QuotaExceededException) { + // Cancel remaining futures and propagate + for (int j = i + 1; j < futures.size(); j++) { + futures.get(j).cancel(true); + } + throw gde; + } + gc.getTranscript().add(errorEntry(null, phaseIdx, phase, e.getMessage())); } catch (Exception e) { gc.getTranscript().add(errorEntry(null, phaseIdx, phase, e.getMessage())); } @@ -577,6 +1276,8 @@ private TranscriptEntry executeAgentTurn(GroupMember member, GroupConversation g var result = conversationService.startConversation(DEFAULT_ENV, member.agentId(), gc.getUserId(), groupContext); privateConvId = result.conversationId(); gc.getMemberConversationIds().put(member.agentId(), privateConvId); + } catch (QuotaExceededException qe) { + throw new GroupDiscussionException("Tenant quota exceeded: " + qe.getMessage(), qe); } catch (Exception e) { return handleAgentFailure(member, phaseIdx, phase, protocol, e, "Failed to start conversation", targetAgentId); } @@ -591,6 +1292,12 @@ private TranscriptEntry executeAgentTurn(GroupMember member, GroupConversation g context.put("groupConversationId", new Context(Context.ContextType.string, gc.getId())); context.put("groupDepth", new Context(Context.ContextType.string, String.valueOf(gc.getDepth()))); + // Pass group-level dynamic agent guardrails to member agents so that + // AgentOrchestrator can enforce caps, allowed providers/models, etc. + if (gc.getDynamicAgentConfig() != null) { + context.put("dynamicAgentConfig", new Context(Context.ContextType.object, gc.getDynamicAgentConfig())); + } + // Wave 6: Peer verification — if the receiving agent requires it, // verify all signed entries from prior speakers before sending context verifyPriorEntriesIfRequired(member.agentId(), gc); @@ -607,15 +1314,20 @@ private TranscriptEntry executeAgentTurn(GroupMember member, GroupConversation g CompletableFuture responseFuture = new CompletableFuture<>(); final String convId = privateConvId; - conversationService.say(DEFAULT_ENV, member.agentId(), convId, false, true, null, inputData, false, snapshot -> { + conversationService.say(DEFAULT_ENV, member.agentId(), convId, true, true, null, inputData, false, snapshot -> { String response = extractResponse(snapshot); // When the agent pipeline fails (e.g. LLM unreachable), extractResponse - // returns null because there are no output keys — only pipeline metadata. + // returns empty because there are no output keys — only pipeline metadata. // Surface the failure as explicit content so the transcript entry is not empty. - if (response == null && snapshot != null + if ((response == null || response.isEmpty()) && snapshot != null && snapshot.getConversationState() == ConversationState.ERROR) { response = "[Agent failed to produce output — conversation entered ERROR state]"; } + + // Propagate dynamic agent tracking data from the member's conversation + // memory to the GroupConversation for lifecycle cleanup. + propagateDynamicAgentTracking(snapshot, gc); + responseFuture.complete(response); }); @@ -724,6 +1436,10 @@ private TranscriptEntry executeAgentTurn(GroupMember member, GroupConversation g } catch (Exception e) { Throwable cause = e instanceof ExecutionException ? e.getCause() : e; + // Quota errors are non-retryable and affect all agents — abort immediately + if (cause instanceof QuotaExceededException) { + throw new GroupDiscussionException("Tenant quota exceeded: " + cause.getMessage(), cause); + } if (protocol.onAgentFailure() == ProtocolConfig.MemberFailurePolicy.RETRY && retries < maxRetries) { retries++; LOGGER.warnf("Agent %s failed (attempt %d/%d): %s", member.agentId(), retries, maxRetries, cause.getMessage()); @@ -825,6 +1541,18 @@ private String buildPhaseInput(DiscussionPhase phase, GroupMember speaker, Strin data.put("transcript", fullTranscript); data.put("totalPhases", phaseIdx); } + case PLAN -> { + // Provide member list for planning template + List> memberList = new ArrayList<>(); + // Note: speaker list should be the full member list for planning + data.put("members", memberList); // populated by caller via template data + } + case EXECUTE -> { + // Task-specific context populated by executeTaskPhase + } + case VERIFY -> { + // Completed tasks populated by executeTaskPhase + } default -> { // All PhaseType values handled above; default required by checkstyle } @@ -869,6 +1597,7 @@ private List> filterByScope(List transcript case ANONYMOUS -> true; // Content included, attribution stripped case OWN_FEEDBACK -> speaker.agentId().equals(e.targetAgentId()); case NONE -> false; + case TASK_ONLY, TASK_WITH_DEPS -> false; // Handled by task-specific logic }).map(e -> { Map entry = new LinkedHashMap<>(); if (scope == ContextScope.ANONYMOUS) { @@ -924,6 +1653,9 @@ private TranscriptEntryType mapPhaseToEntryType(PhaseType type) { case ARGUE -> TranscriptEntryType.ARGUMENT; case REBUTTAL -> TranscriptEntryType.REBUTTAL; case SYNTHESIS -> TranscriptEntryType.SYNTHESIS; + case PLAN -> TranscriptEntryType.PLAN; + case EXECUTE -> TranscriptEntryType.TASK_RESULT; + case VERIFY -> TranscriptEntryType.VERIFICATION; }; } @@ -992,89 +1724,59 @@ private void failConversation(GroupConversation gc) { } /** - * Extracts the human-readable text from a conversation memory snapshot. Looks - * for the {@code output} array in the last ConversationOutput map and - * concatenates all text entries (same logic as the Manager's - * {@code extractOutput()}). + * Reads dynamic agent tracking data from the member's conversation snapshot and + * propagates it to the group conversation's tracking lists. This bridges the + * gap between per-turn tool-local tracking lists and the group-level lifecycle + * tracking in {@link GroupConversation}. */ - private String extractResponse(ai.labs.eddi.engine.memory.model.SimpleConversationMemorySnapshot snapshot) { - if (snapshot == null || snapshot.getConversationOutputs() == null) { - return ""; - } - var outputs = snapshot.getConversationOutputs(); - if (outputs.isEmpty()) { - return ""; - } - var lastOutput = outputs.get(outputs.size() - 1); - if (lastOutput == null) { - return ""; - } - - var texts = new ArrayList(); - - // Format 1: Nested "output" array — may contain TextOutputItem POJOs or Maps - Object outputArray = lastOutput.get("output"); - if (outputArray instanceof List list) { - for (var item : list) { - if (item instanceof String s) { - texts.add(s); - } else if (item instanceof OutputItem oi && oi.toString() != null) { - // TextOutputItem.toString() returns the text field - texts.add(oi.toString()); - } else if (item instanceof Map map) { - Object text = map.get("text"); - if (text instanceof String s) { - texts.add(s); + static void propagateDynamicAgentTracking( + ai.labs.eddi.engine.memory.model.SimpleConversationMemorySnapshot snapshot, + GroupConversation gc) { + if (snapshot == null || snapshot.getConversationSteps() == null) { + return; + } + var steps = snapshot.getConversationSteps(); + if (steps.isEmpty()) { + return; + } + // Check the last step for tracking data + var lastStep = steps.get(steps.size() - 1); + if (lastStep == null || lastStep.getConversationStep() == null) { + return; + } + for (var stepData : lastStep.getConversationStep()) { + if (stepData == null || stepData.getKey() == null) { + continue; + } + if ("dynamic:created_agent_ids" + .equals(stepData.getKey()) && stepData.getValue() instanceof java.util.Collection ids) { + for (Object id : ids) { + if (id instanceof String agentId && !gc.getCreatedAgentIds().contains(agentId)) { + gc.getCreatedAgentIds().add(agentId); + LOGGER.debugf("[DYNAMIC] Propagated created agent '%s' to group conversation", agentId); } } - } - if (!texts.isEmpty()) { - return String.join("\n", texts); - } - } - - // Format 2: Flat keys like "output:text:*" - for (var entry : lastOutput.entrySet()) { - if (entry.getKey() instanceof String key && key.startsWith("output:text:")) { - Object val = entry.getValue(); - if (val instanceof String s) { - texts.add(s); - } else if (val instanceof List list) { - for (var item : list) { - if (item instanceof String s) - texts.add(s); - else if (item instanceof Map map && map.get("text") instanceof String s) - texts.add(s); + } else if ("dynamic:retained_agent_ids" + .equals(stepData.getKey()) && stepData.getValue() instanceof java.util.Collection ids) { + for (Object id : ids) { + if (id instanceof String agentId) { + gc.getRetainedAgentIds().add(agentId); } - } else if (val instanceof Map map && map.get("text") instanceof String s) { - texts.add(s); } } } + } - if (!texts.isEmpty()) { - return String.join("\n", texts); - } - - // Check if the output contains any actual LLM-generated content. - // Output keys follow patterns like "output", "output:text:*", "reply". - // If none are present, the map only contains pipeline metadata - // (e.g. "actions", "input", "context") — return null to avoid - // serializing raw metadata as a group discussion response. - boolean hasAnyOutput = lastOutput.keySet().stream() - .anyMatch(k -> k instanceof String s && - (s.startsWith("output") || s.startsWith("reply"))); - if (!hasAnyOutput) { - return null; - } - - // Fallback: serialize the entire output map (backward compat) - try { - return jsonSerialization.serialize(lastOutput); - } catch (Exception e) { - LOGGER.warnf("Failed to serialize conversation output, falling back to toString(): %s", e.getMessage()); - return lastOutput.toString(); - } + /** + * Extracts the human-readable text from a conversation memory snapshot. + * Delegates to the shared {@link ConversationOutputExtractor} utility. + */ + private String extractResponse(ai.labs.eddi.engine.memory.model.SimpleConversationMemorySnapshot snapshot) { + String result = ConversationOutputExtractor.extractResponse(snapshot); + // Convert null to empty string for backward compatibility with GCS callers + // that check for empty-string (pipeline metadata-only snapshots still return + // null). + return result != null ? result : ""; } private String buildPlainTextFallback(DiscussionPhase phase, GroupMember speaker, String question, List transcript) { diff --git a/src/main/java/ai/labs/eddi/engine/internal/RestGroupConversation.java b/src/main/java/ai/labs/eddi/engine/internal/RestGroupConversation.java index 4016432ad7..aaa0f89d96 100644 --- a/src/main/java/ai/labs/eddi/engine/internal/RestGroupConversation.java +++ b/src/main/java/ai/labs/eddi/engine/internal/RestGroupConversation.java @@ -120,6 +120,16 @@ public void onGroupError(GroupConversationEventSink.GroupErrorEvent event) { sendEvent(eventSink, sse, GroupConversationEventSink.EVENT_GROUP_ERROR, toJson(event)); closeQuietly(eventSink); } + + @Override + public void onTaskPlanCreated(GroupConversationEventSink.TaskPlanCreatedEvent event) { + sendEvent(eventSink, sse, GroupConversationEventSink.EVENT_TASK_PLAN_CREATED, toJson(event)); + } + + @Override + public void onTaskVerified(GroupConversationEventSink.TaskVerifiedEvent event) { + sendEvent(eventSink, sse, GroupConversationEventSink.EVENT_TASK_VERIFIED, toJson(event)); + } }; groupConversationService.startAndDiscussAsync(groupId, request.question(), userId, listener); diff --git a/src/main/java/ai/labs/eddi/engine/internal/TaskListParser.java b/src/main/java/ai/labs/eddi/engine/internal/TaskListParser.java new file mode 100644 index 0000000000..b78afd358c --- /dev/null +++ b/src/main/java/ai/labs/eddi/engine/internal/TaskListParser.java @@ -0,0 +1,248 @@ +/* + * Copyright EDDI contributors + * SPDX-License-Identifier: Apache-2.0 + */ +package ai.labs.eddi.engine.internal; + +import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.GroupMember; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.jboss.logging.Logger; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Parses LLM output into a structured task list with three-tier fallback. + *

    + *
  • Tier 1: JSON array (strict schema)
  • + *
  • Tier 2: Markdown numbered/bulleted list
  • + *
  • Tier 3: Single task with entire goal as description
  • + *
+ * + * @author ginccc + */ +public final class TaskListParser { + + private static final Logger LOGGER = Logger.getLogger(TaskListParser.class); + + private static final ObjectMapper MAPPER = new ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + // Matches: 1. Title: description OR - Title: description OR * Title: + // description + private static final Pattern MARKDOWN_ITEM = Pattern.compile( + "^\\s*(?:\\d+[.)\\]]|[-*+])\\s+(.+?)(?:\\s*[:—–-]\\s+(.+))?$", + Pattern.MULTILINE); + + // Matches: (assigned to AgentName) or (assignedTo: agent-id) + private static final Pattern ASSIGNMENT = Pattern.compile( + "\\(\\s*(?:assigned\\s+to|assignedTo)\\s*[:=]?\\s*(.+?)\\s*\\)", + Pattern.CASE_INSENSITIVE); + + private TaskListParser() { + } + + /** + * A parsed task item from LLM output. + */ + public record ParsedTask(String subject, String description, String assignedTo, int priority) { + } + + /** + * Parse LLM output into task items with three-tier fallback. + * + * @param llmOutput + * the raw LLM response text + * @param members + * group members (unused by parse itself; accepted for API + * consistency — use {@link #resolveAgent} and + * {@link #roundRobinAssign} separately for assignment resolution) + * @return non-empty list of parsed tasks + */ + public static List parse(String llmOutput, List members) { + if (llmOutput == null || llmOutput.isBlank()) { + LOGGER.debug("Empty LLM output, falling back to single task"); + return singleTaskFallback(null); + } + + // Tier 1: Try JSON + List result = tryParseJson(llmOutput); + if (result != null && !result.isEmpty()) { + LOGGER.debugf("Tier 1 (JSON): parsed %d tasks", result.size()); + return result; + } + + // Tier 2: Try Markdown + result = tryParseMarkdown(llmOutput); + if (result != null && !result.isEmpty()) { + LOGGER.debugf("Tier 2 (Markdown): parsed %d tasks", result.size()); + return result; + } + + // Tier 3: Single task fallback + LOGGER.debug("Tier 3 (Fallback): treating entire output as single task"); + return singleTaskFallback(llmOutput); + } + + /** + * Resolve an assignedTo reference against the member list. Matches by agentId + * (exact) or displayName (case-insensitive). + * + * @return the agentId if found, or null if unresolvable + */ + public static String resolveAgent(String assignedTo, List members) { + if (assignedTo == null || assignedTo.isBlank() || members == null || members.isEmpty()) { + return null; + } + + // Exact ID match + for (GroupMember m : members) { + if (assignedTo.equals(m.agentId())) { + return m.agentId(); + } + } + + // Case-insensitive display name match + for (GroupMember m : members) { + if (m.displayName() != null && m.displayName().equalsIgnoreCase(assignedTo.trim())) { + return m.agentId(); + } + } + + return null; + } + + /** + * Assign tasks round-robin to members when the LLM's assignment can't be + * resolved. + */ + public static String roundRobinAssign(int taskIndex, List members) { + if (members == null || members.isEmpty()) { + return null; + } + return members.get(taskIndex % members.size()).agentId(); + } + + // --- Tier 1: JSON parsing --- + + private static List tryParseJson(String text) { + try { + // Strip markdown code fence if present + String json = text; + int jsonStart = text.indexOf('['); + int jsonEnd = text.lastIndexOf(']'); + + // Also try to find JSON wrapped in an object like {"tasks": [...]} + if (jsonStart < 0) { + int objStart = text.indexOf('{'); + int objEnd = text.lastIndexOf('}'); + if (objStart >= 0 && objEnd > objStart) { + String objJson = text.substring(objStart, objEnd + 1); + JsonNode node = MAPPER.readTree(objJson); + // Look for an array field ("tasks", "items", etc.) + for (var it = node.fields(); it.hasNext();) { + var entry = it.next(); + if (entry.getValue().isArray()) { + return parseJsonArray(entry.getValue().toString()); + } + } + } + return null; + } + + if (jsonEnd > jsonStart) { + json = text.substring(jsonStart, jsonEnd + 1); + } + + return parseJsonArray(json); + } catch (Exception e) { + LOGGER.debugf("JSON parse failed: %s", e.getMessage()); + return null; + } + } + + private static List parseJsonArray(String json) throws Exception { + List> items = MAPPER.readValue(json, new TypeReference<>() { + }); + List tasks = new ArrayList<>(); + for (Map item : items) { + String subject = stringVal(item, "subject", "title", "name"); + String desc = stringVal(item, "description", "desc", "details", "instructions"); + String assignedTo = stringVal(item, "assignedTo", "assigned_to", "assignee", "agent"); + int priority = intVal(item, "priority", 0); + + if (subject == null || subject.isBlank()) { + continue; // Skip entries without a subject + } + if (desc == null) { + desc = subject; // Use subject as description if missing + } + tasks.add(new ParsedTask(subject, desc, assignedTo, priority)); + } + return tasks.isEmpty() ? null : tasks; + } + + // --- Tier 2: Markdown parsing --- + + private static List tryParseMarkdown(String text) { + Matcher matcher = MARKDOWN_ITEM.matcher(text); + List tasks = new ArrayList<>(); + int index = 0; + + while (matcher.find()) { + String titlePart = matcher.group(1).trim(); + String descPart = matcher.group(2); + + // Check for inline assignment + String assignedTo = null; + Matcher assignMatcher = ASSIGNMENT.matcher(titlePart); + if (assignMatcher.find()) { + assignedTo = assignMatcher.group(1).trim(); + titlePart = titlePart.substring(0, assignMatcher.start()).trim(); + } + + String subject = titlePart; + String description = descPart != null ? descPart.trim() : titlePart; + + tasks.add(new ParsedTask(subject, description, assignedTo, index)); + index++; + } + + return tasks.isEmpty() ? null : tasks; + } + + // --- Tier 3: Single task fallback --- + + private static List singleTaskFallback(String llmOutput) { + String description = llmOutput != null && !llmOutput.isBlank() + ? llmOutput.substring(0, Math.min(llmOutput.length(), 2000)) + : "Complete the assigned goal"; + return List.of(new ParsedTask("Complete goal", description, null, 0)); + } + + // --- Helpers --- + + private static String stringVal(Map map, String... keys) { + for (String key : keys) { + Object val = map.get(key); + if (val != null) { + return val.toString(); + } + } + return null; + } + + private static int intVal(Map map, String key, int defaultVal) { + Object val = map.get(key); + if (val instanceof Number n) { + return n.intValue(); + } + return defaultVal; + } +} diff --git a/src/main/java/ai/labs/eddi/engine/lifecycle/GroupConversationEventSink.java b/src/main/java/ai/labs/eddi/engine/lifecycle/GroupConversationEventSink.java index df9093f2a6..0d29e375ae 100644 --- a/src/main/java/ai/labs/eddi/engine/lifecycle/GroupConversationEventSink.java +++ b/src/main/java/ai/labs/eddi/engine/lifecycle/GroupConversationEventSink.java @@ -32,6 +32,8 @@ private GroupConversationEventSink() { public static final String EVENT_SYNTHESIS_COMPLETE = "synthesis_complete"; public static final String EVENT_GROUP_COMPLETE = "group_complete"; public static final String EVENT_GROUP_ERROR = "group_error"; + public static final String EVENT_TASK_PLAN_CREATED = "task_plan_created"; + public static final String EVENT_TASK_VERIFIED = "task_verified"; // --- Event payloads --- @@ -68,4 +70,13 @@ public record GroupCompleteEvent(GroupConversation.GroupConversationState state, public record GroupErrorEvent(String error) { } + + public record TaskPlanCreatedEvent(List tasks, boolean preConfigured) { + } + + public record TaskVerifiedEvent(String taskId, String taskSubject, boolean passed, String feedback) { + } + + public record TaskSummary(String id, String subject, String assignedTo, int priority) { + } } diff --git a/src/main/java/ai/labs/eddi/engine/mcp/McpGroupTools.java b/src/main/java/ai/labs/eddi/engine/mcp/McpGroupTools.java index fadb2f04d5..a91dcc203c 100644 --- a/src/main/java/ai/labs/eddi/engine/mcp/McpGroupTools.java +++ b/src/main/java/ai/labs/eddi/engine/mcp/McpGroupTools.java @@ -6,6 +6,7 @@ import ai.labs.eddi.configs.groups.IRestAgentGroupStore; import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration; +import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.TaskDefinition; import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.DiscussionStyle; import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.GroupMember; import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.ProtocolConfig; @@ -17,6 +18,7 @@ import io.quarkiverse.mcp.server.Tool; import io.quarkiverse.mcp.server.ToolArg; import io.quarkus.security.identity.SecurityIdentity; +import io.smallrye.common.annotation.Blocking; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.ws.rs.core.Response; @@ -60,8 +62,8 @@ public McpGroupTools(IRestAgentGroupStore groupStore, IGroupConversationService // --- Discovery --- @Tool(description = "Describe all available discussion styles for agent " + "groups. Returns the name, phase flow, and recommended use case " - + "for each style (ROUND_TABLE, PEER_REVIEW, DEVIL_ADVOCATE, " + "DELPHI, DEBATE). Call this before create_group to choose the " - + "right style.") + + "for each style (ROUND_TABLE, PEER_REVIEW, DEVIL_ADVOCATE, " + "DELPHI, DEBATE, TASK_FORCE). Call this before create_group to " + + "choose the right style.") public String describe_discussion_styles() { requireRole(identity, authEnabled, "eddi-viewer"); return """ @@ -92,6 +94,16 @@ public String describe_discussion_styles() { Use when: Evaluating trade-offs, pro/con analysis, technology comparisons. Member roles: assign members role=PRO or role=CON. Moderator acts as judge. + ### TASK_FORCE + Flow: Plan → Execute (parallel) → Verify → Synthesis + TASK_FORCE — Collaborative task accomplishment. The moderator decomposes the + goal into tasks, each agent executes their assigned tasks in parallel, a + verification phase checks results, and a synthesis phase combines everything. + Best for: concrete deliverables, divide-and-conquer goals, project-style work. + Member roles: none required. Moderator handles planning and synthesis. + Optional: pass pre-configured tasks via the `tasks` parameter to skip the + PLAN phase entirely. + ## Nested Groups (Group-of-Groups) Members can be other groups (memberTypes=GROUP). The sub-group runs its own full discussion and its synthesized answer becomes the member's response. @@ -102,6 +114,9 @@ Members can be other groups (memberTypes=GROUP). The sub-group runs its - moderatorAgentId: required for synthesis/judging phase - memberRoles: comma-separated roles matching member positions - memberTypes: comma-separated types: AGENT (default) or GROUP + - tasks: (TASK_FORCE only) JSON array of pre-configured task definitions. + Each task: {"subject":"...","description":"...","assignToRole":"ALL", + "dependsOn":[],"priority":0}. If provided, the PLAN phase is skipped. """; } @@ -154,10 +169,14 @@ public String create_group(@ToolArg(description = "Group name") String name, + "(default) or GROUP for nested groups (optional)") String memberTypes, @ToolArg(description = "Moderator agent ID (optional)") String moderatorAgentId, @ToolArg(description = "Discussion style: ROUND_TABLE, PEER_REVIEW, " - + "DEVIL_ADVOCATE, DELPHI, DEBATE (default ROUND_TABLE)") String style, + + "DEVIL_ADVOCATE, DELPHI, DEBATE, TASK_FORCE (default ROUND_TABLE)") String style, @ToolArg(description = "Max rounds (default 2)") String maxRounds, @ToolArg(description = "Maximum total agent turns across all phases (default 50). " - + "Safety cap to prevent runaway discussions.") String maxTurns) { + + "Safety cap to prevent runaway discussions.") String maxTurns, + @ToolArg(description = "JSON array of pre-configured tasks for TASK_FORCE style " + + "(optional). Each element: {\"subject\":\"...\",\"description\":\"...\"," + + "\"assignToRole\":\"ALL\",\"dependsOn\":[],\"priority\":0}. " + + "If provided, the PLAN phase is skipped.") String tasks) { requireRole(identity, authEnabled, "eddi-editor"); try { AgentGroupConfiguration config = new AgentGroupConfiguration(); @@ -200,6 +219,16 @@ public String create_group(@ToolArg(description = "Group name") String name, config.setStyle(discussionStyle); config.setMaxRounds(parseIntOrDefault(maxRounds, 2)); + // Pre-configured tasks (TASK_FORCE style — skips PLAN phase) + if (tasks != null && !tasks.isBlank()) { + try { + TaskDefinition[] taskArray = jsonSerialization.deserialize(tasks, TaskDefinition[].class); + config.setTasks(List.of(taskArray)); + } catch (Exception ex) { + return errorJson("Invalid tasks JSON: " + ex.getMessage()); + } + } + // Protocol with maxTurns safety cap int mt = parseIntOrDefault(maxTurns, 0); config.setProtocol(new ProtocolConfig(60, ProtocolConfig.MemberFailurePolicy.SKIP, 2, @@ -253,8 +282,14 @@ public String delete_group(@ToolArg(description = "Group ID") String groupId, // --- Group Conversation --- - @Tool(description = "Start a structured multi-agent discussion. All " + "configured member agents will participate using the group's " - + "discussion style. Returns the full transcript with each " + "agent's contributions organized by phase.") + @Blocking + @Tool(description = "Start a structured multi-agent discussion and wait for it to complete. " + + "All configured member agents participate using the group's discussion style. " + + "Returns the full GroupConversation including transcript, task list (for TASK_FORCE), " + + "dynamic agent tracking, and synthesized answer. " + + "WARNING: TASK_FORCE discussions with many agents/tasks can take several minutes. " + + "For long-running discussions, use start_group_discussion instead (returns immediately, " + + "poll with read_group_conversation).") public String discuss_with_group(@ToolArg(description = "Group configuration ID (from create_group " + "or list_groups)") String groupId, @ToolArg(description = "The question or topic for the group to " + "discuss") String question, @ToolArg(description = "User ID (optional, defaults to " + "'mcp-client')") String userId) { @@ -269,10 +304,15 @@ public String discuss_with_group(@ToolArg(description = "Group configuration ID } } - @Tool(description = "Read a group conversation transcript including all " + "phases, agent contributions, and synthesized answer.") + @Tool(description = "Read a group conversation including its full transcript, task list " + + "(for TASK_FORCE discussions with per-task status, assignments, and results), " + + "dynamic agent tracking (createdAgentIds, retainedAgentIds), synthesized answer, " + + "and conversation state. Use this to poll for completion after start_group_discussion, " + + "or to inspect task-level results after a TASK_FORCE discussion.") public String read_group_conversation( @ToolArg(description = "Group conversation ID (from " - + "discuss_with_group or list_group_conversations)") String groupConversationId) { + + "discuss_with_group, start_group_discussion, " + + "or list_group_conversations)") String groupConversationId) { requireRole(identity, authEnabled, "eddi-viewer"); try { GroupConversation gc = groupConversationService.readGroupConversation(groupConversationId); @@ -298,4 +338,43 @@ public String list_group_conversations(@ToolArg(description = "Group configurati return errorJson(e.getMessage()); } } + + // --- Async Discussion + Delete --- + + @Tool(description = "Start a group discussion asynchronously and return immediately " + + "with the conversation ID and IN_PROGRESS state. Use this instead of " + + "discuss_with_group for TASK_FORCE or other long-running discussions. " + + "Poll with read_group_conversation to check progress and get results " + + "when state changes to COMPLETED or FAILED.") + public String start_group_discussion( + @ToolArg(description = "Group configuration ID (from create_group or list_groups)") String groupId, + @ToolArg(description = "The question or topic for the group to discuss") String question, + @ToolArg(description = "User ID (optional, defaults to 'mcp-client')") String userId) { + requireRole(identity, authEnabled, "eddi-viewer"); + try { + String user = userId != null && !userId.isBlank() ? userId : "mcp-client"; + GroupConversation gc = groupConversationService.startAndDiscussAsync(groupId, question, user, null); + return jsonSerialization.serialize(java.util.Map.of( + "groupConversationId", gc.getId(), + "state", String.valueOf(gc.getState()), + "message", "Discussion started. Poll read_group_conversation with this ID to check progress.")); + } catch (Exception e) { + LOGGER.errorf("start_group_discussion failed: %s", e.getMessage()); + return errorJson(e.getMessage()); + } + } + + @Tool(description = "Delete a group conversation and cascade-delete all member " + + "conversations created during the discussion.") + public String delete_group_conversation( + @ToolArg(description = "Group conversation ID to delete") String groupConversationId) { + requireRole(identity, authEnabled, "eddi-editor"); + try { + groupConversationService.deleteGroupConversation(groupConversationId); + return "Deleted group conversation " + groupConversationId; + } catch (Exception e) { + LOGGER.errorf("delete_group_conversation failed: %s", e.getMessage()); + return errorJson(e.getMessage()); + } + } } diff --git a/src/main/java/ai/labs/eddi/engine/mcp/McpToolFilter.java b/src/main/java/ai/labs/eddi/engine/mcp/McpToolFilter.java index 35942f596b..44fc4b916d 100644 --- a/src/main/java/ai/labs/eddi/engine/mcp/McpToolFilter.java +++ b/src/main/java/ai/labs/eddi/engine/mcp/McpToolFilter.java @@ -19,7 +19,7 @@ * Agent tools (calculator, datetime, websearch, etc.), which are meant ONLY for * internal Agent workflow use — not for external MCP clients. *

- * This whitelist ensures only the 33 intended MCP tools are visible. + * This whitelist ensures only the intended MCP tools are visible. * * @author ginccc */ @@ -49,7 +49,12 @@ public class McpToolFilter implements ToolFilter { "list_agent_triggers", "create_agent_trigger", "update_agent_trigger", "delete_agent_trigger", // Group Conversations (Phase 10) "describe_discussion_styles", "list_groups", "read_group", "create_group", "update_group", "delete_group", "discuss_with_group", - "read_group_conversation", "list_group_conversations"); + "read_group_conversation", "list_group_conversations", "start_group_discussion", "delete_group_conversation", + // Schedule Management + "create_schedule", "list_schedules", "read_schedule", "delete_schedule", "fire_schedule_now", "retry_failed_schedule", + // Channel Integrations + "list_channel_integrations", "read_channel_integration", "create_channel_integration", "update_channel_integration", + "delete_channel_integration"); @Override public boolean test(ToolInfo toolInfo, FilterContext filterContext) { diff --git a/src/main/java/ai/labs/eddi/engine/memory/ConversationOutputExtractor.java b/src/main/java/ai/labs/eddi/engine/memory/ConversationOutputExtractor.java new file mode 100644 index 0000000000..6e5a3c4756 --- /dev/null +++ b/src/main/java/ai/labs/eddi/engine/memory/ConversationOutputExtractor.java @@ -0,0 +1,124 @@ +/* + * Copyright EDDI contributors + * SPDX-License-Identifier: Apache-2.0 + */ +package ai.labs.eddi.engine.memory; + +import ai.labs.eddi.engine.memory.model.ConversationOutput; +import ai.labs.eddi.engine.memory.model.SimpleConversationMemorySnapshot; +import ai.labs.eddi.modules.output.model.OutputItem; +import org.jboss.logging.Logger; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * Shared utility for extracting human-readable text from a conversation memory + * snapshot. Consolidates logic that was duplicated across + * {@code GroupConversationService}, {@code CreateSubAgentTool}, and + * {@code ConverseWithAgentTool}. + * + *

+ * Handles three output formats: + *

    + *
  1. Nested {@code output} array — items may be plain Strings, + * {@link OutputItem} POJOs, or Maps with a {@code text} key
  2. + *
  3. Flat keys like {@code output:text:*} — legacy format
  4. + *
  5. Fallback: {@code toString()} on the entire output map
  6. + *
+ * + * @since 6.0.0 + */ +public final class ConversationOutputExtractor { + + private static final Logger LOGGER = Logger.getLogger(ConversationOutputExtractor.class); + + private ConversationOutputExtractor() { + // Utility class + } + + /** + * Extracts the human-readable response text from the last conversation output + * in a snapshot. + * + * @param snapshot + * the conversation memory snapshot (may be null) + * @return the extracted text, or {@code null} if no meaningful output is found + * (e.g., pipeline metadata only) + */ + public static String extractResponse(SimpleConversationMemorySnapshot snapshot) { + if (snapshot == null || snapshot.getConversationOutputs() == null) { + return null; + } + List outputs = snapshot.getConversationOutputs(); + if (outputs.isEmpty()) { + return null; + } + ConversationOutput lastOutput = outputs.get(outputs.size() - 1); + if (lastOutput == null) { + return null; + } + + var texts = new ArrayList(); + + // Format 1: Nested "output" array — may contain TextOutputItem POJOs or Maps + Object outputArray = lastOutput.get("output"); + if (outputArray instanceof List list) { + for (var item : list) { + if (item instanceof String s) { + texts.add(s); + } else if (item instanceof OutputItem oi && oi.toString() != null) { + // TextOutputItem.toString() returns the text field + texts.add(oi.toString()); + } else if (item instanceof Map map) { + Object text = map.get("text"); + if (text instanceof String s) { + texts.add(s); + } + } + } + if (!texts.isEmpty()) { + return String.join("\n", texts); + } + } + + // Format 2: Flat keys like "output:text:*" + for (var entry : lastOutput.entrySet()) { + if (entry.getKey() instanceof String key && key.startsWith("output:text:")) { + Object val = entry.getValue(); + if (val instanceof String s) { + texts.add(s); + } else if (val instanceof List list) { + for (var item : list) { + if (item instanceof String s) + texts.add(s); + else if (item instanceof Map map && map.get("text") instanceof String s) + texts.add(s); + } + } else if (val instanceof Map map && map.get("text") instanceof String s) { + texts.add(s); + } + } + } + + if (!texts.isEmpty()) { + return String.join("\n", texts); + } + + // Check if the output contains any actual LLM-generated content. + // Output keys follow patterns like "output", "output:text:*", "reply". + // If none are present, the map only contains pipeline metadata + // (e.g. "actions", "input", "context") — return null to avoid + // serializing raw metadata as a group discussion response. + boolean hasAnyOutput = lastOutput.keySet().stream() + .anyMatch(k -> k instanceof String s && + (s.startsWith("output") || s.startsWith("reply"))); + if (!hasAnyOutput) { + return null; + } + + // Fallback: serialize the entire output map + return lastOutput.toString(); + } +} diff --git a/src/main/java/ai/labs/eddi/integrations/slack/SlackGroupDiscussionListener.java b/src/main/java/ai/labs/eddi/integrations/slack/SlackGroupDiscussionListener.java index 2e2f8c2f7f..7305b8bf14 100644 --- a/src/main/java/ai/labs/eddi/integrations/slack/SlackGroupDiscussionListener.java +++ b/src/main/java/ai/labs/eddi/integrations/slack/SlackGroupDiscussionListener.java @@ -8,6 +8,7 @@ import ai.labs.eddi.engine.lifecycle.GroupConversationEventSink; import org.jboss.logging.Logger; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; @@ -24,9 +25,8 @@ * response lives in a thread reply. Peer feedback threads under the target * agent's message; revisions thread under the agent's own message. *

- * Compact mode code paths remain as a safety net for potential future styles - * but are currently unreachable ({@code EXPANDED_STYLES} contains all 5 - * styles). + * Compact mode code paths remain as a fallback for styles not in + * {@code EXPANDED_STYLES} (e.g. {@code CUSTOM}). * * @since 6.0.0 */ @@ -40,7 +40,7 @@ public class SlackGroupDiscussionListener implements GroupDiscussionEventListene * mode (single thread) is too hard to follow with multiple agents. */ private static final Set EXPANDED_STYLES = Set.of( - "ROUND_TABLE", "PEER_REVIEW", "DEVIL_ADVOCATE", "DEBATE", "DELPHI"); + "ROUND_TABLE", "PEER_REVIEW", "DEVIL_ADVOCATE", "DEBATE", "DELPHI", "TASK_FORCE"); private final SlackWebApiClient slackApi; private final String authToken; @@ -188,6 +188,50 @@ public void onGroupError(GroupConversationEventSink.GroupErrorEvent event) { } } + @Override + public void onTaskPlanCreated(GroupConversationEventSink.TaskPlanCreatedEvent event) { + List tasks = event.tasks(); + if (tasks == null || tasks.isEmpty()) { + return; + } + + var sb = new StringBuilder(); + sb.append(event.preConfigured() + ? "📝 *Task plan loaded* (pre-configured)\n" + : "📝 *Task plan created*\n"); + + for (int i = 0; i < tasks.size(); i++) { + var task = tasks.get(i); + sb.append(String.format("%d. *%s*", i + 1, task.subject())); + if (task.assignedTo() != null && !task.assignedTo().isBlank()) { + sb.append(String.format(" — assigned to _%s_", task.assignedTo())); + } + if (task.priority() > 0) { + sb.append(String.format(" [P%d]", task.priority())); + } + sb.append('\n'); + } + + String threadTs = expandedMode ? null : userThreadTs; + postSafe(channelId, threadTs, sb.toString().stripTrailing()); + } + + @Override + public void onTaskVerified(GroupConversationEventSink.TaskVerifiedEvent event) { + String emoji = event.passed() ? "✅" : "❌"; + String status = event.passed() ? "passed" : "failed"; + + var sb = new StringBuilder(); + sb.append(String.format("%s *Task %s* — %s\n", emoji, event.taskSubject(), status)); + + if (event.feedback() != null && !event.feedback().isBlank()) { + sb.append(String.format("> %s\n", event.feedback().replace("\n", "\n> "))); + } + + String threadTs = expandedMode ? null : userThreadTs; + postSafe(channelId, threadTs, sb.toString().stripTrailing()); + } + // ─── Posting strategies ─── /** diff --git a/src/main/java/ai/labs/eddi/modules/llm/impl/AgentOrchestrator.java b/src/main/java/ai/labs/eddi/modules/llm/impl/AgentOrchestrator.java index f44cac3ba8..da4807c638 100644 --- a/src/main/java/ai/labs/eddi/modules/llm/impl/AgentOrchestrator.java +++ b/src/main/java/ai/labs/eddi/modules/llm/impl/AgentOrchestrator.java @@ -5,19 +5,25 @@ package ai.labs.eddi.modules.llm.impl; import ai.labs.eddi.configs.agents.model.AgentConfiguration; +import ai.labs.eddi.configs.agents.IAgentStore; import ai.labs.eddi.configs.agents.IRestAgentStore; +import ai.labs.eddi.configs.agents.CapabilityRegistryService; import ai.labs.eddi.configs.apicalls.model.ApiCall; import ai.labs.eddi.configs.apicalls.model.ApiCallsConfiguration; +import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.DynamicAgentConfig; import ai.labs.eddi.configs.mcpcalls.model.McpCallsConfiguration; import ai.labs.eddi.configs.workflows.IRestWorkflowStore; import ai.labs.eddi.datastore.serialization.IJsonSerialization; import ai.labs.eddi.configs.properties.IUserMemoryStore; import ai.labs.eddi.configs.properties.model.Property; +import ai.labs.eddi.engine.api.IConversationService; import ai.labs.eddi.engine.lifecycle.exceptions.LifecycleException; import ai.labs.eddi.engine.memory.IConversationMemory; import ai.labs.eddi.engine.memory.IMemoryItemConverter; import ai.labs.eddi.engine.memory.MemorySnapshotService; +import ai.labs.eddi.engine.runtime.IAgentFactory; import ai.labs.eddi.engine.runtime.client.configuration.IResourceClientLibrary; +import ai.labs.eddi.engine.setup.AgentSetupService; import com.fasterxml.jackson.core.io.JsonStringEncoder; import ai.labs.eddi.modules.apicalls.impl.IApiCallExecutor; import ai.labs.eddi.modules.llm.model.LlmConfiguration; @@ -26,6 +32,10 @@ import ai.labs.eddi.modules.llm.tools.ToolExecutionService; import ai.labs.eddi.modules.llm.tools.UserMemoryTool; import ai.labs.eddi.modules.llm.tools.ConversationRecallTool; +import ai.labs.eddi.modules.llm.tools.CreateSubAgentTool; +import ai.labs.eddi.modules.llm.tools.ConverseWithAgentTool; +import ai.labs.eddi.modules.llm.tools.FindAgentsByCapabilityTool; +import ai.labs.eddi.modules.llm.tools.TeardownAgentTool; import ai.labs.eddi.modules.llm.tools.impl.*; import dev.langchain4j.agent.tool.ToolExecutionRequest; import dev.langchain4j.agent.tool.ToolSpecification; @@ -67,6 +77,10 @@ class AgentOrchestrator { private static final String HTTPCALLS_TYPE = "eddi://ai.labs.httpcalls"; private static final String MCPCALLS_TYPE = "eddi://ai.labs.mcpcalls"; + /** Well-known data keys for dynamic agent lifecycle tracking. */ + public static final String KEY_DYNAMIC_CREATED_AGENT_IDS = "dynamic:created_agent_ids"; + public static final String KEY_DYNAMIC_RETAINED_AGENT_IDS = "dynamic:retained_agent_ids"; + // Built-in tools private final CalculatorTool calculatorTool; private final DateTimeTool dateTimeTool; @@ -93,6 +107,13 @@ class AgentOrchestrator { private final TenantQuotaService tenantQuotaService; private final MemorySnapshotService memorySnapshotService; + // Dynamic agent creation dependencies + private final AgentSetupService agentSetupService; + private final CapabilityRegistryService capabilityRegistryService; + private final IConversationService conversationService; + private final IAgentFactory agentFactory; + private final IAgentStore agentStore; + AgentOrchestrator(CalculatorTool calculatorTool, DateTimeTool dateTimeTool, WebSearchTool webSearchTool, DataFormatterTool dataFormatterTool, WebScraperTool webScraperTool, TextSummarizerTool textSummarizerTool, PdfReaderTool pdfReaderTool, WeatherTool weatherTool, FetchToolResponsePageTool fetchToolResponsePageTool, @@ -100,7 +121,9 @@ class AgentOrchestrator { IRestAgentStore restAgentStore, IRestWorkflowStore restWorkflowStore, IResourceClientLibrary resourceClientLibrary, IApiCallExecutor apiCallExecutor, IJsonSerialization jsonSerialization, IMemoryItemConverter memoryItemConverter, IUserMemoryStore userMemoryStore, ToolResponseTruncator toolResponseTruncator, TenantQuotaService tenantQuotaService, - MemorySnapshotService memorySnapshotService) { + MemorySnapshotService memorySnapshotService, + AgentSetupService agentSetupService, CapabilityRegistryService capabilityRegistryService, + IConversationService conversationService, IAgentFactory agentFactory, IAgentStore agentStore) { this.calculatorTool = calculatorTool; this.dateTimeTool = dateTimeTool; this.webSearchTool = webSearchTool; @@ -123,6 +146,11 @@ class AgentOrchestrator { this.toolResponseTruncator = toolResponseTruncator; this.tenantQuotaService = tenantQuotaService; this.memorySnapshotService = memorySnapshotService; + this.agentSetupService = agentSetupService; + this.capabilityRegistryService = capabilityRegistryService; + this.conversationService = conversationService; + this.agentFactory = agentFactory; + this.agentStore = agentStore; } /** @@ -535,6 +563,48 @@ private List collectAllBuiltInTools(LlmConfiguration.Task task, IConvers addUserMemoryToolIfEnabled(tools, memory); if (whitelist.contains("conversationRecall")) addConversationRecallToolIfEnabled(tools, task, memory); + // Dynamic agent tools (whitelist-gated, shared tracking lists) + { + List sharedCreatedIds = new java.util.concurrent.CopyOnWriteArrayList<>(); + Set sharedRetainedIds = java.util.concurrent.ConcurrentHashMap.newKeySet(); + String parentAgentId = memory.getAgentId(); + String userId = memory.getUserId(); + DynamicAgentConfig dynamicConfig = resolveDynamicAgentConfig(memory); + + boolean anyDynamicToolAdded = false; + if (whitelist.contains("create_sub_agent") && agentSetupService != null && conversationService != null) { + tools.add(new CreateSubAgentTool(agentSetupService, + conversationService, parentAgentId, userId, dynamicConfig, + sharedCreatedIds, sharedRetainedIds)); + LOGGER.debugf("[DYNAMIC] CreateSubAgentTool enabled for agent='%s'", sanitize(parentAgentId)); + anyDynamicToolAdded = true; + } + if (whitelist.contains("converse_with_agent") && conversationService != null) { + tools.add(new ConverseWithAgentTool(conversationService, userId)); + LOGGER.debugf("[DYNAMIC] ConverseWithAgentTool enabled for agent='%s'", sanitize(parentAgentId)); + } + if (whitelist.contains("find_agents_by_capability") && capabilityRegistryService != null) { + tools.add(new FindAgentsByCapabilityTool(capabilityRegistryService)); + LOGGER.debugf("[DYNAMIC] FindAgentsByCapabilityTool enabled for agent='%s'", sanitize(parentAgentId)); + } + if (whitelist.contains("teardown_agent") && agentFactory != null && agentStore != null) { + tools.add(new TeardownAgentTool(agentFactory, agentStore, sharedCreatedIds, sharedRetainedIds)); + LOGGER.debugf("[DYNAMIC] TeardownAgentTool enabled for agent='%s'", sanitize(parentAgentId)); + anyDynamicToolAdded = true; + } + + // Store tracking lists in memory step data so GroupConversationService + // can read them from the snapshot after each member turn and propagate + // to GroupConversation for lifecycle cleanup (Copilot PR review fix). + // The lists are stored by reference — after tool execution, they'll + // contain all agent IDs accumulated during this turn. + if (anyDynamicToolAdded) { + memory.getCurrentStep().storeData( + new ai.labs.eddi.engine.memory.model.Data<>(KEY_DYNAMIC_CREATED_AGENT_IDS, sharedCreatedIds)); + memory.getCurrentStep().storeData( + new ai.labs.eddi.engine.memory.model.Data<>(KEY_DYNAMIC_RETAINED_AGENT_IDS, sharedRetainedIds)); + } + } } else { // No whitelist — add all built-in tools tools.add(calculatorTool); @@ -604,6 +674,49 @@ private void addConversationRecallToolIfEnabled(List tools, LlmConfigura summaryConfig.getMaxRecallTurns()); } + /** + * Resolves the DynamicAgentConfig for the current conversation. If the agent is + * participating in a group discussion, the group's {@link DynamicAgentConfig} + * is passed via context variable {@code dynamicAgentConfig} by + * {@code GroupConversationService}. If no group config is present (standalone + * agent), a permissive default is used. + * + * @param memory + * the conversation memory to check for group context + * @return the resolved DynamicAgentConfig — group-level if available, + * permissive default otherwise + */ + private DynamicAgentConfig resolveDynamicAgentConfig(IConversationMemory memory) { + // Check if GroupConversationService injected a DynamicAgentConfig via context + var currentStep = memory.getCurrentStep(); + if (currentStep != null) { + var contextData = currentStep.getLatestData("context:dynamicAgentConfig"); + if (contextData != null) { + Object value = contextData.getResult(); + if (value instanceof ai.labs.eddi.engine.model.Context ctx && ctx.getValue() instanceof DynamicAgentConfig groupConfig) { + LOGGER.debugf("[DYNAMIC] Using group-level DynamicAgentConfig for agent='%s'", sanitize(memory.getAgentId())); + return groupConfig; + } + } + } + // Fallback: standalone agent — use permissive defaults + return createDefaultDynamicConfig(); + } + + /** + * Creates a default DynamicAgentConfig for agents without explicit group + * config. Used when individual agents have dynamic agent tools in their + * whitelist. + */ + private DynamicAgentConfig createDefaultDynamicConfig() { + var config = new DynamicAgentConfig(); + config.setEnabled(true); + config.setAllowCreation(true); + config.setAllowRecruitment(true); + config.setAllowDelegation(true); + return config; + } + // --- Httpcall auto-discovery from workflow --- /** diff --git a/src/main/java/ai/labs/eddi/modules/llm/impl/LlmTask.java b/src/main/java/ai/labs/eddi/modules/llm/impl/LlmTask.java index 15e7849a5c..75a79af1fa 100644 --- a/src/main/java/ai/labs/eddi/modules/llm/impl/LlmTask.java +++ b/src/main/java/ai/labs/eddi/modules/llm/impl/LlmTask.java @@ -4,7 +4,9 @@ */ package ai.labs.eddi.modules.llm.impl; +import ai.labs.eddi.configs.agents.IAgentStore; import ai.labs.eddi.configs.agents.IRestAgentStore; +import ai.labs.eddi.configs.agents.CapabilityRegistryService; import ai.labs.eddi.configs.properties.IUserMemoryStore; import ai.labs.eddi.configs.apicalls.model.ApiCall; import ai.labs.eddi.configs.apicalls.model.ApiCallsConfiguration; @@ -20,8 +22,11 @@ import ai.labs.eddi.engine.lifecycle.exceptions.WorkflowConfigurationException; import ai.labs.eddi.engine.memory.*; import ai.labs.eddi.engine.memory.IConversationMemory.IWritableConversationStep; +import ai.labs.eddi.engine.api.IConversationService; +import ai.labs.eddi.engine.runtime.IAgentFactory; import ai.labs.eddi.engine.runtime.client.configuration.IResourceClientLibrary; import ai.labs.eddi.engine.runtime.service.ServiceException; +import ai.labs.eddi.engine.setup.AgentSetupService; import ai.labs.eddi.engine.tenancy.TenantQuotaService; import ai.labs.eddi.modules.apicalls.impl.PrePostUtils; import ai.labs.eddi.modules.llm.model.LlmConfiguration; @@ -123,7 +128,9 @@ public LlmTask(IResourceClientLibrary resourceClientLibrary, IDataFactory dataFa CounterweightService counterweightService, IdentityMaskingService identityMaskingService, ToolResponseTruncator toolResponseTruncator, TenantQuotaService tenantQuotaService, - MemorySnapshotService memorySnapshotService, IAttachmentStore attachmentStore) { + MemorySnapshotService memorySnapshotService, IAttachmentStore attachmentStore, + AgentSetupService agentSetupService, CapabilityRegistryService capabilityRegistryService, + IConversationService conversationService, IAgentFactory agentFactory, IAgentStore agentStore) { this.resourceClientLibrary = resourceClientLibrary; this.dataFactory = dataFactory; this.memoryItemConverter = memoryItemConverter; @@ -139,7 +146,8 @@ public LlmTask(IResourceClientLibrary resourceClientLibrary, IDataFactory dataFa textSummarizerTool, pdfReaderTool, weatherTool, fetchToolResponsePageTool, toolExecutionService, mcpToolProviderManager, a2aToolProviderManager, restAgentStore, restWorkflowStore, resourceClientLibrary, apiCallExecutor, jsonSerialization, memoryItemConverter, userMemoryStore, - toolResponseTruncator, tenantQuotaService, memorySnapshotService); + toolResponseTruncator, tenantQuotaService, memorySnapshotService, + agentSetupService, capabilityRegistryService, conversationService, agentFactory, agentStore); this.ragContextProvider = ragContextProvider; this.tokenCounterFactory = tokenCounterFactory; this.apiCallExecutor = apiCallExecutor; diff --git a/src/main/java/ai/labs/eddi/modules/llm/tools/ConverseWithAgentTool.java b/src/main/java/ai/labs/eddi/modules/llm/tools/ConverseWithAgentTool.java new file mode 100644 index 0000000000..defb899b5f --- /dev/null +++ b/src/main/java/ai/labs/eddi/modules/llm/tools/ConverseWithAgentTool.java @@ -0,0 +1,122 @@ +/* + * Copyright EDDI contributors + * SPDX-License-Identifier: Apache-2.0 + */ +package ai.labs.eddi.modules.llm.tools; + +import ai.labs.eddi.engine.api.IConversationService; +import ai.labs.eddi.engine.api.IConversationService.ConversationResult; +import ai.labs.eddi.engine.model.Deployment.Environment; +import ai.labs.eddi.engine.model.InputData; +import dev.langchain4j.agent.tool.P; +import dev.langchain4j.agent.tool.Tool; +import jakarta.enterprise.inject.Vetoed; +import org.jboss.logging.Logger; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; + +/** + * LLM tool for conversing with another deployed EDDI agent. Constructed + * per-invocation by {@code AgentOrchestrator} with the conversation service and + * user identity. + * + *

+ * Supports both single-turn (fire-and-forget) and multi-turn conversations. + * When a {@code conversationId} is provided, the tool continues an existing + * conversation; otherwise it starts a new one. + * + * @since 6.0.0 + */ +@Vetoed // Instantiated per-invocation by AgentOrchestrator — must NOT be a CDI bean +public class ConverseWithAgentTool { + + private static final Logger LOGGER = Logger.getLogger(ConverseWithAgentTool.class); + private static final Environment DEFAULT_ENV = Environment.production; + + private final IConversationService conversationService; + private final String userId; + + public ConverseWithAgentTool(IConversationService conversationService, String userId) { + this.conversationService = conversationService; + this.userId = userId; + } + + @Tool("Send a message to another deployed EDDI agent and receive its response. " + + "Use this for inter-agent delegation or consultation. " + + "Provide an existing conversationId for multi-turn conversations, " + + "or omit it to start a new conversation.") + public String converseWithAgent( + @P("The ID of the target agent to converse with") String agentId, + @P("The message to send to the agent") String message, + @P("Optional conversation ID for continuing a multi-turn conversation") String conversationId) { + + try { + // --- Validate parameters --- + if (agentId == null || agentId.isBlank()) { + return "⚠️ Agent ID is required."; + } + if (message == null || message.isBlank()) { + return "⚠️ Message is required."; + } + + // --- Start new conversation if no conversationId provided --- + if (conversationId == null || conversationId.isBlank()) { + try { + ConversationResult convResult = conversationService.startConversation( + DEFAULT_ENV, agentId, userId, Collections.emptyMap()); + conversationId = convResult.conversationId(); + LOGGER.debugf("[CONVERSE] Started new conversation '%s' with agent '%s'", + conversationId, agentId); + } catch (Exception e) { + LOGGER.errorf("[CONVERSE] Failed to start conversation with agent '%s': %s", + agentId, e.getMessage()); + return "❌ Failed to start conversation with agent '%s': %s" + .formatted(agentId, e.getMessage()); + } + } + + // --- Send message and wait for response --- + InputData inputData = new InputData(); + inputData.setInput(message); + + CompletableFuture responseFuture = new CompletableFuture<>(); + final String convId = conversationId; + + conversationService.say(DEFAULT_ENV, agentId, convId, + false, true, null, inputData, false, snapshot -> { + String response = extractResponse(snapshot); + if (response == null && snapshot != null + && snapshot.getConversationState() == ai.labs.eddi.engine.memory.model.ConversationState.ERROR) { + response = "[Agent failed to produce output — conversation entered ERROR state]"; + } + responseFuture.complete(response); + }); + + String response = responseFuture.get(60, TimeUnit.SECONDS); + + LOGGER.debugf("[CONVERSE] Agent '%s' responded in conversation '%s'", agentId, convId); + + return "✅ Agent response (conversationId: %s):\n%s".formatted(convId, + response != null && !response.isEmpty() ? response : "[no response]"); + + } catch (java.util.concurrent.TimeoutException e) { + LOGGER.warnf("[CONVERSE] Timeout waiting for agent '%s' response", agentId); + return "⚠️ Timeout waiting for agent '%s' to respond (60s limit).".formatted(agentId); + } catch (Exception e) { + LOGGER.errorf("[CONVERSE] Error conversing with agent '%s': %s", agentId, e.getMessage()); + return "❌ Error conversing with agent '%s': %s".formatted(agentId, e.getMessage()); + } + } + + /** + * Extracts the human-readable text from a conversation memory snapshot. + * Delegates to shared utility. + */ + private String extractResponse(ai.labs.eddi.engine.memory.model.SimpleConversationMemorySnapshot snapshot) { + return ai.labs.eddi.engine.memory.ConversationOutputExtractor.extractResponse(snapshot); + } +} diff --git a/src/main/java/ai/labs/eddi/modules/llm/tools/CreateSubAgentTool.java b/src/main/java/ai/labs/eddi/modules/llm/tools/CreateSubAgentTool.java new file mode 100644 index 0000000000..ae8c6d5024 --- /dev/null +++ b/src/main/java/ai/labs/eddi/modules/llm/tools/CreateSubAgentTool.java @@ -0,0 +1,240 @@ +/* + * Copyright EDDI contributors + * SPDX-License-Identifier: Apache-2.0 + */ +package ai.labs.eddi.modules.llm.tools; + +import ai.labs.eddi.configs.groups.model.AgentGroupConfiguration.DynamicAgentConfig; +import ai.labs.eddi.engine.api.IConversationService; +import ai.labs.eddi.engine.api.IConversationService.ConversationResult; +import ai.labs.eddi.engine.model.Deployment.Environment; +import ai.labs.eddi.engine.model.InputData; +import ai.labs.eddi.engine.setup.AgentSetupService; +import ai.labs.eddi.engine.setup.AgentSetupService.AgentSetupException; +import ai.labs.eddi.engine.setup.SetupAgentRequest; +import ai.labs.eddi.engine.setup.SetupResult; +import dev.langchain4j.agent.tool.P; +import dev.langchain4j.agent.tool.Tool; +import jakarta.enterprise.inject.Vetoed; +import org.jboss.logging.Logger; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; + +/** + * LLM tool for dynamically creating sub-agents during group conversations. + * Constructed per-invocation by {@code AgentOrchestrator} with the parent + * agent's context and the group's {@link DynamicAgentConfig} guardrails. + * + *

+ * The LLM can call this tool to spin up a new specialist agent on the fly, + * optionally sending it an initial message to bootstrap its context. + * + * @since 6.0.0 + */ +@Vetoed // Instantiated per-invocation by AgentOrchestrator — must NOT be a CDI bean +public class CreateSubAgentTool { + + private static final Logger LOGGER = Logger.getLogger(CreateSubAgentTool.class); + private static final Environment DEFAULT_ENV = Environment.production; + + private final AgentSetupService agentSetupService; + private final IConversationService conversationService; + private final String parentAgentId; + private final String userId; + private final DynamicAgentConfig config; + private final List createdAgentIds; + private final Set retainedAgentIds; + + public CreateSubAgentTool(AgentSetupService agentSetupService, + IConversationService conversationService, + String parentAgentId, + String userId, + DynamicAgentConfig config, + List createdAgentIds, + Set retainedAgentIds) { + this.agentSetupService = agentSetupService; + this.conversationService = conversationService; + this.parentAgentId = parentAgentId; + this.userId = userId; + this.config = config != null ? config : new DynamicAgentConfig(); + this.createdAgentIds = createdAgentIds != null ? createdAgentIds : new java.util.concurrent.CopyOnWriteArrayList<>(); + this.retainedAgentIds = retainedAgentIds != null ? retainedAgentIds : java.util.concurrent.ConcurrentHashMap.newKeySet(); + } + + @Tool("Create a new sub-agent dynamically. The agent is set up, deployed, and optionally sent an initial message. " + + "Use this when the current discussion requires a specialist that doesn't exist yet. " + + "The created agent's name will be auto-prefixed with the parent agent's ID.") + public String createSubAgent( + @P("Name for the new agent (will be prefixed with parent agent ID)") String name, + @P("System prompt defining the agent's behavior and expertise") String systemPrompt, + @P("LLM provider (e.g. 'openai', 'anthropic'). Optional — inherits parent if omitted") String provider, + @P("Model name (e.g. 'gpt-4o'). Optional — inherits parent if omitted") String model, + @P("Optional initial message to send to the agent after creation") String initialMessage, + @P("If true, the agent will be retained after the discussion ends. Default: false") Boolean retain) { + + try { + // --- Guardrail: creation allowed --- + if (!config.isEnabled() || !config.isAllowCreation()) { + return "⚠️ Dynamic agent creation is not enabled for this group."; + } + + // --- Guardrail: max created agents --- + if (createdAgentIds.size() >= config.getMaxCreatedAgentsPerDiscussion()) { + return "⚠️ Maximum created agents (%d) reached for this discussion." + .formatted(config.getMaxCreatedAgentsPerDiscussion()); + } + + // --- Guardrail: required parameters --- + if (name == null || name.isBlank()) { + return "⚠️ Agent name is required."; + } + if (systemPrompt == null || systemPrompt.isBlank()) { + return "⚠️ System prompt is required."; + } + + // --- Guardrail: allowed providers --- + if (provider != null && !provider.isBlank() + && config.getAllowedProviders() != null + && !config.getAllowedProviders().isEmpty()) { + boolean providerAllowed = config.getAllowedProviders().stream() + .filter(java.util.Objects::nonNull) + .anyMatch(p -> p.equalsIgnoreCase(provider)); + if (!providerAllowed) { + return "⚠️ Provider '%s' is not allowed. Allowed: %s" + .formatted(provider, config.getAllowedProviders()); + } + } + + // --- Guardrail: allowed models --- + if (model != null && !model.isBlank() + && config.getAllowedModels() != null + && !config.getAllowedModels().isEmpty()) { + if (provider != null && !provider.isBlank()) { + // Provider specified — check against that provider's model list + // (case-insensitive key match) + List allowedModels = config.getAllowedModels().entrySet().stream() + .filter(e -> e.getKey() != null && e.getKey().equalsIgnoreCase(provider)) + .map(Map.Entry::getValue) + .filter(java.util.Objects::nonNull) + .findFirst().orElse(null); + if (allowedModels != null && !allowedModels.isEmpty() + && allowedModels.stream().noneMatch(m -> m.equalsIgnoreCase(model))) { + return "⚠️ Model '%s' is not allowed for provider '%s'. Allowed: %s" + .formatted(model, provider, allowedModels); + } + } else { + // No provider specified — model must appear in at least one provider's + // allow-list + boolean modelFoundInAnyProvider = config.getAllowedModels().values().stream() + .filter(java.util.Objects::nonNull) + .flatMap(List::stream) + .filter(java.util.Objects::nonNull) + .anyMatch(m -> m.equalsIgnoreCase(model)); + if (!modelFoundInAnyProvider) { + return "⚠️ Model '%s' is not in any provider's allowed models list." + .formatted(model); + } + } + } + + // --- Build and execute setup --- + String prefixedName = parentAgentId + "/" + name.trim(); + SetupAgentRequest request = new SetupAgentRequest( + prefixedName, + systemPrompt, + provider, + model, + null, // apiKey — inherited from vault + null, // baseUrl + null, // introMessage (handled separately below) + null, // enableBuiltInTools + null, // builtInToolsWhitelist + null, // enableQuickReplies + null, // enableSentimentAnalysis + null, // mcpServerUrls + true, // deploy + null // environment + ); + + SetupResult result = agentSetupService.setupAgent(request); + String agentId = result.agentId(); + createdAgentIds.add(agentId); + if (Boolean.TRUE.equals(retain)) { + retainedAgentIds.add(agentId); + } + + LOGGER.infof("[SUB-AGENT] Created sub-agent: name='%s', agentId='%s', parent='%s'", + prefixedName, agentId, parentAgentId); + + // --- Optional: send initial message --- + String conversationId = null; + String response = null; + if (initialMessage != null && !initialMessage.isBlank()) { + try { + ConversationResult convResult = conversationService.startConversation( + DEFAULT_ENV, agentId, userId, Collections.emptyMap()); + conversationId = convResult.conversationId(); + + InputData inputData = new InputData(); + inputData.setInput(initialMessage); + + CompletableFuture responseFuture = new CompletableFuture<>(); + conversationService.say(DEFAULT_ENV, agentId, conversationId, + false, true, null, inputData, false, snapshot -> { + String text = extractResponse(snapshot); + responseFuture.complete(text); + }); + + response = responseFuture.get(60, TimeUnit.SECONDS); + } catch (Exception e) { + LOGGER.warnf("[SUB-AGENT] Initial message failed for agent '%s': %s", + agentId, e.getMessage()); + response = "[Initial message failed: " + e.getMessage() + "]"; + } + } + + // --- Build result string --- + var sb = new StringBuilder(); + sb.append("✅ Sub-agent created successfully!\n"); + sb.append("• Agent ID: ").append(agentId).append("\n"); + sb.append("• Name: ").append(prefixedName).append("\n"); + if (result.provider() != null) { + sb.append("• Provider: ").append(result.provider()).append("\n"); + } + if (result.model() != null) { + sb.append("• Model: ").append(result.model()).append("\n"); + } + if (conversationId != null) { + sb.append("• Conversation ID: ").append(conversationId).append("\n"); + } + if (response != null) { + sb.append("• Initial response: ").append(response).append("\n"); + } + if (Boolean.TRUE.equals(retain)) { + sb.append("• Lifecycle: retained (will not be auto-deleted)\n"); + } + + return sb.toString(); + + } catch (AgentSetupException e) { + LOGGER.errorf("[SUB-AGENT] Failed to create sub-agent: %s", e.getMessage()); + return "❌ Failed to create sub-agent: " + e.getMessage(); + } catch (Exception e) { + LOGGER.errorf("[SUB-AGENT] Unexpected error creating sub-agent: %s", e.getMessage()); + return "❌ Unexpected error: " + e.getMessage(); + } + } + + /** + * Extracts the human-readable text from a conversation memory snapshot. + * Delegates to shared utility. + */ + private String extractResponse(ai.labs.eddi.engine.memory.model.SimpleConversationMemorySnapshot snapshot) { + return ai.labs.eddi.engine.memory.ConversationOutputExtractor.extractResponse(snapshot); + } +} diff --git a/src/main/java/ai/labs/eddi/modules/llm/tools/FindAgentsByCapabilityTool.java b/src/main/java/ai/labs/eddi/modules/llm/tools/FindAgentsByCapabilityTool.java new file mode 100644 index 0000000000..e79166bd3b --- /dev/null +++ b/src/main/java/ai/labs/eddi/modules/llm/tools/FindAgentsByCapabilityTool.java @@ -0,0 +1,98 @@ +/* + * Copyright EDDI contributors + * SPDX-License-Identifier: Apache-2.0 + */ +package ai.labs.eddi.modules.llm.tools; + +import ai.labs.eddi.configs.agents.CapabilityRegistryService; +import ai.labs.eddi.configs.agents.CapabilityRegistryService.CapabilityMatch; +import dev.langchain4j.agent.tool.P; +import dev.langchain4j.agent.tool.Tool; +import jakarta.enterprise.inject.Vetoed; +import org.jboss.logging.Logger; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * LLM tool for discovering agents by capability using the + * {@link CapabilityRegistryService}. Constructed per-invocation by + * {@code AgentOrchestrator}. + * + *

+ * The LLM can call this tool to find agents that have registered a specific + * skill, using strategies like highest_confidence, round_robin, or all. + * + * @since 6.0.0 + */ +@Vetoed // Instantiated per-invocation by AgentOrchestrator — must NOT be a CDI bean +public class FindAgentsByCapabilityTool { + + private static final Logger LOGGER = Logger.getLogger(FindAgentsByCapabilityTool.class); + + private final CapabilityRegistryService registryService; + + public FindAgentsByCapabilityTool(CapabilityRegistryService registryService) { + this.registryService = registryService; + } + + @Tool("Find deployed agents that have a specific capability or skill. " + + "Use this to discover which agents can handle a particular task before delegating work. " + + "Strategies: 'highest_confidence' (best match), 'round_robin' (load-balanced), 'all' (every match).") + public String findAgentsByCapability( + @P("The skill or capability to search for (e.g. 'translation', 'summarization', 'code-review')") String skill, + @P("Selection strategy: 'highest_confidence', 'round_robin', or 'all'. Default: 'highest_confidence'") String strategy) { + + try { + // --- Validate parameters --- + if (skill == null || skill.isBlank()) { + return "⚠️ Skill name is required."; + } + + String effectiveStrategy = (strategy != null && !strategy.isBlank()) ? strategy : "highest_confidence"; + + LOGGER.debugf("[CAPABILITY] Searching for skill='%s' with strategy='%s'", skill, effectiveStrategy); + + List matches = registryService.findBySkill(skill, effectiveStrategy); + + if (matches == null || matches.isEmpty()) { + return "No agents found with skill '%s'.".formatted(skill); + } + + // --- Format results --- + String header = "🔍 Found %d agent(s) with skill '%s' (strategy: %s):\n" + .formatted(matches.size(), skill, effectiveStrategy); + + String body = matches.stream() + .map(this::formatMatch) + .collect(Collectors.joining("\n")); + + return header + body; + + } catch (Exception e) { + LOGGER.errorf("[CAPABILITY] Error searching for skill '%s': %s", skill, e.getMessage()); + return "❌ Error searching for agents: " + e.getMessage(); + } + } + + private String formatMatch(CapabilityMatch match) { + var sb = new StringBuilder(); + sb.append("• Agent: ").append(match.agentId()); + sb.append(" | Skill: ").append(match.skill()); + + if (match.confidence() != null && !match.confidence().isBlank()) { + sb.append(" | Confidence: ").append(match.confidence()); + } + + Map attributes = match.attributes(); + if (attributes != null && !attributes.isEmpty()) { + String attrs = attributes.entrySet().stream() + .map(e -> e.getKey() + "=" + e.getValue()) + .collect(Collectors.joining(", ")); + sb.append(" | Attributes: {").append(attrs).append("}"); + } + + return sb.toString(); + } +} diff --git a/src/main/java/ai/labs/eddi/modules/llm/tools/TeardownAgentTool.java b/src/main/java/ai/labs/eddi/modules/llm/tools/TeardownAgentTool.java new file mode 100644 index 0000000000..3f8b70801d --- /dev/null +++ b/src/main/java/ai/labs/eddi/modules/llm/tools/TeardownAgentTool.java @@ -0,0 +1,153 @@ +/* + * Copyright EDDI contributors + * SPDX-License-Identifier: Apache-2.0 + */ +package ai.labs.eddi.modules.llm.tools; + +import ai.labs.eddi.configs.agents.IAgentStore; +import ai.labs.eddi.engine.model.Deployment.Environment; +import ai.labs.eddi.engine.runtime.IAgentFactory; +import dev.langchain4j.agent.tool.P; +import dev.langchain4j.agent.tool.Tool; +import jakarta.enterprise.inject.Vetoed; +import org.jboss.logging.Logger; + +import java.util.List; +import java.util.Set; + +/** + * LLM tool for tearing down dynamically created agents. Constructed + * per-invocation by {@code AgentOrchestrator} with the factory, agent store, + * and the lists of created/retained agent IDs from the group conversation. + * + *

+ * Only agents that were created during the current discussion (tracked in + * {@code createdAgentIds}) can be torn down — preventing accidental destruction + * of pre-existing agents. + * + * @since 6.0.0 + */ +@Vetoed // Instantiated per-invocation by AgentOrchestrator — must NOT be a CDI bean +public class TeardownAgentTool { + + private static final Logger LOGGER = Logger.getLogger(TeardownAgentTool.class); + private static final Environment DEFAULT_ENV = Environment.production; + + private final IAgentFactory agentFactory; + private final IAgentStore agentStore; + private final List createdAgentIds; + private final Set retainedAgentIds; + + public TeardownAgentTool(IAgentFactory agentFactory, + IAgentStore agentStore, + List createdAgentIds, + Set retainedAgentIds) { + this.agentFactory = agentFactory; + this.agentStore = agentStore; + this.createdAgentIds = createdAgentIds != null ? createdAgentIds : new java.util.concurrent.CopyOnWriteArrayList<>(); + this.retainedAgentIds = retainedAgentIds != null ? retainedAgentIds : new java.util.concurrent.CopyOnWriteArraySet<>(); + } + + @Tool("Tear down (undeploy) a dynamically created agent. Only agents created during this discussion " + + "can be torn down. Optionally delete the agent configuration permanently.") + public String teardownAgent( + @P("The ID of the agent to tear down") String agentId, + @P("If true, permanently delete the agent config after undeploying. Default: false") Boolean delete) { + + try { + // --- Validate parameters --- + if (agentId == null || agentId.isBlank()) { + return "⚠️ Agent ID is required."; + } + + // --- Security: can only teardown agents we created --- + if (!createdAgentIds.contains(agentId)) { + return "⚠️ Cannot tear down agent '%s' — it was not created during this discussion." + .formatted(agentId); + } + + // --- Check if retained --- + if (retainedAgentIds.contains(agentId)) { + return "⚠️ Agent '%s' has been marked as retained and cannot be torn down. " + .formatted(agentId) + + "Remove the retain flag first if you want to tear it down."; + } + + // --- Undeploy --- + try { + agentFactory.undeployAgent(DEFAULT_ENV, agentId, null); + LOGGER.infof("[TEARDOWN] Undeployed agent '%s'", agentId); + } catch (Exception e) { + LOGGER.warnf("[TEARDOWN] Undeploy failed for agent '%s': %s", agentId, e.getMessage()); + return "❌ Failed to undeploy agent '%s': %s".formatted(agentId, e.getMessage()); + } + + // --- Optional: delete agent configuration --- + createdAgentIds.remove(agentId); + if (Boolean.TRUE.equals(delete)) { + try { + agentStore.deleteAllPermanently(agentId); + LOGGER.infof("[TEARDOWN] Permanently deleted agent '%s'", agentId); + return "✅ Agent '%s' has been undeployed and permanently deleted.".formatted(agentId); + } catch (Exception e) { + LOGGER.warnf("[TEARDOWN] Delete failed for agent '%s': %s", agentId, e.getMessage()); + return "⚠️ Agent '%s' was undeployed but deletion failed: %s" + .formatted(agentId, e.getMessage()); + } + } + + return "✅ Agent '%s' has been undeployed successfully.".formatted(agentId); + + } catch (Exception e) { + LOGGER.errorf("[TEARDOWN] Unexpected error tearing down agent '%s': %s", + agentId, e.getMessage()); + return "❌ Unexpected error: " + e.getMessage(); + } + } + + @Tool("Mark a dynamically created agent for retention — it will NOT be automatically deleted " + + "when the discussion ends. Use this when a created agent should be kept for future use.") + public String retainAgent( + @P("The ID of the agent to retain") String agentId) { + + try { + // --- Validate parameters --- + if (agentId == null || agentId.isBlank()) { + return "⚠️ Agent ID is required."; + } + + // --- Security: can only retain agents we created --- + if (!createdAgentIds.contains(agentId)) { + return "⚠️ Cannot retain agent '%s' — it was not created during this discussion." + .formatted(agentId); + } + + // --- Check if already retained --- + if (retainedAgentIds.contains(agentId)) { + return "ℹ️ Agent '%s' is already marked as retained.".formatted(agentId); + } + + retainedAgentIds.add(agentId); + LOGGER.infof("[TEARDOWN] Retained agent '%s'", agentId); + + return "✅ Agent '%s' has been marked as retained. It will not be auto-deleted after the discussion." + .formatted(agentId); + + } catch (Exception e) { + LOGGER.errorf("[TEARDOWN] Error retaining agent '%s': %s", agentId, e.getMessage()); + return "❌ Error retaining agent: " + e.getMessage(); + } + } + + @Tool("Remove the retention flag from a previously retained agent, allowing it to be cleaned up when the discussion ends.") + public String unretainAgent(@P("The agent ID to un-retain") String agentId) { + if (agentId == null || agentId.isBlank()) { + return "⚠️ Agent ID is required."; + } + if (!retainedAgentIds.contains(agentId)) { + return "⚠️ Agent '%s' is not currently retained.".formatted(agentId); + } + retainedAgentIds.remove(agentId); + return "✅ Retention flag removed from agent '%s'. It will be cleaned up when the discussion ends.".formatted(agentId); + } +} diff --git a/src/main/resources/META-INF/resources/assets/cssMode-BPLGavJr.js b/src/main/resources/META-INF/resources/assets/cssMode-BPLGavJr.js new file mode 100644 index 0000000000..aa04e209d3 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/cssMode-BPLGavJr.js @@ -0,0 +1 @@ +import{c,l as s}from"./index-CHgQ1fX-.js";import{C as h,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-DhacLp9m.js";import{h as b,i as H,j as y,t as U,k as T}from"./lspLanguageFeatures-DhacLp9m.js";const C=120*1e3;class A{constructor(o){this._defaults=o,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>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=c({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-B4z49cGk.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(...o){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(o)}).then(a=>e)}}function F(n){const o=[],e=[],a=new A(n);o.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=n;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new h(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,n.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(),o.push(d(e)),d(o)}function d(n){return{dispose:()=>g(n)}}function g(n){for(;n.length;)n.pop().dispose()}export{h as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,b as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,H as fromPosition,y as fromRange,F as setupMode,U as toRange,T as toTextEdit}; diff --git a/src/main/resources/META-INF/resources/assets/freemarker2-BIs4Hajg.js b/src/main/resources/META-INF/resources/assets/freemarker2-BIs4Hajg.js new file mode 100644 index 0000000000..962c5220b9 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/freemarker2-BIs4Hajg.js @@ -0,0 +1,3 @@ +import{l as c}from"./index-CHgQ1fX-.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"],a={close:">",id:"angle",open:"<"},r={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=_(a,t),i=_(r,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 b={conf:l(a),language:_(a,k)},x={conf:l(r),language:_(r,k)},$={conf:l(a),language:_(a,p)},E={conf:l(r),language:_(r,p)},B={conf:g(),language:A(k)},D={conf:g(),language:A(p)};export{$ as TagAngleInterpolationBracket,b as TagAngleInterpolationDollar,D as TagAutoInterpolationBracket,B as TagAutoInterpolationDollar,E as TagBracketInterpolationBracket,x as TagBracketInterpolationDollar}; diff --git a/src/main/resources/META-INF/resources/assets/handlebars-CWaySR_i.js b/src/main/resources/META-INF/resources/assets/handlebars-CWaySR_i.js new file mode 100644 index 0000000000..e78898b8e3 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/handlebars-CWaySR_i.js @@ -0,0 +1 @@ +import{l as e}from"./index-CHgQ1fX-.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],a={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}}]},m={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{a as conf,m as language}; diff --git a/src/main/resources/META-INF/resources/assets/html-B_vQbAk9.js b/src/main/resources/META-INF/resources/assets/html-B_vQbAk9.js new file mode 100644 index 0000000000..72bf5b8a4f --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/html-B_vQbAk9.js @@ -0,0 +1 @@ +import{l as e}from"./index-CHgQ1fX-.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={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*")}}},r={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{i as conf,r as language}; diff --git a/src/main/resources/META-INF/resources/assets/htmlMode-k3Yo1QBE.js b/src/main/resources/META-INF/resources/assets/htmlMode-k3Yo1QBE.js new file mode 100644 index 0000000000..d49618d927 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/htmlMode-k3Yo1QBE.js @@ -0,0 +1 @@ +import{c as D,l as t}from"./index-CHgQ1fX-.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-DhacLp9m.js";import{a as E,e as H,d as b,R as y,i as T,j as U,t as x,k as M}from"./lspLanguageFeatures-DhacLp9m.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-DtiGdgqp.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 C(i){const n=new f(i),e=(...s)=>n.getLanguageServiceWorker(...s);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 W(i){const n=[],e=[],r=new f(i);n.push(r);const s=(...o)=>r.getLanguageServiceWorker(...o);function P(){const{languageId:o,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(o,new v(s))),a.hovers&&e.push(t.registerHoverProvider(o,new d(s))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(o,new l(s))),a.links&&e.push(t.registerLinkProvider(o,new c(s))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(o,new h(s))),a.rename&&e.push(t.registerRenameProvider(o,new p(s))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(o,new u(s))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(o,new m(s))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(o,new w(s))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(o,new _(s)))}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,E as DefinitionAdapter,H as DiagnosticsAdapter,b as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,y as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,T as fromPosition,U as fromRange,W as setupMode,C as setupMode1,x as toRange,M as toTextEdit}; diff --git a/src/main/resources/META-INF/resources/assets/index-CHgQ1fX-.js b/src/main/resources/META-INF/resources/assets/index-CHgQ1fX-.js new file mode 100644 index 0000000000..430c4bed0d --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/index-CHgQ1fX-.js @@ -0,0 +1,1927 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-BPLGavJr.js","assets/lspLanguageFeatures-DhacLp9m.js","assets/htmlMode-k3Yo1QBE.js","assets/jsonMode-rox_nk1D.js","assets/javascript-D1_HFFyG.js","assets/typescript-DvHGjc3l.js"])))=>i.map(i=>d[i]); +var QFe=Object.defineProperty;var _ge=i=>{throw TypeError(i)};var XFe=(i,e,t)=>e in i?QFe(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Et=(i,e,t)=>XFe(i,typeof e!="symbol"?e+"":e,t),cU=(i,e,t)=>e.has(i)||_ge("Cannot "+t);var re=(i,e,t)=>(cU(i,e,"read from private field"),t?t.call(i):e.get(i)),Vt=(i,e,t)=>e.has(i)?_ge("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),St=(i,e,t,n)=>(cU(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),it=(i,e,t)=>(cU(i,e,"access private method"),t);var I5=(i,e,t,n)=>({set _(s){St(i,e,s,t)},get _(){return re(i,e,n)}});function ZFe(i,e){for(var t=0;tn[s]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();function SH(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var dU={exports:{}},OT={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var yge;function JFe(){if(yge)return OT;yge=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,r){var o=null;if(r!==void 0&&(o=""+r),s.key!==void 0&&(o=""+s.key),"key"in s){r={};for(var a in s)a!=="key"&&(r[a]=s[a])}else r=s;return s=r.ref,{$$typeof:i,type:n,key:o,ref:s!==void 0?s:null,props:r}}return OT.Fragment=e,OT.jsx=t,OT.jsxs=t,OT}var wge;function e6e(){return wge||(wge=1,dU.exports=JFe()),dU.exports}var d=e6e(),uU={exports:{}},si={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Cge;function t6e(){if(Cge)return si;Cge=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function f(Y){return Y===null||typeof Y!="object"?null:(Y=g&&Y[g]||Y["@@iterator"],typeof Y=="function"?Y:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function _(Y,G,U){this.props=Y,this.context=G,this.refs=v,this.updater=U||m}_.prototype.isReactComponent={},_.prototype.setState=function(Y,G){if(typeof Y!="object"&&typeof Y!="function"&&Y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Y,G,"setState")},_.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function w(){}w.prototype=_.prototype;function k(Y,G,U){this.props=Y,this.context=G,this.refs=v,this.updater=U||m}var C=k.prototype=new w;C.constructor=k,x(C,_.prototype),C.isPureReactComponent=!0;var E=Array.isArray;function D(){}var T={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function R(Y,G,U){var ue=U.ref;return{$$typeof:i,type:Y,key:G,ref:ue!==void 0?ue:null,props:U}}function P(Y,G){return R(Y.type,G,Y.props)}function j(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===i}function B(Y){var G={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(U){return G[U]})}var H=/\/+/g;function $(Y,G){return typeof Y=="object"&&Y!==null&&Y.key!=null?B(""+Y.key):G.toString(36)}function q(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(D,D):(Y.status="pending",Y.then(function(G){Y.status==="pending"&&(Y.status="fulfilled",Y.value=G)},function(G){Y.status==="pending"&&(Y.status="rejected",Y.reason=G)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function V(Y,G,U,ue,fe){var Le=typeof Y;(Le==="undefined"||Le==="boolean")&&(Y=null);var tt=!1;if(Y===null)tt=!0;else switch(Le){case"bigint":case"string":case"number":tt=!0;break;case"object":switch(Y.$$typeof){case i:case e:tt=!0;break;case u:return tt=Y._init,V(tt(Y._payload),G,U,ue,fe)}}if(tt)return fe=fe(Y),tt=ue===""?"."+$(Y,0):ue,E(fe)?(U="",tt!=null&&(U=tt.replace(H,"$&/")+"/"),V(fe,G,U,"",function(We){return We})):fe!=null&&(j(fe)&&(fe=P(fe,U+(fe.key==null||Y&&Y.key===fe.key?"":(""+fe.key).replace(H,"$&/")+"/")+tt)),G.push(fe)),1;tt=0;var ge=ue===""?".":ue+":";if(E(Y))for(var he=0;he>>1,W=V[ne];if(0>>1;nes(U,ae))ues(fe,U)?(V[ne]=fe,V[ue]=ae,ne=ue):(V[ne]=U,V[G]=ae,ne=G);else if(ues(fe,ae))V[ne]=fe,V[ue]=ae,ne=ue;else break e}}return X}function s(V,X){var ae=V.sortIndex-X.sortIndex;return ae!==0?ae:V.id-X.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;i.unstable_now=function(){return r.now()}}else{var o=Date,a=o.now();i.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,g=3,f=!1,m=!1,x=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var X=t(c);X!==null;){if(X.callback===null)n(c);else if(X.startTime<=V)n(c),X.sortIndex=X.expirationTime,e(l,X);else break;X=t(c)}}function E(V){if(x=!1,C(V),!m)if(t(l)!==null)m=!0,D||(D=!0,B());else{var X=t(c);X!==null&&q(E,X.startTime-V)}}var D=!1,T=-1,I=5,R=-1;function P(){return v?!0:!(i.unstable_now()-RV&&P());){var ne=h.callback;if(typeof ne=="function"){h.callback=null,g=h.priorityLevel;var W=ne(h.expirationTime<=V);if(V=i.unstable_now(),typeof W=="function"){h.callback=W,C(V),X=!0;break t}h===t(l)&&n(l),C(V)}else n(l);h=t(l)}if(h!==null)X=!0;else{var Y=t(c);Y!==null&&q(E,Y.startTime-V),X=!1}}break e}finally{h=null,g=ae,f=!1}X=void 0}}finally{X?B():D=!1}}}var B;if(typeof k=="function")B=function(){k(j)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,$=H.port2;H.port1.onmessage=j,B=function(){$.postMessage(null)}}else B=function(){_(j,0)};function q(V,X){T=_(function(){V(i.unstable_now())},X)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(V){V.callback=null},i.unstable_forceFrameRate=function(V){0>V||125ne?(V.sortIndex=ae,e(c,V),t(l)===null&&V===t(c)&&(x?(w(T),T=-1):x=!0,q(E,ae-ne))):(V.sortIndex=W,e(l,V),m||f||(m=!0,D||(D=!0,B()))),V},i.unstable_shouldYield=P,i.unstable_wrapCallback=function(V){var X=g;return function(){var ae=g;g=X;try{return V.apply(this,arguments)}finally{g=ae}}}})(fU)),fU}var Nge;function i6e(){return Nge||(Nge=1,gU.exports=n6e()),gU.exports}var pU={exports:{}},ic={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ege;function s6e(){if(Ege)return ic;Ege=1;var i=Wie();function e(l){var c="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),pU.exports=s6e(),pU.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Dge;function r6e(){if(Dge)return jT;Dge=1;var i=i6e(),e=Wie(),t=ZCe();function n(p){var b="https://react.dev/errors/"+p;if(1W||(p.current=ne[W],ne[W]=null,W--)}function U(p,b){W++,ne[W]=p.current,p.current=b}var ue=Y(null),fe=Y(null),Le=Y(null),tt=Y(null);function ge(p,b){switch(U(Le,b),U(fe,p),U(ue,null),b.nodeType){case 9:case 11:p=(p=b.documentElement)&&(p=p.namespaceURI)?zhe(p):0;break;default:if(p=b.tagName,b=b.namespaceURI)b=zhe(b),p=Uhe(b,p);else switch(p){case"svg":p=1;break;case"math":p=2;break;default:p=0}}G(ue),U(ue,p)}function he(){G(ue),G(fe),G(Le)}function We(p){p.memoizedState!==null&&U(tt,p);var b=ue.current,y=Uhe(b,p.type);b!==y&&(U(fe,p),U(ue,y))}function Ie(p){fe.current===p&&(G(ue),G(fe)),tt.current===p&&(G(tt),AT._currentValue=ae)}var _t,ut;function Wt(p){if(_t===void 0)try{throw Error()}catch(y){var b=y.stack.trim().match(/\n( *(at )?)/);_t=b&&b[1]||"",ut=-1)":-1A||xe[N]!==Ue[A]){var et=` +`+xe[N].replace(" at new "," at ");return p.displayName&&et.includes("")&&(et=et.replace("",p.displayName)),et}while(1<=N&&0<=A);break}}}finally{Re=!1,Error.prepareStackTrace=y}return(y=p?p.displayName||p.name:"")?Wt(y):""}function pt(p,b){switch(p.tag){case 26:case 27:case 5:return Wt(p.type);case 16:return Wt("Lazy");case 13:return p.child!==b&&b!==null?Wt("Suspense Fallback"):Wt("Suspense");case 19:return Wt("SuspenseList");case 0:case 15:return Me(p.type,!1);case 11:return Me(p.type.render,!1);case 1:return Me(p.type,!0);case 31:return Wt("Activity");default:return""}}function mt(p){try{var b="",y=null;do b+=pt(p,y),y=p,p=p.return;while(p);return b}catch(N){return` +Error generating stack: `+N.message+` +`+N.stack}}var $t=Object.prototype.hasOwnProperty,Tn=i.unstable_scheduleCallback,Pi=i.unstable_cancelCallback,Ti=i.unstable_shouldYield,cs=i.unstable_requestPaint,ds=i.unstable_now,zr=i.unstable_getCurrentPriorityLevel,Ye=i.unstable_ImmediatePriority,yt=i.unstable_UserBlockingPriority,sn=i.unstable_NormalPriority,In=i.unstable_LowPriority,On=i.unstable_IdlePriority,ws=i.log,ir=i.unstable_setDisableYieldValue,Nr=null,$i=null;function Rs(p){if(typeof ws=="function"&&ir(p),$i&&typeof $i.setStrictMode=="function")try{$i.setStrictMode(Nr,p)}catch{}}var mi=Math.clz32?Math.clz32:fr,ta=Math.log,Er=Math.LN2;function fr(p){return p>>>=0,p===0?32:31-(ta(p)/Er|0)|0}var vl=256,nu=262144,Cs=4194304;function Vs(p){var b=p&42;if(b!==0)return b;switch(p&-p){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return p&261888;case 262144:case 524288:case 1048576:case 2097152:return p&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return p&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return p}}function rn(p,b,y){var N=p.pendingLanes;if(N===0)return 0;var A=0,M=p.suspendedLanes,K=p.pingedLanes;p=p.warmLanes;var ee=N&134217727;return ee!==0?(N=ee&~M,N!==0?A=Vs(N):(K&=ee,K!==0?A=Vs(K):y||(y=ee&~p,y!==0&&(A=Vs(y))))):(ee=N&~M,ee!==0?A=Vs(ee):K!==0?A=Vs(K):y||(y=N&~p,y!==0&&(A=Vs(y)))),A===0?0:b!==0&&b!==A&&(b&M)===0&&(M=A&-A,y=b&-b,M>=y||M===32&&(y&4194048)!==0)?b:A}function Cn(p,b){return(p.pendingLanes&~(p.suspendedLanes&~p.pingedLanes)&b)===0}function ai(p,b){switch(p){case 1:case 2:case 4:case 8:case 64:return b+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return b+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function li(){var p=Cs;return Cs<<=1,(Cs&62914560)===0&&(Cs=4194304),p}function sr(p){for(var b=[],y=0;31>y;y++)b.push(p);return b}function Ii(p,b){p.pendingLanes|=b,b!==268435456&&(p.suspendedLanes=0,p.pingedLanes=0,p.warmLanes=0)}function Ni(p,b,y,N,A,M){var K=p.pendingLanes;p.pendingLanes=y,p.suspendedLanes=0,p.pingedLanes=0,p.warmLanes=0,p.expiredLanes&=y,p.entangledLanes&=y,p.errorRecoveryDisabledLanes&=y,p.shellSuspendCounter=0;var ee=p.entanglements,xe=p.expirationTimes,Ue=p.hiddenUpdates;for(y=K&~y;0"u")return null;try{return p.activeElement||p.body}catch{return p.body}}var oV=/[\n"\\]/g;function rd(p){return p.replace(oV,function(b){return"\\"+b.charCodeAt(0).toString(16)+" "})}function CS(p,b,y,N,A,M,K,ee){p.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?p.type=K:p.removeAttribute("type"),b!=null?K==="number"?(b===0&&p.value===""||p.value!=b)&&(p.value=""+sd(b)):p.value!==""+sd(b)&&(p.value=""+sd(b)):K!=="submit"&&K!=="reset"||p.removeAttribute("value"),b!=null?F0(p,K,sd(b)):y!=null?F0(p,K,sd(y)):N!=null&&p.removeAttribute("value"),A==null&&M!=null&&(p.defaultChecked=!!M),A!=null&&(p.checked=A&&typeof A!="function"&&typeof A!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?p.name=""+sd(ee):p.removeAttribute("name")}function j0(p,b,y,N,A,M,K,ee){if(M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(p.type=M),b!=null||y!=null){if(!(M!=="submit"&&M!=="reset"||b!=null)){wS(p);return}y=y!=null?""+sd(y):"",b=b!=null?""+sd(b):y,ee||b===p.value||(p.value=b),p.defaultValue=b}N=N??A,N=typeof N!="function"&&typeof N!="symbol"&&!!N,p.checked=ee?p.checked:!!N,p.defaultChecked=!!N,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(p.name=K),wS(p)}function F0(p,b,y){b==="number"&&O0(p.ownerDocument)===p||p.defaultValue===""+y||(p.defaultValue=""+y)}function Mt(p,b,y,N){if(p=p.options,b){b={};for(var A=0;A"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cV=!1;if(Qp)try{var QD={};Object.defineProperty(QD,"passive",{get:function(){cV=!0}}),window.addEventListener("test",QD,QD),window.removeEventListener("test",QD,QD)}catch{cV=!1}var yx=null,dV=null,CO=null;function Uce(){if(CO)return CO;var p,b=dV,y=b.length,N,A="value"in yx?yx.value:yx.textContent,M=A.length;for(p=0;p=JD),Qce=" ",Xce=!1;function Zce(p,b){switch(p){case"keyup":return xje.indexOf(b.keyCode)!==-1;case"keydown":return b.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jce(p){return p=p.detail,typeof p=="object"&&"data"in p?p.data:null}var NS=!1;function _je(p,b){switch(p){case"compositionend":return Jce(b);case"keypress":return b.which!==32?null:(Xce=!0,Qce);case"textInput":return p=b.data,p===Qce&&Xce?null:p;default:return null}}function yje(p,b){if(NS)return p==="compositionend"||!pV&&Zce(p,b)?(p=Uce(),CO=dV=yx=null,NS=!1,p):null;switch(p){case"paste":return null;case"keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:y,offset:b-p};p=N}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=ade(y)}}function cde(p,b){return p&&b?p===b?!0:p&&p.nodeType===3?!1:b&&b.nodeType===3?cde(p,b.parentNode):"contains"in p?p.contains(b):p.compareDocumentPosition?!!(p.compareDocumentPosition(b)&16):!1:!1}function dde(p){p=p!=null&&p.ownerDocument!=null&&p.ownerDocument.defaultView!=null?p.ownerDocument.defaultView:window;for(var b=O0(p.document);b instanceof p.HTMLIFrameElement;){try{var y=typeof b.contentWindow.location.href=="string"}catch{y=!1}if(y)p=b.contentWindow;else break;b=O0(p.document)}return b}function xV(p){var b=p&&p.nodeName&&p.nodeName.toLowerCase();return b&&(b==="input"&&(p.type==="text"||p.type==="search"||p.type==="tel"||p.type==="url"||p.type==="password")||b==="textarea"||p.contentEditable==="true")}var Dje=Qp&&"documentMode"in document&&11>=document.documentMode,ES=null,vV=null,iT=null,_V=!1;function ude(p,b,y){var N=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;_V||ES==null||ES!==O0(N)||(N=ES,"selectionStart"in N&&xV(N)?N={start:N.selectionStart,end:N.selectionEnd}:(N=(N.ownerDocument&&N.ownerDocument.defaultView||window).getSelection(),N={anchorNode:N.anchorNode,anchorOffset:N.anchorOffset,focusNode:N.focusNode,focusOffset:N.focusOffset}),iT&&nT(iT,N)||(iT=N,N=m5(vV,"onSelect"),0>=K,A-=K,of=1<<32-mi(b)+A|y<bi?(Qi=vn,vn=null):Qi=vn.sibling;var Ds=Ge(Te,vn,Ve[bi],nt);if(Ds===null){vn===null&&(vn=Qi);break}p&&vn&&Ds.alternate===null&&b(Te,vn),ke=M(Ds,ke,bi),Ls===null?Nn=Ds:Ls.sibling=Ds,Ls=Ds,vn=Qi}if(bi===Ve.length)return y(Te,vn),ts&&Zp(Te,bi),Nn;if(vn===null){for(;bibi?(Qi=vn,vn=null):Qi=vn.sibling;var zx=Ge(Te,vn,Ds.value,nt);if(zx===null){vn===null&&(vn=Qi);break}p&&vn&&zx.alternate===null&&b(Te,vn),ke=M(zx,ke,bi),Ls===null?Nn=zx:Ls.sibling=zx,Ls=zx,vn=Qi}if(Ds.done)return y(Te,vn),ts&&Zp(Te,bi),Nn;if(vn===null){for(;!Ds.done;bi++,Ds=Ve.next())Ds=ot(Te,Ds.value,nt),Ds!==null&&(ke=M(Ds,ke,bi),Ls===null?Nn=Ds:Ls.sibling=Ds,Ls=Ds);return ts&&Zp(Te,bi),Nn}for(vn=N(vn);!Ds.done;bi++,Ds=Ve.next())Ds=Qe(vn,Te,bi,Ds.value,nt),Ds!==null&&(p&&Ds.alternate!==null&&vn.delete(Ds.key===null?bi:Ds.key),ke=M(Ds,ke,bi),Ls===null?Nn=Ds:Ls.sibling=Ds,Ls=Ds);return p&&vn.forEach(function(YFe){return b(Te,YFe)}),ts&&Zp(Te,bi),Nn}function br(Te,ke,Ve,nt){if(typeof Ve=="object"&&Ve!==null&&Ve.type===x&&Ve.key===null&&(Ve=Ve.props.children),typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case f:e:{for(var Nn=Ve.key;ke!==null;){if(ke.key===Nn){if(Nn=Ve.type,Nn===x){if(ke.tag===7){y(Te,ke.sibling),nt=A(ke,Ve.props.children),nt.return=Te,Te=nt;break e}}else if(ke.elementType===Nn||typeof Nn=="object"&&Nn!==null&&Nn.$$typeof===I&&G0(Nn)===ke.type){y(Te,ke.sibling),nt=A(ke,Ve.props),cT(nt,Ve),nt.return=Te,Te=nt;break e}y(Te,ke);break}else b(Te,ke);ke=ke.sibling}Ve.type===x?(nt=z0(Ve.props.children,Te.mode,nt,Ve.key),nt.return=Te,Te=nt):(nt=RO(Ve.type,Ve.key,Ve.props,null,Te.mode,nt),cT(nt,Ve),nt.return=Te,Te=nt)}return K(Te);case m:e:{for(Nn=Ve.key;ke!==null;){if(ke.key===Nn)if(ke.tag===4&&ke.stateNode.containerInfo===Ve.containerInfo&&ke.stateNode.implementation===Ve.implementation){y(Te,ke.sibling),nt=A(ke,Ve.children||[]),nt.return=Te,Te=nt;break e}else{y(Te,ke);break}else b(Te,ke);ke=ke.sibling}nt=EV(Ve,Te.mode,nt),nt.return=Te,Te=nt}return K(Te);case I:return Ve=G0(Ve),br(Te,ke,Ve,nt)}if(q(Ve))return on(Te,ke,Ve,nt);if(B(Ve)){if(Nn=B(Ve),typeof Nn!="function")throw Error(n(150));return Ve=Nn.call(Ve),jn(Te,ke,Ve,nt)}if(typeof Ve.then=="function")return br(Te,ke,HO(Ve),nt);if(Ve.$$typeof===k)return br(Te,ke,OO(Te,Ve),nt);WO(Te,Ve)}return typeof Ve=="string"&&Ve!==""||typeof Ve=="number"||typeof Ve=="bigint"?(Ve=""+Ve,ke!==null&&ke.tag===6?(y(Te,ke.sibling),nt=A(ke,Ve),nt.return=Te,Te=nt):(y(Te,ke),nt=NV(Ve,Te.mode,nt),nt.return=Te,Te=nt),K(Te)):y(Te,ke)}return function(Te,ke,Ve,nt){try{lT=0;var Nn=br(Te,ke,Ve,nt);return FS=null,Nn}catch(vn){if(vn===jS||vn===FO)throw vn;var Ls=ou(29,vn,null,Te.mode);return Ls.lanes=nt,Ls.return=Te,Ls}finally{}}}var Q0=Mde(!0),Pde=Mde(!1),Nx=!1;function BV(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function HV(p,b){p=p.updateQueue,b.updateQueue===p&&(b.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,callbacks:null})}function Ex(p){return{lane:p,tag:0,payload:null,callback:null,next:null}}function Lx(p,b,y){var N=p.updateQueue;if(N===null)return null;if(N=N.shared,(Ms&2)!==0){var A=N.pending;return A===null?b.next=b:(b.next=A.next,A.next=b),N.pending=b,b=AO(p),xde(p,null,y),b}return IO(p,N,b,y),AO(p)}function dT(p,b,y){if(b=b.updateQueue,b!==null&&(b=b.shared,(y&4194048)!==0)){var N=b.lanes;N&=p.pendingLanes,y|=N,b.lanes=y,zs(p,y)}}function WV(p,b){var y=p.updateQueue,N=p.alternate;if(N!==null&&(N=N.updateQueue,y===N)){var A=null,M=null;if(y=y.firstBaseUpdate,y!==null){do{var K={lane:y.lane,tag:y.tag,payload:y.payload,callback:null,next:null};M===null?A=M=K:M=M.next=K,y=y.next}while(y!==null);M===null?A=M=b:M=M.next=b}else A=M=b;y={baseState:N.baseState,firstBaseUpdate:A,lastBaseUpdate:M,shared:N.shared,callbacks:N.callbacks},p.updateQueue=y;return}p=y.lastBaseUpdate,p===null?y.firstBaseUpdate=b:p.next=b,y.lastBaseUpdate=b}var VV=!1;function uT(){if(VV){var p=OS;if(p!==null)throw p}}function hT(p,b,y,N){VV=!1;var A=p.updateQueue;Nx=!1;var M=A.firstBaseUpdate,K=A.lastBaseUpdate,ee=A.shared.pending;if(ee!==null){A.shared.pending=null;var xe=ee,Ue=xe.next;xe.next=null,K===null?M=Ue:K.next=Ue,K=xe;var et=p.alternate;et!==null&&(et=et.updateQueue,ee=et.lastBaseUpdate,ee!==K&&(ee===null?et.firstBaseUpdate=Ue:ee.next=Ue,et.lastBaseUpdate=xe))}if(M!==null){var ot=A.baseState;K=0,et=Ue=xe=null,ee=M;do{var Ge=ee.lane&-536870913,Qe=Ge!==ee.lane;if(Qe?(Yi&Ge)===Ge:(N&Ge)===Ge){Ge!==0&&Ge===PS&&(VV=!0),et!==null&&(et=et.next={lane:0,tag:ee.tag,payload:ee.payload,callback:null,next:null});e:{var on=p,jn=ee;Ge=b;var br=y;switch(jn.tag){case 1:if(on=jn.payload,typeof on=="function"){ot=on.call(br,ot,Ge);break e}ot=on;break e;case 3:on.flags=on.flags&-65537|128;case 0:if(on=jn.payload,Ge=typeof on=="function"?on.call(br,ot,Ge):on,Ge==null)break e;ot=h({},ot,Ge);break e;case 2:Nx=!0}}Ge=ee.callback,Ge!==null&&(p.flags|=64,Qe&&(p.flags|=8192),Qe=A.callbacks,Qe===null?A.callbacks=[Ge]:Qe.push(Ge))}else Qe={lane:Ge,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},et===null?(Ue=et=Qe,xe=ot):et=et.next=Qe,K|=Ge;if(ee=ee.next,ee===null){if(ee=A.shared.pending,ee===null)break;Qe=ee,ee=Qe.next,Qe.next=null,A.lastBaseUpdate=Qe,A.shared.pending=null}}while(!0);et===null&&(xe=ot),A.baseState=xe,A.firstBaseUpdate=Ue,A.lastBaseUpdate=et,M===null&&(A.shared.lanes=0),Rx|=K,p.lanes=K,p.memoizedState=ot}}function Ode(p,b){if(typeof p!="function")throw Error(n(191,p));p.call(b)}function jde(p,b){var y=p.callbacks;if(y!==null)for(p.callbacks=null,p=0;pM?M:8;var K=V.T,ee={};V.T=ee,az(p,!1,b,y);try{var xe=A(),Ue=V.S;if(Ue!==null&&Ue(ee,xe),xe!==null&&typeof xe=="object"&&typeof xe.then=="function"){var et=Fje(xe,N);pT(p,b,et,uu(p))}else pT(p,b,N,uu(p))}catch(ot){pT(p,b,{then:function(){},status:"rejected",reason:ot},uu())}finally{X.p=M,K!==null&&ee.types!==null&&(K.types=ee.types),V.T=K}}function Uje(){}function rz(p,b,y,N){if(p.tag!==5)throw Error(n(476));var A=pue(p).queue;fue(p,A,b,ae,y===null?Uje:function(){return mue(p),y(N)})}function pue(p){var b=p.memoizedState;if(b!==null)return b;b={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nm,lastRenderedState:ae},next:null};var y={};return b.next={memoizedState:y,baseState:y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nm,lastRenderedState:y},next:null},p.memoizedState=b,p=p.alternate,p!==null&&(p.memoizedState=b),b}function mue(p){var b=pue(p);b.next===null&&(b=p.alternate.memoizedState),pT(p,b.next.queue,{},uu())}function oz(){return Cl(AT)}function bue(){return Wo().memoizedState}function xue(){return Wo().memoizedState}function $je(p){for(var b=p.return;b!==null;){switch(b.tag){case 24:case 3:var y=uu();p=Ex(y);var N=Lx(b,p,y);N!==null&&(hd(N,b,y),dT(N,b,y)),b={cache:PV()},p.payload=b;return}b=b.return}}function qje(p,b,y){var N=uu();y={lane:N,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},XO(p)?_ue(b,y):(y=SV(p,b,y,N),y!==null&&(hd(y,p,N),yue(y,b,N)))}function vue(p,b,y){var N=uu();pT(p,b,y,N)}function pT(p,b,y,N){var A={lane:N,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null};if(XO(p))_ue(b,A);else{var M=p.alternate;if(p.lanes===0&&(M===null||M.lanes===0)&&(M=b.lastRenderedReducer,M!==null))try{var K=b.lastRenderedState,ee=M(K,y);if(A.hasEagerState=!0,A.eagerState=ee,ru(ee,K))return IO(p,b,A,0),Dr===null&&TO(),!1}catch{}finally{}if(y=SV(p,b,A,N),y!==null)return hd(y,p,N),yue(y,b,N),!0}return!1}function az(p,b,y,N){if(N={lane:2,revertLane:Bz(),gesture:null,action:N,hasEagerState:!1,eagerState:null,next:null},XO(p)){if(b)throw Error(n(479))}else b=SV(p,y,N,2),b!==null&&hd(b,p,2)}function XO(p){var b=p.alternate;return p===ui||b!==null&&b===ui}function _ue(p,b){HS=UO=!0;var y=p.pending;y===null?b.next=b:(b.next=y.next,y.next=b),p.pending=b}function yue(p,b,y){if((y&4194048)!==0){var N=b.lanes;N&=p.pendingLanes,y|=N,b.lanes=y,zs(p,y)}}var mT={readContext:Cl,use:KO,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};mT.useEffectEvent=So;var wue={readContext:Cl,use:KO,useCallback:function(p,b){return Ec().memoizedState=[p,b===void 0?null:b],p},useContext:Cl,useEffect:rue,useImperativeHandle:function(p,b,y){y=y!=null?y.concat([p]):null,YO(4194308,4,cue.bind(null,b,p),y)},useLayoutEffect:function(p,b){return YO(4194308,4,p,b)},useInsertionEffect:function(p,b){YO(4,2,p,b)},useMemo:function(p,b){var y=Ec();b=b===void 0?null:b;var N=p();if(X0){Rs(!0);try{p()}finally{Rs(!1)}}return y.memoizedState=[N,b],N},useReducer:function(p,b,y){var N=Ec();if(y!==void 0){var A=y(b);if(X0){Rs(!0);try{y(b)}finally{Rs(!1)}}}else A=b;return N.memoizedState=N.baseState=A,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:A},N.queue=p,p=p.dispatch=qje.bind(null,ui,p),[N.memoizedState,p]},useRef:function(p){var b=Ec();return p={current:p},b.memoizedState=p},useState:function(p){p=ez(p);var b=p.queue,y=vue.bind(null,ui,b);return b.dispatch=y,[p.memoizedState,y]},useDebugValue:iz,useDeferredValue:function(p,b){var y=Ec();return sz(y,p,b)},useTransition:function(){var p=ez(!1);return p=fue.bind(null,ui,p.queue,!0,!1),Ec().memoizedState=p,[!1,p]},useSyncExternalStore:function(p,b,y){var N=ui,A=Ec();if(ts){if(y===void 0)throw Error(n(407));y=y()}else{if(y=b(),Dr===null)throw Error(n(349));(Yi&127)!==0||zde(N,b,y)}A.memoizedState=y;var M={value:y,getSnapshot:b};return A.queue=M,rue($de.bind(null,N,M,p),[p]),N.flags|=2048,VS(9,{destroy:void 0},Ude.bind(null,N,M,y,b),null),y},useId:function(){var p=Ec(),b=Dr.identifierPrefix;if(ts){var y=af,N=of;y=(N&~(1<<32-mi(N)-1)).toString(32)+y,b="_"+b+"R_"+y,y=$O++,0<\/script>",M=M.removeChild(M.firstChild);break;case"select":M=typeof N.is=="string"?K.createElement("select",{is:N.is}):K.createElement("select"),N.multiple?M.multiple=!0:N.size&&(M.size=N.size);break;default:M=typeof N.is=="string"?K.createElement(A,{is:N.is}):K.createElement(A)}}M[rr]=b,M[wi]=N;e:for(K=b.child;K!==null;){if(K.tag===5||K.tag===6)M.appendChild(K.stateNode);else if(K.tag!==4&&K.tag!==27&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===b)break e;for(;K.sibling===null;){if(K.return===null||K.return===b)break e;K=K.return}K.sibling.return=K.return,K=K.sibling}b.stateNode=M;e:switch(kl(M,A,N),A){case"button":case"input":case"select":case"textarea":N=!!N.autoFocus;break e;case"img":N=!0;break e;default:N=!1}N&&sm(b)}}return $r(b),yz(b,b.type,p===null?null:p.memoizedProps,b.pendingProps,y),null;case 6:if(p&&b.stateNode!=null)p.memoizedProps!==N&&sm(b);else{if(typeof N!="string"&&b.stateNode===null)throw Error(n(166));if(p=Le.current,RS(b)){if(p=b.stateNode,y=b.memoizedProps,N=null,A=wl,A!==null)switch(A.tag){case 27:case 5:N=A.memoizedProps}p[rr]=b,p=!!(p.nodeValue===y||N!==null&&N.suppressHydrationWarning===!0||Whe(p.nodeValue,y)),p||Sx(b,!0)}else p=b5(p).createTextNode(N),p[rr]=b,b.stateNode=p}return $r(b),null;case 31:if(y=b.memoizedState,p===null||p.memoizedState!==null){if(N=RS(b),y!==null){if(p===null){if(!N)throw Error(n(318));if(p=b.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(n(557));p[rr]=b}else U0(),(b.flags&128)===0&&(b.memoizedState=null),b.flags|=4;$r(b),p=!1}else y=IV(),p!==null&&p.memoizedState!==null&&(p.memoizedState.hydrationErrors=y),p=!0;if(!p)return b.flags&256?(lu(b),b):(lu(b),null);if((b.flags&128)!==0)throw Error(n(558))}return $r(b),null;case 13:if(N=b.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(A=RS(b),N!==null&&N.dehydrated!==null){if(p===null){if(!A)throw Error(n(318));if(A=b.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(n(317));A[rr]=b}else U0(),(b.flags&128)===0&&(b.memoizedState=null),b.flags|=4;$r(b),A=!1}else A=IV(),p!==null&&p.memoizedState!==null&&(p.memoizedState.hydrationErrors=A),A=!0;if(!A)return b.flags&256?(lu(b),b):(lu(b),null)}return lu(b),(b.flags&128)!==0?(b.lanes=y,b):(y=N!==null,p=p!==null&&p.memoizedState!==null,y&&(N=b.child,A=null,N.alternate!==null&&N.alternate.memoizedState!==null&&N.alternate.memoizedState.cachePool!==null&&(A=N.alternate.memoizedState.cachePool.pool),M=null,N.memoizedState!==null&&N.memoizedState.cachePool!==null&&(M=N.memoizedState.cachePool.pool),M!==A&&(N.flags|=2048)),y!==p&&y&&(b.child.flags|=8192),n5(b,b.updateQueue),$r(b),null);case 4:return he(),p===null&&zz(b.stateNode.containerInfo),$r(b),null;case 10:return em(b.type),$r(b),null;case 19:if(G(Ho),N=b.memoizedState,N===null)return $r(b),null;if(A=(b.flags&128)!==0,M=N.rendering,M===null)if(A)xT(N,!1);else{if(ko!==0||p!==null&&(p.flags&128)!==0)for(p=b.child;p!==null;){if(M=zO(p),M!==null){for(b.flags|=128,xT(N,!1),p=M.updateQueue,b.updateQueue=p,n5(b,p),b.subtreeFlags=0,p=y,y=b.child;y!==null;)vde(y,p),y=y.sibling;return U(Ho,Ho.current&1|2),ts&&Zp(b,N.treeForkCount),b.child}p=p.sibling}N.tail!==null&&ds()>a5&&(b.flags|=128,A=!0,xT(N,!1),b.lanes=4194304)}else{if(!A)if(p=zO(M),p!==null){if(b.flags|=128,A=!0,p=p.updateQueue,b.updateQueue=p,n5(b,p),xT(N,!0),N.tail===null&&N.tailMode==="hidden"&&!M.alternate&&!ts)return $r(b),null}else 2*ds()-N.renderingStartTime>a5&&y!==536870912&&(b.flags|=128,A=!0,xT(N,!1),b.lanes=4194304);N.isBackwards?(M.sibling=b.child,b.child=M):(p=N.last,p!==null?p.sibling=M:b.child=M,N.last=M)}return N.tail!==null?(p=N.tail,N.rendering=p,N.tail=p.sibling,N.renderingStartTime=ds(),p.sibling=null,y=Ho.current,U(Ho,A?y&1|2:y&1),ts&&Zp(b,N.treeForkCount),p):($r(b),null);case 22:case 23:return lu(b),UV(),N=b.memoizedState!==null,p!==null?p.memoizedState!==null!==N&&(b.flags|=8192):N&&(b.flags|=8192),N?(y&536870912)!==0&&(b.flags&128)===0&&($r(b),b.subtreeFlags&6&&(b.flags|=8192)):$r(b),y=b.updateQueue,y!==null&&n5(b,y.retryQueue),y=null,p!==null&&p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(y=p.memoizedState.cachePool.pool),N=null,b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(N=b.memoizedState.cachePool.pool),N!==y&&(b.flags|=2048),p!==null&&G(K0),null;case 24:return y=null,p!==null&&(y=p.memoizedState.cache),b.memoizedState.cache!==y&&(b.flags|=2048),em(ia),$r(b),null;case 25:return null;case 30:return null}throw Error(n(156,b.tag))}function Xje(p,b){switch(DV(b),b.tag){case 1:return p=b.flags,p&65536?(b.flags=p&-65537|128,b):null;case 3:return em(ia),he(),p=b.flags,(p&65536)!==0&&(p&128)===0?(b.flags=p&-65537|128,b):null;case 26:case 27:case 5:return Ie(b),null;case 31:if(b.memoizedState!==null){if(lu(b),b.alternate===null)throw Error(n(340));U0()}return p=b.flags,p&65536?(b.flags=p&-65537|128,b):null;case 13:if(lu(b),p=b.memoizedState,p!==null&&p.dehydrated!==null){if(b.alternate===null)throw Error(n(340));U0()}return p=b.flags,p&65536?(b.flags=p&-65537|128,b):null;case 19:return G(Ho),null;case 4:return he(),null;case 10:return em(b.type),null;case 22:case 23:return lu(b),UV(),p!==null&&G(K0),p=b.flags,p&65536?(b.flags=p&-65537|128,b):null;case 24:return em(ia),null;case 25:return null;default:return null}}function que(p,b){switch(DV(b),b.tag){case 3:em(ia),he();break;case 26:case 27:case 5:Ie(b);break;case 4:he();break;case 31:b.memoizedState!==null&&lu(b);break;case 13:lu(b);break;case 19:G(Ho);break;case 10:em(b.type);break;case 22:case 23:lu(b),UV(),p!==null&&G(K0);break;case 24:em(ia)}}function vT(p,b){try{var y=b.updateQueue,N=y!==null?y.lastEffect:null;if(N!==null){var A=N.next;y=A;do{if((y.tag&p)===p){N=void 0;var M=y.create,K=y.inst;N=M(),K.destroy=N}y=y.next}while(y!==A)}}catch(ee){ar(b,b.return,ee)}}function Ix(p,b,y){try{var N=b.updateQueue,A=N!==null?N.lastEffect:null;if(A!==null){var M=A.next;N=M;do{if((N.tag&p)===p){var K=N.inst,ee=K.destroy;if(ee!==void 0){K.destroy=void 0,A=b;var xe=y,Ue=ee;try{Ue()}catch(et){ar(A,xe,et)}}}N=N.next}while(N!==M)}}catch(et){ar(b,b.return,et)}}function Kue(p){var b=p.updateQueue;if(b!==null){var y=p.stateNode;try{jde(b,y)}catch(N){ar(p,p.return,N)}}}function Gue(p,b,y){y.props=Z0(p.type,p.memoizedProps),y.state=p.memoizedState;try{y.componentWillUnmount()}catch(N){ar(p,b,N)}}function _T(p,b){try{var y=p.ref;if(y!==null){switch(p.tag){case 26:case 27:case 5:var N=p.stateNode;break;case 30:N=p.stateNode;break;default:N=p.stateNode}typeof y=="function"?p.refCleanup=y(N):y.current=N}}catch(A){ar(p,b,A)}}function lf(p,b){var y=p.ref,N=p.refCleanup;if(y!==null)if(typeof N=="function")try{N()}catch(A){ar(p,b,A)}finally{p.refCleanup=null,p=p.alternate,p!=null&&(p.refCleanup=null)}else if(typeof y=="function")try{y(null)}catch(A){ar(p,b,A)}else y.current=null}function Yue(p){var b=p.type,y=p.memoizedProps,N=p.stateNode;try{e:switch(b){case"button":case"input":case"select":case"textarea":y.autoFocus&&N.focus();break e;case"img":y.src?N.src=y.src:y.srcSet&&(N.srcset=y.srcSet)}}catch(A){ar(p,p.return,A)}}function wz(p,b,y){try{var N=p.stateNode;vFe(N,p.type,y,b),N[wi]=b}catch(A){ar(p,p.return,A)}}function Que(p){return p.tag===5||p.tag===3||p.tag===26||p.tag===27&&Fx(p.type)||p.tag===4}function Cz(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||Que(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.tag===27&&Fx(p.type)||p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function Sz(p,b,y){var N=p.tag;if(N===5||N===6)p=p.stateNode,b?(y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y).insertBefore(p,b):(b=y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y,b.appendChild(p),y=y._reactRootContainer,y!=null||b.onclick!==null||(b.onclick=su));else if(N!==4&&(N===27&&Fx(p.type)&&(y=p.stateNode,b=null),p=p.child,p!==null))for(Sz(p,b,y),p=p.sibling;p!==null;)Sz(p,b,y),p=p.sibling}function i5(p,b,y){var N=p.tag;if(N===5||N===6)p=p.stateNode,b?y.insertBefore(p,b):y.appendChild(p);else if(N!==4&&(N===27&&Fx(p.type)&&(y=p.stateNode),p=p.child,p!==null))for(i5(p,b,y),p=p.sibling;p!==null;)i5(p,b,y),p=p.sibling}function Xue(p){var b=p.stateNode,y=p.memoizedProps;try{for(var N=p.type,A=b.attributes;A.length;)b.removeAttributeNode(A[0]);kl(b,N,y),b[rr]=p,b[wi]=y}catch(M){ar(p,p.return,M)}}var rm=!1,oa=!1,kz=!1,Zue=typeof WeakSet=="function"?WeakSet:Set,qa=null;function Zje(p,b){if(p=p.containerInfo,qz=S5,p=dde(p),xV(p)){if("selectionStart"in p)var y={start:p.selectionStart,end:p.selectionEnd};else e:{y=(y=p.ownerDocument)&&y.defaultView||window;var N=y.getSelection&&y.getSelection();if(N&&N.rangeCount!==0){y=N.anchorNode;var A=N.anchorOffset,M=N.focusNode;N=N.focusOffset;try{y.nodeType,M.nodeType}catch{y=null;break e}var K=0,ee=-1,xe=-1,Ue=0,et=0,ot=p,Ge=null;t:for(;;){for(var Qe;ot!==y||A!==0&&ot.nodeType!==3||(ee=K+A),ot!==M||N!==0&&ot.nodeType!==3||(xe=K+N),ot.nodeType===3&&(K+=ot.nodeValue.length),(Qe=ot.firstChild)!==null;)Ge=ot,ot=Qe;for(;;){if(ot===p)break t;if(Ge===y&&++Ue===A&&(ee=K),Ge===M&&++et===N&&(xe=K),(Qe=ot.nextSibling)!==null)break;ot=Ge,Ge=ot.parentNode}ot=Qe}y=ee===-1||xe===-1?null:{start:ee,end:xe}}else y=null}y=y||{start:0,end:0}}else y=null;for(Kz={focusedElem:p,selectionRange:y},S5=!1,qa=b;qa!==null;)if(b=qa,p=b.child,(b.subtreeFlags&1028)!==0&&p!==null)p.return=b,qa=p;else for(;qa!==null;){switch(b=qa,M=b.alternate,p=b.flags,b.tag){case 0:if((p&4)!==0&&(p=b.updateQueue,p=p!==null?p.events:null,p!==null))for(y=0;y title"))),kl(M,N,y),M[rr]=p,Ki(M),N=M;break e;case"link":var K=sge("link","href",A).get(N+(y.href||""));if(K){for(var ee=0;eebr&&(K=br,br=jn,jn=K);var Te=lde(ee,jn),ke=lde(ee,br);if(Te&&ke&&(Qe.rangeCount!==1||Qe.anchorNode!==Te.node||Qe.anchorOffset!==Te.offset||Qe.focusNode!==ke.node||Qe.focusOffset!==ke.offset)){var Ve=ot.createRange();Ve.setStart(Te.node,Te.offset),Qe.removeAllRanges(),jn>br?(Qe.addRange(Ve),Qe.extend(ke.node,ke.offset)):(Ve.setEnd(ke.node,ke.offset),Qe.addRange(Ve))}}}}for(ot=[],Qe=ee;Qe=Qe.parentNode;)Qe.nodeType===1&&ot.push({element:Qe,left:Qe.scrollLeft,top:Qe.scrollTop});for(typeof ee.focus=="function"&&ee.focus(),ee=0;eey?32:y,V.T=null,y=Az,Az=null;var M=Px,K=dm;if(Ea=0,KS=Px=null,dm=0,(Ms&6)!==0)throw Error(n(331));var ee=Ms;if(Ms|=4,che(M.current),ohe(M,M.current,K,y),Ms=ee,NT(0,!1),$i&&typeof $i.onPostCommitFiberRoot=="function")try{$i.onPostCommitFiberRoot(Nr,M)}catch{}return!0}finally{X.p=A,V.T=N,Ehe(p,b)}}function Dhe(p,b,y){b=nh(y,b),b=uz(p.stateNode,b,2),p=Lx(p,b,2),p!==null&&(Ii(p,2),cf(p))}function ar(p,b,y){if(p.tag===3)Dhe(p,p,y);else for(;b!==null;){if(b.tag===3){Dhe(b,p,y);break}else if(b.tag===1){var N=b.stateNode;if(typeof b.type.getDerivedStateFromError=="function"||typeof N.componentDidCatch=="function"&&(Mx===null||!Mx.has(N))){p=nh(y,p),y=Tue(2),N=Lx(b,y,2),N!==null&&(Iue(y,N,b,p),Ii(N,2),cf(N));break}}b=b.return}}function Oz(p,b,y){var N=p.pingCache;if(N===null){N=p.pingCache=new tFe;var A=new Set;N.set(b,A)}else A=N.get(b),A===void 0&&(A=new Set,N.set(b,A));A.has(y)||(Lz=!0,A.add(y),p=oFe.bind(null,p,b,y),b.then(p,p))}function oFe(p,b,y){var N=p.pingCache;N!==null&&N.delete(b),p.pingedLanes|=p.suspendedLanes&y,p.warmLanes&=~y,Dr===p&&(Yi&y)===y&&(ko===4||ko===3&&(Yi&62914560)===Yi&&300>ds()-o5?(Ms&2)===0&&GS(p,0):Dz|=y,qS===Yi&&(qS=0)),cf(p)}function The(p,b){b===0&&(b=li()),p=V0(p,b),p!==null&&(Ii(p,b),cf(p))}function aFe(p){var b=p.memoizedState,y=0;b!==null&&(y=b.retryLane),The(p,y)}function lFe(p,b){var y=0;switch(p.tag){case 31:case 13:var N=p.stateNode,A=p.memoizedState;A!==null&&(y=A.retryLane);break;case 19:N=p.stateNode;break;case 22:N=p.stateNode._retryCache;break;default:throw Error(n(314))}N!==null&&N.delete(b),The(p,y)}function cFe(p,b){return Tn(p,b)}var g5=null,QS=null,jz=!1,f5=!1,Fz=!1,jx=0;function cf(p){p!==QS&&p.next===null&&(QS===null?g5=QS=p:QS=QS.next=p),f5=!0,jz||(jz=!0,uFe())}function NT(p,b){if(!Fz&&f5){Fz=!0;do for(var y=!1,N=g5;N!==null;){if(p!==0){var A=N.pendingLanes;if(A===0)var M=0;else{var K=N.suspendedLanes,ee=N.pingedLanes;M=(1<<31-mi(42|p)+1)-1,M&=A&~(K&~ee),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(y=!0,Mhe(N,M))}else M=Yi,M=rn(N,N===Dr?M:0,N.cancelPendingCommit!==null||N.timeoutHandle!==-1),(M&3)===0||Cn(N,M)||(y=!0,Mhe(N,M));N=N.next}while(y);Fz=!1}}function dFe(){Ihe()}function Ihe(){f5=jz=!1;var p=0;jx!==0&&yFe()&&(p=jx);for(var b=ds(),y=null,N=g5;N!==null;){var A=N.next,M=Ahe(N,b);M===0?(N.next=null,y===null?g5=A:y.next=A,A===null&&(QS=y)):(y=N,(p!==0||(M&3)!==0)&&(f5=!0)),N=A}Ea!==0&&Ea!==5||NT(p),jx!==0&&(jx=0)}function Ahe(p,b){for(var y=p.suspendedLanes,N=p.pingedLanes,A=p.expirationTimes,M=p.pendingLanes&-62914561;0ee)break;var et=xe.transferSize,ot=xe.initiatorType;et&&Vhe(ot)&&(xe=xe.responseEnd,K+=et*(xe"u"?null:document;function ege(p,b,y){var N=XS;if(N&&typeof b=="string"&&b){var A=rd(b);A='link[rel="'+p+'"][href="'+A+'"]',typeof y=="string"&&(A+='[crossorigin="'+y+'"]'),Jhe.has(A)||(Jhe.add(A),p={rel:p,crossOrigin:y,href:b},N.querySelector(A)===null&&(b=N.createElement("link"),kl(b,"link",p),Ki(b),N.head.appendChild(b)))}}function TFe(p){um.D(p),ege("dns-prefetch",p,null)}function IFe(p,b){um.C(p,b),ege("preconnect",p,b)}function AFe(p,b,y){um.L(p,b,y);var N=XS;if(N&&p&&b){var A='link[rel="preload"][as="'+rd(b)+'"]';b==="image"&&y&&y.imageSrcSet?(A+='[imagesrcset="'+rd(y.imageSrcSet)+'"]',typeof y.imageSizes=="string"&&(A+='[imagesizes="'+rd(y.imageSizes)+'"]')):A+='[href="'+rd(p)+'"]';var M=A;switch(b){case"style":M=ZS(p);break;case"script":M=JS(p)}lh.has(M)||(p=h({rel:"preload",href:b==="image"&&y&&y.imageSrcSet?void 0:p,as:b},y),lh.set(M,p),N.querySelector(A)!==null||b==="style"&&N.querySelector(TT(M))||b==="script"&&N.querySelector(IT(M))||(b=N.createElement("link"),kl(b,"link",p),Ki(b),N.head.appendChild(b)))}}function RFe(p,b){um.m(p,b);var y=XS;if(y&&p){var N=b&&typeof b.as=="string"?b.as:"script",A='link[rel="modulepreload"][as="'+rd(N)+'"][href="'+rd(p)+'"]',M=A;switch(N){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":M=JS(p)}if(!lh.has(M)&&(p=h({rel:"modulepreload",href:p},b),lh.set(M,p),y.querySelector(A)===null)){switch(N){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(y.querySelector(IT(M)))return}N=y.createElement("link"),kl(N,"link",p),Ki(N),y.head.appendChild(N)}}}function MFe(p,b,y){um.S(p,b,y);var N=XS;if(N&&p){var A=qi(N).hoistableStyles,M=ZS(p);b=b||"default";var K=A.get(M);if(!K){var ee={loading:0,preload:null};if(K=N.querySelector(TT(M)))ee.loading=5;else{p=h({rel:"stylesheet",href:p,"data-precedence":b},y),(y=lh.get(M))&&eU(p,y);var xe=K=N.createElement("link");Ki(xe),kl(xe,"link",p),xe._p=new Promise(function(Ue,et){xe.onload=Ue,xe.onerror=et}),xe.addEventListener("load",function(){ee.loading|=1}),xe.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,v5(K,b,N)}K={type:"stylesheet",instance:K,count:1,state:ee},A.set(M,K)}}}function PFe(p,b){um.X(p,b);var y=XS;if(y&&p){var N=qi(y).hoistableScripts,A=JS(p),M=N.get(A);M||(M=y.querySelector(IT(A)),M||(p=h({src:p,async:!0},b),(b=lh.get(A))&&tU(p,b),M=y.createElement("script"),Ki(M),kl(M,"link",p),y.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},N.set(A,M))}}function OFe(p,b){um.M(p,b);var y=XS;if(y&&p){var N=qi(y).hoistableScripts,A=JS(p),M=N.get(A);M||(M=y.querySelector(IT(A)),M||(p=h({src:p,async:!0,type:"module"},b),(b=lh.get(A))&&tU(p,b),M=y.createElement("script"),Ki(M),kl(M,"link",p),y.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},N.set(A,M))}}function tge(p,b,y,N){var A=(A=Le.current)?x5(A):null;if(!A)throw Error(n(446));switch(p){case"meta":case"title":return null;case"style":return typeof y.precedence=="string"&&typeof y.href=="string"?(b=ZS(y.href),y=qi(A).hoistableStyles,N=y.get(b),N||(N={type:"style",instance:null,count:0,state:null},y.set(b,N)),N):{type:"void",instance:null,count:0,state:null};case"link":if(y.rel==="stylesheet"&&typeof y.href=="string"&&typeof y.precedence=="string"){p=ZS(y.href);var M=qi(A).hoistableStyles,K=M.get(p);if(K||(A=A.ownerDocument||A,K={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},M.set(p,K),(M=A.querySelector(TT(p)))&&!M._p&&(K.instance=M,K.state.loading=5),lh.has(p)||(y={rel:"preload",as:"style",href:y.href,crossOrigin:y.crossOrigin,integrity:y.integrity,media:y.media,hrefLang:y.hrefLang,referrerPolicy:y.referrerPolicy},lh.set(p,y),M||jFe(A,p,y,K.state))),b&&N===null)throw Error(n(528,""));return K}if(b&&N!==null)throw Error(n(529,""));return null;case"script":return b=y.async,y=y.src,typeof y=="string"&&b&&typeof b!="function"&&typeof b!="symbol"?(b=JS(y),y=qi(A).hoistableScripts,N=y.get(b),N||(N={type:"script",instance:null,count:0,state:null},y.set(b,N)),N):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,p))}}function ZS(p){return'href="'+rd(p)+'"'}function TT(p){return'link[rel="stylesheet"]['+p+"]"}function nge(p){return h({},p,{"data-precedence":p.precedence,precedence:null})}function jFe(p,b,y,N){p.querySelector('link[rel="preload"][as="style"]['+b+"]")?N.loading=1:(b=p.createElement("link"),N.preload=b,b.addEventListener("load",function(){return N.loading|=1}),b.addEventListener("error",function(){return N.loading|=2}),kl(b,"link",y),Ki(b),p.head.appendChild(b))}function JS(p){return'[src="'+rd(p)+'"]'}function IT(p){return"script[async]"+p}function ige(p,b,y){if(b.count++,b.instance===null)switch(b.type){case"style":var N=p.querySelector('style[data-href~="'+rd(y.href)+'"]');if(N)return b.instance=N,Ki(N),N;var A=h({},y,{"data-href":y.href,"data-precedence":y.precedence,href:null,precedence:null});return N=(p.ownerDocument||p).createElement("style"),Ki(N),kl(N,"style",A),v5(N,y.precedence,p),b.instance=N;case"stylesheet":A=ZS(y.href);var M=p.querySelector(TT(A));if(M)return b.state.loading|=4,b.instance=M,Ki(M),M;N=nge(y),(A=lh.get(A))&&eU(N,A),M=(p.ownerDocument||p).createElement("link"),Ki(M);var K=M;return K._p=new Promise(function(ee,xe){K.onload=ee,K.onerror=xe}),kl(M,"link",N),b.state.loading|=4,v5(M,y.precedence,p),b.instance=M;case"script":return M=JS(y.src),(A=p.querySelector(IT(M)))?(b.instance=A,Ki(A),A):(N=y,(A=lh.get(M))&&(N=h({},y),tU(N,A)),p=p.ownerDocument||p,A=p.createElement("script"),Ki(A),kl(A,"link",N),p.head.appendChild(A),b.instance=A);case"void":return null;default:throw Error(n(443,b.type))}else b.type==="stylesheet"&&(b.state.loading&4)===0&&(N=b.instance,b.state.loading|=4,v5(N,y.precedence,p));return b.instance}function v5(p,b,y){for(var N=y.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=N.length?N[N.length-1]:null,M=A,K=0;K title"):null)}function FFe(p,b,y){if(y===1||b.itemProp!=null)return!1;switch(p){case"meta":case"title":return!0;case"style":if(typeof b.precedence!="string"||typeof b.href!="string"||b.href==="")break;return!0;case"link":if(typeof b.rel!="string"||typeof b.href!="string"||b.href===""||b.onLoad||b.onError)break;switch(b.rel){case"stylesheet":return p=b.disabled,typeof b.precedence=="string"&&p==null;default:return!0}case"script":if(b.async&&typeof b.async!="function"&&typeof b.async!="symbol"&&!b.onLoad&&!b.onError&&b.src&&typeof b.src=="string")return!0}return!1}function oge(p){return!(p.type==="stylesheet"&&(p.state.loading&3)===0)}function BFe(p,b,y,N){if(y.type==="stylesheet"&&(typeof N.media!="string"||matchMedia(N.media).matches!==!1)&&(y.state.loading&4)===0){if(y.instance===null){var A=ZS(N.href),M=b.querySelector(TT(A));if(M){b=M._p,b!==null&&typeof b=="object"&&typeof b.then=="function"&&(p.count++,p=y5.bind(p),b.then(p,p)),y.state.loading|=4,y.instance=M,Ki(M);return}M=b.ownerDocument||b,N=nge(N),(A=lh.get(A))&&eU(N,A),M=M.createElement("link"),Ki(M);var K=M;K._p=new Promise(function(ee,xe){K.onload=ee,K.onerror=xe}),kl(M,"link",N),y.instance=M}p.stylesheets===null&&(p.stylesheets=new Map),p.stylesheets.set(y,b),(b=y.state.preload)&&(y.state.loading&3)===0&&(p.count++,y=y5.bind(p),b.addEventListener("load",y),b.addEventListener("error",y))}}var nU=0;function HFe(p,b){return p.stylesheets&&p.count===0&&C5(p,p.stylesheets),0nU?50:800)+b);return p.unsuspend=y,function(){p.unsuspend=null,clearTimeout(N),clearTimeout(A)}}:null}function y5(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)C5(this,this.stylesheets);else if(this.unsuspend){var p=this.unsuspend;this.unsuspend=null,p()}}}var w5=null;function C5(p,b){p.stylesheets=null,p.unsuspend!==null&&(p.count++,w5=new Map,b.forEach(WFe,p),w5=null,y5.call(p))}function WFe(p,b){if(!(b.state.loading&4)){var y=w5.get(p);if(y)var N=y.get(null);else{y=new Map,w5.set(p,y);for(var A=p.querySelectorAll("link[data-precedence],style[data-precedence]"),M=0;M"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),hU.exports=r6e(),hU.exports}var a6e=o6e(),Tg=ZCe();const JCe=SH(Tg);/** + * @remix-run/router v1.23.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function R2(){return R2=Object.assign?Object.assign.bind():function(i){for(var e=1;e"u")throw new Error(e)}function Vie(i,e){if(!i){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function c6e(){return Math.random().toString(36).substr(2,8)}function Age(i,e){return{usr:i.state,key:i.key,idx:e}}function KK(i,e,t,n){return t===void 0&&(t=null),R2({pathname:typeof i=="string"?i:i.pathname,search:"",hash:""},typeof e=="string"?JL(e):e,{state:t,key:e&&e.key||n||c6e()})}function jj(i){let{pathname:e="/",search:t="",hash:n=""}=i;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function JL(i){let e={};if(i){let t=i.indexOf("#");t>=0&&(e.hash=i.substr(t),i=i.substr(0,t));let n=i.indexOf("?");n>=0&&(e.search=i.substr(n),i=i.substr(0,n)),i&&(e.pathname=i)}return e}function d6e(i,e,t,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:r=!1}=n,o=s.history,a=Wv.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(R2({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function h(){a=Wv.Pop;let v=u(),_=v==null?null:v-c;c=v,l&&l({action:a,location:x.location,delta:_})}function g(v,_){a=Wv.Push;let w=KK(x.location,v,_);c=u()+1;let k=Age(w,c),C=x.createHref(w);try{o.pushState(k,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}r&&l&&l({action:a,location:x.location,delta:1})}function f(v,_){a=Wv.Replace;let w=KK(x.location,v,_);c=u();let k=Age(w,c),C=x.createHref(w);o.replaceState(k,"",C),r&&l&&l({action:a,location:x.location,delta:0})}function m(v){let _=s.location.origin!=="null"?s.location.origin:s.location.href,w=typeof v=="string"?v:jj(v);return w=w.replace(/ $/,"%20"),po(_,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,_)}let x={get action(){return a},get location(){return i(s,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Ige,h),l=v,()=>{s.removeEventListener(Ige,h),l=null}},createHref(v){return e(s,v)},createURL:m,encodeLocation(v){let _=m(v);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:g,replace:f,go(v){return o.go(v)}};return x}var Rge;(function(i){i.data="data",i.deferred="deferred",i.redirect="redirect",i.error="error"})(Rge||(Rge={}));function u6e(i,e,t){return t===void 0&&(t="/"),h6e(i,e,t)}function h6e(i,e,t,n){let s=typeof e=="string"?JL(e):e,r=tL(s.pathname||"/",t);if(r==null)return null;let o=eSe(i);g6e(o);let a=null,l=S6e(r);for(let c=0;a==null&&c{let l={relativePath:a===void 0?r.path||"":a,caseSensitive:r.caseSensitive===!0,childrenIndex:o,route:r};l.relativePath.startsWith("/")&&(po(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=l_([n,l.relativePath]),u=t.concat(l);r.children&&r.children.length>0&&(po(r.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),eSe(r.children,e,u,c)),!(r.path==null&&!r.index)&&e.push({path:c,score:_6e(c,r.index),routesMeta:u})};return i.forEach((r,o)=>{var a;if(r.path===""||!((a=r.path)!=null&&a.includes("?")))s(r,o);else for(let l of tSe(r.path))s(r,o,l)}),e}function tSe(i){let e=i.split("/");if(e.length===0)return[];let[t,...n]=e,s=t.endsWith("?"),r=t.replace(/\?$/,"");if(n.length===0)return s?[r,""]:[r];let o=tSe(n.join("/")),a=[];return a.push(...o.map(l=>l===""?r:[r,l].join("/"))),s&&a.push(...o),a.map(l=>i.startsWith("/")&&l===""?"/":l)}function g6e(i){i.sort((e,t)=>e.score!==t.score?t.score-e.score:y6e(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}const f6e=/^:[\w-]+$/,p6e=3,m6e=2,b6e=1,x6e=10,v6e=-2,Mge=i=>i==="*";function _6e(i,e){let t=i.split("/"),n=t.length;return t.some(Mge)&&(n+=v6e),e&&(n+=m6e),t.filter(s=>!Mge(s)).reduce((s,r)=>s+(f6e.test(r)?p6e:r===""?b6e:x6e),n)}function y6e(i,e){return i.length===e.length&&i.slice(0,-1).every((n,s)=>n===e[s])?i[i.length-1]-e[e.length-1]:0}function w6e(i,e,t){let{routesMeta:n}=i,s={},r="/",o=[];for(let a=0;a{let{paramName:g,isOptional:f}=u;if(g==="*"){let x=a[h]||"";o=r.slice(0,r.length-x.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?c[g]=void 0:c[g]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:r,pathnameBase:o,pattern:i}}function C6e(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),Vie(i==="*"||!i.endsWith("*")||i.endsWith("/*"),'Route path "'+i+'" will be treated as if it were '+('"'+i.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+i.replace(/\*$/,"/*")+'".'));let n=[],s="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(n.push({paramName:"*"}),s+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":i!==""&&i!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function S6e(i){try{return i.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Vie(!1,'The URL path "'+i+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),i}}function tL(i,e){if(e==="/")return i;if(!i.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=i.charAt(t);return n&&n!=="/"?null:i.slice(t)||"/"}const k6e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,N6e=i=>k6e.test(i);function E6e(i,e){e===void 0&&(e="/");let{pathname:t,search:n="",hash:s=""}=typeof i=="string"?JL(i):i,r;if(t)if(N6e(t))r=t;else{if(t.includes("//")){let o=t;t=nSe(t),Vie(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+t))}t.startsWith("/")?r=Pge(t.substring(1),"/"):r=Pge(t,e)}else r=e;return{pathname:r,search:T6e(n),hash:I6e(s)}}function Pge(i,e){let t=e.replace(/\/+$/,"").split("/");return i.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function mU(i,e,t,n){return"Cannot include a '"+i+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function L6e(i){return i.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function zie(i,e){let t=L6e(i);return e?t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase):t.map(n=>n.pathnameBase)}function Uie(i,e,t,n){n===void 0&&(n=!1);let s;typeof i=="string"?s=JL(i):(s=R2({},i),po(!s.pathname||!s.pathname.includes("?"),mU("?","pathname","search",s)),po(!s.pathname||!s.pathname.includes("#"),mU("#","pathname","hash",s)),po(!s.search||!s.search.includes("#"),mU("#","search","hash",s)));let r=i===""||s.pathname==="",o=r?"/":s.pathname,a;if(o==null)a=t;else{let h=e.length-1;if(!n&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),h-=1;s.pathname=g.join("/")}a=h>=0?e[h]:"/"}let l=E6e(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(r||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const nSe=i=>i.replace(/\/\/+/g,"/"),l_=i=>nSe(i.join("/")),D6e=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),T6e=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,I6e=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function A6e(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}const iSe=["post","put","patch","delete"];new Set(iSe);const R6e=["get",...iSe];new Set(R6e);/** + * React Router v6.30.4 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function M2(){return M2=Object.assign?Object.assign.bind():function(i){for(var e=1;e{a.current=!0}),L.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let h=Uie(c,JSON.parse(o),r,u.relative==="path");i==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:l_([e,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[e,n,o,r,i])}const O6e=L.createContext(null);function j6e(i){let e=L.useContext(Op).outlet;return e&&L.createElement(O6e.Provider,{value:i},e)}function f0(){let{matches:i}=L.useContext(Op),e=i[i.length-1];return e?e.params:{}}function LH(i,e){let{relative:t}=e===void 0?{}:e,{future:n}=L.useContext(ox),{matches:s}=L.useContext(Op),{pathname:r}=jp(),o=JSON.stringify(zie(s,n.v7_relativeSplatPath));return L.useMemo(()=>Uie(i,JSON.parse(o),r,t==="path"),[i,o,r,t])}function F6e(i,e){return B6e(i,e)}function B6e(i,e,t,n){eD()||po(!1);let{navigator:s}=L.useContext(ox),{matches:r}=L.useContext(Op),o=r[r.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=jp(),u;if(e){var h;let v=typeof e=="string"?JL(e):e;l==="/"||(h=v.pathname)!=null&&h.startsWith(l)||po(!1),u=v}else u=c;let g=u.pathname||"/",f=g;if(l!=="/"){let v=l.replace(/^\//,"").split("/");f="/"+g.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=u6e(i,{pathname:f}),x=U6e(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:l_([l,s.encodeLocation?s.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:l_([l,s.encodeLocation?s.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),r,t,n);return e&&x?L.createElement(EH.Provider,{value:{location:M2({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Wv.Pop}},x):x}function H6e(){let i=G6e(),e=A6e(i)?i.status+" "+i.statusText:i instanceof Error?i.message:JSON.stringify(i),t=i instanceof Error?i.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},e),t?L.createElement("pre",{style:s},t):null,null)}const W6e=L.createElement(H6e,null);class V6e extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?L.createElement(Op.Provider,{value:this.props.routeContext},L.createElement(rSe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function z6e(i){let{routeContext:e,match:t,children:n}=i,s=L.useContext(NH);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(Op.Provider,{value:e},n)}function U6e(i,e,t,n){var s;if(e===void 0&&(e=[]),t===void 0&&(t=null),n===void 0&&(n=null),i==null){var r;if(!t)return null;if(t.errors)i=t.matches;else if((r=n)!=null&&r.v7_partialHydration&&e.length===0&&!t.initialized&&t.matches.length>0)i=t.matches;else return null}let o=i,a=(s=t)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);u>=0||po(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(t&&n&&n.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,g)=>{let f,m=!1,x=null,v=null;t&&(f=a&&h.route.id?a[h.route.id]:void 0,x=h.route.errorElement||W6e,l&&(c<0&&g===0?(Q6e("route-fallback"),m=!0,v=null):c===g&&(m=!0,v=h.route.hydrateFallbackElement||null)));let _=e.concat(o.slice(0,g+1)),w=()=>{let k;return f?k=x:m?k=v:h.route.Component?k=L.createElement(h.route.Component,null):h.route.element?k=h.route.element:k=u,L.createElement(z6e,{match:h,routeContext:{outlet:u,matches:_,isDataRoute:t!=null},children:k})};return t&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?L.createElement(V6e,{location:t.location,revalidation:t.revalidation,component:x,error:f,children:w(),routeContext:{outlet:null,matches:_,isDataRoute:!0}}):w()},null)}var aSe=(function(i){return i.UseBlocker="useBlocker",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i})(aSe||{}),lSe=(function(i){return i.UseBlocker="useBlocker",i.UseLoaderData="useLoaderData",i.UseActionData="useActionData",i.UseRouteError="useRouteError",i.UseNavigation="useNavigation",i.UseRouteLoaderData="useRouteLoaderData",i.UseMatches="useMatches",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i.UseRouteId="useRouteId",i})(lSe||{});function $6e(i){let e=L.useContext(NH);return e||po(!1),e}function q6e(i){let e=L.useContext(sSe);return e||po(!1),e}function K6e(i){let e=L.useContext(Op);return e||po(!1),e}function cSe(i){let e=K6e(),t=e.matches[e.matches.length-1];return t.route.id||po(!1),t.route.id}function G6e(){var i;let e=L.useContext(rSe),t=q6e(),n=cSe();return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function Y6e(){let{router:i}=$6e(aSe.UseNavigateStable),e=cSe(lSe.UseNavigateStable),t=L.useRef(!1);return oSe(()=>{t.current=!0}),L.useCallback(function(s,r){r===void 0&&(r={}),t.current&&(typeof s=="number"?i.navigate(s):i.navigate(s,M2({fromRouteId:e},r)))},[i,e])}const Oge={};function Q6e(i,e,t){Oge[i]||(Oge[i]=!0)}function X6e(i,e){i==null||i.v7_startTransition,i==null||i.v7_relativeSplatPath}function FT(i){let{to:e,replace:t,state:n,relative:s}=i;eD()||po(!1);let{future:r,static:o}=L.useContext(ox),{matches:a}=L.useContext(Op),{pathname:l}=jp(),c=za(),u=Uie(e,zie(a,r.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(u);return L.useEffect(()=>c(JSON.parse(h),{replace:t,state:n,relative:s}),[c,h,s,t,n]),null}function Z6e(i){return j6e(i.context)}function Ai(i){po(!1)}function J6e(i){let{basename:e="/",children:t=null,location:n,navigationType:s=Wv.Pop,navigator:r,static:o=!1,future:a}=i;eD()&&po(!1);let l=e.replace(/^\/*/,"/"),c=L.useMemo(()=>({basename:l,navigator:r,static:o,future:M2({v7_relativeSplatPath:!1},a)}),[l,a,r,o]);typeof n=="string"&&(n=JL(n));let{pathname:u="/",search:h="",hash:g="",state:f=null,key:m="default"}=n,x=L.useMemo(()=>{let v=tL(u,l);return v==null?null:{location:{pathname:v,search:h,hash:g,state:f,key:m},navigationType:s}},[l,u,h,g,f,m,s]);return x==null?null:L.createElement(ox.Provider,{value:c},L.createElement(EH.Provider,{children:t,value:x}))}function e8e(i){let{children:e,location:t}=i;return F6e(YK(e),t)}new Promise(()=>{});function YK(i,e){e===void 0&&(e=[]);let t=[];return L.Children.forEach(i,(n,s)=>{if(!L.isValidElement(n))return;let r=[...e,s];if(n.type===L.Fragment){t.push.apply(t,YK(n.props.children,r));return}n.type!==Ai&&po(!1),!n.props.index||!n.props.children||po(!1);let o={id:n.props.id||r.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=YK(n.props.children,r)),t.push(o)}),t}/** + * React Router DOM v6.30.4 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Fj(){return Fj=Object.assign?Object.assign.bind():function(i){for(var e=1;e{let n=i[t];return e.concat(Array.isArray(n)?n.map(s=>[t,s]):[[t,n]])},[]))}function i8e(i,e){let t=QK(i);return e&&e.forEach((n,s)=>{t.has(s)||e.getAll(s).forEach(r=>{t.append(s,r)})}),t}const s8e=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],r8e=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],o8e="6";try{window.__reactRouterVersion=o8e}catch{}const a8e=L.createContext({isTransitioning:!1}),l8e="startTransition",jge=kH[l8e];function c8e(i){let{basename:e,children:t,future:n,window:s}=i,r=L.useRef();r.current==null&&(r.current=l6e({window:s,v5Compat:!0}));let o=r.current,[a,l]=L.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=L.useCallback(h=>{c&&jge?jge(()=>l(h)):l(h)},[l,c]);return L.useLayoutEffect(()=>o.listen(u),[o,u]),L.useEffect(()=>X6e(n),[n]),L.createElement(J6e,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:o,future:n})}const d8e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",u8e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kn=L.forwardRef(function(e,t){let{onClick:n,relative:s,reloadDocument:r,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:h}=e,g=dSe(e,s8e),{basename:f}=L.useContext(ox),m,x=!1;if(typeof c=="string"&&u8e.test(c)&&(m=c,d8e))try{let k=new URL(window.location.href),C=c.startsWith("//")?new URL(k.protocol+c):new URL(c),E=tL(C.pathname,f);C.origin===k.origin&&E!=null?c=E+C.search+C.hash:x=!0}catch{}let v=M6e(c,{relative:s}),_=f8e(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:h});function w(k){n&&n(k),k.defaultPrevented||_(k)}return L.createElement("a",Fj({},g,{href:m||v,onClick:x||r?n:w,ref:t,target:l}))}),h8e=L.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:s=!1,className:r="",end:o=!1,style:a,to:l,viewTransition:c,children:u}=e,h=dSe(e,r8e),g=LH(l,{relative:h.relative}),f=jp(),m=L.useContext(sSe),{navigator:x,basename:v}=L.useContext(ox),_=m!=null&&p8e(g)&&c===!0,w=x.encodeLocation?x.encodeLocation(g).pathname:g.pathname,k=f.pathname,C=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;s||(k=k.toLowerCase(),C=C?C.toLowerCase():null,w=w.toLowerCase()),C&&v&&(C=tL(C,v)||C);const E=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let D=k===w||!o&&k.startsWith(w)&&k.charAt(E)==="/",T=C!=null&&(C===w||!o&&C.startsWith(w)&&C.charAt(w.length)==="/"),I={isActive:D,isPending:T,isTransitioning:_},R=D?n:void 0,P;typeof r=="function"?P=r(I):P=[r,D?"active":null,T?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let j=typeof a=="function"?a(I):a;return L.createElement(Kn,Fj({},h,{"aria-current":R,className:P,ref:t,style:j,to:l,viewTransition:c}),typeof u=="function"?u(I):u)});var XK;(function(i){i.UseScrollRestoration="useScrollRestoration",i.UseSubmit="useSubmit",i.UseSubmitFetcher="useSubmitFetcher",i.UseFetcher="useFetcher",i.useViewTransitionState="useViewTransitionState"})(XK||(XK={}));var Fge;(function(i){i.UseFetcher="useFetcher",i.UseFetchers="useFetchers",i.UseScrollRestoration="useScrollRestoration"})(Fge||(Fge={}));function g8e(i){let e=L.useContext(NH);return e||po(!1),e}function f8e(i,e){let{target:t,replace:n,state:s,preventScrollReset:r,relative:o,viewTransition:a}=e===void 0?{}:e,l=za(),c=jp(),u=LH(i,{relative:o});return L.useCallback(h=>{if(n8e(h,t)){h.preventDefault();let g=n!==void 0?n:jj(c)===jj(u);l(i,{replace:g,state:s,preventScrollReset:r,relative:o,viewTransition:a})}},[c,l,u,n,s,t,i,r,o,a])}function p0(i){let e=L.useRef(QK(i)),t=L.useRef(!1),n=jp(),s=L.useMemo(()=>i8e(n.search,t.current?null:e.current),[n.search]),r=za(),o=L.useCallback((a,l)=>{const c=QK(typeof a=="function"?a(s):a);t.current=!0,r("?"+c,l)},[r,s]);return[s,o]}function p8e(i,e){e===void 0&&(e={});let t=L.useContext(a8e);t==null&&po(!1);let{basename:n}=g8e(XK.useViewTransitionState),s=LH(i,{relative:e.relative});if(!t.isTransitioning)return!1;let r=tL(t.currentLocation.pathname,n)||t.currentLocation.pathname,o=tL(t.nextLocation.pathname,n)||t.nextLocation.pathname;return GK(s.pathname,o)!=null||GK(s.pathname,r)!=null}var UC=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},m8e={setTimeout:(i,e)=>setTimeout(i,e),clearTimeout:i=>clearTimeout(i),setInterval:(i,e)=>setInterval(i,e),clearInterval:i=>clearInterval(i)},Iv,Hie,OCe,b8e=(OCe=class{constructor(){Vt(this,Iv,m8e);Vt(this,Hie,!1)}setTimeoutProvider(i){St(this,Iv,i)}setTimeout(i,e){return re(this,Iv).setTimeout(i,e)}clearTimeout(i){re(this,Iv).clearTimeout(i)}setInterval(i,e){return re(this,Iv).setInterval(i,e)}clearInterval(i){re(this,Iv).clearInterval(i)}},Iv=new WeakMap,Hie=new WeakMap,OCe),c1=new b8e;function x8e(i){setTimeout(i,0)}var eC=typeof window>"u"||"Deno"in globalThis;function ac(){}function v8e(i,e){return typeof i=="function"?i(e):i}function ZK(i){return typeof i=="number"&&i>=0&&i!==1/0}function uSe(i,e){return Math.max(i+(e||0)-Date.now(),0)}function c_(i,e){return typeof i=="function"?i(e):i}function _h(i,e){return typeof i=="function"?i(e):i}function Bge(i,e){const{type:t="all",exact:n,fetchStatus:s,predicate:r,queryKey:o,stale:a}=i;if(o){if(n){if(e.queryHash!==$ie(o,e.options))return!1}else if(!P2(e.queryKey,o))return!1}if(t!=="all"){const l=e.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||r&&!r(e))}function Hge(i,e){const{exact:t,status:n,predicate:s,mutationKey:r}=i;if(r){if(!e.options.mutationKey)return!1;if(t){if(tC(e.options.mutationKey)!==tC(r))return!1}else if(!P2(e.options.mutationKey,r))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function $ie(i,e){return((e==null?void 0:e.queryKeyHashFn)||tC)(i)}function tC(i){return JSON.stringify(i,(e,t)=>JK(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function P2(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?Object.keys(e).every(t=>P2(i[t],e[t])):!1}var _8e=Object.prototype.hasOwnProperty;function qie(i,e,t=0){if(i===e)return i;if(t>500)return e;const n=Wge(i)&&Wge(e);if(!n&&!(JK(i)&&JK(e)))return e;const r=(n?i:Object.keys(i)).length,o=n?e:Object.keys(e),a=o.length,l=n?new Array(a):{};let c=0;for(let u=0;u{c1.setTimeout(e,i)})}function eG(i,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(i,e):t.structuralSharing!==!1?qie(i,e):e}function Kie(i){return i}function w8e(i,e,t=0){const n=[...i,e];return t&&n.length>t?n.slice(1):n}function C8e(i,e,t=0){const n=[e,...i];return t&&n.length>t?n.slice(0,-1):n}var Gie=Symbol();function hSe(i,e){return!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===Gie?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}function Yie(i,e){return typeof i=="function"?i(...e):!!i}function S8e(i,e,t){let n=!1,s;return Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(s??(s=e()),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),i}var L1,Av,wE,jCe,k8e=(jCe=class extends UC{constructor(){super();Vt(this,L1);Vt(this,Av);Vt(this,wE);St(this,wE,e=>{if(!eC&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){re(this,Av)||this.setEventListener(re(this,wE))}onUnsubscribe(){var e;this.hasListeners()||((e=re(this,Av))==null||e.call(this),St(this,Av,void 0))}setEventListener(e){var t;St(this,wE,e),(t=re(this,Av))==null||t.call(this),St(this,Av,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){re(this,L1)!==e&&(St(this,L1,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof re(this,L1)=="boolean"?re(this,L1):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},L1=new WeakMap,Av=new WeakMap,wE=new WeakMap,jCe),Qie=new k8e;function tG(){let i,e;const t=new Promise((s,r)=>{i=s,e=r});t.status="pending",t.catch(()=>{});function n(s){Object.assign(t,s),delete t.resolve,delete t.reject}return t.resolve=s=>{n({status:"fulfilled",value:s}),i(s)},t.reject=s=>{n({status:"rejected",reason:s}),e(s)},t}var N8e=x8e;function E8e(){let i=[],e=0,t=a=>{a()},n=a=>{a()},s=N8e;const r=a=>{e?i.push(a):s(()=>{t(a)})},o=()=>{const a=i;i=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{t(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{r(()=>{a(...l)})},schedule:r,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Io=E8e(),CE,Rv,SE,FCe,L8e=(FCe=class extends UC{constructor(){super();Vt(this,CE,!0);Vt(this,Rv);Vt(this,SE);St(this,SE,e=>{if(!eC&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){re(this,Rv)||this.setEventListener(re(this,SE))}onUnsubscribe(){var e;this.hasListeners()||((e=re(this,Rv))==null||e.call(this),St(this,Rv,void 0))}setEventListener(e){var t;St(this,SE,e),(t=re(this,Rv))==null||t.call(this),St(this,Rv,e(this.setOnline.bind(this)))}setOnline(e){re(this,CE)!==e&&(St(this,CE,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return re(this,CE)}},CE=new WeakMap,Rv=new WeakMap,SE=new WeakMap,FCe),Bj=new L8e;function D8e(i){return Math.min(1e3*2**i,3e4)}function gSe(i){return(i??"online")==="online"?Bj.isOnline():!0}var nG=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function fSe(i){let e=!1,t=0,n;const s=tG(),r=()=>s.status!=="pending",o=x=>{var v;if(!r()){const _=new nG(x);g(_),(v=i.onCancel)==null||v.call(i,_)}},a=()=>{e=!0},l=()=>{e=!1},c=()=>Qie.isFocused()&&(i.networkMode==="always"||Bj.isOnline())&&i.canRun(),u=()=>gSe(i.networkMode)&&i.canRun(),h=x=>{r()||(n==null||n(),s.resolve(x))},g=x=>{r()||(n==null||n(),s.reject(x))},f=()=>new Promise(x=>{var v;n=_=>{(r()||c())&&x(_)},(v=i.onPause)==null||v.call(i)}).then(()=>{var x;n=void 0,r()||(x=i.onContinue)==null||x.call(i)}),m=()=>{if(r())return;let x;const v=t===0?i.initialPromise:void 0;try{x=v??i.fn()}catch(_){x=Promise.reject(_)}Promise.resolve(x).then(h).catch(_=>{var D;if(r())return;const w=i.retry??(eC?0:3),k=i.retryDelay??D8e,C=typeof k=="function"?k(t,_):k,E=w===!0||typeof w=="number"&&tc()?void 0:f()).then(()=>{e?g(_):m()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?m():f().then(m),s)}}var D1,BCe,pSe=(BCe=class{constructor(){Vt(this,D1)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ZK(this.gcTime)&&St(this,D1,c1.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(eC?1/0:300*1e3))}clearGcTimeout(){re(this,D1)&&(c1.clearTimeout(re(this,D1)),St(this,D1,void 0))}},D1=new WeakMap,BCe),T1,kE,xh,I1,Za,qM,A1,pg,Nm,HCe,T8e=(HCe=class extends pSe{constructor(e){super();Vt(this,pg);Vt(this,T1);Vt(this,kE);Vt(this,xh);Vt(this,I1);Vt(this,Za);Vt(this,qM);Vt(this,A1);St(this,A1,!1),St(this,qM,e.defaultOptions),this.setOptions(e.options),this.observers=[],St(this,I1,e.client),St(this,xh,re(this,I1).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,St(this,T1,Uge(this.options)),this.state=e.state??re(this,T1),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=re(this,Za))==null?void 0:e.promise}setOptions(e){if(this.options={...re(this,qM),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Uge(this.options);t.data!==void 0&&(this.setState(zge(t.data,t.dataUpdatedAt)),St(this,T1,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&re(this,xh).remove(this)}setData(e,t){const n=eG(this.state.data,e,this.options);return it(this,pg,Nm).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e,t){it(this,pg,Nm).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var n,s;const t=(n=re(this,Za))==null?void 0:n.promise;return(s=re(this,Za))==null||s.cancel(e),t?t.then(ac).catch(ac):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(re(this,T1))}isActive(){return this.observers.some(e=>_h(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gie||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>c_(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!uSe(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=re(this,Za))==null||t.continue()}onOnline(){var t;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=re(this,Za))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),re(this,xh).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(re(this,Za)&&(re(this,A1)?re(this,Za).cancel({revert:!0}):re(this,Za).cancelRetry()),this.scheduleGc()),re(this,xh).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||it(this,pg,Nm).call(this,{type:"invalidate"})}async fetch(e,t){var l,c,u,h,g,f,m,x,v,_,w,k;if(this.state.fetchStatus!=="idle"&&((l=re(this,Za))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(re(this,Za))return re(this,Za).continueRetry(),re(this,Za).promise}if(e&&this.setOptions(e),!this.options.queryFn){const C=this.observers.find(E=>E.options.queryFn);C&&this.setOptions(C.options)}const n=new AbortController,s=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(St(this,A1,!0),n.signal)})},r=()=>{const C=hSe(this.options,t),D=(()=>{const T={client:re(this,I1),queryKey:this.queryKey,meta:this.meta};return s(T),T})();return St(this,A1,!1),this.options.persister?this.options.persister(C,D,this):C(D)},a=(()=>{const C={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:re(this,I1),state:this.state,fetchFn:r};return s(C),C})();(c=this.options.behavior)==null||c.onFetch(a,this),St(this,kE,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&it(this,pg,Nm).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta}),St(this,Za,fSe({initialPromise:t==null?void 0:t.initialPromise,fn:a.fetchFn,onCancel:C=>{C instanceof nG&&C.revert&&this.setState({...re(this,kE),fetchStatus:"idle"}),n.abort()},onFail:(C,E)=>{it(this,pg,Nm).call(this,{type:"failed",failureCount:C,error:E})},onPause:()=>{it(this,pg,Nm).call(this,{type:"pause"})},onContinue:()=>{it(this,pg,Nm).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const C=await re(this,Za).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(f=(g=re(this,xh).config).onSuccess)==null||f.call(g,C,this),(x=(m=re(this,xh).config).onSettled)==null||x.call(m,C,this.state.error,this),C}catch(C){if(C instanceof nG){if(C.silent)return re(this,Za).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw it(this,pg,Nm).call(this,{type:"error",error:C}),(_=(v=re(this,xh).config).onError)==null||_.call(v,C,this),(k=(w=re(this,xh).config).onSettled)==null||k.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},T1=new WeakMap,kE=new WeakMap,xh=new WeakMap,I1=new WeakMap,Za=new WeakMap,qM=new WeakMap,A1=new WeakMap,pg=new WeakSet,Nm=function(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...mSe(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...zge(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return St(this,kE,e.manual?s:void 0),s;case"error":const r=e.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Io.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),re(this,xh).notify({query:this,type:"updated",action:e})})},HCe);function mSe(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gSe(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function zge(i,e){return{data:i,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Uge(i){const e=typeof i.initialData=="function"?i.initialData():i.initialData,t=e!==void 0,n=t?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var kd,ns,KM,Ac,R1,NE,Qm,Mv,GM,EE,LE,M1,P1,Pv,DE,Js,MI,iG,sG,rG,oG,aG,lG,cG,bSe,WCe,DH=(WCe=class extends UC{constructor(e,t){super();Vt(this,Js);Vt(this,kd);Vt(this,ns);Vt(this,KM);Vt(this,Ac);Vt(this,R1);Vt(this,NE);Vt(this,Qm);Vt(this,Mv);Vt(this,GM);Vt(this,EE);Vt(this,LE);Vt(this,M1);Vt(this,P1);Vt(this,Pv);Vt(this,DE,new Set);this.options=t,St(this,kd,e),St(this,Mv,null),St(this,Qm,tG()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(re(this,ns).addObserver(this),$ge(re(this,ns),this.options)?it(this,Js,MI).call(this):this.updateResult(),it(this,Js,oG).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dG(re(this,ns),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dG(re(this,ns),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,it(this,Js,aG).call(this),it(this,Js,lG).call(this),re(this,ns).removeObserver(this)}setOptions(e){const t=this.options,n=re(this,ns);if(this.options=re(this,kd).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _h(this.options.enabled,re(this,ns))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");it(this,Js,cG).call(this),re(this,ns).setOptions(this.options),t._defaulted&&!O2(this.options,t)&&re(this,kd).getQueryCache().notify({type:"observerOptionsUpdated",query:re(this,ns),observer:this});const s=this.hasListeners();s&&qge(re(this,ns),n,this.options,t)&&it(this,Js,MI).call(this),this.updateResult(),s&&(re(this,ns)!==n||_h(this.options.enabled,re(this,ns))!==_h(t.enabled,re(this,ns))||c_(this.options.staleTime,re(this,ns))!==c_(t.staleTime,re(this,ns)))&&it(this,Js,iG).call(this);const r=it(this,Js,sG).call(this);s&&(re(this,ns)!==n||_h(this.options.enabled,re(this,ns))!==_h(t.enabled,re(this,ns))||r!==re(this,Pv))&&it(this,Js,rG).call(this,r)}getOptimisticResult(e){const t=re(this,kd).getQueryCache().build(re(this,kd),e),n=this.createResult(t,e);return A8e(this,n)&&(St(this,Ac,n),St(this,NE,this.options),St(this,R1,re(this,ns).state)),n}getCurrentResult(){return re(this,Ac)}trackResult(e,t){return new Proxy(e,{get:(n,s)=>(this.trackProp(s),t==null||t(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&re(this,Qm).status==="pending"&&re(this,Qm).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(e){re(this,DE).add(e)}getCurrentQuery(){return re(this,ns)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=re(this,kd).defaultQueryOptions(e),n=re(this,kd).getQueryCache().build(re(this,kd),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return it(this,Js,MI).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),re(this,Ac)))}createResult(e,t){var R;const n=re(this,ns),s=this.options,r=re(this,Ac),o=re(this,R1),a=re(this,NE),c=e!==n?e.state:re(this,KM),{state:u}=e;let h={...u},g=!1,f;if(t._optimisticResults){const P=this.hasListeners(),j=!P&&$ge(e,t),B=P&&qge(e,n,t,s);(j||B)&&(h={...h,...mSe(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:v}=h;f=h.data;let _=!1;if(t.placeholderData!==void 0&&f===void 0&&v==="pending"){let P;r!=null&&r.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData)?(P=r.data,_=!0):P=typeof t.placeholderData=="function"?t.placeholderData((R=re(this,LE))==null?void 0:R.state.data,re(this,LE)):t.placeholderData,P!==void 0&&(v="success",f=eG(r==null?void 0:r.data,P,t),g=!0)}if(t.select&&f!==void 0&&!_)if(r&&f===(o==null?void 0:o.data)&&t.select===re(this,GM))f=re(this,EE);else try{St(this,GM,t.select),f=t.select(f),f=eG(r==null?void 0:r.data,f,t),St(this,EE,f),St(this,Mv,null)}catch(P){St(this,Mv,P)}re(this,Mv)&&(m=re(this,Mv),f=re(this,EE),x=Date.now(),v="error");const w=h.fetchStatus==="fetching",k=v==="pending",C=v==="error",E=k&&w,D=f!==void 0,I={status:v,fetchStatus:h.fetchStatus,isPending:k,isSuccess:v==="success",isError:C,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!k,isLoadingError:C&&!D,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:C&&D,isStale:Xie(e,t),refetch:this.refetch,promise:re(this,Qm),isEnabled:_h(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,j=I.status==="error"&&!P,B=q=>{j?q.reject(I.error):P&&q.resolve(I.data)},H=()=>{const q=St(this,Qm,I.promise=tG());B(q)},$=re(this,Qm);switch($.status){case"pending":e.queryHash===n.queryHash&&B($);break;case"fulfilled":(j||I.data!==$.value)&&H();break;case"rejected":(!j||I.error!==$.reason)&&H();break}}return I}updateResult(){const e=re(this,Ac),t=this.createResult(re(this,ns),this.options);if(St(this,R1,re(this,ns).state),St(this,NE,this.options),re(this,R1).data!==void 0&&St(this,LE,re(this,ns)),O2(t,e))return;St(this,Ac,t);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,r=typeof s=="function"?s():s;if(r==="all"||!r&&!re(this,DE).size)return!0;const o=new Set(r??re(this,DE));return this.options.throwOnError&&o.add("error"),Object.keys(re(this,Ac)).some(a=>{const l=a;return re(this,Ac)[l]!==e[l]&&o.has(l)})};it(this,Js,bSe).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&it(this,Js,oG).call(this)}},kd=new WeakMap,ns=new WeakMap,KM=new WeakMap,Ac=new WeakMap,R1=new WeakMap,NE=new WeakMap,Qm=new WeakMap,Mv=new WeakMap,GM=new WeakMap,EE=new WeakMap,LE=new WeakMap,M1=new WeakMap,P1=new WeakMap,Pv=new WeakMap,DE=new WeakMap,Js=new WeakSet,MI=function(e){it(this,Js,cG).call(this);let t=re(this,ns).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(ac)),t},iG=function(){it(this,Js,aG).call(this);const e=c_(this.options.staleTime,re(this,ns));if(eC||re(this,Ac).isStale||!ZK(e))return;const n=uSe(re(this,Ac).dataUpdatedAt,e)+1;St(this,M1,c1.setTimeout(()=>{re(this,Ac).isStale||this.updateResult()},n))},sG=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(re(this,ns)):this.options.refetchInterval)??!1},rG=function(e){it(this,Js,lG).call(this),St(this,Pv,e),!(eC||_h(this.options.enabled,re(this,ns))===!1||!ZK(re(this,Pv))||re(this,Pv)===0)&&St(this,P1,c1.setInterval(()=>{(this.options.refetchIntervalInBackground||Qie.isFocused())&&it(this,Js,MI).call(this)},re(this,Pv)))},oG=function(){it(this,Js,iG).call(this),it(this,Js,rG).call(this,it(this,Js,sG).call(this))},aG=function(){re(this,M1)&&(c1.clearTimeout(re(this,M1)),St(this,M1,void 0))},lG=function(){re(this,P1)&&(c1.clearInterval(re(this,P1)),St(this,P1,void 0))},cG=function(){const e=re(this,kd).getQueryCache().build(re(this,kd),this.options);if(e===re(this,ns))return;const t=re(this,ns);St(this,ns,e),St(this,KM,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},bSe=function(e){Io.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(re(this,Ac))}),re(this,kd).getQueryCache().notify({query:re(this,ns),type:"observerResultsUpdated"})})},WCe);function I8e(i,e){return _h(e.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&e.retryOnMount===!1)}function $ge(i,e){return I8e(i,e)||i.state.data!==void 0&&dG(i,e,e.refetchOnMount)}function dG(i,e,t){if(_h(e.enabled,i)!==!1&&c_(e.staleTime,i)!=="static"){const n=typeof t=="function"?t(i):t;return n==="always"||n!==!1&&Xie(i,e)}return!1}function qge(i,e,t,n){return(i!==e||_h(n.enabled,i)===!1)&&(!t.suspense||i.state.status!=="error")&&Xie(i,t)}function Xie(i,e){return _h(e.enabled,i)!==!1&&i.isStaleByTime(c_(e.staleTime,i))}function A8e(i,e){return!O2(i.getCurrentResult(),e)}function Hj(i){return{onFetch:(e,t)=>{var u,h,g,f,m;const n=e.options,s=(g=(h=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,r=((f=e.state.data)==null?void 0:f.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const v=k=>{S8e(k,()=>e.signal,()=>x=!0)},_=hSe(e.options,e.fetchOptions),w=async(k,C,E)=>{if(x)return Promise.reject();if(C==null&&k.pages.length)return Promise.resolve(k);const T=(()=>{const j={client:e.client,queryKey:e.queryKey,pageParam:C,direction:E?"backward":"forward",meta:e.options.meta};return v(j),j})(),I=await _(T),{maxPages:R}=e.options,P=E?C8e:w8e;return{pages:P(k.pages,I,R),pageParams:P(k.pageParams,C,R)}};if(s&&r.length){const k=s==="backward",C=k?xSe:uG,E={pages:r,pageParams:o},D=C(n,E);a=await w(E,D,k)}else{const k=i??r.length;do{const C=l===0?o[0]??n.initialPageParam:uG(n,a);if(l>0&&C==null)break;a=await w(a,C),l++}while(l{var x,v;return(v=(x=e.options).persister)==null?void 0:v.call(x,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=c}}}function uG(i,{pages:e,pageParams:t}){const n=e.length-1;return e.length>0?i.getNextPageParam(e[n],e,t[n],t):void 0}function xSe(i,{pages:e,pageParams:t}){var n;return e.length>0?(n=i.getPreviousPageParam)==null?void 0:n.call(i,e[0],e,t[0],t):void 0}function R8e(i,e){return e?uG(i,e)!=null:!1}function M8e(i,e){return!e||!i.getPreviousPageParam?!1:xSe(i,e)!=null}var P8e=class extends DH{constructor(i,e){super(i,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(i){super.setOptions({...i,behavior:Hj()})}getOptimisticResult(i){return i.behavior=Hj(),super.getOptimisticResult(i)}fetchNextPage(i){return this.fetch({...i,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(i){return this.fetch({...i,meta:{fetchMore:{direction:"backward"}}})}createResult(i,e){var m,x;const{state:t}=i,n=super.createResult(i,e),{isFetching:s,isRefetching:r,isError:o,isRefetchError:a}=n,l=(x=(m=t.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:x.direction,c=o&&l==="forward",u=s&&l==="forward",h=o&&l==="backward",g=s&&l==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:R8e(e,t.data),hasPreviousPage:M8e(e,t.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:h,isFetchingPreviousPage:g,isRefetchError:a&&!c&&!h,isRefetching:r&&!u&&!g}}},YM,Bf,oc,O1,Hf,Jx,VCe,O8e=(VCe=class extends pSe{constructor(e){super();Vt(this,Hf);Vt(this,YM);Vt(this,Bf);Vt(this,oc);Vt(this,O1);St(this,YM,e.client),this.mutationId=e.mutationId,St(this,oc,e.mutationCache),St(this,Bf,[]),this.state=e.state||vSe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){re(this,Bf).includes(e)||(re(this,Bf).push(e),this.clearGcTimeout(),re(this,oc).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){St(this,Bf,re(this,Bf).filter(t=>t!==e)),this.scheduleGc(),re(this,oc).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){re(this,Bf).length||(this.state.status==="pending"?this.scheduleGc():re(this,oc).remove(this))}continue(){var e;return((e=re(this,O1))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,a,l,c,u,h,g,f,m,x,v,_,w,k,C,E,D,T;const t=()=>{it(this,Hf,Jx).call(this,{type:"continue"})},n={client:re(this,YM),meta:this.options.meta,mutationKey:this.options.mutationKey};St(this,O1,fSe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(I,R)=>{it(this,Hf,Jx).call(this,{type:"failed",failureCount:I,error:R})},onPause:()=>{it(this,Hf,Jx).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>re(this,oc).canRun(this)}));const s=this.state.status==="pending",r=!re(this,O1).canStart();try{if(s)t();else{it(this,Hf,Jx).call(this,{type:"pending",variables:e,isPaused:r}),re(this,oc).config.onMutate&&await re(this,oc).config.onMutate(e,this,n);const R=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e,n));R!==this.state.context&&it(this,Hf,Jx).call(this,{type:"pending",context:R,variables:e,isPaused:r})}const I=await re(this,O1).start();return await((c=(l=re(this,oc).config).onSuccess)==null?void 0:c.call(l,I,e,this.state.context,this,n)),await((h=(u=this.options).onSuccess)==null?void 0:h.call(u,I,e,this.state.context,n)),await((f=(g=re(this,oc).config).onSettled)==null?void 0:f.call(g,I,null,this.state.variables,this.state.context,this,n)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,I,null,e,this.state.context,n)),it(this,Hf,Jx).call(this,{type:"success",data:I}),I}catch(I){try{await((_=(v=re(this,oc).config).onError)==null?void 0:_.call(v,I,e,this.state.context,this,n))}catch(R){Promise.reject(R)}try{await((k=(w=this.options).onError)==null?void 0:k.call(w,I,e,this.state.context,n))}catch(R){Promise.reject(R)}try{await((E=(C=re(this,oc).config).onSettled)==null?void 0:E.call(C,void 0,I,this.state.variables,this.state.context,this,n))}catch(R){Promise.reject(R)}try{await((T=(D=this.options).onSettled)==null?void 0:T.call(D,void 0,I,e,this.state.context,n))}catch(R){Promise.reject(R)}throw it(this,Hf,Jx).call(this,{type:"error",error:I}),I}finally{re(this,oc).runNext(this)}}},YM=new WeakMap,Bf=new WeakMap,oc=new WeakMap,O1=new WeakMap,Hf=new WeakSet,Jx=function(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Io.batch(()=>{re(this,Bf).forEach(n=>{n.onMutationUpdate(e)}),re(this,oc).notify({mutation:this,type:"updated",action:e})})},VCe);function vSe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xm,mg,QM,zCe,j8e=(zCe=class extends UC{constructor(e={}){super();Vt(this,Xm);Vt(this,mg);Vt(this,QM);this.config=e,St(this,Xm,new Set),St(this,mg,new Map),St(this,QM,0)}build(e,t,n){const s=new O8e({client:e,mutationCache:this,mutationId:++I5(this,QM)._,options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){re(this,Xm).add(e);const t=A5(e);if(typeof t=="string"){const n=re(this,mg).get(t);n?n.push(e):re(this,mg).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(re(this,Xm).delete(e)){const t=A5(e);if(typeof t=="string"){const n=re(this,mg).get(t);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&re(this,mg).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=A5(e);if(typeof t=="string"){const n=re(this,mg).get(t),s=n==null?void 0:n.find(r=>r.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const t=A5(e);if(typeof t=="string"){const s=(n=re(this,mg).get(t))==null?void 0:n.find(r=>r!==e&&r.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Io.batch(()=>{re(this,Xm).forEach(e=>{this.notify({type:"removed",mutation:e})}),re(this,Xm).clear(),re(this,mg).clear()})}getAll(){return Array.from(re(this,Xm))}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Hge(t,n))}findAll(e={}){return this.getAll().filter(t=>Hge(e,t))}notify(e){Io.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Io.batch(()=>Promise.all(e.map(t=>t.continue().catch(ac))))}},Xm=new WeakMap,mg=new WeakMap,QM=new WeakMap,zCe);function A5(i){var e;return(e=i.options.scope)==null?void 0:e.id}var Zm,Ov,Nd,Jm,Ob,j4,hG,UCe,F8e=(UCe=class extends UC{constructor(t,n){super();Vt(this,Ob);Vt(this,Zm);Vt(this,Ov);Vt(this,Nd);Vt(this,Jm);St(this,Zm,t),this.setOptions(n),this.bindMethods(),it(this,Ob,j4).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=re(this,Zm).defaultMutationOptions(t),O2(this.options,n)||re(this,Zm).getMutationCache().notify({type:"observerOptionsUpdated",mutation:re(this,Nd),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&tC(n.mutationKey)!==tC(this.options.mutationKey)?this.reset():((s=re(this,Nd))==null?void 0:s.state.status)==="pending"&&re(this,Nd).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=re(this,Nd))==null||t.removeObserver(this)}onMutationUpdate(t){it(this,Ob,j4).call(this),it(this,Ob,hG).call(this,t)}getCurrentResult(){return re(this,Ov)}reset(){var t;(t=re(this,Nd))==null||t.removeObserver(this),St(this,Nd,void 0),it(this,Ob,j4).call(this),it(this,Ob,hG).call(this)}mutate(t,n){var s;return St(this,Jm,n),(s=re(this,Nd))==null||s.removeObserver(this),St(this,Nd,re(this,Zm).getMutationCache().build(re(this,Zm),this.options)),re(this,Nd).addObserver(this),re(this,Nd).execute(t)}},Zm=new WeakMap,Ov=new WeakMap,Nd=new WeakMap,Jm=new WeakMap,Ob=new WeakSet,j4=function(){var n;const t=((n=re(this,Nd))==null?void 0:n.state)??vSe();St(this,Ov,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},hG=function(t){Io.batch(()=>{var n,s,r,o,a,l,c,u;if(re(this,Jm)&&this.hasListeners()){const h=re(this,Ov).variables,g=re(this,Ov).context,f={client:re(this,Zm),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(n=re(this,Jm)).onSuccess)==null||s.call(n,t.data,h,g,f)}catch(m){Promise.reject(m)}try{(o=(r=re(this,Jm)).onSettled)==null||o.call(r,t.data,null,h,g,f)}catch(m){Promise.reject(m)}}else if((t==null?void 0:t.type)==="error"){try{(l=(a=re(this,Jm)).onError)==null||l.call(a,t.error,h,g,f)}catch(m){Promise.reject(m)}try{(u=(c=re(this,Jm)).onSettled)==null||u.call(c,void 0,t.error,h,g,f)}catch(m){Promise.reject(m)}}}this.listeners.forEach(h=>{h(re(this,Ov))})})},UCe);function Kge(i,e){const t=new Set(e);return i.filter(n=>!t.has(n))}function B8e(i,e,t){const n=i.slice(0);return n[e]=t,n}var TE,_u,IE,AE,vh,jv,XM,ZM,JM,eP,Gl,gG,fG,pG,mG,bG,$Ce,H8e=($Ce=class extends UC{constructor(e,t,n){super();Vt(this,Gl);Vt(this,TE);Vt(this,_u);Vt(this,IE);Vt(this,AE);Vt(this,vh);Vt(this,jv);Vt(this,XM);Vt(this,ZM);Vt(this,JM);Vt(this,eP,[]);St(this,TE,e),St(this,AE,n),St(this,IE,[]),St(this,vh,[]),St(this,_u,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&re(this,vh).forEach(e=>{e.subscribe(t=>{it(this,Gl,mG).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,re(this,vh).forEach(e=>{e.destroy()})}setQueries(e,t){St(this,IE,e),St(this,AE,t),Io.batch(()=>{const n=re(this,vh),s=it(this,Gl,pG).call(this,re(this,IE));s.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const r=s.map(h=>h.observer),o=r.map(h=>h.getCurrentResult()),a=n.length!==r.length,l=r.some((h,g)=>h!==n[g]),c=a||l,u=c?!0:o.some((h,g)=>{const f=re(this,_u)[g];return!f||!O2(h,f)});!c&&!u||(c&&(St(this,eP,s),St(this,vh,r)),St(this,_u,o),this.hasListeners()&&(c&&(Kge(n,r).forEach(h=>{h.destroy()}),Kge(r,n).forEach(h=>{h.subscribe(g=>{it(this,Gl,mG).call(this,h,g)})})),it(this,Gl,bG).call(this)))})}getCurrentResult(){return re(this,_u)}getQueries(){return re(this,vh).map(e=>e.getCurrentQuery())}getObservers(){return re(this,vh)}getOptimisticResult(e,t){const n=it(this,Gl,pG).call(this,e),s=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=n.map(o=>o.defaultedQueryOptions.queryHash);return[s,o=>it(this,Gl,fG).call(this,o??s,t,r),()=>it(this,Gl,gG).call(this,s,n)]}},TE=new WeakMap,_u=new WeakMap,IE=new WeakMap,AE=new WeakMap,vh=new WeakMap,jv=new WeakMap,XM=new WeakMap,ZM=new WeakMap,JM=new WeakMap,eP=new WeakMap,Gl=new WeakSet,gG=function(e,t){return t.map((n,s)=>{const r=e[s];return n.defaultedQueryOptions.notifyOnChangeProps?r:n.observer.trackResult(r,o=>{t.forEach(a=>{a.observer.trackProp(o)})})})},fG=function(e,t,n){if(t){const s=re(this,JM),r=n!==void 0&&s!==void 0&&(s.length!==n.length||n.some((o,a)=>o!==s[a]));return(!re(this,jv)||re(this,_u)!==re(this,ZM)||r||t!==re(this,XM))&&(St(this,XM,t),St(this,ZM,re(this,_u)),n!==void 0&&St(this,JM,n),St(this,jv,qie(re(this,jv),t(e)))),re(this,jv)}return e},pG=function(e){const t=new Map;re(this,vh).forEach(s=>{const r=s.options.queryHash;if(!r)return;const o=t.get(r);o?o.push(s):t.set(r,[s])});const n=[];return e.forEach(s=>{var l;const r=re(this,TE).defaultQueryOptions(s),a=((l=t.get(r.queryHash))==null?void 0:l.shift())??new DH(re(this,TE),r);n.push({defaultedQueryOptions:r,observer:a})}),n},mG=function(e,t){const n=re(this,vh).indexOf(e);n!==-1&&(St(this,_u,B8e(re(this,_u),n,t)),it(this,Gl,bG).call(this))},bG=function(){var e;if(this.hasListeners()){const t=re(this,jv),n=it(this,Gl,gG).call(this,re(this,_u),re(this,eP)),s=it(this,Gl,fG).call(this,n,(e=re(this,AE))==null?void 0:e.combine);t!==s&&Io.batch(()=>{this.listeners.forEach(r=>{r(re(this,_u))})})}},$Ce),Wf,qCe,W8e=(qCe=class extends UC{constructor(e={}){super();Vt(this,Wf);this.config=e,St(this,Wf,new Map)}build(e,t,n){const s=t.queryKey,r=t.queryHash??$ie(s,t);let o=this.get(r);return o||(o=new T8e({client:e,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){re(this,Wf).has(e.queryHash)||(re(this,Wf).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=re(this,Wf).get(e.queryHash);t&&(e.destroy(),t===e&&re(this,Wf).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Io.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return re(this,Wf).get(e)}getAll(){return[...re(this,Wf).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Bge(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Bge(e,n)):t}notify(e){Io.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Io.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Io.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wf=new WeakMap,qCe),No,Fv,Bv,RE,ME,Hv,PE,OE,KCe,V8e=(KCe=class{constructor(i={}){Vt(this,No);Vt(this,Fv);Vt(this,Bv);Vt(this,RE);Vt(this,ME);Vt(this,Hv);Vt(this,PE);Vt(this,OE);St(this,No,i.queryCache||new W8e),St(this,Fv,i.mutationCache||new j8e),St(this,Bv,i.defaultOptions||{}),St(this,RE,new Map),St(this,ME,new Map),St(this,Hv,0)}mount(){I5(this,Hv)._++,re(this,Hv)===1&&(St(this,PE,Qie.subscribe(async i=>{i&&(await this.resumePausedMutations(),re(this,No).onFocus())})),St(this,OE,Bj.subscribe(async i=>{i&&(await this.resumePausedMutations(),re(this,No).onOnline())})))}unmount(){var i,e;I5(this,Hv)._--,re(this,Hv)===0&&((i=re(this,PE))==null||i.call(this),St(this,PE,void 0),(e=re(this,OE))==null||e.call(this),St(this,OE,void 0))}isFetching(i){return re(this,No).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return re(this,Fv).findAll({...i,status:"pending"}).length}getQueryData(i){var t;const e=this.defaultQueryOptions({queryKey:i});return(t=re(this,No).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(i){const e=this.defaultQueryOptions(i),t=re(this,No).build(this,e),n=t.state.data;return n===void 0?this.fetchQuery(i):(i.revalidateIfStale&&t.isStaleByTime(c_(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(i){return re(this,No).findAll(i).map(({queryKey:e,state:t})=>{const n=t.data;return[e,n]})}setQueryData(i,e,t){const n=this.defaultQueryOptions({queryKey:i}),s=re(this,No).get(n.queryHash),r=s==null?void 0:s.state.data,o=v8e(e,r);if(o!==void 0)return re(this,No).build(this,n).setData(o,{...t,manual:!0})}setQueriesData(i,e,t){return Io.batch(()=>re(this,No).findAll(i).map(({queryKey:n})=>[n,this.setQueryData(n,e,t)]))}getQueryState(i){var t;const e=this.defaultQueryOptions({queryKey:i});return(t=re(this,No).get(e.queryHash))==null?void 0:t.state}removeQueries(i){const e=re(this,No);Io.batch(()=>{e.findAll(i).forEach(t=>{e.remove(t)})})}resetQueries(i,e){const t=re(this,No);return Io.batch(()=>(t.findAll(i).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...i},e)))}cancelQueries(i,e={}){const t={revert:!0,...e},n=Io.batch(()=>re(this,No).findAll(i).map(s=>s.cancel(t)));return Promise.all(n).then(ac).catch(ac)}invalidateQueries(i,e={}){return Io.batch(()=>(re(this,No).findAll(i).forEach(t=>{t.invalidate()}),(i==null?void 0:i.refetchType)==="none"?Promise.resolve():this.refetchQueries({...i,type:(i==null?void 0:i.refetchType)??(i==null?void 0:i.type)??"active"},e)))}refetchQueries(i,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},n=Io.batch(()=>re(this,No).findAll(i).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,t);return t.throwOnError||(r=r.catch(ac)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(ac)}fetchQuery(i){const e=this.defaultQueryOptions(i);e.retry===void 0&&(e.retry=!1);const t=re(this,No).build(this,e);return t.isStaleByTime(c_(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(ac).catch(ac)}fetchInfiniteQuery(i){return i.behavior=Hj(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(ac).catch(ac)}ensureInfiniteQueryData(i){return i.behavior=Hj(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return Bj.isOnline()?re(this,Fv).resumePausedMutations():Promise.resolve()}getQueryCache(){return re(this,No)}getMutationCache(){return re(this,Fv)}getDefaultOptions(){return re(this,Bv)}setDefaultOptions(i){St(this,Bv,i)}setQueryDefaults(i,e){re(this,RE).set(tC(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...re(this,RE).values()],t={};return e.forEach(n=>{P2(i,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(i,e){re(this,ME).set(tC(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...re(this,ME).values()],t={};return e.forEach(n=>{P2(i,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(i){if(i._defaulted)return i;const e={...re(this,Bv).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=$ie(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Gie&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...re(this,Bv).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){re(this,No).clear(),re(this,Fv).clear()}},No=new WeakMap,Fv=new WeakMap,Bv=new WeakMap,RE=new WeakMap,ME=new WeakMap,Hv=new WeakMap,PE=new WeakMap,OE=new WeakMap,KCe),_Se=L.createContext(void 0),un=i=>{const e=L.useContext(_Se);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},z8e=({client:i,children:e})=>(L.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),d.jsx(_Se.Provider,{value:i,children:e})),ySe=L.createContext(!1),wSe=()=>L.useContext(ySe);ySe.Provider;function U8e(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var $8e=L.createContext(U8e()),CSe=()=>L.useContext($8e),SSe=(i,e,t)=>{const n=t!=null&&t.state.error&&typeof i.throwOnError=="function"?Yie(i.throwOnError,[t.state.error,t]):i.throwOnError;(i.suspense||i.experimental_prefetchInRender||n)&&(e.isReset()||(i.retryOnMount=!1))},kSe=i=>{L.useEffect(()=>{i.clearReset()},[i])},NSe=({result:i,errorResetBoundary:e,throwOnError:t,query:n,suspense:s})=>i.isError&&!e.isReset()&&!i.isFetching&&n&&(s&&i.data===void 0||Yie(t,[i.error,n])),ESe=i=>{if(i.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=i.staleTime;i.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof i.gcTime=="number"&&(i.gcTime=Math.max(i.gcTime,1e3))}},q8e=(i,e)=>i.isLoading&&i.isFetching&&!e,xG=(i,e)=>(i==null?void 0:i.suspense)&&e.isPending,vG=(i,e,t)=>e.fetchOptimistic(i).catch(()=>{t.clearReset()});function K8e({queries:i,...e},t){const n=un(),s=wSe(),r=CSe(),o=L.useMemo(()=>i.map(x=>{const v=n.defaultQueryOptions(x);return v._optimisticResults=s?"isRestoring":"optimistic",v}),[i,n,s]);o.forEach(x=>{ESe(x);const v=n.getQueryCache().get(x.queryHash);SSe(x,r,v)}),kSe(r);const[a]=L.useState(()=>new H8e(n,o,e)),[l,c,u]=a.getOptimisticResult(o,e.combine),h=!s&&e.subscribed!==!1;L.useSyncExternalStore(L.useCallback(x=>h?a.subscribe(Io.batchCalls(x)):ac,[a,h]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),L.useEffect(()=>{a.setQueries(o,e)},[o,e,a]);const f=l.some((x,v)=>xG(o[v],x))?l.flatMap((x,v)=>{const _=o[v];if(_&&xG(_,x)){const w=new DH(n,_);return vG(_,w,r)}return[]}):[];if(f.length>0)throw Promise.all(f);const m=l.find((x,v)=>{const _=o[v];return _&&NSe({result:x,errorResetBoundary:r,throwOnError:_.throwOnError,query:n.getQueryCache().get(_.queryHash),suspense:_.suspense})});if(m!=null&&m.error)throw m.error;return c(u())}function LSe(i,e,t){var g,f,m,x;const n=wSe(),s=CSe(),r=un(),o=r.defaultQueryOptions(i);(f=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||f.call(g,o);const a=r.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",ESe(o),SSe(o,s,a),kSe(s);const l=!r.getQueryCache().get(o.queryHash),[c]=L.useState(()=>new e(r,o)),u=c.getOptimisticResult(o),h=!n&&i.subscribed!==!1;if(L.useSyncExternalStore(L.useCallback(v=>{const _=h?c.subscribe(Io.batchCalls(v)):ac;return c.updateResult(),_},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),L.useEffect(()=>{c.setOptions(o)},[o,c]),xG(o,u))throw vG(o,c,s);if(NSe({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw u.error;if((x=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||x.call(m,o,u),o.experimental_prefetchInRender&&!eC&&q8e(u,n)){const v=l?vG(o,c,s):a==null?void 0:a.promise;v==null||v.catch(ac).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function fn(i,e){return LSe(i,DH)}function Xt(i,e){const t=un(),[n]=L.useState(()=>new F8e(t,i));L.useEffect(()=>{n.setOptions(i)},[n,i]);const s=L.useSyncExternalStore(L.useCallback(o=>n.subscribe(Io.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),r=L.useCallback((o,a)=>{n.mutate(o,a).catch(ac)},[n]);if(s.error&&Yie(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function DSe(i,e){return LSe(i,P8e)}function G8e(i){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=i:t.appendChild(document.createTextNode(i))}const Y8e=i=>{switch(i){case"success":return Z8e;case"info":return eBe;case"warning":return J8e;case"error":return tBe;default:return null}},Q8e=Array(12).fill(0),X8e=({visible:i,className:e})=>gt.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":i},gt.createElement("div",{className:"sonner-spinner"},Q8e.map((t,n)=>gt.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Z8e=gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},gt.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),J8e=gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},gt.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),eBe=gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},gt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),tBe=gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},gt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),nBe=gt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},gt.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),gt.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),iBe=()=>{const[i,e]=gt.useState(document.hidden);return gt.useEffect(()=>{const t=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),i};let _G=1;class sBe{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...s}=e,r=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:_G++,o=this.toasts.find(l=>l.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),o?this.toasts=this.toasts.map(l=>l.id===r?(this.publish({...l,...e,id:r,title:n}),{...l,...e,id:r,dismissible:a,title:n}):l):this.addToast({title:n,...s,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,o;const a=s.then(async c=>{if(o=["resolve",c],gt.isValidElement(c))r=!1,this.create({id:n,type:"default",message:c});else if(oBe(c)&&!c.ok){r=!1;const h=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,g=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description,m=typeof h=="object"&&!gt.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...m})}else if(c instanceof Error){r=!1;const h=typeof t.error=="function"?await t.error(c):t.error,g=typeof t.description=="function"?await t.description(c):t.description,m=typeof h=="object"&&!gt.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...m})}else if(t.success!==void 0){r=!1;const h=typeof t.success=="function"?await t.success(c):t.success,g=typeof t.description=="function"?await t.description(c):t.description,m=typeof h=="object"&&!gt.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:g,...m})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(c):t.error,h=typeof t.description=="function"?await t.description(c):t.description,f=typeof u=="object"&&!gt.isValidElement(u)?u:{message:u};this.create({id:n,type:"error",description:h,...f})}}).finally(()=>{r&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),l=()=>new Promise((c,u)=>a.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{const n=(t==null?void 0:t.id)||_G++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ld=new sBe,rBe=(i,e)=>{const t=(e==null?void 0:e.id)||_G++;return Ld.addToast({title:i,...e,id:t}),t},oBe=i=>i&&typeof i=="object"&&"ok"in i&&typeof i.ok=="boolean"&&"status"in i&&typeof i.status=="number",aBe=rBe,lBe=()=>Ld.toasts,cBe=()=>Ld.getActiveToasts(),qe=Object.assign(aBe,{success:Ld.success,info:Ld.info,warning:Ld.warning,error:Ld.error,custom:Ld.custom,message:Ld.message,promise:Ld.promise,dismiss:Ld.dismiss,loading:Ld.loading},{getHistory:lBe,getToasts:cBe});G8e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function R5(i){return i.label!==void 0}const dBe=3,uBe="24px",hBe="16px",Gge=4e3,gBe=356,fBe=14,pBe=45,mBe=200;function df(...i){return i.filter(Boolean).join(" ")}function bBe(i){const[e,t]=i.split("-"),n=[];return e&&n.push(e),t&&n.push(t),n}const xBe=i=>{var e,t,n,s,r,o,a,l,c;const{invert:u,toast:h,unstyled:g,interacting:f,setHeights:m,visibleToasts:x,heights:v,index:_,toasts:w,expanded:k,removeToast:C,defaultRichColors:E,closeButton:D,style:T,cancelButtonStyle:I,actionButtonStyle:R,className:P="",descriptionClassName:j="",duration:B,position:H,gap:$,expandByDefault:q,classNames:V,icons:X,closeButtonAriaLabel:ae="Close toast"}=i,[ne,W]=gt.useState(null),[Y,G]=gt.useState(null),[U,ue]=gt.useState(!1),[fe,Le]=gt.useState(!1),[tt,ge]=gt.useState(!1),[he,We]=gt.useState(!1),[Ie,_t]=gt.useState(!1),[ut,Wt]=gt.useState(0),[Re,Me]=gt.useState(0),pt=gt.useRef(h.duration||B||Gge),mt=gt.useRef(null),$t=gt.useRef(null),Tn=_===0,Pi=_+1<=x,Ti=h.type,cs=h.dismissible!==!1,ds=h.className||"",zr=h.descriptionClassName||"",Ye=gt.useMemo(()=>v.findIndex(rn=>rn.toastId===h.id)||0,[v,h.id]),yt=gt.useMemo(()=>{var rn;return(rn=h.closeButton)!=null?rn:D},[h.closeButton,D]),sn=gt.useMemo(()=>h.duration||B||Gge,[h.duration,B]),In=gt.useRef(0),On=gt.useRef(0),ws=gt.useRef(0),ir=gt.useRef(null),[Nr,$i]=H.split("-"),Rs=gt.useMemo(()=>v.reduce((rn,Cn,ai)=>ai>=Ye?rn:rn+Cn.height,0),[v,Ye]),mi=iBe(),ta=h.invert||u,Er=Ti==="loading";On.current=gt.useMemo(()=>Ye*$+Rs,[Ye,Rs]),gt.useEffect(()=>{pt.current=sn},[sn]),gt.useEffect(()=>{ue(!0)},[]),gt.useEffect(()=>{const rn=$t.current;if(rn){const Cn=rn.getBoundingClientRect().height;return Me(Cn),m(ai=>[{toastId:h.id,height:Cn,position:h.position},...ai]),()=>m(ai=>ai.filter(li=>li.toastId!==h.id))}},[m,h.id]),gt.useLayoutEffect(()=>{if(!U)return;const rn=$t.current,Cn=rn.style.height;rn.style.height="auto";const ai=rn.getBoundingClientRect().height;rn.style.height=Cn,Me(ai),m(li=>li.find(Ii=>Ii.toastId===h.id)?li.map(Ii=>Ii.toastId===h.id?{...Ii,height:ai}:Ii):[{toastId:h.id,height:ai,position:h.position},...li])},[U,h.title,h.description,m,h.id,h.jsx,h.action,h.cancel]);const fr=gt.useCallback(()=>{Le(!0),Wt(On.current),m(rn=>rn.filter(Cn=>Cn.toastId!==h.id)),setTimeout(()=>{C(h)},mBe)},[h,C,m,On]);gt.useEffect(()=>{if(h.promise&&Ti==="loading"||h.duration===1/0||h.type==="loading")return;let rn;return k||f||mi?(()=>{if(ws.current{pt.current!==1/0&&(In.current=new Date().getTime(),rn=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),fr()},pt.current))})(),()=>clearTimeout(rn)},[k,f,h,Ti,mi,fr]),gt.useEffect(()=>{h.delete&&(fr(),h.onDismiss==null||h.onDismiss.call(h,h))},[fr,h.delete]);function vl(){var rn;if(X!=null&&X.loading){var Cn;return gt.createElement("div",{className:df(V==null?void 0:V.loader,h==null||(Cn=h.classNames)==null?void 0:Cn.loader,"sonner-loader"),"data-visible":Ti==="loading"},X.loading)}return gt.createElement(X8e,{className:df(V==null?void 0:V.loader,h==null||(rn=h.classNames)==null?void 0:rn.loader),visible:Ti==="loading"})}const nu=h.icon||(X==null?void 0:X[Ti])||Y8e(Ti);var Cs,Vs;return gt.createElement("li",{tabIndex:0,ref:$t,className:df(P,ds,V==null?void 0:V.toast,h==null||(e=h.classNames)==null?void 0:e.toast,V==null?void 0:V.default,V==null?void 0:V[Ti],h==null||(t=h.classNames)==null?void 0:t[Ti]),"data-sonner-toast":"","data-rich-colors":(Cs=h.richColors)!=null?Cs:E,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":U,"data-promise":!!h.promise,"data-swiped":Ie,"data-removed":fe,"data-visible":Pi,"data-y-position":Nr,"data-x-position":$i,"data-index":_,"data-front":Tn,"data-swiping":tt,"data-dismissible":cs,"data-type":Ti,"data-invert":ta,"data-swipe-out":he,"data-swipe-direction":Y,"data-expanded":!!(k||q&&U),"data-testid":h.testId,style:{"--index":_,"--toasts-before":_,"--z-index":w.length-_,"--offset":`${fe?ut:On.current}px`,"--initial-height":q?"auto":`${Re}px`,...T,...h.style},onDragEnd:()=>{ge(!1),W(null),ir.current=null},onPointerDown:rn=>{rn.button!==2&&(Er||!cs||(mt.current=new Date,Wt(On.current),rn.target.setPointerCapture(rn.pointerId),rn.target.tagName!=="BUTTON"&&(ge(!0),ir.current={x:rn.clientX,y:rn.clientY})))},onPointerUp:()=>{var rn,Cn,ai;if(he||!cs)return;ir.current=null;const li=Number(((rn=$t.current)==null?void 0:rn.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),sr=Number(((Cn=$t.current)==null?void 0:Cn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ii=new Date().getTime()-((ai=mt.current)==null?void 0:ai.getTime()),Ni=ne==="x"?li:sr,Bo=Math.abs(Ni)/Ii;if(Math.abs(Ni)>=pBe||Bo>.11){Wt(On.current),h.onDismiss==null||h.onDismiss.call(h,h),G(ne==="x"?li>0?"right":"left":sr>0?"down":"up"),fr(),We(!0);return}else{var zs,Ei;(zs=$t.current)==null||zs.style.setProperty("--swipe-amount-x","0px"),(Ei=$t.current)==null||Ei.style.setProperty("--swipe-amount-y","0px")}_t(!1),ge(!1),W(null)},onPointerMove:rn=>{var Cn,ai,li;if(!ir.current||!cs||((Cn=window.getSelection())==null?void 0:Cn.toString().length)>0)return;const Ii=rn.clientY-ir.current.y,Ni=rn.clientX-ir.current.x;var Bo;const zs=(Bo=i.swipeDirections)!=null?Bo:bBe(H);!ne&&(Math.abs(Ni)>1||Math.abs(Ii)>1)&&W(Math.abs(Ni)>Math.abs(Ii)?"x":"y");let Ei={x:0,y:0};const lo=Qr=>1/(1.5+Math.abs(Qr)/20);if(ne==="y"){if(zs.includes("top")||zs.includes("bottom"))if(zs.includes("top")&&Ii<0||zs.includes("bottom")&&Ii>0)Ei.y=Ii;else{const Qr=Ii*lo(Ii);Ei.y=Math.abs(Qr)0)Ei.x=Ni;else{const Qr=Ni*lo(Ni);Ei.x=Math.abs(Qr)0||Math.abs(Ei.y)>0)&&_t(!0),(ai=$t.current)==null||ai.style.setProperty("--swipe-amount-x",`${Ei.x}px`),(li=$t.current)==null||li.style.setProperty("--swipe-amount-y",`${Ei.y}px`)}},yt&&!h.jsx&&Ti!=="loading"?gt.createElement("button",{"aria-label":ae,"data-disabled":Er,"data-close-button":!0,onClick:Er||!cs?()=>{}:()=>{fr(),h.onDismiss==null||h.onDismiss.call(h,h)},className:df(V==null?void 0:V.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(Vs=X==null?void 0:X.close)!=null?Vs:nBe):null,(Ti||h.icon||h.promise)&&h.icon!==null&&((X==null?void 0:X[Ti])!==null||h.icon)?gt.createElement("div",{"data-icon":"",className:df(V==null?void 0:V.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||vl():null,h.type!=="loading"?nu:null):null,gt.createElement("div",{"data-content":"",className:df(V==null?void 0:V.content,h==null||(r=h.classNames)==null?void 0:r.content)},gt.createElement("div",{"data-title":"",className:df(V==null?void 0:V.title,h==null||(o=h.classNames)==null?void 0:o.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?gt.createElement("div",{"data-description":"",className:df(j,zr,V==null?void 0:V.description,h==null||(a=h.classNames)==null?void 0:a.description)},typeof h.description=="function"?h.description():h.description):null),gt.isValidElement(h.cancel)?h.cancel:h.cancel&&R5(h.cancel)?gt.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||I,onClick:rn=>{R5(h.cancel)&&cs&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,rn),fr())},className:df(V==null?void 0:V.cancelButton,h==null||(l=h.classNames)==null?void 0:l.cancelButton)},h.cancel.label):null,gt.isValidElement(h.action)?h.action:h.action&&R5(h.action)?gt.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||R,onClick:rn=>{R5(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,rn),!rn.defaultPrevented&&fr())},className:df(V==null?void 0:V.actionButton,h==null||(c=h.classNames)==null?void 0:c.actionButton)},h.action.label):null)};function Yge(){if(typeof window>"u"||typeof document>"u")return"ltr";const i=document.documentElement.getAttribute("dir");return i==="auto"||!i?window.getComputedStyle(document.documentElement).direction:i}function vBe(i,e){const t={};return[i,e].forEach((n,s)=>{const r=s===1,o=r?"--mobile-offset":"--offset",a=r?hBe:uBe;function l(c){["top","right","bottom","left"].forEach(u=>{t[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?t[`${o}-${c}`]=a:t[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),t}const _Be=gt.forwardRef(function(e,t){const{id:n,invert:s,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:u,mobileOffset:h,theme:g="light",richColors:f,duration:m,style:x,visibleToasts:v=dBe,toastOptions:_,dir:w=Yge(),gap:k=fBe,icons:C,containerAriaLabel:E="Notifications"}=e,[D,T]=gt.useState([]),I=gt.useMemo(()=>n?D.filter(U=>U.toasterId===n):D.filter(U=>!U.toasterId),[D,n]),R=gt.useMemo(()=>Array.from(new Set([r].concat(I.filter(U=>U.position).map(U=>U.position)))),[I,r]),[P,j]=gt.useState([]),[B,H]=gt.useState(!1),[$,q]=gt.useState(!1),[V,X]=gt.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ae=gt.useRef(null),ne=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=gt.useRef(null),Y=gt.useRef(!1),G=gt.useCallback(U=>{T(ue=>{var fe;return(fe=ue.find(Le=>Le.id===U.id))!=null&&fe.delete||Ld.dismiss(U.id),ue.filter(({id:Le})=>Le!==U.id)})},[]);return gt.useEffect(()=>Ld.subscribe(U=>{if(U.dismiss){requestAnimationFrame(()=>{T(ue=>ue.map(fe=>fe.id===U.id?{...fe,delete:!0}:fe))});return}setTimeout(()=>{JCe.flushSync(()=>{T(ue=>{const fe=ue.findIndex(Le=>Le.id===U.id);return fe!==-1?[...ue.slice(0,fe),{...ue[fe],...U},...ue.slice(fe+1)]:[U,...ue]})})})}),[D]),gt.useEffect(()=>{if(g!=="system"){X(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:ue})=>{X(ue?"dark":"light")})}catch{U.addListener(({matches:fe})=>{try{X(fe?"dark":"light")}catch(Le){console.error(Le)}})}},[g]),gt.useEffect(()=>{D.length<=1&&H(!1)},[D]),gt.useEffect(()=>{const U=ue=>{var fe;if(o.every(ge=>ue[ge]||ue.code===ge)){var tt;H(!0),(tt=ae.current)==null||tt.focus()}ue.code==="Escape"&&(document.activeElement===ae.current||(fe=ae.current)!=null&&fe.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[o]),gt.useEffect(()=>{if(ae.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,Y.current=!1)}},[ae.current]),gt.createElement("section",{ref:t,"aria-label":`${E} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((U,ue)=>{var fe;const[Le,tt]=U.split("-");return I.length?gt.createElement("ol",{key:U,dir:w==="auto"?Yge():w,tabIndex:-1,ref:ae,className:c,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":Le,"data-x-position":tt,style:{"--front-toast-height":`${((fe=P[0])==null?void 0:fe.height)||0}px`,"--width":`${gBe}px`,"--gap":`${k}px`,...x,...vBe(u,h)},onBlur:ge=>{Y.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(Y.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,W.current=ge.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{$||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},I.filter(ge=>!ge.position&&ue===0||ge.position===U).map((ge,he)=>{var We,Ie;return gt.createElement(xBe,{key:ge.id,icons:C,index:he,toast:ge,defaultRichColors:f,duration:(We=_==null?void 0:_.duration)!=null?We:m,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:s,visibleToasts:v,closeButton:(Ie=_==null?void 0:_.closeButton)!=null?Ie:l,interacting:$,position:U,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:G,toasts:I.filter(_t=>_t.position==ge.position),heights:P.filter(_t=>_t.position==ge.position),setHeights:j,expandByDefault:a,gap:k,expanded:B,swipeDirections:e.swipeDirections})})):null}))}),TSe=L.createContext({theme:"system",setTheme:()=>null,resolvedTheme:"light"});function yBe(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function wBe({children:i,defaultTheme:e="system",storageKey:t="eddi-theme"}){const[n,s]=L.useState(()=>localStorage.getItem(t)||e),[r,o]=L.useState(yBe);L.useEffect(()=>{const u=window.matchMedia("(prefers-color-scheme: dark)"),h=g=>o(g.matches?"dark":"light");return u.addEventListener("change",h),()=>u.removeEventListener("change",h)},[]);const a=n==="system"?r:n;L.useEffect(()=>{const u=window.document.documentElement;u.classList.remove("light","dark"),u.classList.add(a)},[a]);const l=L.useCallback(u=>{localStorage.setItem(t,u),s(u)},[t]),c=L.useMemo(()=>({theme:n,resolvedTheme:a,setTheme:l}),[n,a,l]);return d.jsx(TSe.Provider,{value:c,children:i})}function tP(){const i=L.useContext(TSe);if(i===void 0)throw new Error("useTheme must be used within a ThemeProvider");return i}const CBe="application/json";var eb,Ed,jE,FE,Vf,BE,cr,bg,Ht,F4,ISe,ASe,RSe,MSe,yG,PSe,wG,OSe,jSe,B4,PI,CG,ev,FSe,SG,tv,H4,OI,_f,kG;class SBe{constructor(e){Vt(this,Ht);Vt(this,eb,[]);Vt(this,Ed);Vt(this,jE,!0);Vt(this,FE);Vt(this,Vf,it(this,Ht,kG).call(this,console.info));Vt(this,BE,it(this,Ht,kG).call(this,console.warn));Vt(this,cr,{enable:!0,callbackList:[],interval:5});Vt(this,bg);Et(this,"didInitialize",!1);Et(this,"authenticated",!1);Et(this,"loginRequired",!1);Et(this,"responseMode","fragment");Et(this,"responseType","code");Et(this,"flow","standard");Et(this,"timeSkew",null);Et(this,"redirectUri");Et(this,"silentCheckSsoRedirectUri");Et(this,"silentCheckSsoFallback",!0);Et(this,"pkceMethod","S256");Et(this,"enableLogging",!1);Et(this,"logoutMethod","GET");Et(this,"scope");Et(this,"messageReceiveTimeout",1e4);Et(this,"idToken");Et(this,"idTokenParsed");Et(this,"token");Et(this,"tokenParsed");Et(this,"refreshToken");Et(this,"refreshTokenParsed");Et(this,"clientId");Et(this,"sessionId");Et(this,"subject");Et(this,"authServerUrl");Et(this,"realm");Et(this,"realmAccess");Et(this,"resourceAccess");Et(this,"profile");Et(this,"userInfo");Et(this,"endpoints");Et(this,"tokenTimeoutHandle");Et(this,"onAuthSuccess");Et(this,"onAuthError");Et(this,"onAuthRefreshSuccess");Et(this,"onAuthRefreshError");Et(this,"onTokenExpired");Et(this,"onAuthLogout");Et(this,"onReady");Et(this,"onActionUpdate");Et(this,"init",async(e={})=>{var n;if(this.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");this.didInitialize=!0,St(this,FE,IBe());const t=["default","cordova","cordova-native"];if(typeof e.adapter=="string"&&t.includes(e.adapter)?St(this,Ed,it(this,Ht,F4).call(this,e.adapter)):typeof e.adapter=="object"?St(this,Ed,e.adapter):"Cordova"in window||"cordova"in window?St(this,Ed,it(this,Ht,F4).call(this,"cordova")):St(this,Ed,it(this,Ht,F4).call(this,"default")),typeof e.useNonce<"u"&&St(this,jE,e.useNonce),typeof e.checkLoginIframe<"u"&&(re(this,cr).enable=e.checkLoginIframe),e.checkLoginIframeInterval&&(re(this,cr).interval=e.checkLoginIframeInterval),e.onLoad==="login-required"&&(this.loginRequired=!0),e.responseMode)if(e.responseMode==="query"||e.responseMode==="fragment")this.responseMode=e.responseMode;else throw new Error("Invalid value for responseMode");if(e.flow){switch(e.flow){case"standard":this.responseType="code";break;case"implicit":this.responseType="id_token token";break;case"hybrid":this.responseType="code id_token token";break;default:throw new Error("Invalid value for flow")}this.flow=e.flow}if(typeof e.timeSkew=="number"&&(this.timeSkew=e.timeSkew),e.redirectUri&&(this.redirectUri=e.redirectUri),e.silentCheckSsoRedirectUri&&(this.silentCheckSsoRedirectUri=e.silentCheckSsoRedirectUri),typeof e.silentCheckSsoFallback=="boolean"&&(this.silentCheckSsoFallback=e.silentCheckSsoFallback),typeof e.pkceMethod<"u"){if(e.pkceMethod!=="S256"&&e.pkceMethod!==!1)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${e.pkceMethod}.`);this.pkceMethod=e.pkceMethod}return typeof e.enableLogging=="boolean"&&(this.enableLogging=e.enableLogging),e.logoutMethod==="POST"&&(this.logoutMethod="POST"),typeof e.scope=="string"&&(this.scope=e.scope),typeof e.messageReceiveTimeout=="number"&&e.messageReceiveTimeout>0&&(this.messageReceiveTimeout=e.messageReceiveTimeout),await it(this,Ht,MSe).call(this),await it(this,Ht,OSe).call(this),await it(this,Ht,jSe).call(this,e),(n=this.onReady)==null||n.call(this,this.authenticated),this.authenticated});Et(this,"login",e=>re(this,Ed).login(e));Et(this,"createLoginUrl",async e=>{const t=Qge(),n=Qge(),s=re(this,Ed).redirectUri(e),r={state:t,nonce:n,redirectUri:s,loginOptions:e};e!=null&&e.prompt&&(r.prompt=e.prompt);const o=(e==null?void 0:e.action)==="register"?this.endpoints.register():this.endpoints.authorize();let a=(e==null?void 0:e.scope)||this.scope;const l=a?a.split(" "):[];l.includes("openid")||l.unshift("openid"),a=l.join(" ");const c=new URLSearchParams([["client_id",this.clientId],["redirect_uri",s],["state",t],["response_mode",this.responseMode],["response_type",this.responseType],["scope",a]]);if(re(this,jE)&&c.append("nonce",n),e!=null&&e.prompt&&c.append("prompt",e.prompt),typeof(e==null?void 0:e.maxAge)=="number"&&c.append("max_age",e.maxAge.toString()),e!=null&&e.loginHint&&c.append("login_hint",e.loginHint),e!=null&&e.idpHint&&c.append("kc_idp_hint",e.idpHint),e!=null&&e.action&&e.action!=="register"&&c.append("kc_action",e.action),e!=null&&e.locale&&c.append("ui_locales",e.locale),e!=null&&e.acr&&c.append("claims",kBe(e.acr)),e!=null&&e.acrValues&&c.append("acr_values",e.acrValues),this.pkceMethod)try{const u=NBe(96),h=await EBe(this.pkceMethod,u);r.pkceCodeVerifier=u,c.append("code_challenge",h),c.append("code_challenge_method",this.pkceMethod)}catch(u){throw new Error("Failed to generate PKCE challenge.",{cause:u})}return re(this,FE).add(r),`${o}?${c.toString()}`});Et(this,"logout",e=>re(this,Ed).logout(e));Et(this,"createLogoutUrl",e=>{const t=(e==null?void 0:e.logoutMethod)??this.logoutMethod,n=this.endpoints.logout();if(t==="POST")return n;const s=new URLSearchParams([["client_id",this.clientId],["post_logout_redirect_uri",re(this,Ed).redirectUri(e)]]);return this.idToken&&s.append("id_token_hint",this.idToken),`${n}?${s.toString()}`});Et(this,"register",e=>re(this,Ed).register(e));Et(this,"createRegisterUrl",e=>this.createLoginUrl({...e,action:"register"}));Et(this,"createAccountUrl",e=>{const t=it(this,Ht,_f).call(this);if(!t)throw new Error("Unable to create account URL, make sure the adapter is not configured using a generic OIDC provider.");const n=new URLSearchParams([["referrer",this.clientId],["referrer_uri",re(this,Ed).redirectUri(e)]]);return`${t}/account?${n.toString()}`});Et(this,"accountManagement",()=>re(this,Ed).accountManagement());Et(this,"hasRealmRole",e=>{const t=this.realmAccess;return!!t&&t.roles.indexOf(e)>=0});Et(this,"hasResourceRole",(e,t)=>{if(!this.resourceAccess)return!1;const n=this.resourceAccess[t||this.clientId];return!!n&&n.roles.indexOf(e)>=0});Et(this,"loadUserProfile",async()=>{const e=it(this,Ht,_f).call(this);if(!e)throw new Error("Unable to load user profile, make sure the adapter is not configured using a generic OIDC provider.");const t=`${e}/account`,n=await nL(t,{headers:[Xge(this.token)]});return this.profile=n});Et(this,"loadUserInfo",async()=>{const e=this.endpoints.userinfo(),t=await nL(e,{headers:[Xge(this.token)]});return this.userInfo=t});Et(this,"isTokenExpired",e=>{if(!this.tokenParsed||!this.refreshToken&&this.flow!=="implicit")throw new Error("Not authenticated");if(this.timeSkew==null)return re(this,Vf).call(this,"[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;if(typeof this.tokenParsed.exp!="number")return!1;let t=this.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+this.timeSkew;if(e){if(isNaN(e))throw new Error("Invalid minValidity");t-=e}return t<0});Et(this,"updateToken",async e=>{var o,a;if(!this.refreshToken)throw new Error("Unable to update token, no refresh token available.");e=e||5,re(this,cr).enable&&await it(this,Ht,PI).call(this);let t=!1;if(e===-1?(t=!0,re(this,Vf).call(this,"[KEYCLOAK] Refreshing token: forced refresh")):(!this.tokenParsed||this.isTokenExpired(e))&&(t=!0,re(this,Vf).call(this,"[KEYCLOAK] Refreshing token: token expired")),!t)return!1;const{promise:n,resolve:s,reject:r}=Promise.withResolvers();if(re(this,eb).push({resolve:s,reject:r}),re(this,eb).length===1){const l=this.endpoints.token();let c=new Date().getTime();try{const u=await WBe(l,this.refreshToken,this.clientId);re(this,Vf).call(this,"[KEYCLOAK] Token refreshed"),c=(c+new Date().getTime())/2,it(this,Ht,OI).call(this,u.access_token,u.refresh_token,u.id_token,c),(o=this.onAuthRefreshSuccess)==null||o.call(this);for(let h=re(this,eb).pop();h!=null;h=re(this,eb).pop())h.resolve(!0)}catch(u){re(this,BE).call(this,"[KEYCLOAK] Failed to refresh token"),u instanceof VSe&&u.response.status===400&&this.clearToken(),(a=this.onAuthRefreshError)==null||a.call(this);for(let h=re(this,eb).pop();h!=null;h=re(this,eb).pop())h.reject(u)}}return await n});Et(this,"clearToken",()=>{var e;this.token&&(it(this,Ht,OI).call(this),(e=this.onAuthLogout)==null||e.call(this),this.loginRequired&&this.login())});if(typeof e!="string"&&!TG(e))throw new Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");if(TG(e)){const t="oidcProvider"in e?["clientId"]:["url","realm","clientId"];for(const n of t)if(!(n in e))throw new Error(`The configuration object is missing the required '${n}' property.`)}globalThis.isSecureContext||re(this,BE).call(this,`[KEYCLOAK] Keycloak JS must be used in a 'secure context' to function properly as it relies on browser APIs that are otherwise not available. +Continuing to run your application insecurely will lead to unexpected behavior and breakage. + +For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`),St(this,bg,e)}}eb=new WeakMap,Ed=new WeakMap,jE=new WeakMap,FE=new WeakMap,Vf=new WeakMap,BE=new WeakMap,cr=new WeakMap,bg=new WeakMap,Ht=new WeakSet,F4=function(e){if(e==="default")return it(this,Ht,ISe).call(this);if(e==="cordova")return re(this,cr).enable=!1,it(this,Ht,ASe).call(this);if(e==="cordova-native")return re(this,cr).enable=!1,it(this,Ht,RSe).call(this);throw new Error("invalid adapter type: "+e)},ISe=function(){const e=t=>(t==null?void 0:t.redirectUri)||this.redirectUri||globalThis.location.href;return{login:async t=>(window.location.assign(await this.createLoginUrl(t)),await new Promise(()=>{})),logout:async t=>{if(((t==null?void 0:t.logoutMethod)??this.logoutMethod)==="GET"){window.location.replace(this.createLogoutUrl(t));return}const s=document.createElement("form");s.setAttribute("method","POST"),s.setAttribute("action",this.createLogoutUrl(t)),s.style.display="none";const r={id_token_hint:this.idToken,client_id:this.clientId,post_logout_redirect_uri:e(t)};for(const[o,a]of Object.entries(r)){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",o),l.setAttribute("value",a),s.appendChild(l)}document.body.appendChild(s),s.submit()},register:async t=>(window.location.assign(await this.createRegisterUrl(t)),await new Promise(()=>{})),accountManagement:async()=>{const t=this.createAccountUrl();if(typeof t<"u")window.location.href=t;else throw new Error("Not supported by the OIDC server");return await new Promise(()=>{})},redirectUri:e}},ASe=function(){const e=(o,a,l)=>window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(o,a,l):window.open(o,a,l),t=o=>o&&o.cordovaOptions?Object.keys(o.cordovaOptions).reduce((a,l)=>(a[l]=o.cordovaOptions[l],a),{}):{},n=o=>Object.keys(o).reduce((a,l)=>(a.push(l+"="+o[l]),a),[]).join(","),s=o=>{const a=t(o);return a.location="no",o&&o.prompt==="none"&&(a.hidden="yes"),n(a)},r=()=>this.redirectUri||"http://localhost";return{login:async o=>{const a=s(o),l=await this.createLoginUrl(o),c=e(l,"_blank",a);let u=!1,h=!1;function g(){h=!0,c.close()}return await new Promise((f,m)=>{c.addEventListener("loadstart",async x=>{if(x.url.indexOf(r())===0){const v=it(this,Ht,ev).call(this,x.url);try{await it(this,Ht,tv).call(this,v),f()}catch(_){m(_)}g(),u=!0}}),c.addEventListener("loaderror",async x=>{if(!u)if(x.url.indexOf(r())===0){const v=it(this,Ht,ev).call(this,x.url);try{await it(this,Ht,tv).call(this,v),f()}catch(_){m(_)}g(),u=!0}else m(new Error("Unable to process login.")),g()}),c.addEventListener("exit",function(x){h||m(new Error("User closed the login window."))})})},logout:async o=>{const a=this.createLogoutUrl(o),l=e(a,"_blank","location=no,hidden=yes,clearcache=yes");let c=!1;l.addEventListener("loadstart",u=>{u.url.indexOf(r())===0&&l.close()}),l.addEventListener("loaderror",u=>{u.url.indexOf(r())===0||(c=!0),l.close()}),await new Promise((u,h)=>{l.addEventListener("exit",()=>{c?h(new Error("User closed the login window.")):(this.clearToken(),u())})})},register:async o=>{const a=await this.createRegisterUrl(),l=s(o),c=e(a,"_blank",l);await new Promise((h,g)=>{c.addEventListener("loadstart",async f=>{if(f.url.indexOf(r())===0){c.close();const m=it(this,Ht,ev).call(this,f.url);try{await it(this,Ht,tv).call(this,m),h()}catch(x){g(x)}}})})},accountManagement:async()=>{const o=this.createAccountUrl();if(typeof o<"u"){const a=e(o,"_blank","location=no");a.addEventListener("loadstart",function(l){l.url.indexOf(r())===0&&a.close()})}else throw new Error("Not supported by the OIDC server")},redirectUri:()=>r()}},RSe=function(){return{login:async e=>{const t=await this.createLoginUrl(e);await new Promise((n,s)=>{universalLinks.subscribe("keycloak",async r=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();const o=it(this,Ht,ev).call(this,r.url);try{await it(this,Ht,tv).call(this,o),n()}catch(a){s(a)}}),window.cordova.plugins.browsertab.openUrl(t)})},logout:async e=>{const t=this.createLogoutUrl(e);await new Promise(n=>{universalLinks.subscribe("keycloak",()=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),this.clearToken(),n()}),window.cordova.plugins.browsertab.openUrl(t)})},register:async e=>{const t=await this.createRegisterUrl(e);await new Promise((n,s)=>{universalLinks.subscribe("keycloak",async r=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();const o=it(this,Ht,ev).call(this,r.url);try{await it(this,Ht,tv).call(this,o),n()}catch(a){s(a)}}),window.cordova.plugins.browsertab.openUrl(t)})},accountManagement:async()=>{const e=this.createAccountUrl();if(typeof e<"u")window.cordova.plugins.browsertab.openUrl(e);else throw new Error("Not supported by the OIDC server")},redirectUri:e=>e&&e.redirectUri?e.redirectUri:this.redirectUri?this.redirectUri:"http://localhost"}},MSe=async function(){if(typeof re(this,bg)=="string"){const e=await FBe(re(this,bg));this.authServerUrl=e["auth-server-url"],this.realm=e.realm,this.clientId=e.resource,it(this,Ht,yG).call(this)}else this.clientId=re(this,bg).clientId,"oidcProvider"in re(this,bg)?await it(this,Ht,PSe).call(this,re(this,bg).oidcProvider):(this.authServerUrl=re(this,bg).url,this.realm=re(this,bg).realm,it(this,Ht,yG).call(this))},yG=function(){this.endpoints={authorize:()=>it(this,Ht,_f).call(this)+"/protocol/openid-connect/auth",token:()=>it(this,Ht,_f).call(this)+"/protocol/openid-connect/token",logout:()=>it(this,Ht,_f).call(this)+"/protocol/openid-connect/logout",checkSessionIframe:()=>it(this,Ht,_f).call(this)+"/protocol/openid-connect/login-status-iframe.html",thirdPartyCookiesIframe:()=>it(this,Ht,_f).call(this)+"/protocol/openid-connect/3p-cookies/step1.html",register:()=>it(this,Ht,_f).call(this)+"/protocol/openid-connect/registrations",userinfo:()=>it(this,Ht,_f).call(this)+"/protocol/openid-connect/userinfo"}},PSe=async function(e){if(typeof e=="string"){const t=`${Zge(e)}/.well-known/openid-configuration`,n=await BBe(t);it(this,Ht,wG).call(this,n)}else it(this,Ht,wG).call(this,e)},wG=function(e){this.endpoints={authorize(){return e.authorization_endpoint},token(){return e.token_endpoint},logout(){if(!e.end_session_endpoint)throw new Error("Not supported by the OIDC server");return e.end_session_endpoint},checkSessionIframe(){if(!e.check_session_iframe)throw new Error("Not supported by the OIDC server");return e.check_session_iframe},register(){throw new Error('Redirection to "Register user" page not supported in standard OIDC mode')},userinfo(){if(!e.userinfo_endpoint)throw new Error("Not supported by the OIDC server");return e.userinfo_endpoint}}},OSe=async function(){if(!re(this,cr).enable&&!this.silentCheckSsoRedirectUri||typeof this.endpoints.thirdPartyCookiesIframe!="function")return;const e=document.createElement("iframe");e.setAttribute("src",this.endpoints.thirdPartyCookiesIframe()),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-3p-check-iframe"),e.style.display="none",document.body.appendChild(e);const t=new Promise(n=>{const s=r=>{e.contentWindow===r.source&&(r.data!=="supported"&&r.data!=="unsupported"||(r.data==="unsupported"&&(re(this,BE).call(this,`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means: + + - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication). + - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab). + +For more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers`),re(this,cr).enable=!1,this.silentCheckSsoFallback&&(this.silentCheckSsoRedirectUri=void 0)),document.body.removeChild(e),window.removeEventListener("message",s),n()))};window.addEventListener("message",s,!1)});return await TBe(t,this.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")},jSe=async function(e){var r,o,a;const t=it(this,Ht,ev).call(this,window.location.href);if(t!=null&&t.newUrl&&window.history.replaceState(window.history.state,"",t.newUrl),t&&t.valid){await it(this,Ht,B4).call(this),await it(this,Ht,tv).call(this,t);return}const n=async l=>{const c={};l||(c.prompt="none"),e.locale&&(c.locale=e.locale),await this.login(c)},s=async()=>{switch(e.onLoad){case"check-sso":re(this,cr).enable?(await it(this,Ht,B4).call(this),await it(this,Ht,PI).call(this)||(this.silentCheckSsoRedirectUri?await it(this,Ht,CG).call(this):await n(!1))):this.silentCheckSsoRedirectUri?await it(this,Ht,CG).call(this):await n(!1);break;case"login-required":await n(!0);break;default:throw new Error("Invalid value for onLoad")}};if(e.token&&e.refreshToken)if(it(this,Ht,OI).call(this,e.token,e.refreshToken,e.idToken),re(this,cr).enable)await it(this,Ht,B4).call(this),await it(this,Ht,PI).call(this)&&((r=this.onAuthSuccess)==null||r.call(this),it(this,Ht,H4).call(this));else try{await this.updateToken(-1),(o=this.onAuthSuccess)==null||o.call(this)}catch(l){if((a=this.onAuthError)==null||a.call(this),e.onLoad)await s();else throw l}else e.onLoad&&await s()},B4=async function(){if(!re(this,cr).enable||re(this,cr).iframe)return;const e=document.createElement("iframe");re(this,cr).iframe=e,e.setAttribute("src",this.endpoints.checkSessionIframe()),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-session-iframe"),e.style.display="none",document.body.appendChild(e);const t=s=>{var o;if(s.origin!==re(this,cr).iframeOrigin||((o=re(this,cr).iframe)==null?void 0:o.contentWindow)!==s.source||!(s.data==="unchanged"||s.data==="changed"||s.data==="error"))return;s.data!=="unchanged"&&this.clearToken();const r=re(this,cr).callbackList;re(this,cr).callbackList=[];for(const a of r.reverse())s.data==="error"?a(new Error("Error while checking login iframe")):a(null,s.data==="unchanged")};window.addEventListener("message",t,!1),await new Promise(s=>{e.addEventListener("load",()=>{const r=this.endpoints.authorize();r.startsWith("/")?re(this,cr).iframeOrigin=globalThis.location.origin:re(this,cr).iframeOrigin=new URL(r).origin,s()})})},PI=async function(){if(!re(this,cr).iframe||!re(this,cr).iframeOrigin)return;const e=`${this.clientId} ${this.sessionId?this.sessionId:""}`,t=re(this,cr).iframeOrigin;return await new Promise((s,r)=>{var a,l;const o=(c,u)=>c?r(c):s(u);re(this,cr).callbackList.push(o),re(this,cr).callbackList.length===1&&((l=(a=re(this,cr).iframe)==null?void 0:a.contentWindow)==null||l.postMessage(e,t))})},CG=async function(){const e=document.createElement("iframe"),t=await this.createLoginUrl({prompt:"none",redirectUri:this.silentCheckSsoRedirectUri});return e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e),await new Promise((n,s)=>{const r=async o=>{if(o.origin!==window.location.origin||e.contentWindow!==o.source)return;const a=it(this,Ht,ev).call(this,o.data);try{await it(this,Ht,tv).call(this,a),n()}catch(l){s(l)}document.body.removeChild(e),window.removeEventListener("message",r)};window.addEventListener("message",r)})},ev=function(e){const t=it(this,Ht,FSe).call(this,e);if(!t)return;const n=re(this,FE).get(t.state);return n&&(t.valid=!0,t.redirectUri=n.redirectUri,t.storedNonce=n.nonce,t.prompt=n.prompt,t.pkceCodeVerifier=n.pkceCodeVerifier,t.loginOptions=n.loginOptions),t},FSe=function(e){let t=[];switch(this.flow){case"standard":t=["code","state","session_state","kc_action_status","kc_action","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","kc_action","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","kc_action","iss"];break}t.push("error"),t.push("error_description"),t.push("error_uri");const n=new URL(e);let s="",r;if(this.responseMode==="query"&&n.searchParams.size>0?(r=it(this,Ht,SG).call(this,n.search,t),n.search=r.paramsString,s=n.toString()):this.responseMode==="fragment"&&n.hash.length>0&&(r=it(this,Ht,SG).call(this,n.hash.substring(1),t),n.hash=r.paramsString,s=n.toString()),r!=null&&r.oauthParams){if(this.flow==="standard"||this.flow==="hybrid"){if((r.oauthParams.code||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=s,r.oauthParams}else if(this.flow==="implicit"&&(r.oauthParams.access_token||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=s,r.oauthParams}},SG=function(e,t){const n=e.split("&"),s={};let r="";for(const o of n.reverse()){const a=new URLSearchParams(o).entries().next().value;if(!a){r="&"+r;continue}const[l,c]=a;t.includes(l)&&!(l in s)?s[l]=c:r=r.length===0?o:o+"&"+r}return{paramsString:r,oauthParams:s}},tv=async function(e){var a,l,c,u;const{code:t,error:n,prompt:s}=e;let r=new Date().getTime();const o=(h,g,f)=>{if(r=(r+new Date().getTime())/2,it(this,Ht,OI).call(this,h,g,f,r),re(this,jE)&&this.idTokenParsed&&this.idTokenParsed.nonce!==e.storedNonce)throw re(this,Vf).call(this,"[KEYCLOAK] Invalid nonce, clearing token"),this.clearToken(),new Error("Invalid nonce.")};if(e.kc_action_status&&this.onActionUpdate&&this.onActionUpdate(e.kc_action_status,e.kc_action),n){if(s!=="none")if(e.error_description&&e.error_description==="authentication_expired")await this.login(e.loginOptions);else{const h={error:n,error_description:e.error_description};throw(a=this.onAuthError)==null||a.call(this,h),h}return}else this.flow!=="standard"&&(e.access_token||e.id_token)&&(o(e.access_token,void 0,e.id_token),(l=this.onAuthSuccess)==null||l.call(this));if(this.flow!=="implicit"&&t)try{const h=await HBe(this.endpoints.token(),t,this.clientId,e.redirectUri,e.pkceCodeVerifier);o(h.access_token,h.refresh_token,h.id_token),this.flow==="standard"&&((c=this.onAuthSuccess)==null||c.call(this)),it(this,Ht,H4).call(this)}catch(h){throw(u=this.onAuthError)==null||u.call(this),h}},H4=async function(){re(this,cr).enable&&this.token&&(await zBe(re(this,cr).interval*1e3),await it(this,Ht,PI).call(this)&&await it(this,Ht,H4).call(this))},OI=function(e,t,n,s){if(this.tokenTimeoutHandle&&(clearTimeout(this.tokenTimeoutHandle),this.tokenTimeoutHandle=void 0),t?(this.refreshToken=t,this.refreshTokenParsed=bU(t)):(delete this.refreshToken,delete this.refreshTokenParsed),n?(this.idToken=n,this.idTokenParsed=bU(n)):(delete this.idToken,delete this.idTokenParsed),e){if(this.token=e,this.tokenParsed=bU(e),this.sessionId=this.tokenParsed.sid,this.authenticated=!0,this.subject=this.tokenParsed.sub,this.realmAccess=this.tokenParsed.realm_access,this.resourceAccess=this.tokenParsed.resource_access,s&&(this.timeSkew=Math.floor(s/1e3)-this.tokenParsed.iat),this.timeSkew!==null&&(re(this,Vf).call(this,"[KEYCLOAK] Estimated time difference between browser and server is "+this.timeSkew+" seconds"),this.onTokenExpired)){const r=(this.tokenParsed.exp-new Date().getTime()/1e3+this.timeSkew)*1e3;re(this,Vf).call(this,"[KEYCLOAK] Token expires in "+Math.round(r/1e3)+" s"),r<=0?this.onTokenExpired():this.tokenTimeoutHandle=window.setTimeout(this.onTokenExpired,r)}}else delete this.token,delete this.tokenParsed,delete this.subject,delete this.realmAccess,delete this.resourceAccess,this.authenticated=!1},_f=function(){if(!(typeof this.authServerUrl>"u"))return`${Zge(this.authServerUrl)}/realms/${encodeURIComponent(this.realm)}`},kG=function(e){return t=>{this.enableLogging&&e.call(console,t)}};function Qge(){if(typeof crypto>"u"||typeof crypto.randomUUID>"u")throw new Error("Web Crypto API is not available.");return crypto.randomUUID()}function kBe(i){return JSON.stringify({id_token:{acr:i}})}function NBe(i){return LBe(i,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}async function EBe(i,e){if(i!=="S256")throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${i}'.`);const t=new Uint8Array(await PBe(e));return MBe(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function LBe(i,e){const t=DBe(i),n=new Array(i);for(let s=0;s"u"||typeof crypto.getRandomValues>"u")throw new Error("Web Crypto API is not available.");return crypto.getRandomValues(new Uint8Array(i))}function TBe(i,e,t){let n;const s=new Promise(function(r,o){n=window.setTimeout(function(){o(new Error(t))},e)});return Promise.race([i,s]).finally(function(){clearTimeout(n)})}function IBe(){try{return new ABe}catch{return new RBe}}const BN="kc-callback-";var $h,NG,BSe,EG,HSe;class ABe{constructor(){Vt(this,$h);globalThis.localStorage.setItem("kc-test","test"),globalThis.localStorage.removeItem("kc-test")}get(e){if(!e)return null;it(this,$h,NG).call(this);const t=BN+e,n=globalThis.localStorage.getItem(t);return n?(globalThis.localStorage.removeItem(t),JSON.parse(n)):null}add(e){it(this,$h,NG).call(this);const t=BN+e.state,n=JSON.stringify({...e,expires:Date.now()+3600*1e3});try{globalThis.localStorage.setItem(t,n)}catch{it(this,$h,BSe).call(this),globalThis.localStorage.setItem(t,n)}}}$h=new WeakSet,NG=function(){const e=Date.now();for(const[t,n]of it(this,$h,EG).call(this)){const s=it(this,$h,HSe).call(this,n);(s===null||se.startsWith(BN))},HSe=function(e){let t;try{t=JSON.parse(e)}catch{return null}return TG(t)&&"expires"in t&&typeof t.expires=="number"?t.expires:null};var Pp,WSe,LG,DG;class RBe{constructor(){Vt(this,Pp)}get(e){if(!e)return null;const t=it(this,Pp,WSe).call(this,BN+e);return it(this,Pp,LG).call(this,BN+e,"",it(this,Pp,DG).call(this,-100)),t?JSON.parse(t):null}add(e){it(this,Pp,LG).call(this,BN+e.state,JSON.stringify(e),it(this,Pp,DG).call(this,60))}}Pp=new WeakSet,WSe=function(e){const t=e+"=",n=document.cookie.split(";");for(let s=0;s"u"||typeof crypto.subtle>"u")throw new Error("Web Crypto API is not available.");return await crypto.subtle.digest("SHA-256",t)}function bU(i){const[,e]=i.split(".");if(typeof e!="string")throw new Error("Unable to decode token, payload not found.");let t;try{t=OBe(e)}catch(n){throw new Error("Unable to decode token, payload is not a valid Base64URL value.",{cause:n})}try{return JSON.parse(t)}catch(n){throw new Error("Unable to decode token, payload is not a valid JSON value.",{cause:n})}}function OBe(i){let e=i.replaceAll("-","+").replaceAll("_","/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("Input is not of the correct length.")}try{return jBe(e)}catch{return atob(e)}}function jBe(i){return decodeURIComponent(atob(i).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function TG(i){return typeof i=="object"&&i!==null}async function FBe(i){return await nL(i)}async function BBe(i){return await nL(i)}async function HBe(i,e,t,n,s){const r=new URLSearchParams([["code",e],["grant_type","authorization_code"],["client_id",t],["redirect_uri",n]]);return s&&r.append("code_verifier",s),await nL(i,{method:"POST",credentials:"include",body:r})}async function WBe(i,e,t){const n=new URLSearchParams([["grant_type","refresh_token"],["refresh_token",e],["client_id",t]]);return await nL(i,{method:"POST",credentials:"include",body:n})}async function nL(i,e={}){const t=new Headers(e.headers);return t.set("Accept",CBe),await(await VBe(i,{...e,headers:t})).json()}async function VBe(i,e){const t=await fetch(i,e);if(!t.ok)throw new VSe("Server responded with an invalid status.",{response:t});return t}function Xge(i){if(!i)throw new Error("Unable to build authorization header, token is not set, make sure the user is authenticated.");return["Authorization",`bearer ${i}`]}function Zge(i){return i.endsWith("/")?i.slice(0,-1):i}class VSe extends Error{constructor(t,n){super(t,n);Et(this,"response");this.response=n.response}}const zBe=i=>new Promise(e=>setTimeout(e,i)),xU={url:"http://localhost:8180",realm:"eddi",clientId:"eddi-frontend"};function UBe(){const i=window.__EDDI_AUTH__;return(i==null?void 0:i.method)==="keycloak"?{method:"keycloak",url:i.url||xU.url,realm:i.realm||xU.realm,clientId:i.clientId||xU.clientId}:{method:"none",url:"",realm:"",clientId:""}}const $Be=window.location.origin;function nP(i){return typeof i=="object"&&i!==null&&"status"in i&&"message"in i}function qs(i){return nP(i)?`${i.message} (HTTP ${i.status})`:i instanceof Error?i.message:String(i)}class qBe{constructor(e){Et(this,"baseUrl");Et(this,"headers",{"Content-Type":"application/json"});this.baseUrl=e}setAuthToken(e){this.headers.Authorization=`Bearer ${e}`}clearAuthToken(){delete this.headers.Authorization}getAuthHeader(){const e=this.headers.Authorization;return e?{Authorization:e}:{}}getBaseUrl(){return this.baseUrl}async request(e,t,n,s){const r=`${this.baseUrl}${t}`,o={...this.headers,...s};let a;try{a=await fetch(r,{method:e,headers:o,body:n!==void 0?typeof n=="string"?n:JSON.stringify(n):void 0})}catch(h){throw{status:0,message:h instanceof Error?`Network error: ${h.message}`:"Network error: unable to reach server",url:r}}if(!a.ok){const h={status:a.status,message:a.statusText,url:r};try{const g=await a.json();h.message=g.message||g.errorMessage||g.detail||a.statusText}catch{}throw h}if(a.status===202||a.status===204)return;const l=a.headers.get("Location");if(l&&(a.status===200||a.status===201))try{return{...await a.json(),location:l}}catch{return{location:l}}if(a.headers.get("Content-Length")==="0")return;const u=await a.text();if(u)try{return JSON.parse(u)}catch{throw{status:a.status,message:"Unexpected non-JSON response",url:r}}}get(e){return this.request("GET",e)}post(e,t,n){return this.request("POST",e,t,n)}put(e,t,n){return this.request("PUT",e,t,n)}patch(e,t,n){return this.request("PATCH",e,t,n)}delete(e){return this.request("DELETE",e)}}const Be=new qBe($Be),zSe={authenticated:!0,loading:!1,user:null,roles:[],method:"none",login:()=>{},logout:()=>{}},Zie=L.createContext(zSe);function KBe({children:i,configOverride:e}){const t=L.useMemo(()=>e??UBe(),[e]);return t.method==="none"?d.jsx(Zie.Provider,{value:zSe,children:i}):d.jsx(GBe,{config:t,children:i})}function GBe({config:i,children:e}){const[t]=L.useState(()=>new SBe({url:i.url,realm:i.realm,clientId:i.clientId})),[n,s]=L.useState(!1),[r,o]=L.useState(!0),[a,l]=L.useState(null),[c,u]=L.useState([]),h=L.useRef(void 0);L.useEffect(()=>{let x=!0;return(async()=>{var _,w,k,C,E,D,T,I,R,P,j,B;try{t.onTokenExpired=()=>{t.updateToken(30).then(()=>{x&&t.token&&(Be.setAuthToken(t.token),t.idToken&&(h.current=t.idToken))}).catch(()=>{console.warn("[EDDI Auth] Token refresh failed, logging out"),t.logout({redirectUri:`${window.location.origin}/manage`})})};const H=await t.init({onLoad:"login-required",checkLoginIframe:!1,pkceMethod:"S256",responseMode:"query"});if(!x)return;if(s(H),H&&t.token){Be.setAuthToken(t.token),t.idToken&&(h.current=t.idToken);try{const q=await t.loadUserInfo();l({username:q.preferred_username??((_=t.tokenParsed)==null?void 0:_.preferred_username)??"",firstName:q.given_name??((w=t.tokenParsed)==null?void 0:w.given_name)??"",lastName:q.family_name??((k=t.tokenParsed)==null?void 0:k.family_name)??"",email:q.email??((C=t.tokenParsed)==null?void 0:C.email)??"",fullName:q.name??((E=t.tokenParsed)==null?void 0:E.name)??""})}catch{l({username:((D=t.tokenParsed)==null?void 0:D.preferred_username)??"",firstName:((T=t.tokenParsed)==null?void 0:T.given_name)??"",lastName:((I=t.tokenParsed)==null?void 0:I.family_name)??"",email:((R=t.tokenParsed)==null?void 0:R.email)??"",fullName:((P=t.tokenParsed)==null?void 0:P.name)??""})}const $=((B=(j=t.tokenParsed)==null?void 0:j.realm_access)==null?void 0:B.roles)??[];u($)}o(!1)}catch(H){if(!x)return;console.error("[EDDI Auth] Keycloak init failed:",H),o(!1),s(!1)}})(),()=>{x=!1}},[]);const g=L.useCallback(()=>{t.login()},[t]),f=L.useCallback(()=>{Be.clearAuthToken(),!t.idToken&&h.current&&(t.idToken=h.current),t.logout({redirectUri:`${window.location.origin}/manage`})},[t]),m=L.useMemo(()=>({authenticated:n,loading:r,user:a,roles:c,method:"keycloak",login:g,logout:f}),[n,r,a,c,g,f]);return r?d.jsx("div",{className:"flex h-screen items-center justify-center bg-background","data-testid":"auth-loading",children:d.jsxs("div",{className:"flex flex-col items-center gap-4",children:[d.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-muted border-t-primary"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Authenticating…"})]})}):d.jsx(Zie.Provider,{value:m,children:e})}const YBe=(i,e,t,n)=>{var r,o,a,l;const s=[t,{code:e,...n||{}}];if((o=(r=i==null?void 0:i.services)==null?void 0:r.logger)!=null&&o.forward)return i.services.logger.forward(s,"warn","react-i18next::",!0);j1(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(a=i==null?void 0:i.services)==null?void 0:a.logger)!=null&&l.warn?i.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},Jge={},IG=(i,e,t,n)=>{j1(t)&&Jge[t]||(j1(t)&&(Jge[t]=new Date),YBe(i,e,t,n))},USe=(i,e)=>()=>{if(i.isInitialized)e();else{const t=()=>{setTimeout(()=>{i.off("initialized",t)},0),e()};i.on("initialized",t)}},AG=(i,e,t)=>{i.loadNamespaces(e,USe(i,t))},efe=(i,e,t,n)=>{if(j1(t)&&(t=[t]),i.options.preload&&i.options.preload.indexOf(e)>-1)return AG(i,t,n);t.forEach(s=>{i.options.ns.indexOf(s)<0&&i.options.ns.push(s)}),i.loadLanguages(e,USe(i,n))},QBe=(i,e,t={})=>!e.languages||!e.languages.length?(IG(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(i,{lng:t.lng,precheck:(n,s)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,i))return!1}}),j1=i=>typeof i=="string",XBe=i=>typeof i=="object"&&i!==null,ZBe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,JBe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},e9e=i=>JBe[i],t9e=i=>i.replace(ZBe,e9e);let RG={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t9e};const n9e=(i={})=>{RG={...RG,...i}},i9e=()=>RG;let $Se;const s9e=i=>{$Se=i},r9e=()=>$Se,o9e={type:"3rdParty",init(i){n9e(i.options.react),s9e(i)}},a9e=L.createContext();class l9e{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const c9e=(i,e)=>{const t=L.useRef();return L.useEffect(()=>{t.current=i},[i,e]),t.current},qSe=(i,e,t,n)=>i.getFixedT(e,t,n),d9e=(i,e,t,n)=>L.useCallback(qSe(i,e,t,n),[i,e,t,n]),ve=(i,e={})=>{var C,E,D,T;const{i18n:t}=e,{i18n:n,defaultNS:s}=L.useContext(a9e)||{},r=t||n||r9e();if(r&&!r.reportNamespaces&&(r.reportNamespaces=new l9e),!r){IG(r,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const I=(P,j)=>j1(j)?j:XBe(j)&&j1(j.defaultValue)?j.defaultValue:Array.isArray(P)?P[P.length-1]:P,R=[I,{},!1];return R.t=I,R.i18n={},R.ready=!1,R}(C=r.options.react)!=null&&C.wait&&IG(r,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...i9e(),...r.options.react,...e},{useSuspense:a,keyPrefix:l}=o;let c=s||((E=r.options)==null?void 0:E.defaultNS);c=j1(c)?[c]:c||["translation"],(T=(D=r.reportNamespaces).addUsedNamespaces)==null||T.call(D,c);const u=(r.isInitialized||r.initializedStoreOnce)&&c.every(I=>QBe(I,r,o)),h=d9e(r,e.lng||null,o.nsMode==="fallback"?c:c[0],l),g=()=>h,f=()=>qSe(r,e.lng||null,o.nsMode==="fallback"?c:c[0],l),[m,x]=L.useState(g);let v=c.join();e.lng&&(v=`${e.lng}${v}`);const _=c9e(v),w=L.useRef(!0);L.useEffect(()=>{const{bindI18n:I,bindI18nStore:R}=o;w.current=!0,!u&&!a&&(e.lng?efe(r,e.lng,c,()=>{w.current&&x(f)}):AG(r,c,()=>{w.current&&x(f)})),u&&_&&_!==v&&w.current&&x(f);const P=()=>{w.current&&x(f)};return I&&(r==null||r.on(I,P)),R&&(r==null||r.store.on(R,P)),()=>{w.current=!1,r&&I&&(I==null||I.split(" ").forEach(j=>r.off(j,P))),R&&r&&R.split(" ").forEach(j=>r.store.off(j,P))}},[r,v]),L.useEffect(()=>{w.current&&u&&x(g)},[r,l,u]);const k=[m,r,u];if(k.t=m,k.i18n=r,k.ready=u,u||!u&&!a)return k;throw new Promise(I=>{e.lng?efe(r,e.lng,c,()=>I()):AG(r,c,()=>I())})};/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const u9e=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),KSe=(...i)=>i.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim();/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var h9e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const g9e=L.forwardRef(({color:i="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:s="",children:r,iconNode:o,...a},l)=>L.createElement("svg",{ref:l,...h9e,width:e,height:e,stroke:i,strokeWidth:n?Number(t)*24/Number(e):t,className:KSe("lucide",s),...a},[...o.map(([c,u])=>L.createElement(c,u)),...Array.isArray(r)?r:[r]]));/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ze=(i,e)=>{const t=L.forwardRef(({className:n,...s},r)=>L.createElement(g9e,{ref:r,iconNode:e,className:KSe(`lucide-${u9e(i)}`,n),...s}));return t.displayName=`${i}`,t};/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f9e=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],iL=ze("Activity",f9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p9e=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Od=ze("ArrowDown",p9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m9e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],zl=ze("ArrowLeft",m9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b9e=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],HN=ze("ArrowRightLeft",b9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x9e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Bh=ze("ArrowRight",x9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const v9e=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],rp=ze("ArrowUpDown",v9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _9e=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Ih=ze("ArrowUp",_9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],vU=ze("Ban",y9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w9e=[["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m16 12 2 2 4-4",key:"mdajum"}],["path",{d:"M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3",key:"8arnkb"}]],GSe=ze("BookOpenCheck",w9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C9e=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],jb=ze("BookOpen",C9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S9e=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Qn=ze("Bot",S9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k9e=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],j2=ze("Boxes",k9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N9e=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],E9e=ze("Braces",N9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L9e=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],Hl=ze("Brain",L9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const D9e=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]],Fb=ze("Cable",D9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T9e=[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],TH=ze("CalendarClock",T9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I9e=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],IH=ze("ChartColumn",I9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A9e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ns=ze("Check",A9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R9e=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ln=ze("ChevronDown",R9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M9e=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],YSe=ze("ChevronLeft",M9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P9e=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xs=ze("ChevronRight",P9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O9e=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Fp=ze("ChevronUp",O9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j9e=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],F9e=ze("ChevronsUpDown",j9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const B9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Mo=ze("CircleAlert",B9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const H9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],QSe=ze("CircleArrowUp",H9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W9e=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Jie=ze("CircleCheckBig",W9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Go=ze("CircleCheck",V9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],U9e=ze("CircleHelp",z9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],q9e=ze("CircleStop",$9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const K9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ese=ze("CircleX",K9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],sL=ze("Circle",G9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Y9e=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],Wj=ze("ClipboardList",Y9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Yr=ze("Clock",Q9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const X9e=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],XSe=ze("Cloud",X9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Z9e=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],J9e=ze("CodeXml",Z9e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eHe=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],ZSe=ze("Code",eHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tHe=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],JSe=ze("Coins",tHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nHe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],yo=ze("Copy",nHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iHe=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],tse=ze("Cpu",iHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sHe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],z_=ze("Database",sHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rHe=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],tD=ze("DollarSign",rHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oHe=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],m0=ze("Download",oHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aHe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],AH=ze("EllipsisVertical",aHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lHe=[["line",{x1:"5",x2:"19",y1:"9",y2:"9",key:"1nwqeh"}],["line",{x1:"5",x2:"19",y1:"15",y2:"15",key:"g8yjpy"}]],cHe=ze("Equal",lHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dHe=[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16.2V21h-4.8",key:"1hrera"}],["path",{d:"M21 7.8V3h-4.8",key:"ul1q53"}],["path",{d:"M3 16.2V21h4.8",key:"1x04uo"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 7.8V3h4.8",key:"1ijppm"}],["path",{d:"M9 9 3 3",key:"v551iv"}]],uHe=ze("Expand",dHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hHe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Oo=ze("ExternalLink",hHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gHe=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Bb=ze("EyeOff",gHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fHe=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Hh=ze("Eye",fHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pHe=[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]],nse=ze("FileArchive",pHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mHe=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],eke=ze("FileCode2",mHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bHe=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Bp=ze("FileCode",bHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xHe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],tfe=ze("FileDown",xHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vHe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],_He=ze("FileJson",vHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yHe=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2",key:"1vk7w2"}],["path",{d:"M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6",key:"1jink5"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Vj=ze("FileOutput",yHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wHe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],CHe=ze("FilePlus",wHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SHe=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],kHe=ze("FileSearch",SHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NHe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],nD=ze("FileText",NHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EHe=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],LHe=ze("Filter",EHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DHe=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],rL=ze("Fingerprint",DHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const THe=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],IHe=ze("FolderSearch",THe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AHe=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],ise=ze("Gauge",AHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RHe=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],ax=ze("GitBranch",RHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MHe=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]],tke=ze("GitCompareArrows",MHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PHe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Wu=ze("Globe",PHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OHe=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],jHe=ze("GripVertical",OHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FHe=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],MG=ze("Handshake",FHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BHe=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],vp=ze("Hash",BHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HHe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],oL=ze("History",HHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WHe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],To=ze("Info",WHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VHe=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],d_=ze("KeyRound",VHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zHe=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],UHe=ze("Keyboard",zHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $He=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],up=ze("Layers",$He);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qHe=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],zj=ze("LayoutDashboard",qHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KHe=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],GHe=ze("LayoutGrid",KHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YHe=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],QHe=ze("Lightbulb",YHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XHe=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],nke=ze("Link2Off",XHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZHe=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],U_=ze("Link2",ZHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JHe=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],e7e=ze("Link",JHe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t7e=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],ike=ze("ListFilter",t7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n7e=[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M21 12h-6",key:"bt1uis"}]],i7e=ze("ListMinus",n7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const s7e=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],r7e=ze("ListOrdered",s7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o7e=[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]],a7e=ze("ListPlus",o7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l7e=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],ske=ze("List",l7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c7e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Xn=ze("LoaderCircle",c7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d7e=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],u7e=ze("LockOpen",d7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const h7e=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],RH=ze("Lock",h7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const g7e=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],rke=ze("LogOut",g7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f7e=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],sse=ze("Maximize2",f7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p7e=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],m7e=ze("Menu",p7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b7e=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],_p=ze("MessageCircle",b7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x7e=[["path",{d:"M10 7.5 8 10l2 2.5",key:"xb17xw"}],["path",{d:"m14 7.5 2 2.5-2 2.5",key:"5rap1v"}],["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],oke=ze("MessageSquareCode",x7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const v7e=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]],rse=ze("MessageSquarePlus",v7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _7e=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M8 12a2 2 0 0 0 2-2V8H8",key:"1jfesj"}],["path",{d:"M14 12a2 2 0 0 0 2-2V8h-2",key:"1dq9mh"}]],ake=ze("MessageSquareQuote",_7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y7e=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]],iD=ze("MessageSquareText",y7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w7e=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],Wl=ze("MessageSquare",w7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C7e=[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]],lke=ze("MessagesSquare",C7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S7e=[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],cke=ze("Minimize2",S7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k7e=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],N7e=ze("Monitor",k7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E7e=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],dke=ze("Moon",E7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L7e=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],D7e=ze("Package",L7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T7e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],uke=ze("PanelLeftClose",T7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I7e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],A7e=ze("PanelLeftOpen",I7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R7e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],M7e=ze("PanelLeft",R7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P7e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],hke=ze("PanelRightClose",P7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O7e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],j7e=ze("PanelRightOpen",O7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const F7e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],B7e=ze("PanelRight",F7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const H7e=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],W7e=ze("Paperclip",H7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V7e=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],ose=ze("Pause",V7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z7e=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],U7e=ze("PenLine",z7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $7e=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ase=ze("Pencil",$7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q7e=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],lse=ze("Play",q7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const K7e=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],iP=ze("Plug",K7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G7e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Yt=ze("Plus",G7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Y7e=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],sP=ze("Puzzle",Y7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q7e=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],gke=ze("Radio",Q7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const X7e=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],nfe=ze("RectangleEllipsis",X7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Z7e=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],J7e=ze("Redo2",Z7e);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eWe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],yi=ze("RefreshCw",eWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tWe=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],qh=ze("Rocket",tWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nWe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],$_=ze("RotateCcw",nWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iWe=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],MH=ze("Save",iWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sWe=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]],ife=ze("ScanSearch",sWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rWe=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],fke=ze("Scissors",rWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oWe=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],u_=ze("ScrollText",oWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aWe=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Cr=ze("Search",aWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lWe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],F2=ze("Send",lWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cWe=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Cb=ze("Server",cWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dWe=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],PH=ze("Settings2",dWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uWe=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Kh=ze("Settings",uWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hWe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],OH=ze("ShieldAlert",hWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gWe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]],sfe=ze("ShieldBan",gWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fWe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ah=ze("ShieldCheck",fWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pWe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],nC=ze("Shield",pWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mWe=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],pke=ze("SlidersHorizontal",mWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bWe=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],hl=ze("Sparkles",bWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xWe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],mke=ze("Square",xWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vWe=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Uj=ze("Star",vWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _We=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],yWe=ze("Sun",_We);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wWe=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],bke=ze("Tag",wWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CWe=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],cse=ze("Timer",CWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SWe=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]],xke=ze("ToggleLeft",SWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kWe=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]],dse=ze("ToggleRight",kWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NWe=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],yn=ze("Trash2",NWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EWe=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],vke=ze("TrendingUp",EWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LWe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ui=ze("TriangleAlert",LWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DWe=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],PG=ze("Type",DWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TWe=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],use=ze("Undo2",TWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IWe=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],h_=ze("Upload",IWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AWe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],RWe=ze("UserPlus",AWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MWe=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],PWe=ze("UserRound",MWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OWe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],hse=ze("User",OWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jWe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Yo=ze("Users",jWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FWe=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],OG=ze("Variable",FWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BWe=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],sD=ze("WandSparkles",BWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HWe=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Hd=ze("Workflow",HWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WWe=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],lx=ze("Wrench",WWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VWe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],An=ze("X",VWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zWe=[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],UWe=ze("ZapOff",zWe);/** + * @license lucide-react v0.474.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $We=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],gl=ze("Zap",$We);function _ke(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var s=i.length;for(e=0;e{const t=new Array(i.length+e.length);for(let n=0;n({classGroupId:i,validator:e}),wke=(i=new Map,e=null,t)=>({nextPart:i,validators:e,classGroupId:t}),$j="-",rfe=[],GWe="arbitrary..",YWe=i=>{const e=XWe(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=i;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return QWe(o);const a=o.split($j),l=a[0]===""&&a.length>1?1:0;return Cke(a,l,e)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],c=t[o];return l?c?qWe(c,l):l:c||rfe}return t[o]||rfe}}},Cke=(i,e,t)=>{if(i.length-e===0)return t.classGroupId;const s=i[e],r=t.nextPart.get(s);if(r){const c=Cke(i,e+1,r);if(c)return c}const o=t.validators;if(o===null)return;const a=e===0?i.join($j):i.slice(e).join($j),l=o.length;for(let c=0;ci.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=i.slice(1,-1),t=e.indexOf(":"),n=e.slice(0,t);return n?GWe+n:void 0})(),XWe=i=>{const{theme:e,classGroups:t}=i;return ZWe(t,e)},ZWe=(i,e)=>{const t=wke();for(const n in i){const s=i[n];gse(s,t,n,e)}return t},gse=(i,e,t,n)=>{const s=i.length;for(let r=0;r{if(typeof i=="string"){eVe(i,e,t);return}if(typeof i=="function"){tVe(i,e,t,n);return}nVe(i,e,t,n)},eVe=(i,e,t)=>{const n=i===""?e:Ske(e,i);n.classGroupId=t},tVe=(i,e,t,n)=>{if(iVe(i)){gse(i(n),e,t,n);return}e.validators===null&&(e.validators=[]),e.validators.push(KWe(t,i))},nVe=(i,e,t,n)=>{const s=Object.entries(i),r=s.length;for(let o=0;o{let t=i;const n=e.split($j),s=n.length;for(let r=0;r"isThemeGetter"in i&&i.isThemeGetter===!0,sVe=i=>{if(i<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),n=Object.create(null);const s=(r,o)=>{t[r]=o,e++,e>i&&(e=0,n=t,t=Object.create(null))};return{get(r){let o=t[r];if(o!==void 0)return o;if((o=n[r])!==void 0)return s(r,o),o},set(r,o){r in t?t[r]=o:s(r,o)}}},jG="!",ofe=":",rVe=[],afe=(i,e,t,n,s)=>({modifiers:i,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),oVe=i=>{const{prefix:e,experimentalParseClassName:t}=i;let n=s=>{const r=[];let o=0,a=0,l=0,c;const u=s.length;for(let x=0;xl?c-l:void 0;return afe(r,f,g,m)};if(e){const s=e+ofe,r=n;n=o=>o.startsWith(s)?r(o.slice(s.length)):afe(rVe,!1,o,void 0,!0)}if(t){const s=n;n=r=>t({className:r,parseClassName:s})}return n},aVe=i=>{const e=new Map;return i.orderSensitiveModifiers.forEach((t,n)=>{e.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let r=0;r0&&(s.sort(),n.push(...s),s=[]),n.push(o)):s.push(o)}return s.length>0&&(s.sort(),n.push(...s)),n}},lVe=i=>({cache:sVe(i.cacheSize),parseClassName:oVe(i),sortModifiers:aVe(i),...YWe(i)}),cVe=/\s+/,dVe=(i,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:r}=e,o=[],a=i.trim().split(cVe);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:h,modifiers:g,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:x}=t(u);if(h){l=u+(l.length>0?" "+l:l);continue}let v=!!x,_=n(v?m.substring(0,x):m);if(!_){if(!v){l=u+(l.length>0?" "+l:l);continue}if(_=n(m),!_){l=u+(l.length>0?" "+l:l);continue}v=!1}const w=g.length===0?"":g.length===1?g[0]:r(g).join(":"),k=f?w+jG:w,C=k+_;if(o.indexOf(C)>-1)continue;o.push(C);const E=s(_,v);for(let D=0;D0?" "+l:l)}return l},uVe=(...i)=>{let e=0,t,n,s="";for(;e{if(typeof i=="string")return i;let e,t="";for(let n=0;n{let t,n,s,r;const o=l=>{const c=e.reduce((u,h)=>h(u),i());return t=lVe(c),n=t.cache.get,s=t.cache.set,r=a,a(l)},a=l=>{const c=n(l);if(c)return c;const u=dVe(l,t);return s(l,u),u};return r=o,(...l)=>r(uVe(...l))},gVe=[],La=i=>{const e=t=>t[i]||gVe;return e.isThemeGetter=!0,e},Nke=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Eke=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fVe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,pVe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mVe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bVe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xVe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vVe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ux=i=>fVe.test(i),Li=i=>!!i&&!Number.isNaN(Number(i)),$x=i=>!!i&&Number.isInteger(Number(i)),_U=i=>i.endsWith("%")&&Li(i.slice(0,-1)),hm=i=>pVe.test(i),Lke=()=>!0,_Ve=i=>mVe.test(i)&&!bVe.test(i),fse=()=>!1,yVe=i=>xVe.test(i),wVe=i=>vVe.test(i),CVe=i=>!cn(i)&&!hn(i),SVe=i=>b0(i,Ike,fse),cn=i=>Nke.test(i),ty=i=>b0(i,Ake,_Ve),lfe=i=>b0(i,AVe,Li),kVe=i=>b0(i,Mke,Lke),NVe=i=>b0(i,Rke,fse),cfe=i=>b0(i,Dke,fse),EVe=i=>b0(i,Tke,wVe),M5=i=>b0(i,Pke,yVe),hn=i=>Eke.test(i),BT=i=>$C(i,Ake),LVe=i=>$C(i,Rke),dfe=i=>$C(i,Dke),DVe=i=>$C(i,Ike),TVe=i=>$C(i,Tke),P5=i=>$C(i,Pke,!0),IVe=i=>$C(i,Mke,!0),b0=(i,e,t)=>{const n=Nke.exec(i);return n?n[1]?e(n[1]):t(n[2]):!1},$C=(i,e,t=!1)=>{const n=Eke.exec(i);return n?n[1]?e(n[1]):t:!1},Dke=i=>i==="position"||i==="percentage",Tke=i=>i==="image"||i==="url",Ike=i=>i==="length"||i==="size"||i==="bg-size",Ake=i=>i==="length",AVe=i=>i==="number",Rke=i=>i==="family-name",Mke=i=>i==="number"||i==="weight",Pke=i=>i==="shadow",RVe=()=>{const i=La("color"),e=La("font"),t=La("text"),n=La("font-weight"),s=La("tracking"),r=La("leading"),o=La("breakpoint"),a=La("container"),l=La("spacing"),c=La("radius"),u=La("shadow"),h=La("inset-shadow"),g=La("text-shadow"),f=La("drop-shadow"),m=La("blur"),x=La("perspective"),v=La("aspect"),_=La("ease"),w=La("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...C(),hn,cn],D=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],I=()=>[hn,cn,l],R=()=>[Ux,"full","auto",...I()],P=()=>[$x,"none","subgrid",hn,cn],j=()=>["auto",{span:["full",$x,hn,cn]},$x,hn,cn],B=()=>[$x,"auto",hn,cn],H=()=>["auto","min","max","fr",hn,cn],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...I()],X=()=>[Ux,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],ae=()=>[Ux,"screen","full","dvw","lvw","svw","min","max","fit",...I()],ne=()=>[Ux,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],W=()=>[i,hn,cn],Y=()=>[...C(),dfe,cfe,{position:[hn,cn]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",DVe,SVe,{size:[hn,cn]}],ue=()=>[_U,BT,ty],fe=()=>["","none","full",c,hn,cn],Le=()=>["",Li,BT,ty],tt=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>[Li,_U,dfe,cfe],We=()=>["","none",m,hn,cn],Ie=()=>["none",Li,hn,cn],_t=()=>["none",Li,hn,cn],ut=()=>[Li,hn,cn],Wt=()=>[Ux,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[hm],breakpoint:[hm],color:[Lke],container:[hm],"drop-shadow":[hm],ease:["in","out","in-out"],font:[CVe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[hm],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[hm],shadow:[hm],spacing:["px",Li],text:[hm],"text-shadow":[hm],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ux,cn,hn,v]}],container:["container"],columns:[{columns:[Li,cn,hn,a]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[$x,"auto",hn,cn]}],basis:[{basis:[Ux,"full","auto",a,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Li,Ux,"auto","initial","none",cn]}],grow:[{grow:["",Li,hn,cn]}],shrink:[{shrink:["",Li,hn,cn]}],order:[{order:[$x,"first","last","none",hn,cn]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[a,"screen",...X()]}],"min-w":[{"min-w":[a,"screen","none",...X()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",t,BT,ty]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,IVe,kVe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_U,cn]}],"font-family":[{font:[LVe,NVe,e]}],"font-features":[{"font-features":[cn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,hn,cn]}],"line-clamp":[{"line-clamp":[Li,"none",hn,lfe]}],leading:[{leading:[r,...I()]}],"list-image":[{"list-image":["none",hn,cn]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",hn,cn]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...tt(),"wavy"]}],"text-decoration-thickness":[{decoration:[Li,"from-font","auto",hn,ty]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[Li,"auto",hn,cn]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",hn,cn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",hn,cn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$x,hn,cn],radial:["",hn,cn],conic:[$x,hn,cn]},TVe,EVe]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:Le()}],"border-w-x":[{"border-x":Le()}],"border-w-y":[{"border-y":Le()}],"border-w-s":[{"border-s":Le()}],"border-w-e":[{"border-e":Le()}],"border-w-bs":[{"border-bs":Le()}],"border-w-be":[{"border-be":Le()}],"border-w-t":[{"border-t":Le()}],"border-w-r":[{"border-r":Le()}],"border-w-b":[{"border-b":Le()}],"border-w-l":[{"border-l":Le()}],"divide-x":[{"divide-x":Le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...tt(),"hidden","none"]}],"divide-style":[{divide:[...tt(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...tt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Li,hn,cn]}],"outline-w":[{outline:["",Li,BT,ty]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",u,P5,M5]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",h,P5,M5]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:Le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[Li,ty]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":Le()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",g,P5,M5]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[Li,hn,cn]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Li]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[hn,cn]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Li]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",hn,cn]}],filter:[{filter:["","none",hn,cn]}],blur:[{blur:We()}],brightness:[{brightness:[Li,hn,cn]}],contrast:[{contrast:[Li,hn,cn]}],"drop-shadow":[{"drop-shadow":["","none",f,P5,M5]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",Li,hn,cn]}],"hue-rotate":[{"hue-rotate":[Li,hn,cn]}],invert:[{invert:["",Li,hn,cn]}],saturate:[{saturate:[Li,hn,cn]}],sepia:[{sepia:["",Li,hn,cn]}],"backdrop-filter":[{"backdrop-filter":["","none",hn,cn]}],"backdrop-blur":[{"backdrop-blur":We()}],"backdrop-brightness":[{"backdrop-brightness":[Li,hn,cn]}],"backdrop-contrast":[{"backdrop-contrast":[Li,hn,cn]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Li,hn,cn]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Li,hn,cn]}],"backdrop-invert":[{"backdrop-invert":["",Li,hn,cn]}],"backdrop-opacity":[{"backdrop-opacity":[Li,hn,cn]}],"backdrop-saturate":[{"backdrop-saturate":[Li,hn,cn]}],"backdrop-sepia":[{"backdrop-sepia":["",Li,hn,cn]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",hn,cn]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Li,"initial",hn,cn]}],ease:[{ease:["linear","initial",_,hn,cn]}],delay:[{delay:[Li,hn,cn]}],animate:[{animate:["none",w,hn,cn]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,hn,cn]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:_t()}],"scale-x":[{"scale-x":_t()}],"scale-y":[{"scale-y":_t()}],"scale-z":[{"scale-z":_t()}],"scale-3d":["scale-3d"],skew:[{skew:ut()}],"skew-x":[{"skew-x":ut()}],"skew-y":[{"skew-y":ut()}],transform:[{transform:[hn,cn,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Wt()}],"translate-x":[{"translate-x":Wt()}],"translate-y":[{"translate-y":Wt()}],"translate-z":[{"translate-z":Wt()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",hn,cn]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",hn,cn]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[Li,BT,ty,lfe]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},MVe=hVe(RVe);function me(...i){return MVe(yke(i))}function iC(i){if(!i||!Number.isFinite(i))return"—";const t=Date.now()-i;if(t<0||!Number.isFinite(t))return"—";const n=Math.floor(t/1e3),s=Math.floor(n/60),r=Math.floor(s/60),o=Math.floor(r/24);return o>0?`${o}d ago`:r>0?`${r}h ago`:s>0?`${s}m ago`:"just now"}const ufe=["bg-blue-500","bg-emerald-500","bg-amber-500","bg-purple-500","bg-rose-500","bg-cyan-500","bg-indigo-500","bg-orange-500","bg-teal-500","bg-pink-500","bg-lime-500","bg-violet-500"];function rP(i){let e=0;for(let t=0;te[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}function PVe(i){try{const e=new URL(i);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function aL(i){return!Number.isFinite(i)||i<1?"<1ms":i<1e3?`${Math.round(i)}ms`:`${(i/1e3).toFixed(2)}s`}function Oke(){return L.useContext(Zie)}const hfe=i=>{let e;const t=new Set,n=(c,u)=>{const h=typeof c=="function"?c(e):c;if(!Object.is(h,e)){const g=e;e=u??(typeof h!="object"||h===null)?h:Object.assign({},e,h),t.forEach(f=>f(e,g))}},s=()=>e,a={setState:n,getState:s,getInitialState:()=>l,subscribe:c=>(t.add(c),()=>t.delete(c))},l=e=i(n,s,a);return a},OVe=(i=>i?hfe(i):hfe),jVe=i=>i;function FVe(i,e=jVe){const t=gt.useSyncExternalStore(i.subscribe,gt.useCallback(()=>e(i.getState()),[i,e]),gt.useCallback(()=>e(i.getInitialState()),[i,e]));return gt.useDebugValue(t),t}const gfe=i=>{const e=OVe(i),t=n=>FVe(e,n);return Object.assign(t,e),t},rD=(i=>i?gfe(i):gfe),FG=["dashboard","agents","workflows","chat","resources","conversations","groups","logs","secrets","audit","schedules","quotas","coordinator","orphans"],pse="eddi-onboarding-welcomed",mse="eddi-tour-offers-dismissed",bse=i=>`eddi-tour-${i}`;function BVe(i){try{return localStorage.getItem(bse(i))==="done"}catch{return!1}}function yU(i){try{localStorage.setItem(bse(i),"done")}catch{}}function ffe(i){try{localStorage.removeItem(bse(i))}catch{}}function HVe(){try{return localStorage.getItem(pse)==="true"}catch{return!1}}function WVe(){try{localStorage.setItem(pse,"true")}catch{}}function VVe(){try{localStorage.removeItem(pse)}catch{}}function zVe(){try{return localStorage.getItem(mse)==="true"}catch{return!1}}function UVe(){try{localStorage.setItem(mse,"true")}catch{}}function $Ve(){try{localStorage.removeItem(mse)}catch{}}const Ys=rD((i,e)=>{const t=new Set;for(const n of FG)BVe(n)&&t.add(n);return{showWelcome:!HVe(),activeChapter:null,currentStep:0,offeredChapter:null,completedChapters:t,openWelcome:()=>i({showWelcome:!0}),dismissWelcome:()=>{WVe(),i({showWelcome:!1})},startChapter:n=>{i({activeChapter:n,currentStep:0,offeredChapter:null})},nextStep:()=>{const{currentStep:n,activeChapter:s}=e();s&&i({currentStep:n+1})},prevStep:()=>{i(n=>({currentStep:Math.max(0,n.currentStep-1)}))},skipChapter:()=>{const{activeChapter:n,completedChapters:s}=e();if(n){yU(n);const r=new Set(s);r.add(n),i({activeChapter:null,currentStep:0,completedChapters:r})}},completeChapter:()=>{const{activeChapter:n,completedChapters:s}=e();if(n){yU(n);const r=new Set(s);r.add(n),i({activeChapter:null,currentStep:0,completedChapters:r})}},restartChapter:n=>{ffe(n);const s=new Set(e().completedChapters);s.delete(n),i({activeChapter:n,currentStep:0,offeredChapter:null,completedChapters:s})},acceptOffer:()=>{const{offeredChapter:n}=e();n&&i({activeChapter:n,currentStep:0,offeredChapter:null})},dismissOffer:()=>{const{offeredChapter:n,completedChapters:s}=e();if(n){yU(n);const r=new Set(s);r.add(n),i({offeredChapter:null,completedChapters:r})}},dismissAllOffers:()=>{UVe(),i({offeredChapter:null})},isChapterCompleted:n=>e().completedChapters.has(n),maybeAutoStart:n=>{const{activeChapter:s,completedChapters:r,showWelcome:o,offeredChapter:a}=e();if(!(o||s||r.has(n)||a)){if(n==="dashboard"){i({activeChapter:n,currentStep:0});return}zVe()||i({offeredChapter:n})}},resetAll:()=>{VVe(),$Ve();for(const n of FG)ffe(n);i({showWelcome:!0,activeChapter:null,currentStep:0,offeredChapter:null,completedChapters:new Set})}}}),qVe={id:"dashboard",titleKey:"onboarding.tour.dashboard.title",icon:"LayoutDashboard",route:"/manage",steps:[{target:'[data-testid="sidebar"] nav',titleKey:"onboarding.tour.dashboard.step1Title",descriptionKey:"onboarding.tour.dashboard.step1Desc",placement:"right",padding:4},{target:'[data-tour="dashboard-stats"]',titleKey:"onboarding.tour.dashboard.step2Title",descriptionKey:"onboarding.tour.dashboard.step2Desc",placement:"bottom"},{target:'[data-tour="dashboard-actions"]',titleKey:"onboarding.tour.dashboard.step3Title",descriptionKey:"onboarding.tour.dashboard.step3Desc",placement:"bottom"},{target:'[data-tour="topbar-personalize"]',titleKey:"onboarding.tour.dashboard.step4Title",descriptionKey:"onboarding.tour.dashboard.step4Desc",placement:"bottom"}]},KVe={id:"agents",titleKey:"onboarding.tour.agents.title",icon:"Bot",route:"/manage/agents",steps:[{target:'[data-testid="create-agent-btn"]',titleKey:"onboarding.tour.agents.step1Title",descriptionKey:"onboarding.tour.agents.step1Desc",placement:"bottom"},{target:'[data-testid="import-agent-btn"]',titleKey:"onboarding.tour.agents.step2Title",descriptionKey:"onboarding.tour.agents.step2Desc",placement:"bottom"},{target:'[data-tour="agents-search"]',titleKey:"onboarding.tour.agents.step3Title",descriptionKey:"onboarding.tour.agents.step3Desc",placement:"bottom"},{target:'[data-tour="agents-content"]',titleKey:"onboarding.tour.agents.step4Title",descriptionKey:"onboarding.tour.agents.step4Desc",placement:"top",padding:8}]},GVe={id:"workflows",titleKey:"onboarding.tour.workflows.title",icon:"Workflow",route:"/manage/workflows",steps:[{target:'[data-testid="create-workflow-btn"]',titleKey:"onboarding.tour.workflows.step1Title",descriptionKey:"onboarding.tour.workflows.step1Desc",placement:"bottom"},{target:'[data-tour="workflows-content"]',titleKey:"onboarding.tour.workflows.step2Title",descriptionKey:"onboarding.tour.workflows.step2Desc",placement:"top",padding:8},{target:'[data-tour="workflows-search"]',titleKey:"onboarding.tour.workflows.step3Title",descriptionKey:"onboarding.tour.workflows.step3Desc",placement:"bottom"}]},YVe={id:"chat",titleKey:"onboarding.tour.chat.title",icon:"MessageCircle",route:"/manage/chat",steps:[{target:'[data-testid="agent-selector"]',titleKey:"onboarding.tour.chat.step1Title",descriptionKey:"onboarding.tour.chat.step1Desc",placement:"bottom"},{target:'[data-testid="streaming-toggle"]',titleKey:"onboarding.tour.chat.step2Title",descriptionKey:"onboarding.tour.chat.step2Desc",placement:"bottom"},{target:'[data-testid="history-toggle"]',titleKey:"onboarding.tour.chat.step3Title",descriptionKey:"onboarding.tour.chat.step3Desc",placement:"bottom"},{target:'[data-tour="chat-input-area"]',titleKey:"onboarding.tour.chat.step4Title",descriptionKey:"onboarding.tour.chat.step4Desc",placement:"top"}]},QVe={id:"resources",titleKey:"onboarding.tour.resources.title",icon:"FileCode",route:"/manage/resources",steps:[{target:'[data-testid="resource-types-grid"]',titleKey:"onboarding.tour.resources.step1Title",descriptionKey:"onboarding.tour.resources.step1Desc",placement:"bottom",padding:8},{target:'[data-testid="resource-type-llm"]',titleKey:"onboarding.tour.resources.step2Title",descriptionKey:"onboarding.tour.resources.step2Desc",placement:"bottom"},{target:'[data-testid="resource-type-rules"]',titleKey:"onboarding.tour.resources.step3Title",descriptionKey:"onboarding.tour.resources.step3Desc",placement:"right"}]},XVe={id:"conversations",titleKey:"onboarding.tour.conversations.title",icon:"MessagesSquare",route:"/manage/conversations",steps:[{target:'[data-testid="conversation-search"]',titleKey:"onboarding.tour.conversations.step1Title",descriptionKey:"onboarding.tour.conversations.step1Desc",placement:"bottom"},{target:'[data-tour="conversations-filters"]',titleKey:"onboarding.tour.conversations.step2Title",descriptionKey:"onboarding.tour.conversations.step2Desc",placement:"bottom"},{target:'[data-tour="conversations-content"]',titleKey:"onboarding.tour.conversations.step3Title",descriptionKey:"onboarding.tour.conversations.step3Desc",placement:"top",padding:8}]},ZVe={id:"groups",titleKey:"onboarding.tour.groups.title",icon:"Boxes",route:"/manage/groups",steps:[{target:'[data-testid="create-group-btn"]',titleKey:"onboarding.tour.groups.step1Title",descriptionKey:"onboarding.tour.groups.step1Desc",placement:"bottom"},{target:'[data-testid="group-search"]',titleKey:"onboarding.tour.groups.step2Title",descriptionKey:"onboarding.tour.groups.step2Desc",placement:"bottom"},{target:'[data-tour="groups-content"]',titleKey:"onboarding.tour.groups.step3Title",descriptionKey:"onboarding.tour.groups.step3Desc",placement:"top",padding:8}]},JVe={id:"logs",titleKey:"onboarding.tour.logs.title",icon:"ScrollText",route:"/manage/logs",steps:[{target:'[data-tour="logs-tabs"]',titleKey:"onboarding.tour.logs.step1Title",descriptionKey:"onboarding.tour.logs.step1Desc",placement:"bottom"},{target:'[data-tour="logs-filters"]',titleKey:"onboarding.tour.logs.step2Title",descriptionKey:"onboarding.tour.logs.step2Desc",placement:"bottom"},{target:'[data-testid="export-logs-btn"]',titleKey:"onboarding.tour.logs.step3Title",descriptionKey:"onboarding.tour.logs.step3Desc",placement:"bottom"}]},eze={id:"secrets",titleKey:"onboarding.tour.secrets.title",icon:"KeyRound",route:"/manage/secrets",steps:[{target:'[data-testid="create-secret-button"]',titleKey:"onboarding.tour.secrets.step1Title",descriptionKey:"onboarding.tour.secrets.step1Desc",placement:"bottom"},{target:'[data-testid="tenant-input"]',titleKey:"onboarding.tour.secrets.step2Title",descriptionKey:"onboarding.tour.secrets.step2Desc",placement:"bottom"},{target:'[data-tour="secrets-info"]',titleKey:"onboarding.tour.secrets.step3Title",descriptionKey:"onboarding.tour.secrets.step3Desc",placement:"bottom",padding:4}]},tze={id:"audit",titleKey:"onboarding.tour.audit.title",icon:"ShieldCheck",route:"/manage/audit",steps:[{target:'[data-tour="audit-mode-toggle"]',titleKey:"onboarding.tour.audit.step1Title",descriptionKey:"onboarding.tour.audit.step1Desc",placement:"bottom"},{target:'[data-testid="search-button"]',titleKey:"onboarding.tour.audit.step2Title",descriptionKey:"onboarding.tour.audit.step2Desc",placement:"bottom"},{target:'[data-testid="export-btn"]',titleKey:"onboarding.tour.audit.step3Title",descriptionKey:"onboarding.tour.audit.step3Desc",placement:"bottom"}]},nze={id:"schedules",titleKey:"onboarding.tour.schedules.title",icon:"CalendarClock",route:"/manage/schedules",steps:[{target:'[data-testid="create-schedule-btn"]',titleKey:"onboarding.tour.schedules.step1Title",descriptionKey:"onboarding.tour.schedules.step1Desc",placement:"bottom"},{target:'[data-tour="schedules-stats"]',titleKey:"onboarding.tour.schedules.step2Title",descriptionKey:"onboarding.tour.schedules.step2Desc",placement:"bottom",padding:8},{target:'[data-testid="schedules-table-container"]',titleKey:"onboarding.tour.schedules.step3Title",descriptionKey:"onboarding.tour.schedules.step3Desc",placement:"top",padding:8}]},ize={id:"quotas",titleKey:"onboarding.tour.quotas.title",icon:"SlidersHorizontal",route:"/manage/quotas",steps:[{target:'[data-tour="quotas-config"]',titleKey:"onboarding.tour.quotas.step1Title",descriptionKey:"onboarding.tour.quotas.step1Desc",placement:"right",padding:8},{target:'[data-tour="quotas-usage"]',titleKey:"onboarding.tour.quotas.step2Title",descriptionKey:"onboarding.tour.quotas.step2Desc",placement:"left",padding:8},{target:'[data-testid="quotas-save"]',titleKey:"onboarding.tour.quotas.step3Title",descriptionKey:"onboarding.tour.quotas.step3Desc",placement:"bottom"}]},sze={id:"coordinator",titleKey:"onboarding.tour.coordinator.title",icon:"Activity",route:"/manage/coordinator",steps:[{target:'[data-testid="coordinator-connection-card"]',titleKey:"onboarding.tour.coordinator.step1Title",descriptionKey:"onboarding.tour.coordinator.step1Desc",placement:"bottom",padding:8},{target:'[data-testid="coordinator-queues"]',titleKey:"onboarding.tour.coordinator.step2Title",descriptionKey:"onboarding.tour.coordinator.step2Desc",placement:"top",padding:8},{target:'[data-testid="coordinator-dead-letters"]',titleKey:"onboarding.tour.coordinator.step3Title",descriptionKey:"onboarding.tour.coordinator.step3Desc",placement:"top",padding:8}]},rze={id:"orphans",titleKey:"onboarding.tour.orphans.title",icon:"Link2Off",route:"/manage/orphans",steps:[{target:'[data-testid="scan-button"]',titleKey:"onboarding.tour.orphans.step1Title",descriptionKey:"onboarding.tour.orphans.step1Desc",placement:"bottom"},{target:'[data-testid="include-deleted-checkbox"]',titleKey:"onboarding.tour.orphans.step2Title",descriptionKey:"onboarding.tour.orphans.step2Desc",placement:"bottom"},{target:'[data-testid="pre-scan-state"]',titleKey:"onboarding.tour.orphans.step3Title",descriptionKey:"onboarding.tour.orphans.step3Desc",placement:"top",padding:8}]},xse={dashboard:qVe,agents:KVe,workflows:GVe,chat:YVe,resources:QVe,conversations:XVe,groups:ZVe,logs:JVe,secrets:eze,audit:tze,schedules:nze,quotas:ize,coordinator:sze,orphans:rze};async function oze(){var i;try{const e=await Be.get("/openapi?format=json");return((i=e==null?void 0:e.info)==null?void 0:i.version)||"Unknown"}catch(e){return console.error("Failed to fetch EDDI version",e),"Unknown"}}const aze=[{labelKey:"nav.sectionCore",items:[{path:"/manage",icon:zj,labelKey:"nav.dashboard"},{path:"/manage/agents",icon:Qn,labelKey:"nav.agents"},{path:"/manage/workflows",icon:Hd,labelKey:"nav.packages"},{path:"/manage/groups",icon:j2,labelKey:"nav.groups"},{path:"/manage/channels",icon:Fb,labelKey:"nav.channels"},{path:"/manage/capabilities",icon:up,labelKey:"nav.capabilities"}]},{labelKey:"nav.sectionBuild",items:[{path:"/manage/resources",icon:Bp,labelKey:"nav.resources"},{path:"/manage/chat",icon:_p,labelKey:"nav.chat"},{path:"/manage/triggers",icon:gl,labelKey:"nav.triggers"}]},{labelKey:"nav.sectionMonitor",items:[{path:"/manage/logs",icon:u_,labelKey:"nav.logs"},{path:"/manage/conversations",icon:lke,labelKey:"nav.conversations"},{path:"/manage/coordinator",icon:iL,labelKey:"nav.coordinator"},{path:"/manage/audit",icon:Ah,labelKey:"nav.audit"}]},{labelKey:"nav.sectionAdmin",items:[{path:"/manage/secrets",icon:d_,labelKey:"nav.secrets"},{path:"/manage/variables",icon:OG,labelKey:"nav.variables"},{path:"/manage/quotas",icon:pke,labelKey:"nav.quotas"},{path:"/manage/schedules",icon:TH,labelKey:"nav.schedules"},{path:"/manage/userdata",icon:Yo,labelKey:"nav.userData"},{path:"/manage/orphans",icon:nke,labelKey:"nav.orphans"},{path:"/manage/sync",icon:yi,labelKey:"nav.sync"},{path:"/manage/gdpr",icon:OH,labelKey:"nav.gdpr"}]}],lze=[{href:"/q/swagger-ui",icon:_He,labelKey:"nav.openapi",fallback:"OpenAPI"},{href:"https://docs.labs.ai",icon:jb,labelKey:"nav.docs",fallback:"Documentation"}];function pfe({collapsed:i,onToggle:e}){var m;const{t}=ve(),{method:n,user:s,logout:r}=Oke(),o=n==="keycloak"&&s,{data:a,isLoading:l}=fn({queryKey:["eddi-version"],queryFn:oze,staleTime:1/0,retry:1}),c=o?[s.firstName,s.lastName].filter(Boolean).map(x=>x[0]).join("").toUpperCase()||((m=s.username[0])==null?void 0:m.toUpperCase())||"?":"",u="eddi-sidebar-sections",[h,g]=L.useState(()=>{try{const x=localStorage.getItem(u);return x?new Set(JSON.parse(x)):new Set}catch{return new Set}}),f=L.useCallback(x=>{g(v=>{const _=new Set(v);_.has(x)?_.delete(x):_.add(x);try{localStorage.setItem(u,JSON.stringify([..._]))}catch{}return _})},[]);return d.jsxs("aside",{"data-testid":"sidebar",className:me("flex h-full flex-col border-e border-sidebar-border bg-sidebar transition-all duration-300",i?"w-16":"w-64"),children:[d.jsx("div",{className:"flex h-16 items-center justify-center border-b border-sidebar-border px-4",children:i?d.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0","aria-label":"EDDI",children:[d.jsx("rect",{width:"28",height:"28",rx:"6",className:"fill-sidebar-accent"}),d.jsx("text",{x:"5",y:"20",fontFamily:"'Noto Sans', sans-serif",fontWeight:"700",fontSize:"16",className:"fill-sidebar",children:"E."})]}):d.jsx("img",{src:"/logo_eddi.png",alt:"EDDI",className:"h-7 w-auto"})}),d.jsx("nav",{className:"flex-1 overflow-y-auto p-1.5","aria-label":t("nav.mainNavigation","Main navigation"),children:aze.map((x,v)=>d.jsxs("div",{className:me(v>0&&"mt-2.5"),children:[!i&&d.jsxs("button",{type:"button",onClick:()=>f(v),className:"mb-1 flex w-full items-center gap-1 px-3 text-[11px] font-semibold uppercase tracking-wider text-sidebar-foreground/50 hover:text-sidebar-foreground/80 transition-colors","aria-expanded":!h.has(v),"aria-controls":`sidebar-section-${v}`,children:[d.jsx(xs,{className:me("h-3 w-3 shrink-0 transition-transform duration-200",!h.has(v)&&"rotate-90"),"aria-hidden":"true"}),t(x.labelKey)]}),i&&v>0&&d.jsx("div",{className:"mx-3 mb-2 border-t border-sidebar-border"}),(i?!0:!h.has(v))&&d.jsx("div",{id:`sidebar-section-${v}`,className:"space-y-0.5",children:x.items.map(_=>d.jsxs(h8e,{to:_.path,end:_.path==="/manage",className:({isActive:w})=>me("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-all","hover:bg-sidebar-accent/10 hover:text-sidebar-accent",w?"border-s-2 border-sidebar-accent bg-sidebar-accent/10 text-sidebar-accent":"border-s-2 border-transparent text-sidebar-foreground",i&&"justify-center px-2"),"aria-label":i?t(_.labelKey):void 0,title:i?t(_.labelKey):void 0,children:[d.jsx(_.icon,{className:"h-5 w-5 shrink-0","aria-hidden":"true"}),!i&&d.jsx("span",{children:t(_.labelKey)})]},_.path))})]},x.labelKey))}),d.jsxs("div",{className:"border-t border-sidebar-border p-1.5",children:[!i&&d.jsx("p",{className:"mb-1 px-3 text-[11px] font-semibold uppercase tracking-wider text-sidebar-foreground/50",children:t("nav.sectionExternal","External")}),d.jsx("div",{className:"space-y-0.5",children:lze.map(x=>d.jsxs("a",{href:x.href,target:"_blank",rel:"noopener noreferrer",className:me("flex items-center gap-3 rounded-lg px-3 py-1.5 text-sm font-medium transition-all","border-s-2 border-transparent text-sidebar-foreground","hover:bg-sidebar-accent/10 hover:text-sidebar-accent",i&&"justify-center px-2"),"aria-label":i?`${t(x.labelKey,x.fallback)} (${t("common.opensNewTab","opens in new tab")})`:void 0,title:i?t(x.labelKey,x.fallback):void 0,children:[d.jsx(x.icon,{className:"h-5 w-5 shrink-0","aria-hidden":"true"}),!i&&d.jsxs("span",{className:"flex items-center gap-1.5",children:[t(x.labelKey,x.fallback),d.jsx(Oo,{className:"h-3 w-3 opacity-50","aria-hidden":"true"}),d.jsxs("span",{className:"sr-only",children:["(",t("common.opensNewTab","opens in new tab"),")"]})]})]},x.href))})]}),o&&d.jsx("div",{className:"border-t border-sidebar-border p-1.5",children:d.jsxs("div",{className:me("flex items-center gap-3 rounded-lg px-3 py-2",i&&"justify-center px-2"),"data-testid":"sidebar-user",children:[d.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-xs font-bold text-sidebar",children:c}),!i&&d.jsxs("div",{className:"flex min-w-0 flex-1 items-center justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"truncate text-sm font-medium text-sidebar-foreground",children:s.fullName||s.username}),s.email&&d.jsx("p",{className:"truncate text-xs text-sidebar-foreground/60",children:s.email})]}),d.jsx("button",{onClick:r,"data-testid":"sidebar-logout",title:t("auth.logout","Logout"),"aria-label":t("auth.logout","Logout"),className:"ms-2 shrink-0 rounded-md p-1.5 text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent/10 hover:text-sidebar-accent",children:d.jsx(rke,{className:"h-4 w-4","aria-hidden":"true"})})]})]})}),d.jsx(dze,{collapsed:i}),d.jsxs("div",{className:"border-t border-sidebar-border p-1.5",children:[!i&&d.jsx("p",{className:"mb-1 px-3 text-center text-[10px] text-sidebar-foreground/30",title:a==="Unknown"?"Standalone Demo Mode fallback":void 0,children:l?"Checking version...":a&&a!=="Unknown"?`EDDI ${a}`:"EDDI Demo 6.2.0"}),d.jsx("button",{onClick:e,"data-testid":"sidebar-toggle","aria-label":i?"Expand sidebar":"Collapse sidebar",className:"flex w-full items-center justify-center rounded-lg p-2 text-sidebar-foreground transition-all hover:bg-sidebar-accent/10 hover:text-sidebar-accent active:scale-[0.98]",children:i?d.jsx(M7e,{className:"h-5 w-5"}):d.jsx(uke,{className:"h-5 w-5"})})]})]})}const cze={dashboard:"/manage",agents:"/manage/agents",workflows:"/manage/workflows",chat:"/manage/chat",resources:"/manage/resources",conversations:"/manage/conversations",groups:"/manage/groups",logs:"/manage/logs",secrets:"/manage/secrets",audit:"/manage/audit",schedules:"/manage/schedules",quotas:"/manage/quotas",coordinator:"/manage/coordinator",orphans:"/manage/orphans"};function dze({collapsed:i}){const{t:e}=ve(),t=za(),[n,s]=L.useState(!1),r=L.useRef(null),o=L.useRef(null),a=Ys(g=>g.completedChapters),l=Ys(g=>g.restartChapter),c=Ys(g=>g.resetAll);L.useEffect(()=>{if(!n)return;const g=m=>{r.current&&!r.current.contains(m.target)&&s(!1)},f=m=>{var x;m.key==="Escape"&&(m.preventDefault(),s(!1),(x=o.current)==null||x.focus())};return document.addEventListener("mousedown",g),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",f)}},[n]);const u=g=>{s(!1),t(cze[g]),setTimeout(()=>l(g),300)};L.useEffect(()=>{n&&requestAnimationFrame(()=>{var f;const g=(f=r.current)==null?void 0:f.querySelector('[role="menuitem"]');g==null||g.focus()})},[n]);const h=L.useCallback(g=>{var _,w;const f=(_=r.current)==null?void 0:_.querySelectorAll('[role="menuitem"]');if(!f||f.length===0)return;const m=Array.from(f),x=m.indexOf(document.activeElement);let v=null;switch(g.key){case"ArrowDown":v=(x+1)%m.length;break;case"ArrowUp":v=(x-1+m.length)%m.length;break;case"Home":v=0;break;case"End":v=m.length-1;break;default:return}g.preventDefault(),(w=m[v])==null||w.focus()},[]);return d.jsxs("div",{ref:r,className:"relative border-t border-sidebar-border p-1.5",children:[d.jsxs("button",{ref:o,onClick:()=>s(g=>!g),className:me("flex w-full items-center rounded-lg px-3 py-2 text-sidebar-foreground transition-all hover:bg-sidebar-accent/10 hover:text-sidebar-accent",i&&"justify-center px-2"),title:e("onboarding.help.title","Help & Tour"),"aria-label":e("onboarding.help.title","Help & Tour"),"aria-haspopup":"true","aria-expanded":n,"data-testid":"sidebar-help",children:[d.jsx(U9e,{className:"h-5 w-5 shrink-0","aria-hidden":"true"}),!i&&d.jsx("span",{className:"ms-3 text-sm font-medium",children:e("onboarding.help.title","Help & Tour")})]}),n&&d.jsxs("div",{className:me("absolute z-50 mb-2 w-56 rounded-xl border border-sidebar-border bg-sidebar p-1.5 shadow-xl shadow-black/20",i?"inset-s-14 bottom-0":"inset-s-2 bottom-full"),role:"menu","aria-label":e("onboarding.help.platformTour","Platform Tour"),onKeyDown:h,"data-testid":"help-menu-dropdown",children:[d.jsx("p",{className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-widest text-sidebar-foreground/40","aria-hidden":"true",children:e("onboarding.help.platformTour","Platform Tour")}),FG.map(g=>{const f=xse[g],m=a.has(g);return d.jsxs("button",{onClick:()=>u(g),className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-start text-sm text-sidebar-foreground transition-colors hover:bg-sidebar-accent/10 focus:bg-sidebar-accent/10",role:"menuitem",tabIndex:-1,"data-testid":`help-chapter-${g}`,children:[d.jsx("span",{className:"flex-1 truncate",children:e(f.titleKey)}),m?d.jsx(Ns,{className:"h-3.5 w-3.5 text-emerald-500 shrink-0","aria-hidden":"true"}):d.jsx("span",{className:"h-3.5 w-3.5 shrink-0 rounded-full border border-sidebar-foreground/30","aria-hidden":"true"})]},g)}),d.jsx("div",{className:"mt-1 border-t border-sidebar-border pt-1",children:d.jsxs("button",{onClick:()=>{s(!1),c()},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-xs text-sidebar-foreground/50 transition-colors hover:text-sidebar-foreground hover:bg-sidebar-accent/10 focus:bg-sidebar-accent/10",role:"menuitem",tabIndex:-1,"data-testid":"help-reset-all",children:[d.jsx($_,{className:"h-3.5 w-3.5","aria-hidden":"true"}),e("onboarding.help.resetAll","Reset All Tours")]})})]})]})}async function uze(){const i=performance.now(),e=await fetch(`${window.location.origin}/administration/logs/instance-id`,{signal:AbortSignal.timeout(5e3),headers:Be.getAuthHeader()}),t=Math.round(performance.now()-i);if(!e.ok)throw new Error(`HTTP ${e.status}`);return{instanceId:(await e.json()).instanceId,latencyMs:t}}const hze=["platform","health"];function jke(){const i=fn({queryKey:hze,queryFn:uze,refetchInterval:15e3,staleTime:1e4,retry:1}),e=i.dataUpdatedAt||i.errorUpdatedAt,t=i.isLoading?"checking":i.isError?"offline":"online";return L.useMemo(()=>{var n,s;return{status:t,instanceId:((n=i.data)==null?void 0:n.instanceId)??null,latencyMs:t==="online"?((s=i.data)==null?void 0:s.latencyMs)??null:null,lastCheckedAt:e?new Date(e):null}},[t,i.data,e])}function gze(){const{t:i}=ve(),{status:e,instanceId:t,latencyMs:n,lastCheckedAt:s}=jke(),[r,o]=L.useState(!1),a=L.useRef(null);L.useEffect(()=>{if(!r)return;const g=m=>{a.current&&!a.current.contains(m.target)&&o(!1)},f=m=>{m.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",g),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",f)}},[r]);const[,l]=L.useState(0);L.useEffect(()=>{if(!r)return;const g=setInterval(()=>l(f=>f+1),1e3);return()=>clearInterval(g)},[r]);const c=L.useCallback(()=>{if(!s)return"";const g=Math.round((Date.now()-s.getTime())/1e3);return g<5?i("platform.justNow","just now"):i("platform.secondsAgo","{{count}}s ago",{count:g})},[s,i]),u=e==="online",h=e==="checking";return d.jsxs("div",{ref:a,className:"relative","data-testid":"platform-status",children:[d.jsxs("button",{onClick:()=>o(g=>!g),"aria-expanded":r,"aria-haspopup":"dialog","aria-label":h?i("platform.checking","Checking connection…"):u?i("platform.online","Online"):i("platform.offline","Offline"),className:me("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-all duration-500",h&&"border-border bg-muted/50 text-muted-foreground",u&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",!u&&!h&&"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400"),children:[d.jsx("span",{className:me("inline-block h-2 w-2 rounded-full transition-colors duration-500",h&&"bg-muted-foreground/40 animate-pulse",u&&"bg-emerald-500 animate-pulse",!u&&!h&&"bg-red-500 animate-pulse"),"aria-hidden":"true"}),d.jsx("span",{children:h?"…":u?i("platform.online","Online"):i("platform.offline","Offline")})]}),r&&d.jsxs("div",{className:"absolute inset-s-1/2 top-full z-50 mt-2 w-56 rounded-xl border border-border bg-card p-3 shadow-xl shadow-black/10 transform-[translateX(-50%)] rtl:transform-[translateX(50%)]",role:"dialog","aria-label":i("platform.status","Platform Status"),"data-testid":"platform-status-popover",children:[d.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:i("platform.status","Platform Status")}),d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx("span",{className:me("h-2.5 w-2.5 rounded-full",u?"bg-emerald-500 animate-pulse":h?"bg-muted-foreground/40 animate-pulse":"bg-red-500 animate-pulse")}),d.jsx("span",{className:me("text-sm font-medium",u?"text-emerald-600 dark:text-emerald-400":h?"text-muted-foreground":"text-red-600 dark:text-red-400"),children:h?i("platform.checking","Checking connection…"):u?i("platform.connected","Connected"):i("platform.disconnected","Disconnected")})]}),d.jsxs("div",{className:"space-y-1.5 text-xs",children:[t&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:i("platform.instance","Instance")}),d.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground",children:t.length>12?`${t.substring(0,12)}…`:t})]}),n!==null&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:i("platform.latency","Latency")}),d.jsxs("span",{className:me("font-medium tabular-nums",n<100?"text-emerald-600 dark:text-emerald-400":n<500?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"),children:[n,"ms"]})]}),s&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:i("platform.lastChecked","Last checked")}),d.jsx("span",{className:"text-foreground/70",children:c()})]})]})]})]})}function fze(){const i=jp(),{t:e}=ve(),t=i.pathname.replace(/^\/manage\/?/,"").split("/").filter(Boolean),n=[{label:e("nav.dashboard"),to:"/manage"}],s={agents:e("nav.agents"),workflows:e("nav.packages"),conversations:e("nav.conversations"),chat:e("nav.chat"),resources:e("nav.resources"),groups:e("nav.groups","Groups"),coordinator:e("nav.coordinator","Coordinator"),schedules:e("nav.schedules","Schedules"),logs:e("nav.logs","Logs"),orphans:e("nav.orphans","Orphans"),secrets:e("nav.secrets","Secrets"),audit:e("nav.audit","Audit Trail"),quotas:e("nav.quotas","Quotas"),userdata:e("userData.title","User Data"),triggers:e("nav.triggers","Triggers"),capabilities:e("nav.capabilities","Capabilities"),sync:e("nav.sync","Sync"),gdpr:e("nav.gdpr","GDPR"),wizard:e("wizard.title","Agent Wizard"),workflowview:e("nav.packages")};let r="/manage";for(const o of t){r+=`/${o}`;const a=s[o]??(o.match(/^[a-f0-9]{24}$/)?`${o.substring(0,8)}…`:o.replace(/view$/,""));n.push({label:a,to:r})}return n}function pze({onMenuClick:i,sidebarVisible:e}){var _;const{theme:t,setTheme:n}=tP(),{t:s,i18n:r}=ve(),o=fze(),{method:a,user:l,logout:c}=Oke(),u=a==="keycloak"&&l,[h,g]=L.useState(!1),f=L.useRef(null);L.useEffect(()=>{if(!h)return;const w=C=>{f.current&&!f.current.contains(C.target)&&g(!1)},k=C=>{C.key==="Escape"&&g(!1)};return document.addEventListener("mousedown",w),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",k)}},[h]);const m=[{value:"light",icon:yWe,label:s("theme.light")},{value:"dark",icon:dke,label:s("theme.dark")},{value:"system",icon:N7e,label:s("theme.system")}],x=[{code:"en",label:s("language.en")},{code:"de",label:s("language.de")},{code:"fr",label:s("language.fr")},{code:"es",label:s("language.es")},{code:"ar",label:s("language.ar")},{code:"zh",label:s("language.zh")},{code:"th",label:s("language.th")},{code:"ja",label:s("language.ja")},{code:"ko",label:s("language.ko")},{code:"pt",label:s("language.pt")},{code:"hi",label:s("language.hi")}],v=u?[l.firstName,l.lastName].filter(Boolean).map(w=>w[0]).join("").toUpperCase()||((_=l.username[0])==null?void 0:_.toUpperCase())||"?":"";return d.jsxs("header",{className:"flex h-16 items-center justify-between border-b border-border bg-card px-4",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("button",{onClick:i,"data-testid":"mobile-menu-toggle","aria-label":s("nav.openMenu","Open navigation menu"),className:me("rounded-lg p-2 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground md:hidden",e&&"hidden"),children:d.jsx(m7e,{className:"h-5 w-5","aria-hidden":"true"})}),d.jsx("nav",{"aria-label":"Breadcrumb",className:"hidden items-center gap-1 text-sm md:flex",children:o.map((w,k)=>d.jsxs("span",{className:"flex items-center gap-1",children:[k>0&&d.jsx(xs,{className:"h-3.5 w-3.5 text-muted-foreground/60"}),k===o.length-1?d.jsx("span",{className:"font-medium text-foreground","aria-current":"page",children:w.label}):d.jsx(Kn,{to:w.to,className:"text-muted-foreground transition-colors hover:text-foreground",children:w.label})]},w.to))})]}),d.jsx(gze,{}),d.jsxs("div",{className:"flex items-center gap-2","data-tour":"topbar-personalize",children:[d.jsxs("div",{className:"relative flex items-center gap-1",children:[d.jsx(Wu,{className:"h-4 w-4 text-muted-foreground"}),d.jsx("select",{value:r.language,onChange:w=>r.changeLanguage(w.target.value),"data-testid":"language-selector",className:"appearance-none rounded-md bg-transparent px-2 py-1.5 text-sm text-foreground outline-none transition-colors hover:bg-secondary focus:ring-2 focus:ring-ring",children:x.map(w=>d.jsx("option",{value:w.code,children:w.label},w.code))})]}),d.jsx("div",{className:"flex items-center rounded-lg bg-secondary p-0.5",children:m.map(w=>d.jsx("button",{onClick:()=>n(w.value),"data-testid":`theme-${w.value}`,title:w.label,"aria-label":w.label,"aria-pressed":t===w.value,className:me("rounded-md p-1.5 transition-colors",t===w.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:d.jsx(w.icon,{className:"h-4 w-4","aria-hidden":"true"})},w.value))}),u&&d.jsxs("div",{className:"relative",ref:f,children:[d.jsx("button",{onClick:()=>g(w=>!w),"data-testid":"user-menu-trigger",className:"flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-bold text-primary-foreground transition-opacity hover:opacity-80",title:l.fullName||l.username,"aria-label":s("auth.userMenu","User menu"),"aria-haspopup":"true","aria-expanded":h,children:v}),h&&d.jsxs("div",{className:"absolute inset-e-0 top-full z-50 mt-2 w-56 rounded-lg border border-border bg-card p-1 shadow-lg","data-testid":"user-menu-dropdown",role:"menu","aria-label":s("auth.userMenu","User menu"),children:[d.jsxs("div",{className:"border-b border-border px-3 py-2.5",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:l.fullName||l.username}),l.email&&d.jsx("p",{className:"text-xs text-muted-foreground",children:l.email})]}),d.jsx("div",{className:"py-1",children:d.jsxs("button",{onClick:()=>{g(!1),c()},"data-testid":"user-menu-logout",role:"menuitem",className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-foreground transition-colors hover:bg-secondary",children:[d.jsx(rke,{className:"h-4 w-4"}),s("auth.logout","Logout")]})})]})]})]})]})}const Rc=rD(i=>({isOpen:!1,agentId:null,agentName:null,step:"idle",errorMessage:null,open:(e,t)=>i({isOpen:!0,agentId:e,agentName:t??"Agent",step:"idle",errorMessage:null}),close:()=>i({isOpen:!1,agentId:null,agentName:null,step:"idle",errorMessage:null}),setStep:(e,t)=>i({step:e,errorMessage:t??null})}));function mze(i){const e=i.split("/"),t=e[e.length-1]||i;return t.split("?")[0]??t}async function bze(i,e){const t=await Be.post(`/agents/${e}/start`);return mze(t.location)}function vse(i,e,t,n=!1){const s=new URLSearchParams({returnDetailed:"false",returnCurrentStepOnly:String(n)});return Be.get(`/agents/${t}?${s.toString()}`)}async function xze(i,e,t,n){const s=new URLSearchParams({returnDetailed:"false",returnCurrentStepOnly:"true"}),r=await fetch(`${Be.getBaseUrl()}/agents/${t}?${s.toString()}`,{method:"POST",headers:{"Content-Type":"text/plain",...Be.getAuthHeader()},body:n});if(!r.ok)throw{status:r.status,message:r.statusText,url:r.url};return r.json()}function vze(i,e,t,n){const s=new URLSearchParams({returnDetailed:"false",returnCurrentStepOnly:"true"});return Be.post(`/agents/${t}?${s.toString()}`,n)}async function*_ze(i,e,t,n,s){var c;const r=await fetch(`${Be.getBaseUrl()}/agents/${t}/stream`,{method:"POST",headers:{"Content-Type":"application/json",...Be.getAuthHeader()},body:JSON.stringify(n),signal:s});if(!r.ok)throw{status:r.status,message:`Streaming failed: ${r.statusText}`,url:r.url};const o=(c=r.body)==null?void 0:c.getReader();if(!o)throw new Error("No readable stream");const a=new TextDecoder;let l="";try{for(;;){const{done:u,value:h}=await o.read();if(u)break;l+=a.decode(h,{stream:!0});const g=l.split(` + +`);l=g.pop()??"";for(const f of g){if(!f.trim())continue;let m="token",x="";for(const v of f.split(` +`))v.startsWith("event:")?m=v.slice(6).trim():v.startsWith("data:")&&(x=v.slice(5).trim());(x||m)&&(yield{type:m,data:x})}}}finally{o.releaseLock()}}function yze(i){return Be.post(`/agents/${i}/endConversation`)}function wze(i,e,t){return Be.post(`/agents/${t}/undo`)}function Cze(i,e,t){return Be.post(`/agents/${t}/redo`)}function Sze(i){const e=new URLSearchParams({returnDetailed:"false",returnCurrentStepOnly:"true"});return Be.post(`/agents/${i}/rerun?${e.toString()}`)}function kze(i){if(!i)return{agentId:"",agentVersion:0};try{const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,t=new URL(e,"http://dummy"),n=t.pathname.split("/"),s=n[n.length-1]||"",r=parseInt(t.searchParams.get("version")||"0",10);return{agentId:s,agentVersion:isNaN(r)?0:r}}catch{return{agentId:i,agentVersion:0}}}function Nze(i){const e=kze(i.agentResource);return{resource:i.resource,name:i.name||i.agentName||"",description:i.description||"",createdOn:i.createdOn,lastModifiedOn:i.lastModifiedOn,agentId:i.agentId||e.agentId,agentVersion:i.agentVersion??e.agentVersion,conversationState:i.conversationState,viewState:i.viewState,conversationStepSize:i.conversationStepSize,environment:i.environment,userId:i.userId}}function qj(i){var t;const e=(t=i.conversationStep)==null?void 0:t.find(n=>n.key==="input:initial");return e==null?void 0:e.value}function sC(i){if(!i)return;const e=[],t=i.output;if(Array.isArray(t)){for(const n of t)typeof n=="string"?e.push(n):n!=null&&n.text&&e.push(n.text);if(e.length>0)return e.join(` +`)}for(const[n,s]of Object.entries(i))if(n.startsWith("output:text:"))if(typeof s=="string")e.push(s);else if(Array.isArray(s))for(const r of s)typeof r=="string"?e.push(r):r!=null&&r.text&&e.push(r.text);else s&&typeof s=="object"&&s.text&&e.push(s.text);return e.length>0?e.join(` +`):void 0}function Eze(i){if(!i)return;const e=i.output;if(Array.isArray(e)){for(const t of e)if(t&&typeof t=="object"&&t.type==="inputField"){const n=t;return{subType:n.subType||"password",placeholder:n.placeholder,label:n.label,defaultValue:n.defaultValue}}}}function _se(i){if(!i)return[];const e=i.quickReplies;return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t&&typeof t=="object"&&"value"in t?t.value:null).filter(t=>t!==null):[]}function Lze(i){var t;const e=(t=i.conversationStep)==null?void 0:t.find(n=>n.key==="actions");return e!=null&&e.value?Array.isArray(e.value)?e.value:typeof e.value=="string"?[e.value]:[]:[]}function Lg(i){try{const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,n=new URL(e,"http://dummy").pathname.split("/");return n[n.length-1]||i}catch{return i}}async function oD(i=20,e=0,t="",n="",s,r){const o=new URLSearchParams({limit:String(i),index:String(e)});t&&o.set("filter",t),n&&o.set("agentId",n),r&&o.set("conversationState",r);const a=await Be.get(`/conversationstore/conversations?${o.toString()}`);return(Array.isArray(a)?a:(a==null?void 0:a.value)??[]).map(Nze)}function Fke(i,e=!1,t=!1){const n=new URLSearchParams({returnDetailed:String(e),returnCurrentStepOnly:String(t)});return Be.get(`/conversationstore/conversations/simple/${i}?${n.toString()}`)}function Dze(i,e=!1){return Be.delete(`/conversationstore/conversations/${i}?deletePermanently=${e}`)}function Tze(i){return Be.get(`/agents/${i}?returnDetailed=true`)}const Kj=["production","test"],Bke={high:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20",medium:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",low:"bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/20"};function mo(i){const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,t=new URL(e,"http://dummy"),n=t.pathname.split("/").filter(Boolean),s=n[n.length-1]??i,r=parseInt(t.searchParams.get("version")||"1",10),o=isNaN(r)?1:r;return{id:s,version:o}}function aD(i=20,e=0,t=""){const n=new URLSearchParams({limit:String(i),index:String(e)});return t&&n.set("filter",t),Be.get(`/agentstore/agents/descriptors?${n.toString()}`)}async function Ize(i){const t=await Be.get(`/agentstore/agents/${i}/currentversion`)??1,s=(await Promise.all(Array.from({length:t},(r,o)=>o+1).map(async r=>{try{return await Be.get(`/agentstore/agents/descriptors?filter=${i}&version=${r}`)}catch{return[]}}))).flat();return s.length===0?Be.get(`/agentstore/agents/descriptors?filter=${i}`):s}function qC(i,e){const t=e!=null&&e>0?`?version=${e}`:"";return Be.get(`/agentstore/agents/${i}${t}`)}function Aze(i){return Be.post("/agentstore/agents",i)}function aP(i,e,t){return Be.put(`/agentstore/agents/${i}?version=${e}`,t)}function Hke(i,e,t){const n=new URLSearchParams({version:String(e)});return t!=null&&t.cascade&&n.set("cascade","true"),t!=null&&t.permanent&&n.set("permanent","true"),Be.delete(`/agentstore/agents/${i}?${n}`)}function Rze(i,e,t=!1){return Be.post(`/agentstore/agents/${i}?version=${e}&deepCopy=${t}`)}function yse(i,e,t){return Be.post(`/administration/${i}/deploy/${e}?version=${t}`)}function Mze(i,e,t){return Be.post(`/administration/${i}/undeploy/${e}?version=${t}`)}function lP(i,e,t){return Be.get(`/administration/${i}/deploymentstatus/${e}?version=${t}`)}async function Pze(i,e){return(await Promise.allSettled(Kj.map(async n=>{try{const s=await lP(n,i,e);return{environment:n,status:s.status}}catch{return{environment:n,status:"NOT_FOUND"}}}))).map((n,s)=>n.status==="fulfilled"?n.value:{environment:Kj[s],status:"NOT_FOUND"})}const Oze=()=>{try{return localStorage.getItem("eddi-debug-open")==="true"}catch{return!1}},mfe=i=>{try{localStorage.setItem("eddi-debug-open",String(i))}catch{}},jze=()=>{try{return localStorage.getItem("eddi-show-activity")!=="false"}catch{return!0}},Fze=i=>{try{localStorage.setItem("eddi-show-activity",String(i))}catch{}},Mu=rD(i=>({turns:[],currentTurnEvents:[],currentTurnStart:0,isDebugOpen:Oze(),activeTab:"pipeline",selectedTurnIndex:null,showActivity:jze(),addEvent:e=>i(t=>({currentTurnEvents:[...t.currentTurnEvents,e],currentTurnStart:t.currentTurnStart||e.timestamp})),finalizeTurn:()=>i(e=>{if(e.currentTurnEvents.length===0)return e;const t=e.currentTurnEvents,n=t.reduce((r,o)=>r+(o.durationMs??0),0),s={turnIndex:e.turns.length,events:t,totalDurationMs:n,startTime:e.currentTurnStart};return{turns:[...e.turns,s],currentTurnEvents:[],currentTurnStart:0,selectedTurnIndex:null}}),setDebugOpen:e=>{mfe(e),i({isDebugOpen:e})},toggleDebug:()=>i(e=>{const t=!e.isDebugOpen;return mfe(t),{isDebugOpen:t}}),setActiveTab:e=>i({activeTab:e}),setSelectedTurn:e=>i({selectedTurnIndex:e}),toggleShowActivity:()=>i(e=>{const t=!e.showActivity;return Fze(t),{showActivity:t}}),reset:()=>i({turns:[],currentTurnEvents:[],currentTurnStart:0,selectedTurnIndex:null})})),Bze=()=>{try{return localStorage.getItem("eddi-chat-streaming")!=="false"}catch{return!0}},Bi=rD(i=>({messages:[],conversationId:null,selectedAgentId:null,selectedAgentName:null,isProcessing:!1,isThinking:!1,streamingEnabled:Bze(),undoAvailable:!1,redoAvailable:!1,quickReplies:[],activeInputField:null,isSecretMode:!1,setSelectedAgent:(e,t)=>i({selectedAgentId:e,selectedAgentName:t,conversationId:null,messages:[]}),setConversationId:e=>i({conversationId:e}),addMessage:e=>i(t=>({messages:[...t.messages,e]})),appendToLastAgentMessage:e=>i(t=>{const n=[...t.messages],s=n[n.length-1];return(s==null?void 0:s.role)==="agent"&&(n[n.length-1]={...s,content:s.content+e}),{messages:n}}),finishStreaming:()=>i(e=>{const t=[...e.messages],n=t[t.length-1];return(n==null?void 0:n.role)==="agent"&&(t[t.length-1]={...n,isStreaming:!1}),{messages:t,isProcessing:!1}}),setProcessing:e=>i({isProcessing:e}),setThinking:e=>i({isThinking:e}),toggleStreaming:()=>i(e=>{const t=!e.streamingEnabled;try{localStorage.setItem("eddi-chat-streaming",String(t))}catch{}return{streamingEnabled:t}}),clearMessages:()=>i({messages:[],conversationId:null,undoAvailable:!1,redoAvailable:!1,quickReplies:[],activeInputField:null,isSecretMode:!1}),setUndoRedo:(e,t)=>i({undoAvailable:e,redoAvailable:t}),setQuickReplies:e=>i({quickReplies:e}),replaceMessages:e=>i({messages:e}),setInputField:e=>i({activeInputField:e}),clearInputField:()=>i({activeInputField:null}),toggleSecretMode:()=>i(e=>({isSecretMode:!e.isSecretMode})),reset:()=>i({messages:[],conversationId:null,selectedAgentId:null,selectedAgentName:null,isProcessing:!1,isThinking:!1,undoAvailable:!1,redoAvailable:!1,quickReplies:[],activeInputField:null,isSecretMode:!1})})),wse=["chat"];function Cse(){return fn({queryKey:[...wse,"deployedAgents"],queryFn:async()=>{const i=await aD(500,0,""),e=new Map;for(const s of i){const{id:r,version:o}=mo(s.resource),a=e.get(s.name);(!a||o>a.version)&&e.set(s.name,{...s,id:r,version:o})}const t=Array.from(e.values());return(await Promise.allSettled(t.map(async s=>{const r=await lP("production",s.id,s.version);return{agent:s,status:r}}))).filter(s=>s.status==="fulfilled"&&s.value.status.status==="READY").map(s=>s.value.agent)},staleTime:6e4})}function cP(){const i=Bi;return Xt({mutationFn:async({agentId:e})=>{const t=await bze("production",e);i.getState().setConversationId(t);const s=(await vse("production",e,t,!1)).conversationOutputs??[];for(const r of s){const o=sC(r);o&&i.getState().addMessage({id:`welcome-${Date.now()}-${Math.random()}`,role:"agent",content:o,timestamp:Date.now()});const a=_se(r);a.length>0&&i.getState().setQuickReplies(a)}return t}})}function Sse(){const i=Bi;return Xt({mutationFn:async({message:e,isSecret:t})=>{var a,l;const n=i.getState(),{selectedAgentId:s,conversationId:r,streamingEnabled:o}=n;if(!s||!r)throw new Error("No active conversation");if(n.addMessage({id:`user-${Date.now()}`,role:"user",content:t?"●●●●●●●●":e,timestamp:Date.now()}),n.setProcessing(!0),n.setQuickReplies([]),t&&n.clearInputField(),o){n.addMessage({id:`agent-${Date.now()}`,role:"agent",content:"",timestamp:Date.now(),isStreaming:!0});const c=new AbortController,u=_ze("production",s,r,{input:e},c.signal);try{for await(const h of u)if(Hze(h,i)){c.abort();break}}catch(h){if(!(h instanceof DOMException&&h.name==="AbortError"))throw h}i.getState().isProcessing&&i.getState().finishStreaming()}else{const c=`agent-typing-${Date.now()}`;n.addMessage({id:c,role:"agent",content:"",timestamp:Date.now(),isStreaming:!0});let u;t?u=await vze("production",s,r,{input:e,context:{secretInput:{type:"string",value:"true"}}}):u=await xze("production",s,r,e);const h=(l=u.conversationOutputs)==null?void 0:l[(((a=u.conversationOutputs)==null?void 0:a.length)??1)-1],g=sC(h);i.setState(x=>{const v=x.messages.filter(_=>_.id!==c);return g&&v.push({id:`agent-${Date.now()}`,role:"agent",content:g,timestamp:Date.now()}),{messages:v}});const f=Eze(h);f&&n.setInputField(f);const m=_se(h);n.setQuickReplies(m),n.setProcessing(!1)}},onError:e=>{const t=i.getState(),n=e&&typeof e=="object"&&"message"in e?String(e.message):String(e);t.addMessage({id:`agent-error-${Date.now()}`,role:"agent",content:` + +⚠️ Error: ${n}`,timestamp:Date.now()}),t.setProcessing(!1),t.setQuickReplies([])}})}function Hze(i,e){var n;const t=Mu.getState();switch(i.type){case"token":return e.getState().setThinking(!1),e.getState().appendToLastAgentMessage(i.data),!1;case"done":{t.finalizeTurn();let s=[];if(i.data)try{const r=JSON.parse(i.data);if((n=r.conversationOutputs)!=null&&n.length){const o=r.conversationOutputs[r.conversationOutputs.length-1];s=_se(o);const a=e.getState().messages,l=a[a.length-1];if((l==null?void 0:l.role)==="agent"&&!l.content.trim()){const c=sC(o);c&&e.setState(u=>{const h=[...u.messages],g=h[h.length-1];return g&&(h[h.length-1]={id:g.id,role:g.role,content:c,timestamp:g.timestamp,isStreaming:g.isStreaming}),{messages:h}})}}}catch{}return e.getState().setQuickReplies(s),e.getState().finishStreaming(),!0}case"error":return e.getState().appendToLastAgentMessage(` + +⚠️ Error: ${i.data}`),e.getState().finishStreaming(),t.finalizeTurn(),!0;case"task_start":{e.getState().setThinking(!0);let s="unknown",r="unknown",o=0;try{const a=JSON.parse(i.data);s=a.taskId??a.id??"unknown",r=a.taskType??a.type??"unknown",o=a.index??0}catch{r=i.data||"unknown"}return t.addEvent({type:"task_start",taskId:s,taskType:r,index:o,timestamp:Date.now()}),!1}case"task_complete":{e.getState().setThinking(!1);let s="unknown",r="unknown",o=0,a,l,c,u;try{const h=JSON.parse(i.data);s=h.taskId??h.id??"unknown",r=h.taskType??h.type??"unknown",o=h.index??0,a=h.durationMs??h.duration,l=h.actions,c=h.confidence,u=h.toolTrace}catch{r=i.data||"unknown"}return t.addEvent({type:"task_complete",taskId:s,taskType:r,index:o,durationMs:a,actions:l,confidence:c,toolTrace:u,timestamp:Date.now()}),!1}default:return!1}}function jH(i){const e=[],t=i.conversationOutputs??[];for(let n=0;n<(i.conversationSteps??[]).length;n++){const s=i.conversationSteps[n],r=s?qj(s):void 0,o=sC(t[n]);r&&e.push({id:`user-${e.length}-${Date.now()}`,role:"user",content:r,timestamp:Date.now()}),o&&e.push({id:`agent-${e.length}-${Date.now()}`,role:"agent",content:o,timestamp:Date.now()})}return e}function Wze(i){return fn({queryKey:[...wse,"history",i],queryFn:()=>oD(50,0,"",i??""),enabled:!!i,staleTime:3e4})}function Vze(){const i=Bi;return Xt({mutationFn:async({agentId:e,conversationId:t})=>{i.getState().clearMessages(),i.getState().setConversationId(t);const n=await vse("production",e,t,!1),s=jH(n);return i.getState().replaceMessages(s),i.getState().setUndoRedo(n.conversationSteps.length>0,n.redoAvailable??!1),n}})}function zze(){const i=Bi;return Xt({mutationFn:async()=>{const{selectedAgentId:e,conversationId:t}=i.getState();if(!e||!t)throw new Error("No active conversation");const n=await wze("production",e,t),s=jH(n);return i.getState().replaceMessages(s),i.getState().setUndoRedo(n.conversationSteps.length>0,n.redoAvailable??!1),n}})}function Uze(){const i=Bi;return Xt({mutationFn:async()=>{const{selectedAgentId:e,conversationId:t}=i.getState();if(!e||!t)throw new Error("No active conversation");const n=await Cze("production",e,t),s=jH(n);return i.getState().replaceMessages(s),i.getState().setUndoRedo(n.conversationSteps.length>0,n.redoAvailable??!1),n}})}function $ze(){const i=Bi,e=un();return Xt({mutationFn:async()=>{const t=i.getState().conversationId;if(!t)throw new Error("No active conversation");await yze(t),i.getState().clearMessages()},onSuccess:()=>{e.invalidateQueries({queryKey:[...wse,"history"]})}})}function qze(){const i=Bi;return Xt({mutationFn:async()=>{const{selectedAgentId:e,conversationId:t}=i.getState();if(!e||!t)throw new Error("No active conversation");await Sze(t);const n=await vse("production",e,t,!1),s=jH(n);return i.getState().replaceMessages(s),i.getState().setUndoRedo(n.conversationSteps.length>0,n.redoAvailable??!1),n}})}function bfe(i){const e=[],t=String(i||"");let n=t.indexOf(","),s=0,r=!1;for(;!r;){n===-1&&(n=t.length,r=!0);const o=t.slice(s,n).trim();(o||!r)&&e.push(o),s=n+1,n=t.indexOf(",",s)}return e}function Wke(i,e){const t={};return(i[i.length-1]===""?[...i,""]:i).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Kze=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gze=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yze={};function xfe(i,e){return(Yze.jsx?Gze:Kze).test(i)}const Qze=/[ \t\n\f\r]/g;function Xze(i){return typeof i=="object"?i.type==="text"?vfe(i.value):!1:vfe(i)}function vfe(i){return i.replace(Qze,"")===""}class dP{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}dP.prototype.normal={};dP.prototype.property={};dP.prototype.space=void 0;function Vke(i,e){const t={},n={};for(const s of i)Object.assign(t,s.property),Object.assign(n,s.normal);return new dP(t,n,e)}function B2(i){return i.toLowerCase()}class Qd{constructor(e,t){this.attribute=t,this.property=e}}Qd.prototype.attribute="";Qd.prototype.booleanish=!1;Qd.prototype.boolean=!1;Qd.prototype.commaOrSpaceSeparated=!1;Qd.prototype.commaSeparated=!1;Qd.prototype.defined=!1;Qd.prototype.mustUseProperty=!1;Qd.prototype.number=!1;Qd.prototype.overloadedBoolean=!1;Qd.prototype.property="";Qd.prototype.spaceSeparated=!1;Qd.prototype.space=void 0;let Zze=0;const xi=KC(),ha=KC(),BG=KC(),It=KC(),Br=KC(),WN=KC(),fu=KC();function KC(){return 2**++Zze}const HG=Object.freeze(Object.defineProperty({__proto__:null,boolean:xi,booleanish:ha,commaOrSpaceSeparated:fu,commaSeparated:WN,number:It,overloadedBoolean:BG,spaceSeparated:Br},Symbol.toStringTag,{value:"Module"})),wU=Object.keys(HG);class kse extends Qd{constructor(e,t,n,s){let r=-1;if(super(e,t),_fe(this,"space",s),typeof n=="number")for(;++r4&&t.slice(0,4)==="data"&&iUe.test(e)){if(e.charAt(4)==="-"){const r=e.slice(5).replace(yfe,rUe);n="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=e.slice(4);if(!yfe.test(r)){let o=r.replace(nUe,sUe);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}s=kse}return new s(n,e)}function sUe(i){return"-"+i.toLowerCase()}function rUe(i){return i.charAt(1).toUpperCase()}const uP=Vke([zke,Jze,qke,Kke,Gke],"html"),x0=Vke([zke,eUe,qke,Kke,Gke],"svg");function wfe(i){const e=String(i||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Yke(i){return i.join(" ").trim()}var tk={},CU,Cfe;function oUe(){if(Cfe)return CU;Cfe=1;var i=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,l=` +`,c="/",u="*",h="",g="comment",f="declaration";function m(v,_){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];_=_||{};var w=1,k=1;function C($){var q=$.match(e);q&&(w+=q.length);var V=$.lastIndexOf(l);k=~V?$.length-V:k+$.length}function E(){var $={line:w,column:k};return function(q){return q.position=new D($),R(),q}}function D($){this.start=$,this.end={line:w,column:k},this.source=_.source}D.prototype.content=v;function T($){var q=new Error(_.source+":"+w+":"+k+": "+$);if(q.reason=$,q.filename=_.source,q.line=w,q.column=k,q.source=v,!_.silent)throw q}function I($){var q=$.exec(v);if(q){var V=q[0];return C(V),v=v.slice(V.length),q}}function R(){I(t)}function P($){var q;for($=$||[];q=j();)q!==!1&&$.push(q);return $}function j(){var $=E();if(!(c!=v.charAt(0)||u!=v.charAt(1))){for(var q=2;h!=v.charAt(q)&&(u!=v.charAt(q)||c!=v.charAt(q+1));)++q;if(q+=2,h===v.charAt(q-1))return T("End of comment missing");var V=v.slice(2,q-2);return k+=2,C(V),v=v.slice(q),k+=2,$({type:g,comment:V})}}function B(){var $=E(),q=I(n);if(q){if(j(),!I(s))return T("property missing ':'");var V=I(r),X=$({type:f,property:x(q[0].replace(i,h)),value:V?x(V[0].replace(i,h)):h});return I(o),X}}function H(){var $=[];P($);for(var q;q=B();)q!==!1&&($.push(q),P($));return $}return R(),H()}function x(v){return v?v.replace(a,h):h}return CU=m,CU}var Sfe;function aUe(){if(Sfe)return tk;Sfe=1;var i=tk&&tk.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(tk,"__esModule",{value:!0}),tk.default=t;const e=i(oUe());function t(n,s){let r=null;if(!n||typeof n!="string")return r;const o=(0,e.default)(n),a=typeof s=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;a?s(c,u,l):u&&(r=r||{},r[c]=u)}),r}return tk}var HT={},kfe;function lUe(){if(kfe)return HT;kfe=1,Object.defineProperty(HT,"__esModule",{value:!0}),HT.camelCase=void 0;var i=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,r=function(c){return!c||t.test(c)||i.test(c)},o=function(c,u){return u.toUpperCase()},a=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),r(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(s,a):c=c.replace(n,a),c.replace(e,o))};return HT.camelCase=l,HT}var WT,Nfe;function cUe(){if(Nfe)return WT;Nfe=1;var i=WT&&WT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},e=i(aUe()),t=lUe();function n(s,r){var o={};return!s||typeof s!="string"||(0,e.default)(s,function(a,l){a&&l&&(o[(0,t.camelCase)(a,r)]=l)}),o}return n.default=n,WT=n,WT}var dUe=cUe();const uUe=SH(dUe),BH=Qke("end"),Hp=Qke("start");function Qke(i){return e;function e(t){const n=t&&t.position&&t.position[i]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function hUe(i){const e=Hp(i),t=BH(i);if(e&&t)return{start:e,end:t}}function oA(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?Efe(i.position):"start"in i||"end"in i?Efe(i):"line"in i||"column"in i?WG(i):""}function WG(i){return Lfe(i&&i.line)+":"+Lfe(i&&i.column)}function Efe(i){return WG(i&&i.start)+"-"+WG(i&&i.end)}function Lfe(i){return i&&typeof i=="number"?i:1}class Cc extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let s="",r={},o=!1;if(t&&("line"in t&&"column"in t?r={place:t}:"start"in t&&"end"in t?r={place:t}:"type"in t?r={ancestors:[t],place:t.position}:r={...t}),typeof e=="string"?s=e:!r.cause&&e&&(o=!0,s=e.message,r.cause=e),!r.ruleId&&!r.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?r.ruleId=n:(r.source=n.slice(0,l),r.ruleId=n.slice(l+1))}if(!r.place&&r.ancestors&&r.ancestors){const l=r.ancestors[r.ancestors.length-1];l&&(r.place=l.position)}const a=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=a?a.line:void 0,this.name=oA(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=o&&r.cause&&typeof r.cause.stack=="string"?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Cc.prototype.file="";Cc.prototype.name="";Cc.prototype.reason="";Cc.prototype.message="";Cc.prototype.stack="";Cc.prototype.column=void 0;Cc.prototype.line=void 0;Cc.prototype.ancestors=void 0;Cc.prototype.cause=void 0;Cc.prototype.fatal=void 0;Cc.prototype.place=void 0;Cc.prototype.ruleId=void 0;Cc.prototype.source=void 0;const Nse={}.hasOwnProperty,gUe=new Map,fUe=/[A-Z]/g,pUe=new Set(["table","tbody","thead","tfoot","tr"]),mUe=new Set(["td","th"]),Xke="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bUe(i,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=e.filePath||void 0;let n;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=kUe(t,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=SUe(t,e.jsx,e.jsxs)}const s={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:n,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?x0:uP,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},r=Zke(s,i,void 0);return r&&typeof r!="string"?r:s.create(i,s.Fragment,{children:r||void 0},void 0)}function Zke(i,e,t){if(e.type==="element")return xUe(i,e,t);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return vUe(i,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return yUe(i,e,t);if(e.type==="mdxjsEsm")return _Ue(i,e);if(e.type==="root")return wUe(i,e,t);if(e.type==="text")return CUe(i,e)}function xUe(i,e,t){const n=i.schema;let s=n;e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=x0,i.schema=s),i.ancestors.push(e);const r=eNe(i,e.tagName,!1),o=NUe(i,e);let a=Lse(i,e);return pUe.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Xze(l):!0})),Jke(i,o,r,e),Ese(o,a),i.ancestors.pop(),i.schema=n,i.create(e,r,o,t)}function vUe(i,e){if(e.data&&e.data.estree&&i.evaluater){const n=e.data.estree.body[0];return n.type,i.evaluater.evaluateExpression(n.expression)}H2(i,e.position)}function _Ue(i,e){if(e.data&&e.data.estree&&i.evaluater)return i.evaluater.evaluateProgram(e.data.estree);H2(i,e.position)}function yUe(i,e,t){const n=i.schema;let s=n;e.name==="svg"&&n.space==="html"&&(s=x0,i.schema=s),i.ancestors.push(e);const r=e.name===null?i.Fragment:eNe(i,e.name,!0),o=EUe(i,e),a=Lse(i,e);return Jke(i,o,r,e),Ese(o,a),i.ancestors.pop(),i.schema=n,i.create(e,r,o,t)}function wUe(i,e,t){const n={};return Ese(n,Lse(i,e)),i.create(e,i.Fragment,n,t)}function CUe(i,e){return e.value}function Jke(i,e,t,n){typeof t!="string"&&t!==i.Fragment&&i.passNode&&(e.node=n)}function Ese(i,e){if(e.length>0){const t=e.length>1?e:e[0];t&&(i.children=t)}}function SUe(i,e,t){return n;function n(s,r,o,a){const c=Array.isArray(o.children)?t:e;return a?c(r,o,a):c(r,o)}}function kUe(i,e){return t;function t(n,s,r,o){const a=Array.isArray(r.children),l=Hp(n);return e(s,r,o,a,{columnNumber:l?l.column-1:void 0,fileName:i,lineNumber:l?l.line:void 0},void 0)}}function NUe(i,e){const t={};let n,s;for(s in e.properties)if(s!=="children"&&Nse.call(e.properties,s)){const r=LUe(i,s,e.properties[s]);if(r){const[o,a]=r;i.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&mUe.has(e.tagName)?n=a:t[o]=a}}if(n){const r=t.style||(t.style={});r[i.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return t}function EUe(i,e){const t={};for(const n of e.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&i.evaluater){const r=n.data.estree.body[0];r.type;const o=r.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,i.evaluater.evaluateExpression(a.argument))}else H2(i,e.position);else{const s=n.name;let r;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&i.evaluater){const a=n.value.data.estree.body[0];a.type,r=i.evaluater.evaluateExpression(a.expression)}else H2(i,e.position);else r=n.value===null?!0:n.value;t[s]=r}return t}function Lse(i,e){const t=[];let n=-1;const s=i.passKeys?new Map:gUe;for(;++ns?0:s+e:e=e>s?s:e,t=t>0?t:0,n.length<1e4)o=Array.from(n),o.unshift(e,t),i.splice(...o);else for(t&&i.splice(e,t);r0?(Ou(i,i.length,0,e),i):e}const Ife={}.hasOwnProperty;function nNe(i){const e={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Mg(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Fc=v0(/[A-Za-z]/),hc=v0(/[\dA-Za-z]/),jUe=v0(/[#-'*+\--9=?A-Z^-~]/);function Gj(i){return i!==null&&(i<32||i===127)}const VG=v0(/\d/),FUe=v0(/[\dA-Fa-f]/),BUe=v0(/[!-/:-@[-`{-~]/);function Mn(i){return i!==null&&i<-2}function Mr(i){return i!==null&&(i<0||i===32)}function Wi(i){return i===-2||i===-1||i===32}const HH=v0(new RegExp("\\p{P}|\\p{S}","u")),rC=v0(/\s/);function v0(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function cD(i){const e=[];let t=-1,n=0,s=0;for(;++t55295&&r<57344){const a=i.charCodeAt(t+1);r<56320&&a>56319&&a<57344?(o=String.fromCharCode(r,a),s=1):o="�"}else o=String.fromCharCode(r);o&&(e.push(i.slice(n,t),encodeURIComponent(o)),n=t+s+1,o=""),s&&(t+=s,s=0)}return e.join("")+i.slice(n)}function ms(i,e,t,n){const s=n?n-1:Number.POSITIVE_INFINITY;let r=0;return o;function o(l){return Wi(l)?(i.enter(t),a(l)):e(l)}function a(l){return Wi(l)&&r++o))return;const T=e.events.length;let I=T,R,P;for(;I--;)if(e.events[I][0]==="exit"&&e.events[I][1].type==="chunkFlow"){if(R){P=e.events[I][1].end;break}R=!0}for(_(n),D=T;Dk;){const E=t[C];e.containerState=E[1],E[0].exit.call(e,i)}t.length=k}function w(){s.write([null]),r=void 0,s=void 0,e.containerState._closeFlow=void 0}}function UUe(i,e,t){return ms(i,i.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function lL(i){if(i===null||Mr(i)||rC(i))return 1;if(HH(i))return 2}function WH(i,e,t){const n=[];let s=-1;for(;++s1&&i[t][1].end.offset-i[t][1].start.offset>1?2:1;const h={...i[n][1].end},g={...i[t][1].start};Rfe(h,-l),Rfe(g,l),o={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...i[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...i[t][1].start},end:g},r={type:l>1?"strongText":"emphasisText",start:{...i[n][1].end},end:{...i[t][1].start}},s={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},i[n][1].end={...o.start},i[t][1].start={...a.end},c=[],i[n][1].end.offset-i[n][1].start.offset&&(c=kh(c,[["enter",i[n][1],e],["exit",i[n][1],e]])),c=kh(c,[["enter",s,e],["enter",o,e],["exit",o,e],["enter",r,e]]),c=kh(c,WH(e.parser.constructs.insideSpan.null,i.slice(n+1,t),e)),c=kh(c,[["exit",r,e],["enter",a,e],["exit",a,e],["exit",s,e]]),i[t][1].end.offset-i[t][1].start.offset?(u=2,c=kh(c,[["enter",i[t][1],e],["exit",i[t][1],e]])):u=0,Ou(i,n-1,t-n+3,c),t=n+c.length-u-2;break}}for(t=-1;++t0&&Wi(D)?ms(i,w,"linePrefix",r+1)(D):w(D)}function w(D){return D===null||Mn(D)?i.check(Mfe,x,C)(D):(i.enter("codeFlowValue"),k(D))}function k(D){return D===null||Mn(D)?(i.exit("codeFlowValue"),w(D)):(i.consume(D),k)}function C(D){return i.exit("codeFenced"),e(D)}function E(D,T,I){let R=0;return P;function P(q){return D.enter("lineEnding"),D.consume(q),D.exit("lineEnding"),j}function j(q){return D.enter("codeFencedFence"),Wi(q)?ms(D,B,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):B(q)}function B(q){return q===a?(D.enter("codeFencedFenceSequence"),H(q)):I(q)}function H(q){return q===a?(R++,D.consume(q),H):R>=o?(D.exit("codeFencedFenceSequence"),Wi(q)?ms(D,$,"whitespace")(q):$(q)):I(q)}function $(q){return q===null||Mn(q)?(D.exit("codeFencedFence"),T(q)):I(q)}}}function n$e(i,e,t){const n=this;return s;function s(o){return o===null?t(o):(i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),r)}function r(o){return n.parser.lazy[n.now().line]?t(o):e(o)}}const kU={name:"codeIndented",tokenize:s$e},i$e={partial:!0,tokenize:r$e};function s$e(i,e,t){const n=this;return s;function s(c){return i.enter("codeIndented"),ms(i,r,"linePrefix",5)(c)}function r(c){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?l(c):Mn(c)?i.attempt(i$e,o,l)(c):(i.enter("codeFlowValue"),a(c))}function a(c){return c===null||Mn(c)?(i.exit("codeFlowValue"),o(c)):(i.consume(c),a)}function l(c){return i.exit("codeIndented"),e(c)}}function r$e(i,e,t){const n=this;return s;function s(o){return n.parser.lazy[n.now().line]?t(o):Mn(o)?(i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),s):ms(i,r,"linePrefix",5)(o)}function r(o){const a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):Mn(o)?s(o):t(o)}}const o$e={name:"codeText",previous:l$e,resolve:a$e,tokenize:c$e};function a$e(i){let e=i.length-4,t=3,n,s;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(n=t;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const s=t||0;this.setCursor(Math.trunc(e));const r=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return n&&VT(this.left,n),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),VT(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),VT(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(o):i.interrupt(n.parser.constructs.flow,t,e)(o)}}function lNe(i,e,t,n,s,r,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return h;function h(_){return _===60?(i.enter(n),i.enter(s),i.enter(r),i.consume(_),i.exit(r),g):_===null||_===32||_===41||Gj(_)?t(_):(i.enter(n),i.enter(o),i.enter(a),i.enter("chunkString",{contentType:"string"}),x(_))}function g(_){return _===62?(i.enter(r),i.consume(_),i.exit(r),i.exit(s),i.exit(n),e):(i.enter(a),i.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===62?(i.exit("chunkString"),i.exit(a),g(_)):_===null||_===60||Mn(_)?t(_):(i.consume(_),_===92?m:f)}function m(_){return _===60||_===62||_===92?(i.consume(_),f):f(_)}function x(_){return!u&&(_===null||_===41||Mr(_))?(i.exit("chunkString"),i.exit(a),i.exit(o),i.exit(n),e(_)):u999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):f===93?(i.exit(r),i.enter(s),i.consume(f),i.exit(s),i.exit(n),e):Mn(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),u):(i.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||Mn(f)||a++>999?(i.exit("chunkString"),u(f)):(i.consume(f),l||(l=!Wi(f)),f===92?g:h)}function g(f){return f===91||f===92||f===93?(i.consume(f),a++,h):h(f)}}function dNe(i,e,t,n,s,r){let o;return a;function a(g){return g===34||g===39||g===40?(i.enter(n),i.enter(s),i.consume(g),i.exit(s),o=g===40?41:g,l):t(g)}function l(g){return g===o?(i.enter(s),i.consume(g),i.exit(s),i.exit(n),e):(i.enter(r),c(g))}function c(g){return g===o?(i.exit(r),l(o)):g===null?t(g):Mn(g)?(i.enter("lineEnding"),i.consume(g),i.exit("lineEnding"),ms(i,c,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===o||g===null||Mn(g)?(i.exit("chunkString"),c(g)):(i.consume(g),g===92?h:u)}function h(g){return g===o||g===92?(i.consume(g),u):u(g)}}function aA(i,e){let t;return n;function n(s){return Mn(s)?(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),t=!0,n):Wi(s)?ms(i,n,t?"linePrefix":"lineSuffix")(s):e(s)}}const b$e={name:"definition",tokenize:v$e},x$e={partial:!0,tokenize:_$e};function v$e(i,e,t){const n=this;let s;return r;function r(f){return i.enter("definition"),o(f)}function o(f){return cNe.call(n,i,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return s=Mg(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(i.enter("definitionMarker"),i.consume(f),i.exit("definitionMarker"),l):t(f)}function l(f){return Mr(f)?aA(i,c)(f):c(f)}function c(f){return lNe(i,u,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return i.attempt(x$e,h,h)(f)}function h(f){return Wi(f)?ms(i,g,"whitespace")(f):g(f)}function g(f){return f===null||Mn(f)?(i.exit("definition"),n.parser.defined.push(s),e(f)):t(f)}}function _$e(i,e,t){return n;function n(a){return Mr(a)?aA(i,s)(a):t(a)}function s(a){return dNe(i,r,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function r(a){return Wi(a)?ms(i,o,"whitespace")(a):o(a)}function o(a){return a===null||Mn(a)?e(a):t(a)}}const y$e={name:"hardBreakEscape",tokenize:w$e};function w$e(i,e,t){return n;function n(r){return i.enter("hardBreakEscape"),i.consume(r),s}function s(r){return Mn(r)?(i.exit("hardBreakEscape"),e(r)):t(r)}}const C$e={name:"headingAtx",resolve:S$e,tokenize:k$e};function S$e(i,e){let t=i.length-2,n=3,s,r;return i[n][1].type==="whitespace"&&(n+=2),t-2>n&&i[t][1].type==="whitespace"&&(t-=2),i[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&i[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(s={type:"atxHeadingText",start:i[n][1].start,end:i[t][1].end},r={type:"chunkText",start:i[n][1].start,end:i[t][1].end,contentType:"text"},Ou(i,n,t-n+1,[["enter",s,e],["enter",r,e],["exit",r,e],["exit",s,e]])),i}function k$e(i,e,t){let n=0;return s;function s(u){return i.enter("atxHeading"),r(u)}function r(u){return i.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&n++<6?(i.consume(u),o):u===null||Mr(u)?(i.exit("atxHeadingSequence"),a(u)):t(u)}function a(u){return u===35?(i.enter("atxHeadingSequence"),l(u)):u===null||Mn(u)?(i.exit("atxHeading"),e(u)):Wi(u)?ms(i,a,"whitespace")(u):(i.enter("atxHeadingText"),c(u))}function l(u){return u===35?(i.consume(u),l):(i.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Mr(u)?(i.exit("atxHeadingText"),a(u)):(i.consume(u),c)}}const N$e=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ofe=["pre","script","style","textarea"],E$e={concrete:!0,name:"htmlFlow",resolveTo:T$e,tokenize:I$e},L$e={partial:!0,tokenize:R$e},D$e={partial:!0,tokenize:A$e};function T$e(i){let e=i.length;for(;e--&&!(i[e][0]==="enter"&&i[e][1].type==="htmlFlow"););return e>1&&i[e-2][1].type==="linePrefix"&&(i[e][1].start=i[e-2][1].start,i[e+1][1].start=i[e-2][1].start,i.splice(e-2,2)),i}function I$e(i,e,t){const n=this;let s,r,o,a,l;return c;function c(U){return u(U)}function u(U){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(U),h}function h(U){return U===33?(i.consume(U),g):U===47?(i.consume(U),r=!0,x):U===63?(i.consume(U),s=3,n.interrupt?e:W):Fc(U)?(i.consume(U),o=String.fromCharCode(U),v):t(U)}function g(U){return U===45?(i.consume(U),s=2,f):U===91?(i.consume(U),s=5,a=0,m):Fc(U)?(i.consume(U),s=4,n.interrupt?e:W):t(U)}function f(U){return U===45?(i.consume(U),n.interrupt?e:W):t(U)}function m(U){const ue="CDATA[";return U===ue.charCodeAt(a++)?(i.consume(U),a===ue.length?n.interrupt?e:B:m):t(U)}function x(U){return Fc(U)?(i.consume(U),o=String.fromCharCode(U),v):t(U)}function v(U){if(U===null||U===47||U===62||Mr(U)){const ue=U===47,fe=o.toLowerCase();return!ue&&!r&&Ofe.includes(fe)?(s=1,n.interrupt?e(U):B(U)):N$e.includes(o.toLowerCase())?(s=6,ue?(i.consume(U),_):n.interrupt?e(U):B(U)):(s=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(U):r?w(U):k(U))}return U===45||hc(U)?(i.consume(U),o+=String.fromCharCode(U),v):t(U)}function _(U){return U===62?(i.consume(U),n.interrupt?e:B):t(U)}function w(U){return Wi(U)?(i.consume(U),w):P(U)}function k(U){return U===47?(i.consume(U),P):U===58||U===95||Fc(U)?(i.consume(U),C):Wi(U)?(i.consume(U),k):P(U)}function C(U){return U===45||U===46||U===58||U===95||hc(U)?(i.consume(U),C):E(U)}function E(U){return U===61?(i.consume(U),D):Wi(U)?(i.consume(U),E):k(U)}function D(U){return U===null||U===60||U===61||U===62||U===96?t(U):U===34||U===39?(i.consume(U),l=U,T):Wi(U)?(i.consume(U),D):I(U)}function T(U){return U===l?(i.consume(U),l=null,R):U===null||Mn(U)?t(U):(i.consume(U),T)}function I(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||Mr(U)?E(U):(i.consume(U),I)}function R(U){return U===47||U===62||Wi(U)?k(U):t(U)}function P(U){return U===62?(i.consume(U),j):t(U)}function j(U){return U===null||Mn(U)?B(U):Wi(U)?(i.consume(U),j):t(U)}function B(U){return U===45&&s===2?(i.consume(U),V):U===60&&s===1?(i.consume(U),X):U===62&&s===4?(i.consume(U),Y):U===63&&s===3?(i.consume(U),W):U===93&&s===5?(i.consume(U),ne):Mn(U)&&(s===6||s===7)?(i.exit("htmlFlowData"),i.check(L$e,G,H)(U)):U===null||Mn(U)?(i.exit("htmlFlowData"),H(U)):(i.consume(U),B)}function H(U){return i.check(D$e,$,G)(U)}function $(U){return i.enter("lineEnding"),i.consume(U),i.exit("lineEnding"),q}function q(U){return U===null||Mn(U)?H(U):(i.enter("htmlFlowData"),B(U))}function V(U){return U===45?(i.consume(U),W):B(U)}function X(U){return U===47?(i.consume(U),o="",ae):B(U)}function ae(U){if(U===62){const ue=o.toLowerCase();return Ofe.includes(ue)?(i.consume(U),Y):B(U)}return Fc(U)&&o.length<8?(i.consume(U),o+=String.fromCharCode(U),ae):B(U)}function ne(U){return U===93?(i.consume(U),W):B(U)}function W(U){return U===62?(i.consume(U),Y):U===45&&s===2?(i.consume(U),W):B(U)}function Y(U){return U===null||Mn(U)?(i.exit("htmlFlowData"),G(U)):(i.consume(U),Y)}function G(U){return i.exit("htmlFlow"),e(U)}}function A$e(i,e,t){const n=this;return s;function s(o){return Mn(o)?(i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),r):t(o)}function r(o){return n.parser.lazy[n.now().line]?t(o):e(o)}}function R$e(i,e,t){return n;function n(s){return i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),i.attempt(hP,e,t)}}const M$e={name:"htmlText",tokenize:P$e};function P$e(i,e,t){const n=this;let s,r,o;return a;function a(W){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(W),l}function l(W){return W===33?(i.consume(W),c):W===47?(i.consume(W),E):W===63?(i.consume(W),k):Fc(W)?(i.consume(W),I):t(W)}function c(W){return W===45?(i.consume(W),u):W===91?(i.consume(W),r=0,m):Fc(W)?(i.consume(W),w):t(W)}function u(W){return W===45?(i.consume(W),f):t(W)}function h(W){return W===null?t(W):W===45?(i.consume(W),g):Mn(W)?(o=h,X(W)):(i.consume(W),h)}function g(W){return W===45?(i.consume(W),f):h(W)}function f(W){return W===62?V(W):W===45?g(W):h(W)}function m(W){const Y="CDATA[";return W===Y.charCodeAt(r++)?(i.consume(W),r===Y.length?x:m):t(W)}function x(W){return W===null?t(W):W===93?(i.consume(W),v):Mn(W)?(o=x,X(W)):(i.consume(W),x)}function v(W){return W===93?(i.consume(W),_):x(W)}function _(W){return W===62?V(W):W===93?(i.consume(W),_):x(W)}function w(W){return W===null||W===62?V(W):Mn(W)?(o=w,X(W)):(i.consume(W),w)}function k(W){return W===null?t(W):W===63?(i.consume(W),C):Mn(W)?(o=k,X(W)):(i.consume(W),k)}function C(W){return W===62?V(W):k(W)}function E(W){return Fc(W)?(i.consume(W),D):t(W)}function D(W){return W===45||hc(W)?(i.consume(W),D):T(W)}function T(W){return Mn(W)?(o=T,X(W)):Wi(W)?(i.consume(W),T):V(W)}function I(W){return W===45||hc(W)?(i.consume(W),I):W===47||W===62||Mr(W)?R(W):t(W)}function R(W){return W===47?(i.consume(W),V):W===58||W===95||Fc(W)?(i.consume(W),P):Mn(W)?(o=R,X(W)):Wi(W)?(i.consume(W),R):V(W)}function P(W){return W===45||W===46||W===58||W===95||hc(W)?(i.consume(W),P):j(W)}function j(W){return W===61?(i.consume(W),B):Mn(W)?(o=j,X(W)):Wi(W)?(i.consume(W),j):R(W)}function B(W){return W===null||W===60||W===61||W===62||W===96?t(W):W===34||W===39?(i.consume(W),s=W,H):Mn(W)?(o=B,X(W)):Wi(W)?(i.consume(W),B):(i.consume(W),$)}function H(W){return W===s?(i.consume(W),s=void 0,q):W===null?t(W):Mn(W)?(o=H,X(W)):(i.consume(W),H)}function $(W){return W===null||W===34||W===39||W===60||W===61||W===96?t(W):W===47||W===62||Mr(W)?R(W):(i.consume(W),$)}function q(W){return W===47||W===62||Mr(W)?R(W):t(W)}function V(W){return W===62?(i.consume(W),i.exit("htmlTextData"),i.exit("htmlText"),e):t(W)}function X(W){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(W),i.exit("lineEnding"),ae}function ae(W){return Wi(W)?ms(i,ne,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):ne(W)}function ne(W){return i.enter("htmlTextData"),o(W)}}const Ise={name:"labelEnd",resolveAll:B$e,resolveTo:H$e,tokenize:W$e},O$e={tokenize:V$e},j$e={tokenize:z$e},F$e={tokenize:U$e};function B$e(i){let e=-1;const t=[];for(;++e=3&&(c===null||Mn(c))?(i.exit("thematicBreak"),e(c)):t(c)}function l(c){return c===s?(i.consume(c),n++,l):(i.exit("thematicBreakSequence"),Wi(c)?ms(i,a,"whitespace")(c):a(c))}}const md={continuation:{tokenize:eqe},exit:nqe,name:"list",tokenize:J$e},X$e={partial:!0,tokenize:iqe},Z$e={partial:!0,tokenize:tqe};function J$e(i,e,t){const n=this,s=n.events[n.events.length-1];let r=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return a;function a(f){const m=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:VG(f)){if(n.containerState.type||(n.containerState.type=m,i.enter(m,{_container:!0})),m==="listUnordered")return i.enter("listItemPrefix"),f===42||f===45?i.check(W4,t,c)(f):c(f);if(!n.interrupt||f===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),l(f)}return t(f)}function l(f){return VG(f)&&++o<10?(i.consume(f),l):(!n.interrupt||o<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(i.exit("listItemValue"),c(f)):t(f)}function c(f){return i.enter("listItemMarker"),i.consume(f),i.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,i.check(hP,n.interrupt?t:u,i.attempt(X$e,g,h))}function u(f){return n.containerState.initialBlankLine=!0,r++,g(f)}function h(f){return Wi(f)?(i.enter("listItemPrefixWhitespace"),i.consume(f),i.exit("listItemPrefixWhitespace"),g):t(f)}function g(f){return n.containerState.size=r+n.sliceSerialize(i.exit("listItemPrefix"),!0).length,e(f)}}function eqe(i,e,t){const n=this;return n.containerState._closeFlow=void 0,i.check(hP,s,r);function s(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ms(i,e,"listItemIndent",n.containerState.size+1)(a)}function r(a){return n.containerState.furtherBlankLines||!Wi(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i.attempt(Z$e,e,o)(a))}function o(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,ms(i,i.attempt(md,e,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function tqe(i,e,t){const n=this;return ms(i,s,"listItemIndent",n.containerState.size+1);function s(r){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?e(r):t(r)}}function nqe(i){i.exit(this.containerState.type)}function iqe(i,e,t){const n=this;return ms(i,s,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(r){const o=n.events[n.events.length-1];return!Wi(r)&&o&&o[1].type==="listItemPrefixWhitespace"?e(r):t(r)}}const jfe={name:"setextUnderline",resolveTo:sqe,tokenize:rqe};function sqe(i,e){let t=i.length,n,s,r;for(;t--;)if(i[t][0]==="enter"){if(i[t][1].type==="content"){n=t;break}i[t][1].type==="paragraph"&&(s=t)}else i[t][1].type==="content"&&i.splice(t,1),!r&&i[t][1].type==="definition"&&(r=t);const o={type:"setextHeading",start:{...i[n][1].start},end:{...i[i.length-1][1].end}};return i[s][1].type="setextHeadingText",r?(i.splice(s,0,["enter",o,e]),i.splice(r+1,0,["exit",i[n][1],e]),i[n][1].end={...i[r][1].end}):i[n][1]=o,i.push(["exit",o,e]),i}function rqe(i,e,t){const n=this;let s;return r;function r(c){let u=n.events.length,h;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){h=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(i.enter("setextHeadingLine"),s=c,o(c)):t(c)}function o(c){return i.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===s?(i.consume(c),a):(i.exit("setextHeadingLineSequence"),Wi(c)?ms(i,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Mn(c)?(i.exit("setextHeadingLine"),e(c)):t(c)}}const oqe={tokenize:aqe};function aqe(i){const e=this,t=i.attempt(hP,n,i.attempt(this.parser.constructs.flowInitial,s,ms(i,i.attempt(this.parser.constructs.flow,s,i.attempt(h$e,s)),"linePrefix")));return t;function n(r){if(r===null){i.consume(r);return}return i.enter("lineEndingBlank"),i.consume(r),i.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function s(r){if(r===null){i.consume(r);return}return i.enter("lineEnding"),i.consume(r),i.exit("lineEnding"),e.currentConstruct=void 0,t}}const lqe={resolveAll:hNe()},cqe=uNe("string"),dqe=uNe("text");function uNe(i){return{resolveAll:hNe(i==="text"?uqe:void 0),tokenize:e};function e(t){const n=this,s=this.parser.constructs[i],r=t.attempt(s,o,a);return o;function o(u){return c(u)?r(u):a(u)}function a(u){if(u===null){t.consume(u);return}return t.enter("data"),t.consume(u),l}function l(u){return c(u)?(t.exit("data"),r(u)):(t.consume(u),l)}function c(u){if(u===null)return!0;const h=s[u];let g=-1;if(h)for(;++g-1){const a=o[0];typeof a=="string"?o[0]=a.slice(n):o.shift()}r>0&&o.push(i[s].slice(0,r))}return o}function Sqe(i,e){let t=-1;const n=[];let s;for(;++t0){const ws=sn.tokenStack[sn.tokenStack.length-1];(ws[1]||Bfe).call(sn,void 0,ws[0])}for(yt.position={start:qx(Ye.length>0?Ye[0][1].start:{line:1,column:1,offset:0}),end:qx(Ye.length>0?Ye[Ye.length-2][1].end:{line:1,column:1,offset:0})},On=-1;++On0&&(n.className=["language-"+s[0]]);let r={type:"element",tagName:"code",properties:n,children:[{type:"text",value:t}]};return e.meta&&(r.data={meta:e.meta}),i.patch(e,r),r=i.applyData(e,r),r={type:"element",tagName:"pre",properties:{},children:[r]},i.patch(e,r),r}function Fqe(i,e){const t={type:"element",tagName:"del",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Bqe(i,e){const t={type:"element",tagName:"em",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Hqe(i,e){const t=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),s=cD(n.toLowerCase()),r=i.footnoteOrder.indexOf(n);let o,a=i.footnoteCounts.get(n);a===void 0?(a=0,i.footnoteOrder.push(n),o=i.footnoteOrder.length):o=r+1,a+=1,i.footnoteCounts.set(n,a);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};i.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return i.patch(e,c),i.applyData(e,c)}function Wqe(i,e){const t={type:"element",tagName:"h"+e.depth,properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function Vqe(i,e){if(i.options.allowDangerousHtml){const t={type:"raw",value:e.value};return i.patch(e,t),i.applyData(e,t)}}function pNe(i,e){const t=e.referenceType;let n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];const s=i.all(e),r=s[0];r&&r.type==="text"?r.value="["+r.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=n:s.push({type:"text",value:n}),s}function zqe(i,e){const t=String(e.identifier).toUpperCase(),n=i.definitionById.get(t);if(!n)return pNe(i,e);const s={src:cD(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(s.title=n.title);const r={type:"element",tagName:"img",properties:s,children:[]};return i.patch(e,r),i.applyData(e,r)}function Uqe(i,e){const t={src:cD(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);const n={type:"element",tagName:"img",properties:t,children:[]};return i.patch(e,n),i.applyData(e,n)}function $qe(i,e){const t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};i.patch(e,t);const n={type:"element",tagName:"code",properties:{},children:[t]};return i.patch(e,n),i.applyData(e,n)}function qqe(i,e){const t=String(e.identifier).toUpperCase(),n=i.definitionById.get(t);if(!n)return pNe(i,e);const s={href:cD(n.url||"")};n.title!==null&&n.title!==void 0&&(s.title=n.title);const r={type:"element",tagName:"a",properties:s,children:i.all(e)};return i.patch(e,r),i.applyData(e,r)}function Kqe(i,e){const t={href:cD(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);const n={type:"element",tagName:"a",properties:t,children:i.all(e)};return i.patch(e,n),i.applyData(e,n)}function Gqe(i,e,t){const n=i.all(e),s=t?Yqe(t):mNe(e),r={},o=[];if(typeof e.checked=="boolean"){const u=n[0];let h;u&&u.type==="element"&&u.tagName==="p"?h=u:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let a=-1;for(;++a1}function Qqe(i,e){const t={},n=i.all(e);let s=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++s0){const o={type:"element",tagName:"tbody",properties:{},children:i.wrap(t,!0)},a=Hp(e.children[1]),l=BH(e.children[e.children.length-1]);a&&l&&(o.position={start:a,end:l}),s.push(o)}const r={type:"element",tagName:"table",properties:{},children:i.wrap(s,!0)};return i.patch(e,r),i.applyData(e,r)}function tKe(i,e,t){const n=t?t.children:void 0,r=(n?n.indexOf(e):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:e.children.length;let l=-1;const c=[];for(;++l0,!0),n[0]),s=n.index+n[0].length,n=t.exec(e);return r.push(Vfe(e.slice(s),s>0,!1)),r.join("")}function Vfe(i,e,t){let n=0,s=i.length;if(e){let r=i.codePointAt(n);for(;r===Hfe||r===Wfe;)n++,r=i.codePointAt(n)}if(t){let r=i.codePointAt(s-1);for(;r===Hfe||r===Wfe;)s--,r=i.codePointAt(s-1)}return s>n?i.slice(n,s):""}function sKe(i,e){const t={type:"text",value:iKe(String(e.value))};return i.patch(e,t),i.applyData(e,t)}function rKe(i,e){const t={type:"element",tagName:"hr",properties:{},children:[]};return i.patch(e,t),i.applyData(e,t)}const oKe={blockquote:Pqe,break:Oqe,code:jqe,delete:Fqe,emphasis:Bqe,footnoteReference:Hqe,heading:Wqe,html:Vqe,imageReference:zqe,image:Uqe,inlineCode:$qe,linkReference:qqe,link:Kqe,listItem:Gqe,list:Qqe,paragraph:Xqe,root:Zqe,strong:Jqe,table:eKe,tableCell:nKe,tableRow:tKe,text:sKe,thematicBreak:rKe,toml:O5,yaml:O5,definition:O5,footnoteDefinition:O5};function O5(){}const bNe=-1,VH=0,lA=1,Yj=2,Ase=3,Rse=4,Mse=5,Pse=6,xNe=7,vNe=8,zfe=typeof self=="object"?self:globalThis,aKe=(i,e)=>{const t=(s,r)=>(i.set(r,s),s),n=s=>{if(i.has(s))return i.get(s);const[r,o]=e[s];switch(r){case VH:case bNe:return t(o,s);case lA:{const a=t([],s);for(const l of o)a.push(n(l));return a}case Yj:{const a=t({},s);for(const[l,c]of o)a[n(l)]=n(c);return a}case Ase:return t(new Date(o),s);case Rse:{const{source:a,flags:l}=o;return t(new RegExp(a,l),s)}case Mse:{const a=t(new Map,s);for(const[l,c]of o)a.set(n(l),n(c));return a}case Pse:{const a=t(new Set,s);for(const l of o)a.add(n(l));return a}case xNe:{const{name:a,message:l}=o;return t(new zfe[a](l),s)}case vNe:return t(BigInt(o),s);case"BigInt":return t(Object(BigInt(o)),s);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new zfe[r](o),s)};return n},Ufe=i=>aKe(new Map,i)(0),nk="",{toString:lKe}={},{keys:cKe}=Object,zT=i=>{const e=typeof i;if(e!=="object"||!i)return[VH,e];const t=lKe.call(i).slice(8,-1);switch(t){case"Array":return[lA,nk];case"Object":return[Yj,nk];case"Date":return[Ase,nk];case"RegExp":return[Rse,nk];case"Map":return[Mse,nk];case"Set":return[Pse,nk];case"DataView":return[lA,t]}return t.includes("Array")?[lA,t]:t.includes("Error")?[xNe,t]:[Yj,t]},j5=([i,e])=>i===VH&&(e==="function"||e==="symbol"),dKe=(i,e,t,n)=>{const s=(o,a)=>{const l=n.push(o)-1;return t.set(a,l),l},r=o=>{if(t.has(o))return t.get(o);let[a,l]=zT(o);switch(a){case VH:{let u=o;switch(l){case"bigint":a=vNe,u=o.toString();break;case"function":case"symbol":if(i)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return s([bNe],o)}return s([a,u],o)}case lA:{if(l){let g=o;return l==="DataView"?g=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(g=new Uint8Array(o)),s([l,[...g]],o)}const u=[],h=s([a,u],o);for(const g of o)u.push(r(g));return h}case Yj:{if(l)switch(l){case"BigInt":return s([l,o.toString()],o);case"Boolean":case"Number":case"String":return s([l,o.valueOf()],o)}if(e&&"toJSON"in o)return r(o.toJSON());const u=[],h=s([a,u],o);for(const g of cKe(o))(i||!j5(zT(o[g])))&&u.push([r(g),r(o[g])]);return h}case Ase:return s([a,o.toISOString()],o);case Rse:{const{source:u,flags:h}=o;return s([a,{source:u,flags:h}],o)}case Mse:{const u=[],h=s([a,u],o);for(const[g,f]of o)(i||!(j5(zT(g))||j5(zT(f))))&&u.push([r(g),r(f)]);return h}case Pse:{const u=[],h=s([a,u],o);for(const g of o)(i||!j5(zT(g)))&&u.push(r(g));return h}}const{message:c}=o;return s([a,{name:l,message:c}],o)};return r},$fe=(i,{json:e,lossy:t}={})=>{const n=[];return dKe(!(e||t),!!e,new Map,n)(i),n},cL=typeof structuredClone=="function"?(i,e)=>e&&("json"in e||"lossy"in e)?Ufe($fe(i,e)):structuredClone(i):(i,e)=>Ufe($fe(i,e));function uKe(i,e){const t=[{type:"text",value:"↩"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function hKe(i,e){return"Back to reference "+(i+1)+(e>1?"-"+e:"")}function gKe(i){const e=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",t=i.options.footnoteBackContent||uKe,n=i.options.footnoteBackLabel||hKe,s=i.options.footnoteLabel||"Footnotes",r=i.options.footnoteLabelTagName||"h2",o=i.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&m.push({type:"text",value:" "});let w=typeof t=="string"?t:t(l,f);typeof w=="string"&&(w={type:"text",value:w}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+g+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,f),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...m)}else u.push(...m);const _={type:"element",tagName:"li",properties:{id:e+"fn-"+g},children:i.wrap(u,!0)};i.patch(c,_),a.push(_)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...cL(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:i.wrap(a,!0)},{type:"text",value:` +`}]}}const zH=(function(i){if(i==null)return bKe;if(typeof i=="function")return UH(i);if(typeof i=="object")return Array.isArray(i)?fKe(i):pKe(i);if(typeof i=="string")return mKe(i);throw new Error("Expected function, string, or object as test")});function fKe(i){const e=[];let t=-1;for(;++t":""))+")"})}return g;function g(){let f=_Ne,m,x,v;if((!e||r(l,c,u[u.length-1]||void 0))&&(f=yKe(t(l,u)),f[0]===UG))return f;if("children"in l&&l.children){const _=l;if(_.children&&f[0]!==_Ke)for(x=(n?_.children.length:-1)+o,v=u.concat(_);x>-1&&x<_.children.length;){const w=_.children[x];if(m=a(w,x,v)(),m[0]===UG)return m;x=typeof m[1]=="number"?m[1]:x+o}}return f}}}function yKe(i){return Array.isArray(i)?i:typeof i=="number"?[vKe,i]:i==null?_Ne:[i]}function $H(i,e,t,n){let s,r,o;typeof e=="function"&&typeof t!="function"?(r=void 0,o=e,s=t):(r=e,o=t,s=n),yNe(i,r,a,s);function a(l,c){const u=c[c.length-1],h=u?u.children.indexOf(l):void 0;return o(l,h,u)}}const $G={}.hasOwnProperty,wKe={};function CKe(i,e){const t=e||wKe,n=new Map,s=new Map,r=new Map,o={...oKe,...t.handlers},a={all:c,applyData:kKe,definitionById:n,footnoteById:s,footnoteCounts:r,footnoteOrder:[],handlers:o,one:l,options:t,patch:SKe,wrap:EKe};return $H(i,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const h=u.type==="definition"?n:s,g=String(u.identifier).toUpperCase();h.has(g)||h.set(g,u)}}),a;function l(u,h){const g=u.type,f=a.handlers[g];if($G.call(a.handlers,g)&&f)return f(a,u,h);if(a.options.passThrough&&a.options.passThrough.includes(g)){if("children"in u){const{children:x,...v}=u,_=cL(v);return _.children=a.all(u),_}return cL(u)}return(a.options.unknownHandler||NKe)(a,u,h)}function c(u){const h=[];if("children"in u){const g=u.children;let f=-1;for(;++f0&&t.push({type:"text",value:` +`}),t}function qfe(i){let e=0,t=i.charCodeAt(e);for(;t===9||t===32;)e++,t=i.charCodeAt(e);return i.slice(e)}function Kfe(i,e){const t=CKe(i,e),n=t.one(i,void 0),s=gKe(t),r=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return s&&r.children.push({type:"text",value:` +`},s),r}function LKe(i,e){return i&&"run"in i?async function(t,n){const s=Kfe(t,{file:n,...e});await i.run(s,n)}:function(t,n){return Kfe(t,{file:n,...i||e})}}function Gfe(i){if(i)throw i}var EU,Yfe;function DKe(){if(Yfe)return EU;Yfe=1;var i=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=function(c){return typeof Array.isArray=="function"?Array.isArray(c):e.call(c)==="[object Array]"},r=function(c){if(!c||e.call(c)!=="[object Object]")return!1;var u=i.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&i.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!u&&!h)return!1;var g;for(g in c);return typeof g>"u"||i.call(c,g)},o=function(c,u){t&&u.name==="__proto__"?t(c,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):c[u.name]=u.newValue},a=function(c,u){if(u==="__proto__")if(i.call(c,u)){if(n)return n(c,u).value}else return;return c[u]};return EU=function l(){var c,u,h,g,f,m,x=arguments[0],v=1,_=arguments.length,w=!1;for(typeof x=="boolean"&&(w=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});v<_;++v)if(c=arguments[v],c!=null)for(u in c)h=a(x,u),g=a(c,u),x!==g&&(w&&g&&(r(g)||(f=s(g)))?(f?(f=!1,m=h&&s(h)?h:[]):m=h&&r(h)?h:{},o(x,{name:u,newValue:l(w,m,g)})):typeof g<"u"&&o(x,{name:u,newValue:g}));return x},EU}var TKe=DKe();const LU=SH(TKe);function qG(i){if(typeof i!="object"||i===null)return!1;const e=Object.getPrototypeOf(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function IKe(){const i=[],e={run:t,use:n};return e;function t(...s){let r=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...s);function a(l,...c){const u=i[++r];let h=-1;if(l){o(l);return}for(;++ho.length;let l;a&&o.push(s);try{l=i.apply(this,o)}catch(c){const u=c;if(a&&t)throw u;return s(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(r,s):l instanceof Error?s(l):r(l))}function s(o,...a){t||(t=!0,e(o,...a))}function r(o){s(null,o)}}const Lf={basename:RKe,dirname:MKe,extname:PKe,join:OKe,sep:"/"};function RKe(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');gP(i);let t=0,n=-1,s=i.length,r;if(e===void 0||e.length===0||e.length>i.length){for(;s--;)if(i.codePointAt(s)===47){if(r){t=s+1;break}}else n<0&&(r=!0,n=s+1);return n<0?"":i.slice(t,n)}if(e===i)return"";let o=-1,a=e.length-1;for(;s--;)if(i.codePointAt(s)===47){if(r){t=s+1;break}}else o<0&&(r=!0,o=s+1),a>-1&&(i.codePointAt(s)===e.codePointAt(a--)?a<0&&(n=s):(a=-1,n=o));return t===n?n=o:n<0&&(n=i.length),i.slice(t,n)}function MKe(i){if(gP(i),i.length===0)return".";let e=-1,t=i.length,n;for(;--t;)if(i.codePointAt(t)===47){if(n){e=t;break}}else n||(n=!0);return e<0?i.codePointAt(0)===47?"/":".":e===1&&i.codePointAt(0)===47?"//":i.slice(0,e)}function PKe(i){gP(i);let e=i.length,t=-1,n=0,s=-1,r=0,o;for(;e--;){const a=i.codePointAt(e);if(a===47){if(o){n=e+1;break}continue}t<0&&(o=!0,t=e+1),a===46?s<0?s=e:r!==1&&(r=1):s>-1&&(r=-1)}return s<0||t<0||r===0||r===1&&s===t-1&&s===n+1?"":i.slice(s,t)}function OKe(...i){let e=-1,t;for(;++e0&&i.codePointAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function FKe(i,e){let t="",n=0,s=-1,r=0,o=-1,a,l;for(;++o<=i.length;){if(o2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",n=0):(t=t.slice(0,l),n=t.length-1-t.lastIndexOf("/")),s=o,r=0;continue}}else if(t.length>0){t="",n=0,s=o,r=0;continue}}e&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+i.slice(s+1,o):t=i.slice(s+1,o),n=o-s-1;s=o,r=0}else a===46&&r>-1?r++:r=-1}return t}function gP(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}const BKe={cwd:HKe};function HKe(){return"/"}function KG(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}function WKe(i){if(typeof i=="string")i=new URL(i);else if(!KG(i)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(i.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return VKe(i)}function VKe(i){if(i.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const e=i.pathname;let t=-1;for(;++t0){let[f,...m]=u;const x=n[g][1];qG(x)&&qG(f)&&(f=LU(!0,x,f)),n[g]=[c,f,...m]}}}}const qKe=new Ose().freeze();function AU(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `parser`")}function RU(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `compiler`")}function MU(i,e){if(e)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Xfe(i){if(!qG(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function Zfe(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function F5(i){return KKe(i)?i:new wNe(i)}function KKe(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function GKe(i){return typeof i=="string"||YKe(i)}function YKe(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}const QKe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Jfe=[],epe={allowDangerousHtml:!0},XKe=/^(https?|ircs?|mailto|xmpp)$/i,ZKe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function jse(i){const e=JKe(i),t=eGe(i);return tGe(e.runSync(e.parse(t),t),i)}function JKe(i){const e=i.rehypePlugins||Jfe,t=i.remarkPlugins||Jfe,n=i.remarkRehypeOptions?{...i.remarkRehypeOptions,...epe}:epe;return qKe().use(Mqe).use(t).use(LKe,n).use(e)}function eGe(i){const e=i.children||"",t=new wNe;return typeof e=="string"&&(t.value=e),t}function tGe(i,e){const t=e.allowedElements,n=e.allowElement,s=e.components,r=e.disallowedElements,o=e.skipHtml,a=e.unwrapDisallowed,l=e.urlTransform||nGe;for(const u of ZKe)Object.hasOwn(e,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+QKe+u.id,void 0);return e.className&&(i={type:"element",tagName:"div",properties:{className:e.className},children:i.type==="root"?i.children:[i]}),$H(i,c),bUe(i,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function c(u,h,g){if(u.type==="raw"&&g&&typeof h=="number")return o?g.children.splice(h,1):g.children[h]={type:"text",value:u.value},h;if(u.type==="element"){let f;for(f in SU)if(Object.hasOwn(SU,f)&&Object.hasOwn(u.properties,f)){const m=u.properties[f],x=SU[f];(x===null||x.includes(u.tagName))&&(u.properties[f]=l(String(m||""),f,u))}}if(u.type==="element"){let f=t?!t.includes(u.tagName):r?r.includes(u.tagName):!1;if(!f&&n&&typeof h=="number"&&(f=!n(u,h,g)),f&&g&&typeof h=="number")return a&&u.children?g.children.splice(h,1,...u.children):g.children.splice(h,1),h}}}function nGe(i){const e=i.indexOf(":"),t=i.indexOf("?"),n=i.indexOf("#"),s=i.indexOf("/");return e===-1||s!==-1&&e>s||t!==-1&&e>t||n!==-1&&e>n||XKe.test(i.slice(0,e))?i:""}function tpe(i,e){const t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let n=0,s=t.indexOf(e);for(;s!==-1;)n++,s=t.indexOf(e,s+e.length);return n}function iGe(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sGe(i,e,t){const s=zH((t||{}).ignore||[]),r=rGe(e);let o=-1;for(;++o0?{type:"text",value:D}:void 0),D===!1?g.lastIndex=C+1:(m!==C&&w.push({type:"text",value:c.value.slice(m,C)}),Array.isArray(D)?w.push(...D):D&&w.push(D),m=C+k[0].length,_=!0),!g.global)break;k=g.exec(c.value)}return _?(m?\]}]+$/.exec(i);if(!e)return[i,void 0];i=i.slice(0,e.index);let t=e[0],n=t.indexOf(")");const s=tpe(i,"(");let r=tpe(i,")");for(;n!==-1&&s>r;)i+=t.slice(0,n+1),t=t.slice(n+1),n=t.indexOf(")"),r++;return[i,t]}function CNe(i,e){const t=i.input.charCodeAt(i.index-1);return(i.index===0||rC(t)||HH(t))&&(!e||t!==47)}SNe.peek=LGe;function _Ge(){this.buffer()}function yGe(i){this.enter({type:"footnoteReference",identifier:"",label:""},i)}function wGe(){this.buffer()}function CGe(i){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},i)}function SGe(i){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Mg(this.sliceSerialize(i)).toLowerCase(),t.label=e}function kGe(i){this.exit(i)}function NGe(i){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Mg(this.sliceSerialize(i)).toLowerCase(),t.label=e}function EGe(i){this.exit(i)}function LGe(){return"["}function SNe(i,e,t,n){const s=t.createTracker(n);let r=s.move("[^");const o=t.enter("footnoteReference"),a=t.enter("reference");return r+=s.move(t.safe(t.associationId(i),{after:"]",before:r})),a(),o(),r+=s.move("]"),r}function DGe(){return{enter:{gfmFootnoteCallString:_Ge,gfmFootnoteCall:yGe,gfmFootnoteDefinitionLabelString:wGe,gfmFootnoteDefinition:CGe},exit:{gfmFootnoteCallString:SGe,gfmFootnoteCall:kGe,gfmFootnoteDefinitionLabelString:NGe,gfmFootnoteDefinition:EGe}}}function TGe(i){let e=!1;return i&&i.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:t,footnoteReference:SNe},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(n,s,r,o){const a=r.createTracker(o);let l=a.move("[^");const c=r.enter("footnoteDefinition"),u=r.enter("label");return l+=a.move(r.safe(r.associationId(n),{before:l,after:"]"})),u(),l+=a.move("]:"),n.children&&n.children.length>0&&(a.shift(4),l+=a.move((e?` +`:" ")+r.indentLines(r.containerFlow(n,a.current()),e?kNe:IGe))),c(),l}}function IGe(i,e,t){return e===0?i:kNe(i,e,t)}function kNe(i,e,t){return(t?"":" ")+i}const AGe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];NNe.peek=jGe;function RGe(){return{canContainEols:["delete"],enter:{strikethrough:PGe},exit:{strikethrough:OGe}}}function MGe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:AGe}],handlers:{delete:NNe}}}function PGe(i){this.enter({type:"delete",children:[]},i)}function OGe(i){this.exit(i)}function NNe(i,e,t,n){const s=t.createTracker(n),r=t.enter("strikethrough");let o=s.move("~~");return o+=t.containerPhrasing(i,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),r(),o}function jGe(){return"~"}function FGe(i){return i.length}function BGe(i,e){const t=e||{},n=(t.align||[]).concat(),s=t.stringLength||FGe,r=[],o=[],a=[],l=[];let c=0,u=-1;for(;++uc&&(c=i[u].length);++_l[_])&&(l[_]=k)}x.push(w)}o[u]=x,a[u]=v}let h=-1;if(typeof n=="object"&&"length"in n)for(;++hl[h]&&(l[h]=w),f[h]=w),g[h]=k}o.splice(1,0,g),a.splice(1,0,f),u=-1;const m=[];for(;++u "),r.shift(2);const o=t.indentLines(t.containerFlow(i,r.current()),VGe);return s(),o}function VGe(i,e,t){return">"+(t?"":" ")+i}function zGe(i,e){return spe(i,e.inConstruct,!0)&&!spe(i,e.notInConstruct,!1)}function spe(i,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let n=-1;for(;++no&&(o=r):r=1,s=n+e.length,n=t.indexOf(e,s);return o}function $Ge(i,e){return!!(e.options.fences===!1&&i.value&&!i.lang&&/[^ \r\n]/.test(i.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(i.value))}function qGe(i){const e=i.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function KGe(i,e,t,n){const s=qGe(t),r=i.value||"",o=s==="`"?"GraveAccent":"Tilde";if($Ge(i,t)){const h=t.enter("codeIndented"),g=t.indentLines(r,GGe);return h(),g}const a=t.createTracker(n),l=s.repeat(Math.max(UGe(r,s)+1,3)),c=t.enter("codeFenced");let u=a.move(l);if(i.lang){const h=t.enter(`codeFencedLang${o}`);u+=a.move(t.safe(i.lang,{before:u,after:" ",encode:["`"],...a.current()})),h()}if(i.lang&&i.meta){const h=t.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(t.safe(i.meta,{before:u,after:` +`,encode:["`"],...a.current()})),h()}return u+=a.move(` +`),r&&(u+=a.move(r+` +`)),u+=a.move(l),c(),u}function GGe(i,e,t){return(t?"":" ")+i}function Fse(i){const e=i.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function YGe(i,e,t,n){const s=Fse(t),r=s==='"'?"Quote":"Apostrophe",o=t.enter("definition");let a=t.enter("label");const l=t.createTracker(n);let c=l.move("[");return c+=l.move(t.safe(t.associationId(i),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!i.url||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,{before:c,after:i.title?" ":` +`,...l.current()}))),a(),i.title&&(a=t.enter(`title${r}`),c+=l.move(" "+s),c+=l.move(t.safe(i.title,{before:c,after:s,...l.current()})),c+=l.move(s),a()),o(),c}function QGe(i){const e=i.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function W2(i){return"&#x"+i.toString(16).toUpperCase()+";"}function Qj(i,e,t){const n=lL(i),s=lL(e);return n===void 0?s===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}LNe.peek=XGe;function LNe(i,e,t,n){const s=QGe(t),r=t.enter("emphasis"),o=t.createTracker(n),a=o.move(s);let l=o.move(t.containerPhrasing(i,{after:s,before:a,...o.current()}));const c=l.charCodeAt(0),u=Qj(n.before.charCodeAt(n.before.length-1),c,s);u.inside&&(l=W2(c)+l.slice(1));const h=l.charCodeAt(l.length-1),g=Qj(n.after.charCodeAt(0),h,s);g.inside&&(l=l.slice(0,-1)+W2(h));const f=o.move(s);return r(),t.attentionEncodeSurroundingInfo={after:g.outside,before:u.outside},a+l+f}function XGe(i,e,t){return t.options.emphasis||"*"}function ZGe(i,e){let t=!1;return $H(i,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return t=!0,UG}),!!((!i.depth||i.depth<3)&&Dse(i)&&(e.options.setext||t))}function JGe(i,e,t,n){const s=Math.max(Math.min(6,i.depth||1),1),r=t.createTracker(n);if(ZGe(i,t)){const u=t.enter("headingSetext"),h=t.enter("phrasing"),g=t.containerPhrasing(i,{...r.current(),before:` +`,after:` +`});return h(),u(),g+` +`+(s===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(` +`))+1))}const o="#".repeat(s),a=t.enter("headingAtx"),l=t.enter("phrasing");r.move(o+" ");let c=t.containerPhrasing(i,{before:"# ",after:` +`,...r.current()});return/^[\t ]/.test(c)&&(c=W2(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),l(),a(),c}DNe.peek=eYe;function DNe(i){return i.value||""}function eYe(){return"<"}TNe.peek=tYe;function TNe(i,e,t,n){const s=Fse(t),r=s==='"'?"Quote":"Apostrophe",o=t.enter("image");let a=t.enter("label");const l=t.createTracker(n);let c=l.move("![");return c+=l.move(t.safe(i.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,{before:c,after:i.title?" ":")",...l.current()}))),a(),i.title&&(a=t.enter(`title${r}`),c+=l.move(" "+s),c+=l.move(t.safe(i.title,{before:c,after:s,...l.current()})),c+=l.move(s),a()),c+=l.move(")"),o(),c}function tYe(){return"!"}INe.peek=nYe;function INe(i,e,t,n){const s=i.referenceType,r=t.enter("imageReference");let o=t.enter("label");const a=t.createTracker(n);let l=a.move("![");const c=t.safe(i.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=t.stack;t.stack=[],o=t.enter("reference");const h=t.safe(t.associationId(i),{before:l,after:"]",...a.current()});return o(),t.stack=u,r(),s==="full"||!c||c!==h?l+=a.move(h+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function nYe(){return"!"}ANe.peek=iYe;function ANe(i,e,t){let n=i.value||"",s="`",r=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(n);)s+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++r\u007F]/.test(i.url))}MNe.peek=sYe;function MNe(i,e,t,n){const s=Fse(t),r=s==='"'?"Quote":"Apostrophe",o=t.createTracker(n);let a,l;if(RNe(i,t)){const u=t.stack;t.stack=[],a=t.enter("autolink");let h=o.move("<");return h+=o.move(t.containerPhrasing(i,{before:h,after:">",...o.current()})),h+=o.move(">"),a(),t.stack=u,h}a=t.enter("link"),l=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(i,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(l=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(i.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=t.enter("destinationRaw"),c+=o.move(t.safe(i.url,{before:c,after:i.title?" ":")",...o.current()}))),l(),i.title&&(l=t.enter(`title${r}`),c+=o.move(" "+s),c+=o.move(t.safe(i.title,{before:c,after:s,...o.current()})),c+=o.move(s),l()),c+=o.move(")"),a(),c}function sYe(i,e,t){return RNe(i,t)?"<":"["}PNe.peek=rYe;function PNe(i,e,t,n){const s=i.referenceType,r=t.enter("linkReference");let o=t.enter("label");const a=t.createTracker(n);let l=a.move("[");const c=t.containerPhrasing(i,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=t.stack;t.stack=[],o=t.enter("reference");const h=t.safe(t.associationId(i),{before:l,after:"]",...a.current()});return o(),t.stack=u,r(),s==="full"||!c||c!==h?l+=a.move(h+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function rYe(){return"["}function Bse(i){const e=i.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function oYe(i){const e=Bse(i),t=i.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function aYe(i){const e=i.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function ONe(i){const e=i.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function lYe(i,e,t,n){const s=t.enter("list"),r=t.bulletCurrent;let o=i.ordered?aYe(t):Bse(t);const a=i.ordered?o==="."?")":".":oYe(t);let l=e&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!i.ordered){const u=i.children?i.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),ONe(t)===o&&u){let h=-1;for(;++h-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(i))+r);let o=r.length+1;(s==="tab"||s==="mixed"&&(e&&e.type==="list"&&e.spread||i.spread))&&(o=Math.ceil(o/4)*4);const a=t.createTracker(n);a.move(r+" ".repeat(o-r.length)),a.shift(o);const l=t.enter("listItem"),c=t.indentLines(t.containerFlow(i,a.current()),u);return l(),c;function u(h,g,f){return g?(f?"":" ".repeat(o))+h:(f?r:r+" ".repeat(o-r.length))+h}}function uYe(i,e,t,n){const s=t.enter("paragraph"),r=t.enter("phrasing"),o=t.containerPhrasing(i,n);return r(),s(),o}const hYe=zH(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gYe(i,e,t,n){return(i.children.some(function(o){return hYe(o)})?t.containerPhrasing:t.containerFlow).call(t,i,n)}function fYe(i){const e=i.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}jNe.peek=pYe;function jNe(i,e,t,n){const s=fYe(t),r=t.enter("strong"),o=t.createTracker(n),a=o.move(s+s);let l=o.move(t.containerPhrasing(i,{after:s,before:a,...o.current()}));const c=l.charCodeAt(0),u=Qj(n.before.charCodeAt(n.before.length-1),c,s);u.inside&&(l=W2(c)+l.slice(1));const h=l.charCodeAt(l.length-1),g=Qj(n.after.charCodeAt(0),h,s);g.inside&&(l=l.slice(0,-1)+W2(h));const f=o.move(s+s);return r(),t.attentionEncodeSurroundingInfo={after:g.outside,before:u.outside},a+l+f}function pYe(i,e,t){return t.options.strong||"*"}function mYe(i,e,t,n){return t.safe(i.value,n)}function bYe(i){const e=i.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function xYe(i,e,t){const n=(ONe(t)+(t.options.ruleSpaces?" ":"")).repeat(bYe(t));return t.options.ruleSpaces?n.slice(0,-1):n}const FNe={blockquote:WGe,break:rpe,code:KGe,definition:YGe,emphasis:LNe,hardBreak:rpe,heading:JGe,html:DNe,image:TNe,imageReference:INe,inlineCode:ANe,link:MNe,linkReference:PNe,list:lYe,listItem:dYe,paragraph:uYe,root:gYe,strong:jNe,text:mYe,thematicBreak:xYe};function vYe(){return{enter:{table:_Ye,tableData:ope,tableHeader:ope,tableRow:wYe},exit:{codeText:CYe,table:yYe,tableData:FU,tableHeader:FU,tableRow:FU}}}function _Ye(i){const e=i._align;this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},i),this.data.inTable=!0}function yYe(i){this.exit(i),this.data.inTable=void 0}function wYe(i){this.enter({type:"tableRow",children:[]},i)}function FU(i){this.exit(i)}function ope(i){this.enter({type:"tableCell",children:[]},i)}function CYe(i){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,SYe));const t=this.stack[this.stack.length-1];t.type,t.value=e,this.exit(i)}function SYe(i,e){return e==="|"?e:i}function kYe(i){const e=i||{},t=e.tableCellPadding,n=e.tablePipeAlign,s=e.stringLength,r=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:o,tableCell:l,tableRow:a}};function o(f,m,x,v){return c(u(f,x,v),f.align)}function a(f,m,x,v){const _=h(f,x,v),w=c([_]);return w.slice(0,w.indexOf(` +`))}function l(f,m,x,v){const _=x.enter("tableCell"),w=x.enter("phrasing"),k=x.containerPhrasing(f,{...v,before:r,after:r});return w(),_(),k}function c(f,m){return BGe(f,{align:m,alignDelimiters:n,padding:t,stringLength:s})}function u(f,m,x){const v=f.children;let _=-1;const w=[],k=m.enter("table");for(;++_0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const zYe={tokenize:XYe,partial:!0};function UYe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GYe,continuation:{tokenize:YYe},exit:QYe}},text:{91:{name:"gfmFootnoteCall",tokenize:KYe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$Ye,resolveTo:qYe}}}}function $Ye(i,e,t){const n=this;let s=n.events.length;const r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;s--;){const l=n.events[s][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return t(l);const c=Mg(n.sliceSerialize({start:o.end,end:n.now()}));return c.codePointAt(0)!==94||!r.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function qYe(i,e){let t=i.length;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},i[t+3][1].start),end:Object.assign({},i[i.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},i[t+3][1].end),end:Object.assign({},i[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const r={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},i[i.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},r.start),end:Object.assign({},r.end)},a=[i[t+1],i[t+2],["enter",n,e],i[t+3],i[t+4],["enter",s,e],["exit",s,e],["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e],i[i.length-2],i[i.length-1],["exit",n,e]];return i.splice(t,i.length-t+1,...a),i}function KYe(i,e,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let r=0,o;return a;function a(h){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?t(h):(i.enter("gfmFootnoteCallMarker"),i.consume(h),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(h){if(r>999||h===93&&!o||h===null||h===91||Mr(h))return t(h);if(h===93){i.exit("chunkString");const g=i.exit("gfmFootnoteCallString");return s.includes(Mg(n.sliceSerialize(g)))?(i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e):t(h)}return Mr(h)||(o=!0),r++,i.consume(h),h===92?u:c}function u(h){return h===91||h===92||h===93?(i.consume(h),r++,c):c(h)}}function GYe(i,e,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let r,o=0,a;return l;function l(m){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),i.enter("chunkString").contentType="string",u):t(m)}function u(m){if(o>999||m===93&&!a||m===null||m===91||Mr(m))return t(m);if(m===93){i.exit("chunkString");const x=i.exit("gfmFootnoteDefinitionLabelString");return r=Mg(n.sliceSerialize(x)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),g}return Mr(m)||(a=!0),o++,i.consume(m),m===92?h:u}function h(m){return m===91||m===92||m===93?(i.consume(m),o++,u):u(m)}function g(m){return m===58?(i.enter("definitionMarker"),i.consume(m),i.exit("definitionMarker"),s.includes(r)||s.push(r),ms(i,f,"gfmFootnoteDefinitionWhitespace")):t(m)}function f(m){return e(m)}}function YYe(i,e,t){return i.check(hP,e,i.attempt(zYe,e,t))}function QYe(i){i.exit("gfmFootnoteDefinition")}function XYe(i,e,t){const n=this;return ms(i,s,"gfmFootnoteDefinitionIndent",5);function s(r){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(r):t(r)}}function ZYe(i){let t=(i||{}).singleTilde;const n={name:"strikethrough",tokenize:r,resolveAll:s};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function s(o,a){let l=-1;for(;++l1?l(m):(o.consume(m),h++,f);if(h<2&&!t)return l(m);const v=o.exit("strikethroughSequenceTemporary"),_=lL(m);return v._open=!_||_===2&&!!x,v._close=!x||x===2&&!!_,a(m)}}}class JYe{constructor(){this.map=[]}add(e,t,n){eQe(this,e,t,n)}consume(e){if(this.map.sort(function(r,o){return r[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let s=n.pop();for(;s;){for(const r of s)e.push(r);s=n.pop()}this.map.length=0}}function eQe(i,e,t,n){let s=0;if(!(t===0&&n.length===0)){for(;s-1;){const $=n.events[j][1].type;if($==="lineEnding"||$==="linePrefix")j--;else break}const B=j>-1?n.events[j][1].type:null,H=B==="tableHead"||B==="tableRow"?D:l;return H===D&&n.parser.lazy[n.now().line]?t(P):H(P)}function l(P){return i.enter("tableHead"),i.enter("tableRow"),c(P)}function c(P){return P===124||(o=!0,r+=1),u(P)}function u(P){return P===null?t(P):Mn(P)?r>1?(r=0,n.interrupt=!0,i.exit("tableRow"),i.enter("lineEnding"),i.consume(P),i.exit("lineEnding"),f):t(P):Wi(P)?ms(i,u,"whitespace")(P):(r+=1,o&&(o=!1,s+=1),P===124?(i.enter("tableCellDivider"),i.consume(P),i.exit("tableCellDivider"),o=!0,u):(i.enter("data"),h(P)))}function h(P){return P===null||P===124||Mr(P)?(i.exit("data"),u(P)):(i.consume(P),P===92?g:h)}function g(P){return P===92||P===124?(i.consume(P),h):h(P)}function f(P){return n.interrupt=!1,n.parser.lazy[n.now().line]?t(P):(i.enter("tableDelimiterRow"),o=!1,Wi(P)?ms(i,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):m(P))}function m(P){return P===45||P===58?v(P):P===124?(o=!0,i.enter("tableCellDivider"),i.consume(P),i.exit("tableCellDivider"),x):E(P)}function x(P){return Wi(P)?ms(i,v,"whitespace")(P):v(P)}function v(P){return P===58?(r+=1,o=!0,i.enter("tableDelimiterMarker"),i.consume(P),i.exit("tableDelimiterMarker"),_):P===45?(r+=1,_(P)):P===null||Mn(P)?C(P):E(P)}function _(P){return P===45?(i.enter("tableDelimiterFiller"),w(P)):E(P)}function w(P){return P===45?(i.consume(P),w):P===58?(o=!0,i.exit("tableDelimiterFiller"),i.enter("tableDelimiterMarker"),i.consume(P),i.exit("tableDelimiterMarker"),k):(i.exit("tableDelimiterFiller"),k(P))}function k(P){return Wi(P)?ms(i,C,"whitespace")(P):C(P)}function C(P){return P===124?m(P):P===null||Mn(P)?!o||s!==r?E(P):(i.exit("tableDelimiterRow"),i.exit("tableHead"),e(P)):E(P)}function E(P){return t(P)}function D(P){return i.enter("tableRow"),T(P)}function T(P){return P===124?(i.enter("tableCellDivider"),i.consume(P),i.exit("tableCellDivider"),T):P===null||Mn(P)?(i.exit("tableRow"),e(P)):Wi(P)?ms(i,T,"whitespace")(P):(i.enter("data"),I(P))}function I(P){return P===null||P===124||Mr(P)?(i.exit("data"),T(P)):(i.consume(P),P===92?R:I)}function R(P){return P===92||P===124?(i.consume(P),I):I(P)}}function sQe(i,e){let t=-1,n=!0,s=0,r=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,h;const g=new JYe;for(;++tt[2]+1){const m=t[2]+1,x=t[3]-t[2]-1;i.add(m,x,[])}}i.add(t[3]+1,0,[["exit",h,e]])}return s!==void 0&&(r.end=Object.assign({},Wk(e.events,s)),i.add(s,0,[["exit",r,e]]),r=void 0),r}function lpe(i,e,t,n,s){const r=[],o=Wk(e.events,t);s&&(s.end=Object.assign({},o),r.push(["exit",s,e])),n.end=Object.assign({},o),r.push(["exit",n,e]),i.add(t+1,0,r)}function Wk(i,e){const t=i[e],n=t[0]==="enter"?"start":"end";return t[1][n]}const rQe={name:"tasklistCheck",tokenize:aQe};function oQe(){return{text:{91:rQe}}}function aQe(i,e,t){const n=this;return s;function s(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(l):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),r)}function r(l){return Mr(l)?(i.enter("taskListCheckValueUnchecked"),i.consume(l),i.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(i.enter("taskListCheckValueChecked"),i.consume(l),i.exit("taskListCheckValueChecked"),o):t(l)}function o(l){return l===93?(i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),a):t(l)}function a(l){return Mn(l)?e(l):Wi(l)?i.check({tokenize:lQe},e,t)(l):t(l)}}function lQe(i,e,t){return ms(i,n,"whitespace");function n(s){return s===null?t(s):e(s)}}function cQe(i){return nNe([MYe(),UYe(),ZYe(i),nQe(),oQe()])}const dQe={};function Wse(i){const e=this,t=i||dQe,n=e.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),r=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(cQe(t)),r.push(TYe()),o.push(IYe(t))}const cpe=/[#.]/g;function uQe(i,e){const t=i||"",n={};let s=0,r,o;for(;s-1&&r<=e.length){let o=0;for(;;){let a=t[o];if(a===void 0){const l=upe(e,t[o-1]);a=l===-1?e.length+1:l+1,t[o]=a}if(a>r)return{line:o+1,column:r-(o>0?t[o-1]:0)+1,offset:r};o++}}}function s(r){if(r&&typeof r.line=="number"&&typeof r.column=="number"&&!Number.isNaN(r.line)&&!Number.isNaN(r.column)){for(;t.length1?t[r.line-2]:0)+r.column-1;if(o=55296&&i<=57343}function OQe(i){return i>=56320&&i<=57343}function jQe(i,e){return(i-55296)*1024+9216+e}function ZNe(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159}function JNe(i){return i>=64976&&i<=65007||PQe.has(i)}var Je;(function(i){i.controlCharacterInInputStream="control-character-in-input-stream",i.noncharacterInInputStream="noncharacter-in-input-stream",i.surrogateInInputStream="surrogate-in-input-stream",i.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",i.endTagWithAttributes="end-tag-with-attributes",i.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",i.unexpectedSolidusInTag="unexpected-solidus-in-tag",i.unexpectedNullCharacter="unexpected-null-character",i.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",i.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",i.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",i.missingEndTagName="missing-end-tag-name",i.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",i.unknownNamedCharacterReference="unknown-named-character-reference",i.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",i.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",i.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",i.eofBeforeTagName="eof-before-tag-name",i.eofInTag="eof-in-tag",i.missingAttributeValue="missing-attribute-value",i.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",i.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",i.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",i.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",i.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",i.missingDoctypePublicIdentifier="missing-doctype-public-identifier",i.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",i.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",i.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",i.cdataInHtmlContent="cdata-in-html-content",i.incorrectlyOpenedComment="incorrectly-opened-comment",i.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",i.eofInDoctype="eof-in-doctype",i.nestedComment="nested-comment",i.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",i.eofInComment="eof-in-comment",i.incorrectlyClosedComment="incorrectly-closed-comment",i.eofInCdata="eof-in-cdata",i.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",i.nullCharacterReference="null-character-reference",i.surrogateCharacterReference="surrogate-character-reference",i.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",i.controlCharacterReference="control-character-reference",i.noncharacterCharacterReference="noncharacter-character-reference",i.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",i.missingDoctypeName="missing-doctype-name",i.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",i.duplicateAttribute="duplicate-attribute",i.nonConformingDoctype="non-conforming-doctype",i.missingDoctype="missing-doctype",i.misplacedDoctype="misplaced-doctype",i.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",i.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",i.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",i.openElementsLeftAfterEof="open-elements-left-after-eof",i.abandonedHeadElementChild="abandoned-head-element-child",i.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",i.nestedNoscriptInHead="nested-noscript-in-head",i.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Je||(Je={}));const FQe=65536;class BQe{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=FQe,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:s,offset:r}=this,o=s+t,a=r+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:a,endOffset:a}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(OQe(t))return this.pos++,this._addGap(),jQe(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,oe.EOF;return this._err(Je.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,oe.EOF;const n=this.html.charCodeAt(t);return n===oe.CARRIAGE_RETURN?oe.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,oe.EOF;let e=this.html.charCodeAt(this.pos);return e===oe.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,oe.LINE_FEED):e===oe.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,XNe(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===oe.LINE_FEED||e===oe.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){ZNe(e)?this._err(Je.controlCharacterInInputStream):JNe(e)&&this._err(Je.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;t--)if(i.attrs[t].name===e)return i.attrs[t].value;return null}const HQe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(i=>i.charCodeAt(0))),WQe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function VQe(i){var e;return i>=55296&&i<=57343||i>1114111?65533:(e=WQe.get(i))!==null&&e!==void 0?e:i}var ol;(function(i){i[i.NUM=35]="NUM",i[i.SEMI=59]="SEMI",i[i.EQUALS=61]="EQUALS",i[i.ZERO=48]="ZERO",i[i.NINE=57]="NINE",i[i.LOWER_A=97]="LOWER_A",i[i.LOWER_F=102]="LOWER_F",i[i.LOWER_X=120]="LOWER_X",i[i.LOWER_Z=122]="LOWER_Z",i[i.UPPER_A=65]="UPPER_A",i[i.UPPER_F=70]="UPPER_F",i[i.UPPER_Z=90]="UPPER_Z"})(ol||(ol={}));const zQe=32;var Vv;(function(i){i[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.BRANCH_LENGTH=16256]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE"})(Vv||(Vv={}));function QG(i){return i>=ol.ZERO&&i<=ol.NINE}function UQe(i){return i>=ol.UPPER_A&&i<=ol.UPPER_F||i>=ol.LOWER_A&&i<=ol.LOWER_F}function $Qe(i){return i>=ol.UPPER_A&&i<=ol.UPPER_Z||i>=ol.LOWER_A&&i<=ol.LOWER_Z||QG(i)}function qQe(i){return i===ol.EQUALS||$Qe(i)}var Ga;(function(i){i[i.EntityStart=0]="EntityStart",i[i.NumericStart=1]="NumericStart",i[i.NumericDecimal=2]="NumericDecimal",i[i.NumericHex=3]="NumericHex",i[i.NamedEntity=4]="NamedEntity"})(Ga||(Ga={}));var tb;(function(i){i[i.Legacy=0]="Legacy",i[i.Strict=1]="Strict",i[i.Attribute=2]="Attribute"})(tb||(tb={}));class KQe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Ga.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=tb.Strict}startEntity(e){this.decodeMode=e,this.state=Ga.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ga.EntityStart:return e.charCodeAt(t)===ol.NUM?(this.state=Ga.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ga.NamedEntity,this.stateNamedEntity(e,t));case Ga.NumericStart:return this.stateNumericStart(e,t);case Ga.NumericDecimal:return this.stateNumericDecimal(e,t);case Ga.NumericHex:return this.stateNumericHex(e,t);case Ga.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|zQe)===ol.LOWER_X?(this.state=Ga.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ga.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,s){if(t!==n){const r=n-t;this.result=this.result*Math.pow(s,r)+Number.parseInt(e.substr(t,r),s),this.consumed+=r}}stateNumericHex(e,t){const n=t;for(;t>14;for(;t>14,r!==0){if(o===ol.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==tb.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,s=(n[t]&Vv.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,s,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:s}=this;return this.emitCodePoint(t===1?s[e]&~Vv.VALUE_LENGTH:s[e+1],n),t===3&&this.emitCodePoint(s[e+2],n),n}end(){var e;switch(this.state){case Ga.NamedEntity:return this.result!==0&&(this.decodeMode!==tb.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ga.NumericDecimal:return this.emitNumericEntity(0,2);case Ga.NumericHex:return this.emitNumericEntity(0,3);case Ga.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ga.EntityStart:return 0}}}function GQe(i,e,t,n){const s=(e&Vv.BRANCH_LENGTH)>>7,r=e&Vv.JUMP_TABLE;if(s===0)return r!==0&&n===r?t:-1;if(r){const l=n-r;return l<0||l>=s?-1:i[t+l]-1}let o=t,a=o+s-1;for(;o<=a;){const l=o+a>>>1,c=i[l];if(cn)a=l-1;else return i[l+s]}return-1}var bt;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.MATHML="http://www.w3.org/1998/Math/MathML",i.SVG="http://www.w3.org/2000/svg",i.XLINK="http://www.w3.org/1999/xlink",i.XML="http://www.w3.org/XML/1998/namespace",i.XMLNS="http://www.w3.org/2000/xmlns/"})(bt||(bt={}));var F1;(function(i){i.TYPE="type",i.ACTION="action",i.ENCODING="encoding",i.PROMPT="prompt",i.NAME="name",i.COLOR="color",i.FACE="face",i.SIZE="size"})(F1||(F1={}));var Nh;(function(i){i.NO_QUIRKS="no-quirks",i.QUIRKS="quirks",i.LIMITED_QUIRKS="limited-quirks"})(Nh||(Nh={}));var je;(function(i){i.A="a",i.ADDRESS="address",i.ANNOTATION_XML="annotation-xml",i.APPLET="applet",i.AREA="area",i.ARTICLE="article",i.ASIDE="aside",i.B="b",i.BASE="base",i.BASEFONT="basefont",i.BGSOUND="bgsound",i.BIG="big",i.BLOCKQUOTE="blockquote",i.BODY="body",i.BR="br",i.BUTTON="button",i.CAPTION="caption",i.CENTER="center",i.CODE="code",i.COL="col",i.COLGROUP="colgroup",i.DD="dd",i.DESC="desc",i.DETAILS="details",i.DIALOG="dialog",i.DIR="dir",i.DIV="div",i.DL="dl",i.DT="dt",i.EM="em",i.EMBED="embed",i.FIELDSET="fieldset",i.FIGCAPTION="figcaption",i.FIGURE="figure",i.FONT="font",i.FOOTER="footer",i.FOREIGN_OBJECT="foreignObject",i.FORM="form",i.FRAME="frame",i.FRAMESET="frameset",i.H1="h1",i.H2="h2",i.H3="h3",i.H4="h4",i.H5="h5",i.H6="h6",i.HEAD="head",i.HEADER="header",i.HGROUP="hgroup",i.HR="hr",i.HTML="html",i.I="i",i.IMG="img",i.IMAGE="image",i.INPUT="input",i.IFRAME="iframe",i.KEYGEN="keygen",i.LABEL="label",i.LI="li",i.LINK="link",i.LISTING="listing",i.MAIN="main",i.MALIGNMARK="malignmark",i.MARQUEE="marquee",i.MATH="math",i.MENU="menu",i.META="meta",i.MGLYPH="mglyph",i.MI="mi",i.MO="mo",i.MN="mn",i.MS="ms",i.MTEXT="mtext",i.NAV="nav",i.NOBR="nobr",i.NOFRAMES="noframes",i.NOEMBED="noembed",i.NOSCRIPT="noscript",i.OBJECT="object",i.OL="ol",i.OPTGROUP="optgroup",i.OPTION="option",i.P="p",i.PARAM="param",i.PLAINTEXT="plaintext",i.PRE="pre",i.RB="rb",i.RP="rp",i.RT="rt",i.RTC="rtc",i.RUBY="ruby",i.S="s",i.SCRIPT="script",i.SEARCH="search",i.SECTION="section",i.SELECT="select",i.SOURCE="source",i.SMALL="small",i.SPAN="span",i.STRIKE="strike",i.STRONG="strong",i.STYLE="style",i.SUB="sub",i.SUMMARY="summary",i.SUP="sup",i.TABLE="table",i.TBODY="tbody",i.TEMPLATE="template",i.TEXTAREA="textarea",i.TFOOT="tfoot",i.TD="td",i.TH="th",i.THEAD="thead",i.TITLE="title",i.TR="tr",i.TRACK="track",i.TT="tt",i.U="u",i.UL="ul",i.SVG="svg",i.VAR="var",i.WBR="wbr",i.XMP="xmp"})(je||(je={}));var O;(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.A=1]="A",i[i.ADDRESS=2]="ADDRESS",i[i.ANNOTATION_XML=3]="ANNOTATION_XML",i[i.APPLET=4]="APPLET",i[i.AREA=5]="AREA",i[i.ARTICLE=6]="ARTICLE",i[i.ASIDE=7]="ASIDE",i[i.B=8]="B",i[i.BASE=9]="BASE",i[i.BASEFONT=10]="BASEFONT",i[i.BGSOUND=11]="BGSOUND",i[i.BIG=12]="BIG",i[i.BLOCKQUOTE=13]="BLOCKQUOTE",i[i.BODY=14]="BODY",i[i.BR=15]="BR",i[i.BUTTON=16]="BUTTON",i[i.CAPTION=17]="CAPTION",i[i.CENTER=18]="CENTER",i[i.CODE=19]="CODE",i[i.COL=20]="COL",i[i.COLGROUP=21]="COLGROUP",i[i.DD=22]="DD",i[i.DESC=23]="DESC",i[i.DETAILS=24]="DETAILS",i[i.DIALOG=25]="DIALOG",i[i.DIR=26]="DIR",i[i.DIV=27]="DIV",i[i.DL=28]="DL",i[i.DT=29]="DT",i[i.EM=30]="EM",i[i.EMBED=31]="EMBED",i[i.FIELDSET=32]="FIELDSET",i[i.FIGCAPTION=33]="FIGCAPTION",i[i.FIGURE=34]="FIGURE",i[i.FONT=35]="FONT",i[i.FOOTER=36]="FOOTER",i[i.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",i[i.FORM=38]="FORM",i[i.FRAME=39]="FRAME",i[i.FRAMESET=40]="FRAMESET",i[i.H1=41]="H1",i[i.H2=42]="H2",i[i.H3=43]="H3",i[i.H4=44]="H4",i[i.H5=45]="H5",i[i.H6=46]="H6",i[i.HEAD=47]="HEAD",i[i.HEADER=48]="HEADER",i[i.HGROUP=49]="HGROUP",i[i.HR=50]="HR",i[i.HTML=51]="HTML",i[i.I=52]="I",i[i.IMG=53]="IMG",i[i.IMAGE=54]="IMAGE",i[i.INPUT=55]="INPUT",i[i.IFRAME=56]="IFRAME",i[i.KEYGEN=57]="KEYGEN",i[i.LABEL=58]="LABEL",i[i.LI=59]="LI",i[i.LINK=60]="LINK",i[i.LISTING=61]="LISTING",i[i.MAIN=62]="MAIN",i[i.MALIGNMARK=63]="MALIGNMARK",i[i.MARQUEE=64]="MARQUEE",i[i.MATH=65]="MATH",i[i.MENU=66]="MENU",i[i.META=67]="META",i[i.MGLYPH=68]="MGLYPH",i[i.MI=69]="MI",i[i.MO=70]="MO",i[i.MN=71]="MN",i[i.MS=72]="MS",i[i.MTEXT=73]="MTEXT",i[i.NAV=74]="NAV",i[i.NOBR=75]="NOBR",i[i.NOFRAMES=76]="NOFRAMES",i[i.NOEMBED=77]="NOEMBED",i[i.NOSCRIPT=78]="NOSCRIPT",i[i.OBJECT=79]="OBJECT",i[i.OL=80]="OL",i[i.OPTGROUP=81]="OPTGROUP",i[i.OPTION=82]="OPTION",i[i.P=83]="P",i[i.PARAM=84]="PARAM",i[i.PLAINTEXT=85]="PLAINTEXT",i[i.PRE=86]="PRE",i[i.RB=87]="RB",i[i.RP=88]="RP",i[i.RT=89]="RT",i[i.RTC=90]="RTC",i[i.RUBY=91]="RUBY",i[i.S=92]="S",i[i.SCRIPT=93]="SCRIPT",i[i.SEARCH=94]="SEARCH",i[i.SECTION=95]="SECTION",i[i.SELECT=96]="SELECT",i[i.SOURCE=97]="SOURCE",i[i.SMALL=98]="SMALL",i[i.SPAN=99]="SPAN",i[i.STRIKE=100]="STRIKE",i[i.STRONG=101]="STRONG",i[i.STYLE=102]="STYLE",i[i.SUB=103]="SUB",i[i.SUMMARY=104]="SUMMARY",i[i.SUP=105]="SUP",i[i.TABLE=106]="TABLE",i[i.TBODY=107]="TBODY",i[i.TEMPLATE=108]="TEMPLATE",i[i.TEXTAREA=109]="TEXTAREA",i[i.TFOOT=110]="TFOOT",i[i.TD=111]="TD",i[i.TH=112]="TH",i[i.THEAD=113]="THEAD",i[i.TITLE=114]="TITLE",i[i.TR=115]="TR",i[i.TRACK=116]="TRACK",i[i.TT=117]="TT",i[i.U=118]="U",i[i.UL=119]="UL",i[i.SVG=120]="SVG",i[i.VAR=121]="VAR",i[i.WBR=122]="WBR",i[i.XMP=123]="XMP"})(O||(O={}));const YQe=new Map([[je.A,O.A],[je.ADDRESS,O.ADDRESS],[je.ANNOTATION_XML,O.ANNOTATION_XML],[je.APPLET,O.APPLET],[je.AREA,O.AREA],[je.ARTICLE,O.ARTICLE],[je.ASIDE,O.ASIDE],[je.B,O.B],[je.BASE,O.BASE],[je.BASEFONT,O.BASEFONT],[je.BGSOUND,O.BGSOUND],[je.BIG,O.BIG],[je.BLOCKQUOTE,O.BLOCKQUOTE],[je.BODY,O.BODY],[je.BR,O.BR],[je.BUTTON,O.BUTTON],[je.CAPTION,O.CAPTION],[je.CENTER,O.CENTER],[je.CODE,O.CODE],[je.COL,O.COL],[je.COLGROUP,O.COLGROUP],[je.DD,O.DD],[je.DESC,O.DESC],[je.DETAILS,O.DETAILS],[je.DIALOG,O.DIALOG],[je.DIR,O.DIR],[je.DIV,O.DIV],[je.DL,O.DL],[je.DT,O.DT],[je.EM,O.EM],[je.EMBED,O.EMBED],[je.FIELDSET,O.FIELDSET],[je.FIGCAPTION,O.FIGCAPTION],[je.FIGURE,O.FIGURE],[je.FONT,O.FONT],[je.FOOTER,O.FOOTER],[je.FOREIGN_OBJECT,O.FOREIGN_OBJECT],[je.FORM,O.FORM],[je.FRAME,O.FRAME],[je.FRAMESET,O.FRAMESET],[je.H1,O.H1],[je.H2,O.H2],[je.H3,O.H3],[je.H4,O.H4],[je.H5,O.H5],[je.H6,O.H6],[je.HEAD,O.HEAD],[je.HEADER,O.HEADER],[je.HGROUP,O.HGROUP],[je.HR,O.HR],[je.HTML,O.HTML],[je.I,O.I],[je.IMG,O.IMG],[je.IMAGE,O.IMAGE],[je.INPUT,O.INPUT],[je.IFRAME,O.IFRAME],[je.KEYGEN,O.KEYGEN],[je.LABEL,O.LABEL],[je.LI,O.LI],[je.LINK,O.LINK],[je.LISTING,O.LISTING],[je.MAIN,O.MAIN],[je.MALIGNMARK,O.MALIGNMARK],[je.MARQUEE,O.MARQUEE],[je.MATH,O.MATH],[je.MENU,O.MENU],[je.META,O.META],[je.MGLYPH,O.MGLYPH],[je.MI,O.MI],[je.MO,O.MO],[je.MN,O.MN],[je.MS,O.MS],[je.MTEXT,O.MTEXT],[je.NAV,O.NAV],[je.NOBR,O.NOBR],[je.NOFRAMES,O.NOFRAMES],[je.NOEMBED,O.NOEMBED],[je.NOSCRIPT,O.NOSCRIPT],[je.OBJECT,O.OBJECT],[je.OL,O.OL],[je.OPTGROUP,O.OPTGROUP],[je.OPTION,O.OPTION],[je.P,O.P],[je.PARAM,O.PARAM],[je.PLAINTEXT,O.PLAINTEXT],[je.PRE,O.PRE],[je.RB,O.RB],[je.RP,O.RP],[je.RT,O.RT],[je.RTC,O.RTC],[je.RUBY,O.RUBY],[je.S,O.S],[je.SCRIPT,O.SCRIPT],[je.SEARCH,O.SEARCH],[je.SECTION,O.SECTION],[je.SELECT,O.SELECT],[je.SOURCE,O.SOURCE],[je.SMALL,O.SMALL],[je.SPAN,O.SPAN],[je.STRIKE,O.STRIKE],[je.STRONG,O.STRONG],[je.STYLE,O.STYLE],[je.SUB,O.SUB],[je.SUMMARY,O.SUMMARY],[je.SUP,O.SUP],[je.TABLE,O.TABLE],[je.TBODY,O.TBODY],[je.TEMPLATE,O.TEMPLATE],[je.TEXTAREA,O.TEXTAREA],[je.TFOOT,O.TFOOT],[je.TD,O.TD],[je.TH,O.TH],[je.THEAD,O.THEAD],[je.TITLE,O.TITLE],[je.TR,O.TR],[je.TRACK,O.TRACK],[je.TT,O.TT],[je.U,O.U],[je.UL,O.UL],[je.SVG,O.SVG],[je.VAR,O.VAR],[je.WBR,O.WBR],[je.XMP,O.XMP]]);function uD(i){var e;return(e=YQe.get(i))!==null&&e!==void 0?e:O.UNKNOWN}const wt=O,QQe={[bt.HTML]:new Set([wt.ADDRESS,wt.APPLET,wt.AREA,wt.ARTICLE,wt.ASIDE,wt.BASE,wt.BASEFONT,wt.BGSOUND,wt.BLOCKQUOTE,wt.BODY,wt.BR,wt.BUTTON,wt.CAPTION,wt.CENTER,wt.COL,wt.COLGROUP,wt.DD,wt.DETAILS,wt.DIR,wt.DIV,wt.DL,wt.DT,wt.EMBED,wt.FIELDSET,wt.FIGCAPTION,wt.FIGURE,wt.FOOTER,wt.FORM,wt.FRAME,wt.FRAMESET,wt.H1,wt.H2,wt.H3,wt.H4,wt.H5,wt.H6,wt.HEAD,wt.HEADER,wt.HGROUP,wt.HR,wt.HTML,wt.IFRAME,wt.IMG,wt.INPUT,wt.LI,wt.LINK,wt.LISTING,wt.MAIN,wt.MARQUEE,wt.MENU,wt.META,wt.NAV,wt.NOEMBED,wt.NOFRAMES,wt.NOSCRIPT,wt.OBJECT,wt.OL,wt.P,wt.PARAM,wt.PLAINTEXT,wt.PRE,wt.SCRIPT,wt.SECTION,wt.SELECT,wt.SOURCE,wt.STYLE,wt.SUMMARY,wt.TABLE,wt.TBODY,wt.TD,wt.TEMPLATE,wt.TEXTAREA,wt.TFOOT,wt.TH,wt.THEAD,wt.TITLE,wt.TR,wt.TRACK,wt.UL,wt.WBR,wt.XMP]),[bt.MATHML]:new Set([wt.MI,wt.MO,wt.MN,wt.MS,wt.MTEXT,wt.ANNOTATION_XML]),[bt.SVG]:new Set([wt.TITLE,wt.FOREIGN_OBJECT,wt.DESC]),[bt.XLINK]:new Set,[bt.XML]:new Set,[bt.XMLNS]:new Set},XG=new Set([wt.H1,wt.H2,wt.H3,wt.H4,wt.H5,wt.H6]);je.STYLE,je.SCRIPT,je.XMP,je.IFRAME,je.NOEMBED,je.NOFRAMES,je.PLAINTEXT;var ce;(function(i){i[i.DATA=0]="DATA",i[i.RCDATA=1]="RCDATA",i[i.RAWTEXT=2]="RAWTEXT",i[i.SCRIPT_DATA=3]="SCRIPT_DATA",i[i.PLAINTEXT=4]="PLAINTEXT",i[i.TAG_OPEN=5]="TAG_OPEN",i[i.END_TAG_OPEN=6]="END_TAG_OPEN",i[i.TAG_NAME=7]="TAG_NAME",i[i.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",i[i.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",i[i.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",i[i.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",i[i.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",i[i.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",i[i.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",i[i.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",i[i.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",i[i.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",i[i.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",i[i.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",i[i.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",i[i.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",i[i.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",i[i.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",i[i.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",i[i.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",i[i.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",i[i.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",i[i.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",i[i.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",i[i.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",i[i.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",i[i.BOGUS_COMMENT=40]="BOGUS_COMMENT",i[i.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",i[i.COMMENT_START=42]="COMMENT_START",i[i.COMMENT_START_DASH=43]="COMMENT_START_DASH",i[i.COMMENT=44]="COMMENT",i[i.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",i[i.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",i[i.COMMENT_END_DASH=49]="COMMENT_END_DASH",i[i.COMMENT_END=50]="COMMENT_END",i[i.COMMENT_END_BANG=51]="COMMENT_END_BANG",i[i.DOCTYPE=52]="DOCTYPE",i[i.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",i[i.DOCTYPE_NAME=54]="DOCTYPE_NAME",i[i.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",i[i.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",i[i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",i[i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",i[i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",i[i.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",i[i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",i[i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",i[i.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",i[i.CDATA_SECTION=68]="CDATA_SECTION",i[i.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",i[i.CDATA_SECTION_END=70]="CDATA_SECTION_END",i[i.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",i[i.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(ce||(ce={}));const qo={DATA:ce.DATA,RCDATA:ce.RCDATA,RAWTEXT:ce.RAWTEXT,SCRIPT_DATA:ce.SCRIPT_DATA,PLAINTEXT:ce.PLAINTEXT,CDATA_SECTION:ce.CDATA_SECTION};function XQe(i){return i>=oe.DIGIT_0&&i<=oe.DIGIT_9}function jI(i){return i>=oe.LATIN_CAPITAL_A&&i<=oe.LATIN_CAPITAL_Z}function ZQe(i){return i>=oe.LATIN_SMALL_A&&i<=oe.LATIN_SMALL_Z}function nv(i){return ZQe(i)||jI(i)}function gpe(i){return nv(i)||XQe(i)}function H5(i){return i+32}function tEe(i){return i===oe.SPACE||i===oe.LINE_FEED||i===oe.TABULATION||i===oe.FORM_FEED}function fpe(i){return tEe(i)||i===oe.SOLIDUS||i===oe.GREATER_THAN_SIGN}function JQe(i){return i===oe.NULL?Je.nullCharacterReference:i>1114111?Je.characterReferenceOutsideUnicodeRange:XNe(i)?Je.surrogateCharacterReference:JNe(i)?Je.noncharacterCharacterReference:ZNe(i)||i===oe.CARRIAGE_RETURN?Je.controlCharacterReference:null}class eXe{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ce.DATA,this.returnState=ce.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new BQe(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new KQe(HQe,(n,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(n)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Je.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(Je.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const s=JQe(n);s&&this._err(s,1)}}:void 0)}_err(e,t=0){var n,s;(s=(n=this.handler).onParseError)===null||s===void 0||s.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n==null||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(Je.endTagWithAttributes),e.selfClosing&&this._err(Je.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Ri.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ri.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ri.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Ri.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){const t=tEe(e)?Ri.WHITESPACE_CHARACTER:e===oe.NULL?Ri.NULL_CHARACTER:Ri.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Ri.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=ce.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?tb.Attribute:tb.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ce.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ce.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case ce.DATA:{this._stateData(e);break}case ce.RCDATA:{this._stateRcdata(e);break}case ce.RAWTEXT:{this._stateRawtext(e);break}case ce.SCRIPT_DATA:{this._stateScriptData(e);break}case ce.PLAINTEXT:{this._statePlaintext(e);break}case ce.TAG_OPEN:{this._stateTagOpen(e);break}case ce.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case ce.TAG_NAME:{this._stateTagName(e);break}case ce.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case ce.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case ce.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case ce.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case ce.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case ce.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case ce.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case ce.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case ce.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case ce.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case ce.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case ce.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case ce.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case ce.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case ce.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case ce.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case ce.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case ce.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case ce.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case ce.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case ce.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case ce.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case ce.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case ce.BOGUS_COMMENT:{this._stateBogusComment(e);break}case ce.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case ce.COMMENT_START:{this._stateCommentStart(e);break}case ce.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case ce.COMMENT:{this._stateComment(e);break}case ce.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case ce.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case ce.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case ce.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case ce.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case ce.COMMENT_END:{this._stateCommentEnd(e);break}case ce.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case ce.DOCTYPE:{this._stateDoctype(e);break}case ce.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case ce.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case ce.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case ce.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case ce.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case ce.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case ce.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case ce.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case ce.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case ce.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case ce.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case ce.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case ce.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case ce.CDATA_SECTION:{this._stateCdataSection(e);break}case ce.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case ce.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case ce.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case ce.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case oe.LESS_THAN_SIGN:{this.state=ce.TAG_OPEN;break}case oe.AMPERSAND:{this._startCharacterReference();break}case oe.NULL:{this._err(Je.unexpectedNullCharacter),this._emitCodePoint(e);break}case oe.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case oe.AMPERSAND:{this._startCharacterReference();break}case oe.LESS_THAN_SIGN:{this.state=ce.RCDATA_LESS_THAN_SIGN;break}case oe.NULL:{this._err(Je.unexpectedNullCharacter),this._emitChars(Jr);break}case oe.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case oe.LESS_THAN_SIGN:{this.state=ce.RAWTEXT_LESS_THAN_SIGN;break}case oe.NULL:{this._err(Je.unexpectedNullCharacter),this._emitChars(Jr);break}case oe.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case oe.LESS_THAN_SIGN:{this.state=ce.SCRIPT_DATA_LESS_THAN_SIGN;break}case oe.NULL:{this._err(Je.unexpectedNullCharacter),this._emitChars(Jr);break}case oe.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case oe.NULL:{this._err(Je.unexpectedNullCharacter),this._emitChars(Jr);break}case oe.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(nv(e))this._createStartTagToken(),this.state=ce.TAG_NAME,this._stateTagName(e);else switch(e){case oe.EXCLAMATION_MARK:{this.state=ce.MARKUP_DECLARATION_OPEN;break}case oe.SOLIDUS:{this.state=ce.END_TAG_OPEN;break}case oe.QUESTION_MARK:{this._err(Je.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ce.BOGUS_COMMENT,this._stateBogusComment(e);break}case oe.EOF:{this._err(Je.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Je.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ce.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(nv(e))this._createEndTagToken(),this.state=ce.TAG_NAME,this._stateTagName(e);else switch(e){case oe.GREATER_THAN_SIGN:{this._err(Je.missingEndTagName),this.state=ce.DATA;break}case oe.EOF:{this._err(Je.eofBeforeTagName),this._emitChars("");break}case oe.NULL:{this._err(Je.unexpectedNullCharacter),this.state=ce.SCRIPT_DATA_ESCAPED,this._emitChars(Jr);break}case oe.EOF:{this._err(Je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ce.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===oe.SOLIDUS?this.state=ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nv(e)?(this._emitChars("<"),this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){nv(e)?(this.state=ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case oe.NULL:{this._err(Je.unexpectedNullCharacter),this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Jr);break}case oe.EOF:{this._err(Je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===oe.SOLIDUS?(this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(gd.SCRIPT,!1)&&fpe(this.preprocessor.peek(gd.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const s=this._indexOf(e)+1;this.items.splice(s,0,t),this.tagIDs.splice(s,0,n),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==bt.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(rXe,bt.HTML)}clearBackToTableBodyContext(){this.clearBackTo(sXe,bt.HTML)}clearBackToTableRowContext(){this.clearBackTo(iXe,bt.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===O.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===O.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const s=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case bt.HTML:{if(s===e)return!0;if(t.has(s))return!1;break}case bt.SVG:{if(bpe.has(s))return!1;break}case bt.MATHML:{if(mpe.has(s))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Xj)}hasInListItemScope(e){return this.hasInDynamicScope(e,tXe)}hasInButtonScope(e){return this.hasInDynamicScope(e,nXe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case bt.HTML:{if(XG.has(t))return!0;if(Xj.has(t))return!1;break}case bt.SVG:{if(bpe.has(t))return!1;break}case bt.MATHML:{if(mpe.has(t))return!1;break}}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===bt.HTML)switch(this.tagIDs[t]){case e:return!0;case O.TABLE:case O.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===bt.HTML)switch(this.tagIDs[e]){case O.TBODY:case O.THEAD:case O.TFOOT:return!0;case O.TABLE:case O.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===bt.HTML)switch(this.tagIDs[t]){case e:return!0;case O.OPTION:case O.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&nEe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ppe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&ppe.has(this.currentTagId);)this.pop()}}const BU=3;var zf;(function(i){i[i.Marker=0]="Marker",i[i.Element=1]="Element"})(zf||(zf={}));const xpe={type:zf.Marker};class lXe{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],s=t.length,r=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let a=0;a[o.name,o.value]));let r=0;for(let o=0;os.get(l.name)===l.value)&&(r+=1,r>=BU&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(xpe)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:zf.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:zf.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(xpe);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find(n=>n.type===zf.Marker||this.treeAdapter.getTagName(n.element)===e);return t&&t.type===zf.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===zf.Element&&t.element===e)}}const iv={createDocument(){return{nodeName:"#document",mode:Nh.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(i){return{nodeName:"#comment",data:i,parentNode:null}},createTextNode(i){return{nodeName:"#text",value:i,parentNode:null}},appendChild(i,e){i.childNodes.push(e),e.parentNode=i},insertBefore(i,e,t){const n=i.childNodes.indexOf(t);i.childNodes.splice(n,0,e),e.parentNode=i},setTemplateContent(i,e){i.content=e},getTemplateContent(i){return i.content},setDocumentType(i,e,t,n){const s=i.childNodes.find(r=>r.nodeName==="#documentType");if(s)s.name=e,s.publicId=t,s.systemId=n;else{const r={nodeName:"#documentType",name:e,publicId:t,systemId:n,parentNode:null};iv.appendChild(i,r)}},setDocumentMode(i,e){i.mode=e},getDocumentMode(i){return i.mode},detachNode(i){if(i.parentNode){const e=i.parentNode.childNodes.indexOf(i);i.parentNode.childNodes.splice(e,1),i.parentNode=null}},insertText(i,e){if(i.childNodes.length>0){const t=i.childNodes[i.childNodes.length-1];if(iv.isTextNode(t)){t.value+=e;return}}iv.appendChild(i,iv.createTextNode(e))},insertTextBefore(i,e,t){const n=i.childNodes[i.childNodes.indexOf(t)-1];n&&iv.isTextNode(n)?n.value+=e:iv.insertBefore(i,iv.createTextNode(e),t)},adoptAttributes(i,e){const t=new Set(i.attrs.map(n=>n.name));for(let n=0;ni.startsWith(t))}function fXe(i){return i.name===iEe&&i.publicId===null&&(i.systemId===null||i.systemId===cXe)}function pXe(i){if(i.name!==iEe)return Nh.QUIRKS;const{systemId:e}=i;if(e&&e.toLowerCase()===dXe)return Nh.QUIRKS;let{publicId:t}=i;if(t!==null){if(t=t.toLowerCase(),hXe.has(t))return Nh.QUIRKS;let n=e===null?uXe:sEe;if(vpe(t,n))return Nh.QUIRKS;if(n=e===null?rEe:gXe,vpe(t,n))return Nh.LIMITED_QUIRKS}return Nh.NO_QUIRKS}const _pe={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},mXe="definitionurl",bXe="definitionURL",xXe=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(i=>[i.toLowerCase(),i])),vXe=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:bt.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:bt.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:bt.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:bt.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:bt.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:bt.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:bt.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:bt.XML}],["xml:space",{prefix:"xml",name:"space",namespace:bt.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:bt.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:bt.XMLNS}]]),_Xe=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(i=>[i.toLowerCase(),i])),yXe=new Set([O.B,O.BIG,O.BLOCKQUOTE,O.BODY,O.BR,O.CENTER,O.CODE,O.DD,O.DIV,O.DL,O.DT,O.EM,O.EMBED,O.H1,O.H2,O.H3,O.H4,O.H5,O.H6,O.HEAD,O.HR,O.I,O.IMG,O.LI,O.LISTING,O.MENU,O.META,O.NOBR,O.OL,O.P,O.PRE,O.RUBY,O.S,O.SMALL,O.SPAN,O.STRONG,O.STRIKE,O.SUB,O.SUP,O.TABLE,O.TT,O.U,O.UL,O.VAR]);function wXe(i){const e=i.tagID;return e===O.FONT&&i.attrs.some(({name:n})=>n===F1.COLOR||n===F1.SIZE||n===F1.FACE)||yXe.has(e)}function oEe(i){for(let e=0;e0&&this._setContextModes(e,t)}onItemPop(e,t){var n,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(s=(n=this.treeAdapter).onItemPop)===null||s===void 0||s.call(n,e,this.openElements.current),t){let r,o;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,o=this.fragmentContextID):{current:r,currentTagId:o}=this.openElements,this._setContextModes(r,o)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===bt.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,bt.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=pe.TEXT}switchToPlaintextParsing(){this.insertionMode=pe.TEXT,this.originalInsertionMode=pe.IN_BODY,this.tokenizer.state=qo.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===je.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==bt.HTML))switch(this.fragmentContextID){case O.TITLE:case O.TEXTAREA:{this.tokenizer.state=qo.RCDATA;break}case O.STYLE:case O.XMP:case O.IFRAME:case O.NOEMBED:case O.NOFRAMES:case O.NOSCRIPT:{this.tokenizer.state=qo.RAWTEXT;break}case O.SCRIPT:{this.tokenizer.state=qo.SCRIPT_DATA;break}case O.PLAINTEXT:{this.tokenizer.state=qo.PLAINTEXT;break}}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",s=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,s),e.location){const o=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));o&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,bt.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,bt.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(je.HTML,bt.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,O.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const s=this.treeAdapter.getChildNodes(t),r=n?s.lastIndexOf(n):s.length,o=s[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:l,endCol:c,endOffset:u}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:l,endCol:c,endOffset:u})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,s=this.treeAdapter.getTagName(e),r=t.type===Ri.END_TAG&&s===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,r)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===O.SVG&&this.treeAdapter.getTagName(t)===je.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===bt.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===O.MGLYPH||e.tagID===O.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,bt.HTML)}_processToken(e){switch(e.type){case Ri.CHARACTER:{this.onCharacter(e);break}case Ri.NULL_CHARACTER:{this.onNullCharacter(e);break}case Ri.COMMENT:{this.onComment(e);break}case Ri.DOCTYPE:{this.onDoctype(e);break}case Ri.START_TAG:{this._processStartTag(e);break}case Ri.END_TAG:{this.onEndTag(e);break}case Ri.EOF:{this.onEof(e);break}case Ri.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,t,n){const s=this.treeAdapter.getNamespaceURI(t),r=this.treeAdapter.getAttrList(t);return NXe(e,s,r,n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex(s=>s.type===zf.Marker||this.openElements.contains(s.element)),n=t===-1?e-1:t-1;for(let s=n;s>=0;s--){const r=this.activeFormattingElements.entries[s];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=pe.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(O.P),this.openElements.popUntilTagNamePopped(O.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case O.TR:{this.insertionMode=pe.IN_ROW;return}case O.TBODY:case O.THEAD:case O.TFOOT:{this.insertionMode=pe.IN_TABLE_BODY;return}case O.CAPTION:{this.insertionMode=pe.IN_CAPTION;return}case O.COLGROUP:{this.insertionMode=pe.IN_COLUMN_GROUP;return}case O.TABLE:{this.insertionMode=pe.IN_TABLE;return}case O.BODY:{this.insertionMode=pe.IN_BODY;return}case O.FRAMESET:{this.insertionMode=pe.IN_FRAMESET;return}case O.SELECT:{this._resetInsertionModeForSelect(e);return}case O.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case O.HTML:{this.insertionMode=this.headElement?pe.AFTER_HEAD:pe.BEFORE_HEAD;return}case O.TD:case O.TH:{if(e>0){this.insertionMode=pe.IN_CELL;return}break}case O.HEAD:{if(e>0){this.insertionMode=pe.IN_HEAD;return}break}}this.insertionMode=pe.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const n=this.openElements.tagIDs[t];if(n===O.TEMPLATE)break;if(n===O.TABLE){this.insertionMode=pe.IN_SELECT_IN_TABLE;return}}this.insertionMode=pe.IN_SELECT}_isElementCausesFosterParenting(e){return lEe.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case O.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(t)===bt.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break}case O.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return QQe[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){oJe(this,e);return}switch(this.insertionMode){case pe.INITIAL:{UT(this,e);break}case pe.BEFORE_HTML:{cA(this,e);break}case pe.BEFORE_HEAD:{dA(this,e);break}case pe.IN_HEAD:{uA(this,e);break}case pe.IN_HEAD_NO_SCRIPT:{hA(this,e);break}case pe.AFTER_HEAD:{gA(this,e);break}case pe.IN_BODY:case pe.IN_CAPTION:case pe.IN_CELL:case pe.IN_TEMPLATE:{dEe(this,e);break}case pe.TEXT:case pe.IN_SELECT:case pe.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case pe.IN_TABLE:case pe.IN_TABLE_BODY:case pe.IN_ROW:{HU(this,e);break}case pe.IN_TABLE_TEXT:{mEe(this,e);break}case pe.IN_COLUMN_GROUP:{Zj(this,e);break}case pe.AFTER_BODY:{Jj(this,e);break}case pe.AFTER_AFTER_BODY:{z4(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){rJe(this,e);return}switch(this.insertionMode){case pe.INITIAL:{UT(this,e);break}case pe.BEFORE_HTML:{cA(this,e);break}case pe.BEFORE_HEAD:{dA(this,e);break}case pe.IN_HEAD:{uA(this,e);break}case pe.IN_HEAD_NO_SCRIPT:{hA(this,e);break}case pe.AFTER_HEAD:{gA(this,e);break}case pe.TEXT:{this._insertCharacters(e);break}case pe.IN_TABLE:case pe.IN_TABLE_BODY:case pe.IN_ROW:{HU(this,e);break}case pe.IN_COLUMN_GROUP:{Zj(this,e);break}case pe.AFTER_BODY:{Jj(this,e);break}case pe.AFTER_AFTER_BODY:{z4(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){ZG(this,e);return}switch(this.insertionMode){case pe.INITIAL:case pe.BEFORE_HTML:case pe.BEFORE_HEAD:case pe.IN_HEAD:case pe.IN_HEAD_NO_SCRIPT:case pe.AFTER_HEAD:case pe.IN_BODY:case pe.IN_TABLE:case pe.IN_CAPTION:case pe.IN_COLUMN_GROUP:case pe.IN_TABLE_BODY:case pe.IN_ROW:case pe.IN_CELL:case pe.IN_SELECT:case pe.IN_SELECT_IN_TABLE:case pe.IN_TEMPLATE:case pe.IN_FRAMESET:case pe.AFTER_FRAMESET:{ZG(this,e);break}case pe.IN_TABLE_TEXT:{$T(this,e);break}case pe.AFTER_BODY:{jXe(this,e);break}case pe.AFTER_AFTER_BODY:case pe.AFTER_AFTER_FRAMESET:{FXe(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case pe.INITIAL:{BXe(this,e);break}case pe.BEFORE_HEAD:case pe.IN_HEAD:case pe.IN_HEAD_NO_SCRIPT:case pe.AFTER_HEAD:{this._err(e,Je.misplacedDoctype);break}case pe.IN_TABLE_TEXT:{$T(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Je.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?aJe(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case pe.INITIAL:{UT(this,e);break}case pe.BEFORE_HTML:{HXe(this,e);break}case pe.BEFORE_HEAD:{VXe(this,e);break}case pe.IN_HEAD:{Zg(this,e);break}case pe.IN_HEAD_NO_SCRIPT:{$Xe(this,e);break}case pe.AFTER_HEAD:{KXe(this,e);break}case pe.IN_BODY:{Sc(this,e);break}case pe.IN_TABLE:{dL(this,e);break}case pe.IN_TABLE_TEXT:{$T(this,e);break}case pe.IN_CAPTION:{zZe(this,e);break}case pe.IN_COLUMN_GROUP:{Kse(this,e);break}case pe.IN_TABLE_BODY:{GH(this,e);break}case pe.IN_ROW:{YH(this,e);break}case pe.IN_CELL:{qZe(this,e);break}case pe.IN_SELECT:{vEe(this,e);break}case pe.IN_SELECT_IN_TABLE:{GZe(this,e);break}case pe.IN_TEMPLATE:{QZe(this,e);break}case pe.AFTER_BODY:{ZZe(this,e);break}case pe.IN_FRAMESET:{JZe(this,e);break}case pe.AFTER_FRAMESET:{tJe(this,e);break}case pe.AFTER_AFTER_BODY:{iJe(this,e);break}case pe.AFTER_AFTER_FRAMESET:{sJe(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?lJe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case pe.INITIAL:{UT(this,e);break}case pe.BEFORE_HTML:{WXe(this,e);break}case pe.BEFORE_HEAD:{zXe(this,e);break}case pe.IN_HEAD:{UXe(this,e);break}case pe.IN_HEAD_NO_SCRIPT:{qXe(this,e);break}case pe.AFTER_HEAD:{GXe(this,e);break}case pe.IN_BODY:{KH(this,e);break}case pe.TEXT:{RZe(this,e);break}case pe.IN_TABLE:{V2(this,e);break}case pe.IN_TABLE_TEXT:{$T(this,e);break}case pe.IN_CAPTION:{UZe(this,e);break}case pe.IN_COLUMN_GROUP:{$Ze(this,e);break}case pe.IN_TABLE_BODY:{JG(this,e);break}case pe.IN_ROW:{xEe(this,e);break}case pe.IN_CELL:{KZe(this,e);break}case pe.IN_SELECT:{_Ee(this,e);break}case pe.IN_SELECT_IN_TABLE:{YZe(this,e);break}case pe.IN_TEMPLATE:{XZe(this,e);break}case pe.AFTER_BODY:{wEe(this,e);break}case pe.IN_FRAMESET:{eJe(this,e);break}case pe.AFTER_FRAMESET:{nJe(this,e);break}case pe.AFTER_AFTER_BODY:{z4(this,e);break}}}onEof(e){switch(this.insertionMode){case pe.INITIAL:{UT(this,e);break}case pe.BEFORE_HTML:{cA(this,e);break}case pe.BEFORE_HEAD:{dA(this,e);break}case pe.IN_HEAD:{uA(this,e);break}case pe.IN_HEAD_NO_SCRIPT:{hA(this,e);break}case pe.AFTER_HEAD:{gA(this,e);break}case pe.IN_BODY:case pe.IN_TABLE:case pe.IN_CAPTION:case pe.IN_COLUMN_GROUP:case pe.IN_TABLE_BODY:case pe.IN_ROW:case pe.IN_CELL:case pe.IN_SELECT:case pe.IN_SELECT_IN_TABLE:{fEe(this,e);break}case pe.TEXT:{MZe(this,e);break}case pe.IN_TABLE_TEXT:{$T(this,e);break}case pe.IN_TEMPLATE:{yEe(this,e);break}case pe.AFTER_BODY:case pe.IN_FRAMESET:case pe.AFTER_FRAMESET:case pe.AFTER_AFTER_BODY:case pe.AFTER_AFTER_FRAMESET:{qse(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===oe.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case pe.IN_HEAD:case pe.IN_HEAD_NO_SCRIPT:case pe.AFTER_HEAD:case pe.TEXT:case pe.IN_COLUMN_GROUP:case pe.IN_SELECT:case pe.IN_SELECT_IN_TABLE:case pe.IN_FRAMESET:case pe.AFTER_FRAMESET:{this._insertCharacters(e);break}case pe.IN_BODY:case pe.IN_CAPTION:case pe.IN_CELL:case pe.IN_TEMPLATE:case pe.AFTER_BODY:case pe.AFTER_AFTER_BODY:case pe.AFTER_AFTER_FRAMESET:{cEe(this,e);break}case pe.IN_TABLE:case pe.IN_TABLE_BODY:case pe.IN_ROW:{HU(this,e);break}case pe.IN_TABLE_TEXT:{pEe(this,e);break}}}};function IXe(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagID)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):gEe(i,e),t}function AXe(i,e){let t=null,n=i.openElements.stackTop;for(;n>=0;n--){const s=i.openElements.items[n];if(s===e.element)break;i._isSpecialElement(s,i.openElements.tagIDs[n])&&(t=s)}return t||(i.openElements.shortenToLength(Math.max(n,0)),i.activeFormattingElements.removeEntry(e)),t}function RXe(i,e,t){let n=e,s=i.openElements.getCommonAncestor(e);for(let r=0,o=s;o!==t;r++,o=s){s=i.openElements.getCommonAncestor(o);const a=i.activeFormattingElements.getElementEntry(o),l=a&&r>=DXe;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(o)):(o=MXe(i,a),n===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(n),i.treeAdapter.appendChild(o,n),n=o)}return n}function MXe(i,e){const t=i.treeAdapter.getNamespaceURI(e.element),n=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,n),e.element=n,n}function PXe(i,e,t){const n=i.treeAdapter.getTagName(e),s=uD(n);if(i._isElementCausesFosterParenting(s))i._fosterParentElement(t);else{const r=i.treeAdapter.getNamespaceURI(e);s===O.TEMPLATE&&r===bt.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function OXe(i,e,t){const n=i.treeAdapter.getNamespaceURI(t.element),{token:s}=t,r=i.treeAdapter.createElement(s.tagName,n,s.attrs);i._adoptNodes(e,r),i.treeAdapter.appendChild(e,r),i.activeFormattingElements.insertElementAfterBookmark(r,s),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,r,s.tagID)}function $se(i,e){for(let t=0;t=t;n--)i._setEndLocation(i.openElements.items[n],e);if(!i.fragmentContext&&i.openElements.stackTop>=0){const n=i.openElements.items[0],s=i.treeAdapter.getNodeSourceCodeLocation(n);if(s&&!s.endTag&&(i._setEndLocation(n,e),i.openElements.stackTop>=1)){const r=i.openElements.items[1],o=i.treeAdapter.getNodeSourceCodeLocation(r);o&&!o.endTag&&i._setEndLocation(r,e)}}}}function BXe(i,e){i._setDocumentType(e);const t=e.forceQuirks?Nh.QUIRKS:pXe(e);fXe(e)||i._err(e,Je.nonConformingDoctype),i.treeAdapter.setDocumentMode(i.document,t),i.insertionMode=pe.BEFORE_HTML}function UT(i,e){i._err(e,Je.missingDoctype,!0),i.treeAdapter.setDocumentMode(i.document,Nh.QUIRKS),i.insertionMode=pe.BEFORE_HTML,i._processToken(e)}function HXe(i,e){e.tagID===O.HTML?(i._insertElement(e,bt.HTML),i.insertionMode=pe.BEFORE_HEAD):cA(i,e)}function WXe(i,e){const t=e.tagID;(t===O.HTML||t===O.HEAD||t===O.BODY||t===O.BR)&&cA(i,e)}function cA(i,e){i._insertFakeRootElement(),i.insertionMode=pe.BEFORE_HEAD,i._processToken(e)}function VXe(i,e){switch(e.tagID){case O.HTML:{Sc(i,e);break}case O.HEAD:{i._insertElement(e,bt.HTML),i.headElement=i.openElements.current,i.insertionMode=pe.IN_HEAD;break}default:dA(i,e)}}function zXe(i,e){const t=e.tagID;t===O.HEAD||t===O.BODY||t===O.HTML||t===O.BR?dA(i,e):i._err(e,Je.endTagWithoutMatchingOpenElement)}function dA(i,e){i._insertFakeElement(je.HEAD,O.HEAD),i.headElement=i.openElements.current,i.insertionMode=pe.IN_HEAD,i._processToken(e)}function Zg(i,e){switch(e.tagID){case O.HTML:{Sc(i,e);break}case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:{i._appendElement(e,bt.HTML),e.ackSelfClosing=!0;break}case O.TITLE:{i._switchToTextParsing(e,qo.RCDATA);break}case O.NOSCRIPT:{i.options.scriptingEnabled?i._switchToTextParsing(e,qo.RAWTEXT):(i._insertElement(e,bt.HTML),i.insertionMode=pe.IN_HEAD_NO_SCRIPT);break}case O.NOFRAMES:case O.STYLE:{i._switchToTextParsing(e,qo.RAWTEXT);break}case O.SCRIPT:{i._switchToTextParsing(e,qo.SCRIPT_DATA);break}case O.TEMPLATE:{i._insertTemplate(e),i.activeFormattingElements.insertMarker(),i.framesetOk=!1,i.insertionMode=pe.IN_TEMPLATE,i.tmplInsertionModeStack.unshift(pe.IN_TEMPLATE);break}case O.HEAD:{i._err(e,Je.misplacedStartTagForHeadElement);break}default:uA(i,e)}}function UXe(i,e){switch(e.tagID){case O.HEAD:{i.openElements.pop(),i.insertionMode=pe.AFTER_HEAD;break}case O.BODY:case O.BR:case O.HTML:{uA(i,e);break}case O.TEMPLATE:{GC(i,e);break}default:i._err(e,Je.endTagWithoutMatchingOpenElement)}}function GC(i,e){i.openElements.tmplCount>0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagId!==O.TEMPLATE&&i._err(e,Je.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(O.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode()):i._err(e,Je.endTagWithoutMatchingOpenElement)}function uA(i,e){i.openElements.pop(),i.insertionMode=pe.AFTER_HEAD,i._processToken(e)}function $Xe(i,e){switch(e.tagID){case O.HTML:{Sc(i,e);break}case O.BASEFONT:case O.BGSOUND:case O.HEAD:case O.LINK:case O.META:case O.NOFRAMES:case O.STYLE:{Zg(i,e);break}case O.NOSCRIPT:{i._err(e,Je.nestedNoscriptInHead);break}default:hA(i,e)}}function qXe(i,e){switch(e.tagID){case O.NOSCRIPT:{i.openElements.pop(),i.insertionMode=pe.IN_HEAD;break}case O.BR:{hA(i,e);break}default:i._err(e,Je.endTagWithoutMatchingOpenElement)}}function hA(i,e){const t=e.type===Ri.EOF?Je.openElementsLeftAfterEof:Je.disallowedContentInNoscriptInHead;i._err(e,t),i.openElements.pop(),i.insertionMode=pe.IN_HEAD,i._processToken(e)}function KXe(i,e){switch(e.tagID){case O.HTML:{Sc(i,e);break}case O.BODY:{i._insertElement(e,bt.HTML),i.framesetOk=!1,i.insertionMode=pe.IN_BODY;break}case O.FRAMESET:{i._insertElement(e,bt.HTML),i.insertionMode=pe.IN_FRAMESET;break}case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:case O.NOFRAMES:case O.SCRIPT:case O.STYLE:case O.TEMPLATE:case O.TITLE:{i._err(e,Je.abandonedHeadElementChild),i.openElements.push(i.headElement,O.HEAD),Zg(i,e),i.openElements.remove(i.headElement);break}case O.HEAD:{i._err(e,Je.misplacedStartTagForHeadElement);break}default:gA(i,e)}}function GXe(i,e){switch(e.tagID){case O.BODY:case O.HTML:case O.BR:{gA(i,e);break}case O.TEMPLATE:{GC(i,e);break}default:i._err(e,Je.endTagWithoutMatchingOpenElement)}}function gA(i,e){i._insertFakeElement(je.BODY,O.BODY),i.insertionMode=pe.IN_BODY,qH(i,e)}function qH(i,e){switch(e.type){case Ri.CHARACTER:{dEe(i,e);break}case Ri.WHITESPACE_CHARACTER:{cEe(i,e);break}case Ri.COMMENT:{ZG(i,e);break}case Ri.START_TAG:{Sc(i,e);break}case Ri.END_TAG:{KH(i,e);break}case Ri.EOF:{fEe(i,e);break}}}function cEe(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function dEe(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function YXe(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function QXe(i,e){const t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function XXe(i,e){const t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,bt.HTML),i.insertionMode=pe.IN_FRAMESET)}function ZXe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML)}function JXe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i.openElements.currentTagId!==void 0&&XG.has(i.openElements.currentTagId)&&i.openElements.pop(),i._insertElement(e,bt.HTML)}function eZe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function tZe(i,e){const t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML),t||(i.formElement=i.openElements.current))}function nZe(i,e){i.framesetOk=!1;const t=e.tagID;for(let n=i.openElements.stackTop;n>=0;n--){const s=i.openElements.tagIDs[n];if(t===O.LI&&s===O.LI||(t===O.DD||t===O.DT)&&(s===O.DD||s===O.DT)){i.openElements.generateImpliedEndTagsWithExclusion(s),i.openElements.popUntilTagNamePopped(s);break}if(s!==O.ADDRESS&&s!==O.DIV&&s!==O.P&&i._isSpecialElement(i.openElements.items[n],s))break}i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML)}function iZe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML),i.tokenizer.state=qo.PLAINTEXT}function sZe(i,e){i.openElements.hasInScope(O.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(O.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.framesetOk=!1}function rZe(i,e){const t=i.activeFormattingElements.getElementEntryInScopeWithTagName(je.A);t&&($se(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function oZe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function aZe(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(O.NOBR)&&($se(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,bt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function lZe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function cZe(i,e){i.treeAdapter.getDocumentMode(i.document)!==Nh.QUIRKS&&i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML),i.framesetOk=!1,i.insertionMode=pe.IN_TABLE}function uEe(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,bt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function hEe(i){const e=eEe(i,F1.TYPE);return e!=null&&e.toLowerCase()===EXe}function dZe(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,bt.HTML),hEe(e)||(i.framesetOk=!1),e.ackSelfClosing=!0}function uZe(i,e){i._appendElement(e,bt.HTML),e.ackSelfClosing=!0}function hZe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._appendElement(e,bt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function gZe(i,e){e.tagName=je.IMG,e.tagID=O.IMG,uEe(i,e)}function fZe(i,e){i._insertElement(e,bt.HTML),i.skipNextNewLine=!0,i.tokenizer.state=qo.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=pe.TEXT}function pZe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,qo.RAWTEXT)}function mZe(i,e){i.framesetOk=!1,i._switchToTextParsing(e,qo.RAWTEXT)}function Cpe(i,e){i._switchToTextParsing(e,qo.RAWTEXT)}function bZe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.framesetOk=!1,i.insertionMode=i.insertionMode===pe.IN_TABLE||i.insertionMode===pe.IN_CAPTION||i.insertionMode===pe.IN_TABLE_BODY||i.insertionMode===pe.IN_ROW||i.insertionMode===pe.IN_CELL?pe.IN_SELECT_IN_TABLE:pe.IN_SELECT}function xZe(i,e){i.openElements.currentTagId===O.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML)}function vZe(i,e){i.openElements.hasInScope(O.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,bt.HTML)}function _Ze(i,e){i.openElements.hasInScope(O.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(O.RTC),i._insertElement(e,bt.HTML)}function yZe(i,e){i._reconstructActiveFormattingElements(),oEe(e),Use(e),e.selfClosing?i._appendElement(e,bt.MATHML):i._insertElement(e,bt.MATHML),e.ackSelfClosing=!0}function wZe(i,e){i._reconstructActiveFormattingElements(),aEe(e),Use(e),e.selfClosing?i._appendElement(e,bt.SVG):i._insertElement(e,bt.SVG),e.ackSelfClosing=!0}function Spe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML)}function Sc(i,e){switch(e.tagID){case O.I:case O.S:case O.B:case O.U:case O.EM:case O.TT:case O.BIG:case O.CODE:case O.FONT:case O.SMALL:case O.STRIKE:case O.STRONG:{oZe(i,e);break}case O.A:{rZe(i,e);break}case O.H1:case O.H2:case O.H3:case O.H4:case O.H5:case O.H6:{JXe(i,e);break}case O.P:case O.DL:case O.OL:case O.UL:case O.DIV:case O.DIR:case O.NAV:case O.MAIN:case O.MENU:case O.ASIDE:case O.CENTER:case O.FIGURE:case O.FOOTER:case O.HEADER:case O.HGROUP:case O.DIALOG:case O.DETAILS:case O.ADDRESS:case O.ARTICLE:case O.SEARCH:case O.SECTION:case O.SUMMARY:case O.FIELDSET:case O.BLOCKQUOTE:case O.FIGCAPTION:{ZXe(i,e);break}case O.LI:case O.DD:case O.DT:{nZe(i,e);break}case O.BR:case O.IMG:case O.WBR:case O.AREA:case O.EMBED:case O.KEYGEN:{uEe(i,e);break}case O.HR:{hZe(i,e);break}case O.RB:case O.RTC:{vZe(i,e);break}case O.RT:case O.RP:{_Ze(i,e);break}case O.PRE:case O.LISTING:{eZe(i,e);break}case O.XMP:{pZe(i,e);break}case O.SVG:{wZe(i,e);break}case O.HTML:{YXe(i,e);break}case O.BASE:case O.LINK:case O.META:case O.STYLE:case O.TITLE:case O.SCRIPT:case O.BGSOUND:case O.BASEFONT:case O.TEMPLATE:{Zg(i,e);break}case O.BODY:{QXe(i,e);break}case O.FORM:{tZe(i,e);break}case O.NOBR:{aZe(i,e);break}case O.MATH:{yZe(i,e);break}case O.TABLE:{cZe(i,e);break}case O.INPUT:{dZe(i,e);break}case O.PARAM:case O.TRACK:case O.SOURCE:{uZe(i,e);break}case O.IMAGE:{gZe(i,e);break}case O.BUTTON:{sZe(i,e);break}case O.APPLET:case O.OBJECT:case O.MARQUEE:{lZe(i,e);break}case O.IFRAME:{mZe(i,e);break}case O.SELECT:{bZe(i,e);break}case O.OPTION:case O.OPTGROUP:{xZe(i,e);break}case O.NOEMBED:case O.NOFRAMES:{Cpe(i,e);break}case O.FRAMESET:{XXe(i,e);break}case O.TEXTAREA:{fZe(i,e);break}case O.NOSCRIPT:{i.options.scriptingEnabled?Cpe(i,e):Spe(i,e);break}case O.PLAINTEXT:{iZe(i,e);break}case O.COL:case O.TH:case O.TD:case O.TR:case O.HEAD:case O.FRAME:case O.TBODY:case O.TFOOT:case O.THEAD:case O.CAPTION:case O.COLGROUP:break;default:Spe(i,e)}}function CZe(i,e){if(i.openElements.hasInScope(O.BODY)&&(i.insertionMode=pe.AFTER_BODY,i.options.sourceCodeLocationInfo)){const t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i._setEndLocation(t,e)}}function SZe(i,e){i.openElements.hasInScope(O.BODY)&&(i.insertionMode=pe.AFTER_BODY,wEe(i,e))}function kZe(i,e){const t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function NZe(i){const e=i.openElements.tmplCount>0,{formElement:t}=i;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(O.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(O.FORM):t&&i.openElements.remove(t))}function EZe(i){i.openElements.hasInButtonScope(O.P)||i._insertFakeElement(je.P,O.P),i._closePElement()}function LZe(i){i.openElements.hasInListItemScope(O.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(O.LI),i.openElements.popUntilTagNamePopped(O.LI))}function DZe(i,e){const t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function TZe(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function IZe(i,e){const t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function AZe(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(je.BR,O.BR),i.openElements.pop(),i.framesetOk=!1}function gEe(i,e){const t=e.tagName,n=e.tagID;for(let s=i.openElements.stackTop;s>0;s--){const r=i.openElements.items[s],o=i.openElements.tagIDs[s];if(n===o&&(n!==O.UNKNOWN||i.treeAdapter.getTagName(r)===t)){i.openElements.generateImpliedEndTagsWithExclusion(n),i.openElements.stackTop>=s&&i.openElements.shortenToLength(s);break}if(i._isSpecialElement(r,o))break}}function KH(i,e){switch(e.tagID){case O.A:case O.B:case O.I:case O.S:case O.U:case O.EM:case O.TT:case O.BIG:case O.CODE:case O.FONT:case O.NOBR:case O.SMALL:case O.STRIKE:case O.STRONG:{$se(i,e);break}case O.P:{EZe(i);break}case O.DL:case O.UL:case O.OL:case O.DIR:case O.DIV:case O.NAV:case O.PRE:case O.MAIN:case O.MENU:case O.ASIDE:case O.BUTTON:case O.CENTER:case O.FIGURE:case O.FOOTER:case O.HEADER:case O.HGROUP:case O.DIALOG:case O.ADDRESS:case O.ARTICLE:case O.DETAILS:case O.SEARCH:case O.SECTION:case O.SUMMARY:case O.LISTING:case O.FIELDSET:case O.BLOCKQUOTE:case O.FIGCAPTION:{kZe(i,e);break}case O.LI:{LZe(i);break}case O.DD:case O.DT:{DZe(i,e);break}case O.H1:case O.H2:case O.H3:case O.H4:case O.H5:case O.H6:{TZe(i);break}case O.BR:{AZe(i);break}case O.BODY:{CZe(i,e);break}case O.HTML:{SZe(i,e);break}case O.FORM:{NZe(i);break}case O.APPLET:case O.OBJECT:case O.MARQUEE:{IZe(i,e);break}case O.TEMPLATE:{GC(i,e);break}default:gEe(i,e)}}function fEe(i,e){i.tmplInsertionModeStack.length>0?yEe(i,e):qse(i,e)}function RZe(i,e){var t;e.tagID===O.SCRIPT&&((t=i.scriptHandler)===null||t===void 0||t.call(i,i.openElements.current)),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function MZe(i,e){i._err(e,Je.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i.onEof(e)}function HU(i,e){if(i.openElements.currentTagId!==void 0&&lEe.has(i.openElements.currentTagId))switch(i.pendingCharacterTokens.length=0,i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=pe.IN_TABLE_TEXT,e.type){case Ri.CHARACTER:{mEe(i,e);break}case Ri.WHITESPACE_CHARACTER:{pEe(i,e);break}}else fP(i,e)}function PZe(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,bt.HTML),i.insertionMode=pe.IN_CAPTION}function OZe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,bt.HTML),i.insertionMode=pe.IN_COLUMN_GROUP}function jZe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(je.COLGROUP,O.COLGROUP),i.insertionMode=pe.IN_COLUMN_GROUP,Kse(i,e)}function FZe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,bt.HTML),i.insertionMode=pe.IN_TABLE_BODY}function BZe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(je.TBODY,O.TBODY),i.insertionMode=pe.IN_TABLE_BODY,GH(i,e)}function HZe(i,e){i.openElements.hasInTableScope(O.TABLE)&&(i.openElements.popUntilTagNamePopped(O.TABLE),i._resetInsertionMode(),i._processStartTag(e))}function WZe(i,e){hEe(e)?i._appendElement(e,bt.HTML):fP(i,e),e.ackSelfClosing=!0}function VZe(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,bt.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function dL(i,e){switch(e.tagID){case O.TD:case O.TH:case O.TR:{BZe(i,e);break}case O.STYLE:case O.SCRIPT:case O.TEMPLATE:{Zg(i,e);break}case O.COL:{jZe(i,e);break}case O.FORM:{VZe(i,e);break}case O.TABLE:{HZe(i,e);break}case O.TBODY:case O.TFOOT:case O.THEAD:{FZe(i,e);break}case O.INPUT:{WZe(i,e);break}case O.CAPTION:{PZe(i,e);break}case O.COLGROUP:{OZe(i,e);break}default:fP(i,e)}}function V2(i,e){switch(e.tagID){case O.TABLE:{i.openElements.hasInTableScope(O.TABLE)&&(i.openElements.popUntilTagNamePopped(O.TABLE),i._resetInsertionMode());break}case O.TEMPLATE:{GC(i,e);break}case O.BODY:case O.CAPTION:case O.COL:case O.COLGROUP:case O.HTML:case O.TBODY:case O.TD:case O.TFOOT:case O.TH:case O.THEAD:case O.TR:break;default:fP(i,e)}}function fP(i,e){const t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,qH(i,e),i.fosterParentingEnabled=t}function pEe(i,e){i.pendingCharacterTokens.push(e)}function mEe(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function $T(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t0&&i.openElements.currentTagId===O.OPTION&&i.openElements.tagIDs[i.openElements.stackTop-1]===O.OPTGROUP&&i.openElements.pop(),i.openElements.currentTagId===O.OPTGROUP&&i.openElements.pop();break}case O.OPTION:{i.openElements.currentTagId===O.OPTION&&i.openElements.pop();break}case O.SELECT:{i.openElements.hasInSelectScope(O.SELECT)&&(i.openElements.popUntilTagNamePopped(O.SELECT),i._resetInsertionMode());break}case O.TEMPLATE:{GC(i,e);break}}}function GZe(i,e){const t=e.tagID;t===O.CAPTION||t===O.TABLE||t===O.TBODY||t===O.TFOOT||t===O.THEAD||t===O.TR||t===O.TD||t===O.TH?(i.openElements.popUntilTagNamePopped(O.SELECT),i._resetInsertionMode(),i._processStartTag(e)):vEe(i,e)}function YZe(i,e){const t=e.tagID;t===O.CAPTION||t===O.TABLE||t===O.TBODY||t===O.TFOOT||t===O.THEAD||t===O.TR||t===O.TD||t===O.TH?i.openElements.hasInTableScope(t)&&(i.openElements.popUntilTagNamePopped(O.SELECT),i._resetInsertionMode(),i.onEndTag(e)):_Ee(i,e)}function QZe(i,e){switch(e.tagID){case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:case O.NOFRAMES:case O.SCRIPT:case O.STYLE:case O.TEMPLATE:case O.TITLE:{Zg(i,e);break}case O.CAPTION:case O.COLGROUP:case O.TBODY:case O.TFOOT:case O.THEAD:{i.tmplInsertionModeStack[0]=pe.IN_TABLE,i.insertionMode=pe.IN_TABLE,dL(i,e);break}case O.COL:{i.tmplInsertionModeStack[0]=pe.IN_COLUMN_GROUP,i.insertionMode=pe.IN_COLUMN_GROUP,Kse(i,e);break}case O.TR:{i.tmplInsertionModeStack[0]=pe.IN_TABLE_BODY,i.insertionMode=pe.IN_TABLE_BODY,GH(i,e);break}case O.TD:case O.TH:{i.tmplInsertionModeStack[0]=pe.IN_ROW,i.insertionMode=pe.IN_ROW,YH(i,e);break}default:i.tmplInsertionModeStack[0]=pe.IN_BODY,i.insertionMode=pe.IN_BODY,Sc(i,e)}}function XZe(i,e){e.tagID===O.TEMPLATE&&GC(i,e)}function yEe(i,e){i.openElements.tmplCount>0?(i.openElements.popUntilTagNamePopped(O.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode(),i.onEof(e)):qse(i,e)}function ZZe(i,e){e.tagID===O.HTML?Sc(i,e):Jj(i,e)}function wEe(i,e){var t;if(e.tagID===O.HTML){if(i.fragmentContext||(i.insertionMode=pe.AFTER_AFTER_BODY),i.options.sourceCodeLocationInfo&&i.openElements.tagIDs[0]===O.HTML){i._setEndLocation(i.openElements.items[0],e);const n=i.openElements.items[1];n&&!(!((t=i.treeAdapter.getNodeSourceCodeLocation(n))===null||t===void 0)&&t.endTag)&&i._setEndLocation(n,e)}}else Jj(i,e)}function Jj(i,e){i.insertionMode=pe.IN_BODY,qH(i,e)}function JZe(i,e){switch(e.tagID){case O.HTML:{Sc(i,e);break}case O.FRAMESET:{i._insertElement(e,bt.HTML);break}case O.FRAME:{i._appendElement(e,bt.HTML),e.ackSelfClosing=!0;break}case O.NOFRAMES:{Zg(i,e);break}}}function eJe(i,e){e.tagID===O.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagId!==O.FRAMESET&&(i.insertionMode=pe.AFTER_FRAMESET))}function tJe(i,e){switch(e.tagID){case O.HTML:{Sc(i,e);break}case O.NOFRAMES:{Zg(i,e);break}}}function nJe(i,e){e.tagID===O.HTML&&(i.insertionMode=pe.AFTER_AFTER_FRAMESET)}function iJe(i,e){e.tagID===O.HTML?Sc(i,e):z4(i,e)}function z4(i,e){i.insertionMode=pe.IN_BODY,qH(i,e)}function sJe(i,e){switch(e.tagID){case O.HTML:{Sc(i,e);break}case O.NOFRAMES:{Zg(i,e);break}}}function rJe(i,e){e.chars=Jr,i._insertCharacters(e)}function oJe(i,e){i._insertCharacters(e),i.framesetOk=!1}function CEe(i){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==bt.HTML&&i.openElements.currentTagId!==void 0&&!i._isIntegrationPoint(i.openElements.currentTagId,i.openElements.current);)i.openElements.pop()}function aJe(i,e){if(wXe(e))CEe(i),i._startTagOutsideForeignContent(e);else{const t=i._getAdjustedCurrentElement(),n=i.treeAdapter.getNamespaceURI(t);n===bt.MATHML?oEe(e):n===bt.SVG&&(CXe(e),aEe(e)),Use(e),e.selfClosing?i._appendElement(e,n):i._insertElement(e,n),e.ackSelfClosing=!0}}function lJe(i,e){if(e.tagID===O.P||e.tagID===O.BR){CEe(i),i._endTagOutsideForeignContent(e);return}for(let t=i.openElements.stackTop;t>0;t--){const n=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(n)===bt.HTML){i._endTagOutsideForeignContent(e);break}const s=i.treeAdapter.getTagName(n);if(s.toLowerCase()===e.tagName){e.tagName=s,i.openElements.shortenToLength(t);break}}}je.AREA,je.BASE,je.BASEFONT,je.BGSOUND,je.BR,je.COL,je.EMBED,je.FRAME,je.HR,je.IMG,je.INPUT,je.KEYGEN,je.LINK,je.META,je.PARAM,je.SOURCE,je.TRACK,je.WBR;const cJe=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,dJe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),kpe={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function SEe(i,e){const t=_Je(i),n=ENe("type",{handlers:{root:uJe,element:hJe,text:gJe,comment:NEe,doctype:fJe,raw:mJe},unknown:bJe}),s={parser:t?new wpe(kpe):wpe.getFragmentParser(void 0,kpe),handle(a){n(a,s)},stitches:!1,options:e||{}};n(i,s),hD(s,Hp());const r=t?s.parser.document:s.parser.getFragment(),o=yQe(r,{file:s.options.file});return s.stitches&&$H(o,"comment",function(a,l,c){const u=a;if(u.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=u.value.stitch,l}}),o.type==="root"&&o.children.length===1&&o.children[0].type===i.type?o.children[0]:o}function kEe(i,e){let t=-1;if(i)for(;++t4&&(e.parser.tokenizer.state=0);const t={type:Ri.CHARACTER,chars:i.value,location:pP(i)};hD(e,Hp(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function fJe(i,e){const t={type:Ri.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:pP(i)};hD(e,Hp(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function pJe(i,e){e.stitches=!0;const t=yJe(i);if("children"in i&&"children"in t){const n=SEe({type:"root",children:i.children},e.options);t.children=n.children}NEe({type:"comment",value:{stitch:t}},e)}function NEe(i,e){const t=i.value,n={type:Ri.COMMENT,data:t,location:pP(i)};hD(e,Hp(i)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function mJe(i,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,EEe(e,Hp(i)),e.parser.tokenizer.write(e.options.tagfilter?i.value.replace(cJe,"<$1$2"):i.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;const t=e.parser.tokenizer._consume();e.parser.tokenizer._callState(t)}}function bJe(i,e){const t=i;if(e.options.passThrough&&e.options.passThrough.includes(t.type))pJe(t,e);else{let n="";throw dJe.has(t.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+t.type+"` node"+n)}}function hD(i,e){EEe(i,e);const t=i.parser.tokenizer.currentCharacterToken;t&&t.location&&(t.location.endLine=i.parser.tokenizer.preprocessor.line,t.location.endCol=i.parser.tokenizer.preprocessor.col+1,t.location.endOffset=i.parser.tokenizer.preprocessor.offset+1,i.parser.currentToken=t,i.parser._processToken(i.parser.currentToken)),i.parser.tokenizer.paused=!1,i.parser.tokenizer.inLoop=!1,i.parser.tokenizer.active=!1,i.parser.tokenizer.returnState=qo.DATA,i.parser.tokenizer.charRefCode=-1,i.parser.tokenizer.consumedAfterSnapshot=-1,i.parser.tokenizer.currentLocation=null,i.parser.tokenizer.currentCharacterToken=null,i.parser.tokenizer.currentToken=null,i.parser.tokenizer.currentAttr={name:"",value:""}}function EEe(i,e){if(e&&e.offset!==void 0){const t={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};i.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,i.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,i.parser.tokenizer.preprocessor.line=e.line,i.parser.tokenizer.currentLocation=t}}function xJe(i,e){const t=i.tagName.toLowerCase();if(e.parser.tokenizer.state===qo.PLAINTEXT)return;hD(e,Hp(i));const n=e.parser.openElements.current;let s="namespaceURI"in n?n.namespaceURI:d1.html;s===d1.html&&t==="svg"&&(s=d1.svg);const r=NQe({...i,children:[]},{space:s===d1.svg?"svg":"html"}),o={type:Ri.START_TAG,tagName:t,tagID:uD(t),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in r?r.attrs:[],location:pP(i)};e.parser.currentToken=o,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=t}function vJe(i,e){const t=i.tagName.toLowerCase();if(!e.parser.tokenizer.inForeignNode&&MQe.includes(t)||e.parser.tokenizer.state===qo.PLAINTEXT)return;hD(e,BH(i));const n={type:Ri.END_TAG,tagName:t,tagID:uD(t),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:pP(i)};e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken),t===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===qo.RCDATA||e.parser.tokenizer.state===qo.RAWTEXT||e.parser.tokenizer.state===qo.SCRIPT_DATA)&&(e.parser.tokenizer.state=qo.DATA)}function _Je(i){const e=i.type==="root"?i.children[0]:i;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName.toLowerCase()==="html"))}function pP(i){const e=Hp(i)||{line:void 0,column:void 0,offset:void 0},t=BH(i)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function yJe(i){return"children"in i?cL({...i,children:[]}):cL(i)}function Gse(i){return function(e,t){return SEe(e,{...i,file:t})}}function wJe(i){return new Date(i).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function CJe(i){return new Date(i).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}const LEe=L.memo(function({message:e}){const t=e.role==="user",[n,s]=L.useState(!1);return d.jsxs("div",{className:me("group relative flex gap-3 px-4 py-3",t?"flex-row-reverse":"flex-row"),onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[d.jsx("div",{className:me("flex h-8 w-8 shrink-0 items-center justify-center rounded-full",t?"bg-primary text-primary-foreground":"bg-accent/20 text-accent"),children:t?d.jsx(hse,{className:"h-4 w-4"}):d.jsx(Qn,{className:"h-4 w-4"})}),d.jsxs("div",{className:me("flex flex-col gap-1 max-w-[75%]",t&&"items-end"),children:[d.jsx("div",{className:me("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",t?"bg-primary text-primary-foreground rounded-ee-md":"bg-card border border-border text-card-foreground rounded-es-md",e.isStreaming&&"animate-pulse"),children:t?d.jsx("p",{className:"whitespace-pre-wrap",children:e.content}):d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-xs",children:e.content?d.jsx(jse,{remarkPlugins:[Wse],rehypePlugins:[Gse],children:e.content}):e.isStreaming?d.jsx(kJe,{}):d.jsx("p",{className:"text-muted-foreground italic",children:"No response"})})}),d.jsxs("div",{className:me("flex items-center gap-1.5 px-1",t?"flex-row-reverse":"flex-row"),children:[d.jsx("span",{className:"text-[10px] text-muted-foreground/60 select-none",title:CJe(e.timestamp),children:wJe(e.timestamp)}),!t&&e.content&&n&&d.jsx(SJe,{content:e.content})]})]})]})});function SJe({content:i}){const[e,t]=L.useState(!1),n=L.useCallback(()=>{navigator.clipboard.writeText(i),t(!0),setTimeout(()=>t(!1),1500)},[i]);return d.jsx("button",{onClick:n,className:me("inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 text-[10px] transition-colors",e?"text-emerald-500":"text-muted-foreground/50 hover:text-foreground hover:bg-muted/50"),title:"Copy message","data-testid":"copy-message",children:e?d.jsxs(d.Fragment,{children:[d.jsx(Ns,{className:"h-3 w-3"}),d.jsx("span",{children:"Copied"})]}):d.jsxs(d.Fragment,{children:[d.jsx(yo,{className:"h-3 w-3"}),d.jsx("span",{children:"Copy"})]})})}function kJe(){const{t:i}=ve();return d.jsxs("div",{className:"flex items-center gap-1 py-1","aria-label":i("chat.agentTyping","Agent is typing"),children:[d.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-muted-foreground/50 [animation-delay:0ms]"}),d.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-muted-foreground/50 [animation-delay:150ms]"}),d.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-muted-foreground/50 [animation-delay:300ms]"})]})}function DEe(){const{t:i}=ve(),e=Bi(n=>n.streamingEnabled),t=Bi(n=>n.toggleStreaming);return d.jsxs("button",{onClick:t,className:me("flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs font-medium transition-colors",e?"border-primary/30 bg-primary/10 text-primary":"border-border bg-muted text-muted-foreground"),title:i("chat.streaming"),"aria-label":i("chat.streaming"),"aria-pressed":e,"data-testid":"streaming-toggle",children:[e?d.jsx(gl,{className:"h-3.5 w-3.5"}):d.jsx(UWe,{className:"h-3.5 w-3.5"}),i("chat.streaming")]})}const TEe="/auditstore";async function QH(i,e=0,t=100){return Be.get(`${TEe}/${i}?skip=${e}&limit=${t}`)}async function NJe(i,e,t=0,n=100){const s=new URLSearchParams({skip:String(t),limit:String(n)});return e!=null&&s.set("agentVersion",String(e)),Be.get(`${TEe}/agent/${i}?${s.toString()}`)}const EJe={parser:"bg-blue-500/80",expressions:"bg-blue-500/80",behavior:"bg-violet-500/80",rules:"bg-violet-500/80",httpcalls:"bg-amber-500/80",apicalls:"bg-amber-500/80",langchain:"bg-emerald-500/80",llm:"bg-emerald-500/80",output:"bg-rose-500/80",property:"bg-cyan-500/80",propertysetter:"bg-cyan-500/80",mcpcalls:"bg-orange-500/80",dictionary:"bg-indigo-500/80",rag:"bg-teal-500/80"};function LJe(i){const e=i.toLowerCase().replace("ai.labs.","");return EJe[e]??"bg-muted-foreground/60"}function DJe(i){return i.replace("ai.labs.","").replace(/store$/,"")}function TJe({conversationId:i}){const{t:e}=ve(),t=Mu(g=>g.turns),n=Mu(g=>g.currentTurnEvents),s=Mu(g=>g.selectedTurnIndex),r=Mu(g=>g.setSelectedTurn),{data:o,isError:a}=fn({queryKey:["audit","debugger",i],queryFn:()=>QH(i,0,200),enabled:!!i&&t.length===0,staleTime:3e4}),l=L.useMemo(()=>o!=null&&o.length?RJe(o):[],[o]),c=t.length>0?t:l,u=s!==null?c[s]:c[c.length-1],h=s===null&&n.length>0;return d.jsxs("div",{className:"flex flex-col gap-3 p-3","data-testid":"pipeline-trace",children:[c.length>1&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:e("debugDrawer.turn","Turn")}),d.jsxs("select",{value:s??"latest",onChange:g=>{const f=g.target.value;r(f==="latest"?null:Number(f))},"aria-label":e("debugDrawer.turn","Turn"),className:"rounded-md border border-input bg-card px-2 py-1 text-xs","data-testid":"turn-selector",children:[d.jsxs("option",{value:"latest",children:[e("debugDrawer.latest","Latest")," (",e("debugDrawer.turn","Turn")," ",c.length,")"]}),c.map((g,f)=>d.jsxs("option",{value:f,children:[e("debugDrawer.turn","Turn")," ",f+1," — ",aL(g.totalDurationMs)]},f))]})]}),a&&c.length===0&&!h&&d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center","data-testid":"pipeline-trace-error",children:[d.jsx(Ui,{className:"h-8 w-8 text-destructive/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e("debugDrawer.pipelineError","Failed to load pipeline trace")})]}),!a||c.length>0||h?h?d.jsx(AJe,{events:n}):u?d.jsx(IJe,{turn:u}):d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(gl,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e("debugDrawer.noPipeline","Send a message to see the pipeline trace")})]}):null]})}function IJe({turn:i}){const{t:e}=ve(),t=L.useMemo(()=>AEe(i.events),[i.events]),n=Math.max(...t.map(s=>s.durationMs),1);return d.jsxs("div",{className:"space-y-1.5",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(Yr,{className:"h-3 w-3"}),e("debugDrawer.turn","Turn")," ",i.turnIndex+1]}),d.jsx("span",{className:"font-mono",children:aL(i.totalDurationMs)})]}),t.map((s,r)=>d.jsx(IEe,{task:s,maxDuration:n},r)),i.events.some(s=>{var r;return(r=s.actions)==null?void 0:r.length})&&d.jsxs("div",{className:"flex flex-wrap gap-1 pt-1",children:[d.jsxs("span",{className:"text-[10px] font-medium text-muted-foreground me-1",children:[e("debugDrawer.actions","Actions"),":"]}),i.events.flatMap(s=>s.actions??[]).filter((s,r,o)=>o.indexOf(s)===r).map(s=>d.jsx("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:s},s))]})]})}function AJe({events:i}){const{t:e}=ve(),t=L.useMemo(()=>AEe(i),[i]),n=Math.max(...t.map(s=>s.durationMs||100),1);return d.jsxs("div",{className:"space-y-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1 text-xs text-primary animate-pulse",children:[d.jsx(gl,{className:"h-3 w-3"}),e("debugDrawer.processing","Processing...")]}),t.map((s,r)=>d.jsx(IEe,{task:s,maxDuration:n},r))]})}function IEe({task:i,maxDuration:e}){var o;const{t}=ve(),[n,s]=L.useState(!1),r=Math.max(i.durationMs/e*100,8);return d.jsxs("div",{children:[d.jsxs("button",{onClick:()=>s(!n),"aria-expanded":n,className:"group flex w-full items-center gap-2 rounded-md px-1 py-0.5 text-start transition-colors hover:bg-muted/50","data-testid":"task-bar",children:[d.jsx("span",{className:"w-20 shrink-0 truncate text-[11px] font-medium text-foreground",children:DJe(i.taskType)}),d.jsx("div",{className:"flex-1 h-4 rounded-sm bg-muted/30 overflow-hidden",children:d.jsx("div",{className:me("h-full rounded-sm transition-all duration-500",LJe(i.taskType),i.isRunning&&"animate-pulse"),style:{width:`${r}%`}})}),d.jsx("span",{className:"w-14 shrink-0 text-end font-mono text-[10px] text-muted-foreground",children:i.isRunning?"...":aL(i.durationMs)}),d.jsx(Ln,{className:me("h-3 w-3 shrink-0 text-muted-foreground/50 transition-transform",n&&"rotate-180")})]}),n&&d.jsxs("div",{className:"ms-22 mb-1 rounded-md border border-border bg-card p-2 text-[10px] text-muted-foreground space-y-0.5",children:[(o=i.actions)!=null&&o.length?d.jsxs("p",{children:[d.jsxs("span",{className:"font-medium",children:[t("debugDrawer.actions","Actions"),":"]})," ",i.actions.join(", ")]}):null,i.confidence!=null&&d.jsxs("p",{children:[d.jsxs("span",{className:"font-medium",children:[t("debugDrawer.confidence","Confidence"),":"]})," ",(i.confidence*100).toFixed(0),"%"]}),d.jsxs("p",{children:[d.jsxs("span",{className:"font-medium",children:[t("debugDrawer.duration","Duration"),":"]})," ",aL(i.durationMs)]})]})]})}function AEe(i){const e=[],t=new Map;for(const n of i){const s=`${n.taskType}-${n.index}`;if(n.type==="task_start")t.set(s,n);else if(n.type==="task_complete"){const r=t.get(s);e.push({taskType:n.taskType,durationMs:n.durationMs??(r?n.timestamp-r.timestamp:0),actions:n.actions,confidence:n.confidence,isRunning:!1}),t.delete(s)}}for(const[,n]of t)e.push({taskType:n.taskType,durationMs:Date.now()-n.timestamp,isRunning:!0});return e}function RJe(i){const e=new Map;for(const n of i){const s=n.stepIndex??0;e.has(s)||e.set(s,[]),e.get(s).push(n)}const t=[];for(const[n,s]of e){const r=s.flatMap(a=>[{type:"task_start",taskId:a.taskId,taskType:a.taskType,index:a.taskIndex,timestamp:new Date(a.timestamp).getTime()},{type:"task_complete",taskId:a.taskId,taskType:a.taskType,index:a.taskIndex,durationMs:a.durationMs,actions:a.actions??void 0,timestamp:new Date(a.timestamp).getTime()+(a.durationMs??0)}]),o=s.reduce((a,l)=>a+(l.durationMs??0),0);t.push({turnIndex:n,events:r,totalDurationMs:o,startTime:new Date(s[0].timestamp).getTime()})}return t.sort((n,s)=>n.turnIndex-s.turnIndex)}const REe="/llm/tools";async function MJe(i){try{return await Be.get(`${REe}/costs/conversation/${i}`)}catch(e){if(nP(e)&&e.status===404)return null;throw e}}async function PJe(){return Be.get(`${REe}/cache/stats`)}const MEe=["toolMetrics"];function OJe(i,e=!0){return fn({queryKey:[...MEe,"costs",i],queryFn:()=>MJe(i),enabled:!!i&&e,refetchInterval:e?5e3:!1,staleTime:4e3})}function jJe(i=!1){return fn({queryKey:[...MEe,"cacheStats"],queryFn:PJe,enabled:i,staleTime:3e4})}function FJe({conversationId:i,isActive:e=!1}){const{t}=ve(),{data:n,isError:s}=OJe(i,e),{data:r}=jJe(e),{data:o}=fn({queryKey:["audit","costDash",i],queryFn:()=>QH(i,0,200),enabled:!!i,staleTime:1e4}),a=L.useMemo(()=>o!=null&&o.length?HJe(o):null,[o]),l=a==null?void 0:a.turns[a.turns.length-1];return d.jsxs("div",{className:"flex flex-col gap-3 p-3","data-testid":"cost-dashboard",children:[l&&d.jsxs(W5,{title:t("costDashboard.thisTurn","This Turn"),icon:d.jsx(gl,{className:"h-3.5 w-3.5"}),children:[d.jsx(iy,{label:t("costDashboard.tokens","Tokens"),value:`${ik(l.inputTokens)} ${t("costDashboard.in","in")} · ${ik(l.outputTokens)} ${t("costDashboard.out","out")} · ${ik(l.totalTokens)} ${t("costDashboard.total","total")}`}),l.cost>0&&d.jsx(iy,{label:t("costDashboard.cost","Cost"),value:Npe(l.cost)}),d.jsx(iy,{label:t("costDashboard.duration","Duration"),value:aL(l.durationMs)}),l.modelName&&d.jsx(iy,{label:t("costDashboard.model","Model"),value:l.modelName})]}),a&&d.jsxs(W5,{title:t("costDashboard.conversationTotal","Conversation Total"),icon:d.jsx(vke,{className:"h-3.5 w-3.5"}),children:[d.jsx(iy,{label:t("costDashboard.tokens","Tokens"),value:`${ik(a.totalInput)} ${t("costDashboard.in","in")} · ${ik(a.totalOutput)} ${t("costDashboard.out","out")} · ${ik(a.totalTokens)} ${t("costDashboard.total","total")}`}),d.jsx(iy,{label:t("costDashboard.cost","Cost"),value:Npe(a.totalCost)}),(n==null?void 0:n.toolCallCount)!=null&&n.toolCallCount>0&&d.jsx(iy,{label:t("costDashboard.toolCalls","Tool Calls"),value:`${n.toolCallCount}`})]}),(n==null?void 0:n.toolUsage)&&Object.keys(n.toolUsage).length>0&&d.jsx(W5,{title:t("costDashboard.toolUsage","Tool Usage"),icon:d.jsx(IH,{className:"h-3.5 w-3.5"}),children:Object.entries(n.toolUsage).map(([c,u])=>d.jsx("div",{className:"space-y-0.5",children:d.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[d.jsx("span",{className:"font-medium text-foreground truncate",children:c}),d.jsxs("span",{className:"text-muted-foreground font-mono",children:[u," ",t("costDashboard.calls","calls")]})]})},c))}),r&&r.hitRate>0&&d.jsx(W5,{title:t("costDashboard.cacheStats","Cache"),icon:d.jsx(Cb,{className:"h-3.5 w-3.5"}),children:d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[d.jsx("span",{className:"text-foreground",children:t("costDashboard.hitRate","Hit Rate")}),d.jsxs("span",{className:"font-mono text-muted-foreground",children:[(r.hitRate*100).toFixed(1),"%"]})]}),d.jsx(BJe,{value:r.hitRate,variant:"success"})]})}),s&&!n&&d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center","data-testid":"cost-dashboard-error",children:[d.jsx(Ui,{className:"h-8 w-8 text-destructive/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:t("costDashboard.error","Unable to load cost data from server")})]}),!a&&!n&&!s&&d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(JSe,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:t("costDashboard.empty","Send a message to see cost metrics")})]})]})}function W5({title:i,icon:e,children:t}){return d.jsxs("div",{className:"rounded-lg border border-border bg-card/50 p-2.5 space-y-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-foreground/80",children:[e,i]}),d.jsx("div",{className:"space-y-1",children:t})]})}function iy({label:i,value:e}){return d.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[d.jsx("span",{className:"text-muted-foreground",children:i}),d.jsx("span",{className:"font-mono text-foreground",children:e})]})}function BJe({value:i,max:e=1,variant:t="default"}){const n=Math.min(i/e*100,100),s=t==="critical"?"bg-destructive":t==="warning"?"bg-amber-500":t==="success"?"bg-emerald-500":"bg-primary";return d.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted/40 overflow-hidden",children:d.jsx("div",{className:me("h-full rounded-full transition-all duration-500",s),style:{width:`${n}%`}})})}function HJe(i){const e=new Map;for(const a of i){const l=a.stepIndex??0;e.has(l)||e.set(l,[]),e.get(l).push(a)}const t=[];let n=0,s=0,r=0;const o=Array.from(e.entries()).sort(([a],[l])=>a-l);for(const[,a]of o){let l=0,c=0,u=0,h=0,g=null;for(const f of a){const m=f.llmDetail;if(m){const x=m.tokenUsage;x&&(l+=x.inputTokens??0,c+=x.outputTokens??0),m.modelName&&(g=String(m.modelName))}u+=f.cost??0,h+=f.durationMs??0}t.push({inputTokens:l,outputTokens:c,totalTokens:l+c,cost:u,durationMs:h,modelName:g}),n+=l,s+=c,r+=u}return{turns:t,totalInput:n,totalOutput:s,totalTokens:n+s,totalCost:r}}function ik(i){return i.toLocaleString()}function Npe(i){return i===0?"$0.00":i<.01?`$${i.toFixed(4)}`:`$${i.toFixed(2)}`}function WJe({conversationId:i}){const{t:e}=ve(),{data:t,isLoading:n,isError:s,refetch:r}=fn({queryKey:["memory","detailed",i],queryFn:()=>Tze(i),enabled:!!i,staleTime:1e4});if(!i)return d.jsx(Epe,{message:e("memoryInspector.noConversation","Start a conversation to inspect memory")});if(n)return d.jsx("div",{className:"flex items-center justify-center py-8",children:d.jsx(yi,{className:"h-5 w-5 animate-spin text-muted-foreground"})});if(s&&!t)return d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center","data-testid":"memory-inspector-error",children:[d.jsx(Ui,{className:"h-8 w-8 text-destructive/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e("memoryInspector.error","Failed to load memory data")})]});const o=(t==null?void 0:t.conversationSteps)??[];return d.jsxs("div",{className:"flex flex-col gap-2 p-3","data-testid":"memory-inspector",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:e("memoryInspector.title","Conversation Memory")}),d.jsx("button",{onClick:()=>r(),className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground",title:e("common.retry","Refresh"),"data-testid":"memory-refresh",children:d.jsx(yi,{className:"h-3 w-3"})})]}),o.length===0?d.jsx(Epe,{message:e("memoryInspector.empty","No memory data available")}):o.map((a,l)=>d.jsx(VJe,{step:a,stepIndex:l},l)),(t==null?void 0:t.conversationProperties)&&Object.keys(t.conversationProperties).length>0&&d.jsx(PEe,{label:e("memoryInspector.properties","Properties"),defaultOpen:!1,children:d.jsx("pre",{className:"text-[10px] font-mono text-muted-foreground whitespace-pre-wrap break-all",children:JSON.stringify(t.conversationProperties,null,2)})})]})}function VJe({step:i,stepIndex:e}){const{t}=ve(),n=L.useMemo(()=>{const s=new Map;for(const r of i.conversationStep??[]){const o=r.originWorkflowId??"input";s.has(o)||s.set(o,[]),s.get(o).push(r)}return Array.from(s.entries())},[i.conversationStep]);return d.jsx(PEe,{label:`${t("memoryInspector.step","Step")} ${e+1}`,badge:`${(i.conversationStep??[]).length} ${t("memoryInspector.keys","keys")}`,defaultOpen:e===0,children:n.map(([s,r])=>d.jsxs("div",{className:"ms-2 border-s border-border ps-2 space-y-0.5",children:[d.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wide",children:s==="input"?t("memoryInspector.input","Input"):s}),r.map((o,a)=>d.jsx(zJe,{item:o},a))]},s))})}function zJe({item:i}){const[e,t]=L.useState(!1),n=typeof i.value=="object"&&i.value!==null,s=!i.key.includes("private"),r=n?JSON.stringify(i.value,null,2):String(i.value),o=r.length>80;return d.jsxs("div",{className:"rounded-sm",children:[d.jsxs("button",{onClick:()=>o&&t(!e),className:me("flex w-full items-center gap-1 py-0.5 text-start text-[10px]",o&&"cursor-pointer hover:bg-muted/30 rounded px-1 -mx-1"),children:[s?d.jsx(Hh,{className:"h-2.5 w-2.5 shrink-0 text-emerald-500/60"}):d.jsx(Bb,{className:"h-2.5 w-2.5 shrink-0 text-amber-500/60"}),d.jsx("span",{className:"font-mono font-medium text-primary/80 shrink-0",children:i.key}),d.jsx("span",{className:"text-muted-foreground/60 mx-0.5",children:"="}),!e&&d.jsxs("span",{className:"truncate font-mono text-foreground/70",children:[r.slice(0,80),o&&"…"]})]}),e&&d.jsx("pre",{className:"ms-5 mt-0.5 rounded border border-border bg-card p-1.5 text-[10px] font-mono text-foreground/70 whitespace-pre-wrap break-all max-h-48 overflow-y-auto",children:r})]})}function PEe({label:i,badge:e,defaultOpen:t=!1,children:n}){const[s,r]=L.useState(t);return d.jsxs("div",{className:"rounded-md border border-border bg-card/30",children:[d.jsxs("button",{onClick:()=>r(!s),"aria-expanded":s,className:"flex w-full items-center gap-1.5 px-2 py-1.5 text-xs font-medium text-foreground hover:bg-muted/30 rounded-t-md","data-testid":"expandable-node",children:[d.jsx(xs,{className:me("h-3 w-3 shrink-0 text-muted-foreground transition-transform",s&&"rotate-90")}),i,e&&d.jsx("span",{className:"ms-auto text-[10px] font-normal text-muted-foreground",children:e})]}),s&&d.jsx("div",{className:"px-2 pb-2 space-y-1",children:n})]})}function Epe({message:i}){return d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(z_,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:i})]})}class OEe{constructor(e,t={}){Et(this,"abortController",null);Et(this,"reconnectTimer",null);Et(this,"listeners",new Map);Et(this,"_closed",!1);Et(this,"onmessage",null);Et(this,"onerror",null);Et(this,"onopen",null);this.url=e,this.headers=t,this.connect()}addEventListener(e,t){this.listeners.has(e)||this.listeners.set(e,[]),this.listeners.get(e).push(t)}close(){var e;this._closed=!0,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(e=this.abortController)==null||e.abort(),this.abortController=null}async connect(){var e;if(!this._closed){this.abortController=new AbortController;try{const t=await fetch(this.url,{headers:{Accept:"text/event-stream",...this.headers},signal:this.abortController.signal});if(!t.ok||!t.body){this.scheduleReconnect();return}(e=this.onopen)==null||e.call(this);const n=t.body.getReader(),s=new TextDecoder;let r="";for(;!this._closed;){const{done:o,value:a}=await n.read();if(o)break;r+=s.decode(a,{stream:!0});const l=r.split(` + +`);r=l.pop()??"";for(const c of l){const u=this.parseBlock(c.trim());u&&this.dispatch(u)}}this._closed||this.scheduleReconnect()}catch(t){if(this._closed||t instanceof DOMException&&t.name==="AbortError")return;this.scheduleReconnect()}}}scheduleReconnect(){var e;this._closed||((e=this.onerror)==null||e.call(this),this.reconnectTimer=setTimeout(()=>this.connect(),5e3))}parseBlock(e){if(!e)return null;let t="message";const n=[];for(const s of e.split(` +`))s.startsWith("event:")?t=s.slice(6).trim():s.startsWith("data:")&&n.push(s.slice(5).trimStart());return n.length===0?null:new MessageEvent(t,{data:n.join(` +`)})}dispatch(e){var n;const t=this.listeners.get(e.type);t&&t.forEach(s=>s(e)),(n=this.onmessage)==null||n.call(this,e)}}const XH="/administration/logs";async function UJe(i={}){const e=new URLSearchParams;i.agentId&&e.set("agentId",i.agentId),i.conversationId&&e.set("conversationId",i.conversationId),i.level&&e.set("level",i.level),i.limit&&e.set("limit",String(i.limit));const t=e.toString();return Be.get(`${XH}${t?`?${t}`:""}`)}async function $Je(i={}){const e=new URLSearchParams;i.environment&&e.set("environment",i.environment),i.agentId&&e.set("agentId",i.agentId),i.agentVersion&&e.set("agentVersion",String(i.agentVersion)),i.conversationId&&e.set("conversationId",i.conversationId),i.userId&&e.set("userId",i.userId),i.instanceId&&e.set("instanceId",i.instanceId),i.skip&&e.set("skip",String(i.skip)),i.limit&&e.set("limit",String(i.limit));const t=e.toString();return Be.get(`${XH}/history${t?`?${t}`:""}`)}async function qJe(){return Be.get(`${XH}/instance`)}function Yse(i={}){const e=new URLSearchParams;i.agentId&&e.set("agentId",i.agentId),i.conversationId&&e.set("conversationId",i.conversationId),i.level&&e.set("level",i.level);const t=e.toString(),n=`${window.location.origin}${XH}/stream${t?`?${t}`:""}`;return new OEe(n,Be.getAuthHeader())}const Lpe=500,jEe={ERROR:"text-destructive",WARN:"text-amber-500",INFO:"text-emerald-500",DEBUG:"text-muted-foreground",TRACE:"text-muted-foreground/50"},FEe={ERROR:"bg-destructive/10",WARN:"bg-amber-500/10",INFO:"bg-emerald-500/10",DEBUG:"bg-muted/30",TRACE:"bg-muted/20"};function KJe({agentId:i,conversationId:e}){const{t}=ve(),[n,s]=L.useState([]),[r,o]=L.useState(!1),a=L.useRef(!1),[l,c]=L.useState(null),[u,h]=L.useState(""),[g,f]=L.useState(!1),m=L.useRef(null),x=L.useRef(null);L.useEffect(()=>{a.current=r},[r]),L.useEffect(()=>{if(!i)return;const w=Yse({agentId:i,conversationId:e??void 0}),k=C=>{if(!a.current)try{const E=JSON.parse(C.data);s(D=>{const T=[...D,E];return T.length>Lpe?T.slice(-Lpe):T})}catch{}};return w.addEventListener("log",k),w.onmessage=k,w.onopen=()=>f(!0),w.onerror=()=>f(!1),x.current=w,()=>{w.close(),x.current=null,f(!1)}},[i,e]),L.useEffect(()=>{i&&UJe({agentId:i,conversationId:e??void 0,limit:50}).then(w=>s(w)).catch(()=>{})},[i,e]),L.useEffect(()=>{var w;r||(w=m.current)==null||w.scrollTo({top:m.current.scrollHeight,behavior:"smooth"})},[n,r]);const v=L.useCallback(()=>s([]),[]),_=L.useMemo(()=>{let w=n;if(l&&(w=w.filter(k=>k.level===l)),u.trim()){const k=u.toLowerCase();w=w.filter(C=>C.message.toLowerCase().includes(k)||C.loggerName.toLowerCase().includes(k))}return w},[n,l,u]);return i?d.jsxs("div",{className:"flex flex-col","data-testid":"live-log-viewer",children:[d.jsxs("div",{className:"flex items-center gap-1.5 border-b border-border px-3 py-1.5",children:[d.jsx(sL,{className:me("h-2 w-2 shrink-0 fill-current",g?"text-emerald-500":"text-destructive"),"aria-label":g?t("logViewer.connected","Connected"):t("logViewer.disconnected","Disconnected"),role:"status"}),["ERROR","WARN","INFO","DEBUG"].map(w=>d.jsx("button",{onClick:()=>c(l===w?null:w),"aria-pressed":l===w,className:me("rounded-full px-2 py-0.5 text-[10px] font-medium transition-colors",l===w?`${FEe[w]} ${jEe[w]}`:"text-muted-foreground hover:bg-muted"),"data-testid":`filter-${w}`,children:w},w)),d.jsx("div",{className:"flex-1"}),d.jsxs("div",{className:"relative",children:[d.jsx(Cr,{className:"absolute inset-s-1.5 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),d.jsx("input",{type:"text",value:u,onChange:w=>h(w.target.value),placeholder:t("logViewer.search","Search..."),className:"w-32 rounded border border-input bg-card py-0.5 ps-6 pe-2 text-[10px] focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"log-search"})]}),d.jsx("button",{onClick:()=>o(!r),className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground",title:r?t("logViewer.resume","Resume"):t("logViewer.pause","Pause"),"data-testid":"log-pause",children:r?d.jsx(lse,{className:"h-3 w-3"}):d.jsx(ose,{className:"h-3 w-3"})}),d.jsx("button",{onClick:v,className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground",title:t("logViewer.clear","Clear"),"data-testid":"log-clear",children:d.jsx(yn,{className:"h-3 w-3"})})]}),d.jsx("div",{ref:m,role:"log","aria-live":"polite","aria-label":t("logViewer.logOutput","Log output"),className:"overflow-y-auto font-mono text-[10px] leading-relaxed",style:{maxHeight:"35vh"},children:_.length===0?d.jsx("div",{className:"flex items-center justify-center py-8 text-muted-foreground text-xs",children:t("logViewer.waiting","Waiting for logs...")}):_.map((w,k)=>d.jsx(GJe,{entry:w},k))})]}):d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(u_,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:t("logViewer.noAgent","Select an agent to view logs")})]})}function GJe({entry:i}){const e=i.level??"INFO",t=i.timestamp?new Date(i.timestamp).toLocaleTimeString(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}):"",n=i.loggerName?i.loggerName.split(".").pop()??i.loggerName:"";return d.jsxs("div",{className:me("flex items-start gap-1.5 border-b border-border/30 px-3 py-0.5 leading-tight",FEe[e]??"bg-transparent"),"data-testid":"log-entry",children:[d.jsx("span",{className:"shrink-0 text-muted-foreground/70 min-w-[70px]",children:t}),d.jsx("span",{className:me("shrink-0 w-10 font-bold",jEe[e]??"text-foreground"),children:e.padEnd(5)}),d.jsxs("span",{className:"shrink-0 text-primary/60 w-24 truncate",children:["[",n,"]"]}),d.jsx("span",{className:"text-foreground/80 break-all",children:i.message})]})}function YJe({conversationId:i}){const{t:e}=ve(),{data:t,isError:n}=fn({queryKey:["audit","promptViewer",i],queryFn:()=>QH(i,0,200),enabled:!!i,staleTime:1e4}),s=L.useMemo(()=>t?t.filter(l=>l.llmDetail!=null).sort((l,c)=>new Date(l.timestamp).getTime()-new Date(c.timestamp).getTime()):[],[t]),[r,o]=L.useState(null),a=r!==null?s[r]:s[s.length-1];return i?n&&!t?d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center","data-testid":"prompt-viewer-error",children:[d.jsx(Ui,{className:"h-8 w-8 text-destructive/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e("promptViewer.error","Failed to load prompt data")})]}):s.length===0?d.jsx(Ipe,{message:e("promptViewer.noLlm","No LLM interactions found yet")}):d.jsxs("div",{className:"flex flex-col gap-3 p-3","data-testid":"prompt-viewer",children:[s.length>1&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:e("promptViewer.turn","Turn")}),d.jsxs("select",{value:r??"latest",onChange:l=>{const c=l.target.value;o(c==="latest"?null:Number(c))},className:"rounded-md border border-input bg-card px-2 py-1 text-xs","data-testid":"prompt-turn-selector",children:[d.jsxs("option",{value:"latest",children:[e("promptViewer.latest","Latest")," (",e("promptViewer.step","Step")," ",s.length,")"]}),s.map((l,c)=>d.jsxs("option",{value:c,children:[e("promptViewer.step","Step")," ",l.stepIndex+1," — ",l.taskType]},c))]})]}),a&&d.jsx(QJe,{entry:a,conversationId:i})]}):d.jsx(Ipe,{message:e("promptViewer.noConversation","Start a conversation to inspect prompts")})}function QJe({entry:i,conversationId:e}){const{t}=ve(),[n,s]=L.useState(!1),[r,o]=L.useState(!1),a=i.llmDetail,l=a==null?void 0:a.compiledPrompt,c=a==null?void 0:a.modelResponse,u=a==null?void 0:a.modelName,h=a==null?void 0:a.tokenUsage,g=i.toolCalls,f=L.useMemo(()=>l?ZJe(l):[],[l]),m=async()=>{const v=l??JSON.stringify(a,null,2);try{await navigator.clipboard.writeText(v),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},x=async()=>{try{o(!0),await Be.post(`/agents/${e}/rerun`)}catch{}finally{o(!1)}};return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsxs("span",{className:"font-medium text-foreground",children:[t("promptViewer.step","Step")," ",i.stepIndex+1]}),d.jsx("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] font-medium text-emerald-500",children:i.taskType}),i.durationMs>0&&d.jsx("span",{className:"font-mono",children:aL(i.durationMs)})]}),f.length>0?d.jsx("div",{className:"space-y-2",children:f.map((v,_)=>d.jsx(Tpe,{role:v.role,content:v.content},_))}):l?d.jsx("div",{className:"rounded-lg border border-border bg-card p-3",children:d.jsx("pre",{className:"text-[11px] font-mono text-foreground/80 whitespace-pre-wrap break-all max-h-64 overflow-y-auto",children:l})}):null,c&&d.jsx(Tpe,{role:"assistant",content:c}),g&&g.length>0&&d.jsx(XJe,{toolCalls:g}),d.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 rounded-lg border border-border bg-card/50 px-3 py-2 text-[10px] text-muted-foreground",children:[h&&d.jsxs("span",{children:[d.jsxs("strong",{className:"text-foreground",children:[t("promptViewer.tokens","Tokens"),":"]})," ",(h.inputTokens??0).toLocaleString()," ",t("costDashboard.in","in")," / ",(h.outputTokens??0).toLocaleString()," ",t("costDashboard.out","out")]}),u&&d.jsxs("span",{children:[d.jsxs("strong",{className:"text-foreground",children:[t("promptViewer.model","Model"),":"]})," ",u]}),i.cost>0&&d.jsxs("span",{children:[d.jsxs("strong",{className:"text-foreground",children:[t("promptViewer.cost","Cost"),":"]})," ","$",i.cost<.01?i.cost.toFixed(4):i.cost.toFixed(2)]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("button",{onClick:m,className:"inline-flex items-center gap-1 rounded-md border border-input px-2.5 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-secondary","data-testid":"copy-prompt",children:[n?d.jsx(Ns,{className:"h-3 w-3 text-emerald-500"}):d.jsx(yo,{className:"h-3 w-3"}),n?t("promptViewer.copied","Copied!"):t("promptViewer.copy","Copy Prompt")]}),d.jsxs("button",{onClick:x,disabled:r,className:"inline-flex items-center gap-1 rounded-md border border-input px-2.5 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-secondary disabled:opacity-50","data-testid":"replay-turn",children:[d.jsx($_,{className:me("h-3 w-3",r&&"animate-spin")}),t("promptViewer.replay","Replay This Turn")]})]})]})}const Dpe={system:{icon:tse,labelKey:"promptViewer.roleSystem",fallback:"System Prompt",color:"border-emerald-500/30 bg-emerald-500/5"},user:{icon:hse,labelKey:"promptViewer.roleUser",fallback:"User",color:"border-blue-500/30 bg-blue-500/5"},assistant:{icon:Qn,labelKey:"promptViewer.roleAssistant",fallback:"Assistant",color:"border-primary/30 bg-primary/5"},tool:{icon:lx,labelKey:"promptViewer.roleTool",fallback:"Tool Result",color:"border-amber-500/30 bg-amber-500/5"}};function Tpe({role:i,content:e}){const{t}=ve(),[n,s]=L.useState(i==="system"||i==="user"),r=Dpe[i]??Dpe.assistant,o=r.icon,a=t(r.labelKey,r.fallback),l=e.length>300;return d.jsxs("div",{className:me("rounded-lg border p-2.5",r.color),children:[d.jsxs("button",{onClick:()=>s(!n),"aria-expanded":n,className:"flex w-full items-center gap-1.5 text-start",children:[d.jsx(o,{className:"h-3.5 w-3.5 shrink-0 text-foreground/60"}),d.jsx("span",{className:"text-[11px] font-semibold text-foreground/80",children:a}),l&&d.jsx(Ln,{className:me("ms-auto h-3 w-3 text-muted-foreground transition-transform",n&&"rotate-180")})]}),n&&d.jsx("pre",{className:"mt-1.5 text-[10px] font-mono text-foreground/70 whitespace-pre-wrap break-all max-h-48 overflow-y-auto",children:e})]})}function XJe({toolCalls:i}){const{t:e}=ve();return d.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-2.5 space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-foreground/80",children:[d.jsx(lx,{className:"h-3.5 w-3.5"}),e("promptViewer.toolCalls","Tool Calls")," (",i.length,")"]}),i.map((t,n)=>d.jsx("pre",{className:"text-[10px] font-mono text-foreground/70 whitespace-pre-wrap break-all",children:JSON.stringify(t,null,2)},n))]})}function ZJe(i){try{const r=JSON.parse(i);if(Array.isArray(r))return r.map(o=>({role:o.role??"user",content:o.content??JSON.stringify(o)}))}catch{}const e=[],t=i.split(` +`);let n="system",s=[];for(const r of t){const o=r.toLowerCase().trim();let a=null;if(o.startsWith("system:")||o==="[system]"?a="system":o.startsWith("user:")||o==="[user]"?a="user":o.startsWith("assistant:")||o==="[assistant]"?a="assistant":(o.startsWith("tool:")||o==="[tool]")&&(a="tool"),a){s.length>0&&(e.push({role:n,content:s.join(` +`).trim()}),s=[]),n=a;const l=r.indexOf(":");l>=0&&l0&&e.push({role:n,content:s.join(` +`).trim()}),e.length===1&&e[0].role==="system"?[{role:"system",content:i}]:e}function Ipe({message:i}){return d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(oke,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:i})]})}const sy=[{id:"pipeline",labelKey:"debugDrawer.tabPipeline",fallback:"Pipeline",icon:d.jsx(ax,{className:"h-3.5 w-3.5"})},{id:"costs",labelKey:"debugDrawer.tabCosts",fallback:"Costs",icon:d.jsx(JSe,{className:"h-3.5 w-3.5"})},{id:"memory",labelKey:"debugDrawer.tabMemory",fallback:"Memory",icon:d.jsx(z_,{className:"h-3.5 w-3.5"})},{id:"logs",labelKey:"debugDrawer.tabLogs",fallback:"Logs",icon:d.jsx(u_,{className:"h-3.5 w-3.5"})},{id:"prompt",labelKey:"debugDrawer.tabPrompt",fallback:"Prompt",icon:d.jsx(oke,{className:"h-3.5 w-3.5"})}];function BEe({conversationId:i,agentId:e}){const{t}=ve(),n=Mu(l=>l.isDebugOpen),s=Mu(l=>l.activeTab),r=Mu(l=>l.setActiveTab),o=Mu(l=>l.toggleDebug),a=L.useCallback(l=>{const c=sy.findIndex(f=>f.id===s);let u=null;switch(l.key){case"ArrowRight":case"ArrowDown":u=(c+1)%sy.length;break;case"ArrowLeft":case"ArrowUp":u=(c-1+sy.length)%sy.length;break;case"Home":u=0;break;case"End":u=sy.length-1;break;default:return}l.preventDefault();const h=sy[u];r(h.id);const g=document.getElementById(`debug-tab-${h.id}`);g==null||g.focus()},[s,r]);return d.jsxs("div",{"data-testid":"debug-drawer",children:[d.jsxs("button",{onClick:o,"aria-expanded":n,"aria-controls":"debug-drawer-content",className:me("flex w-full items-center justify-center gap-1.5 border-t border-border px-4 py-1.5 text-xs font-medium transition-colors",n?"bg-primary/5 text-primary hover:bg-primary/10":"text-muted-foreground hover:bg-muted hover:text-foreground"),"data-testid":"debug-toggle",children:[n?d.jsx(Ln,{className:"h-3.5 w-3.5"}):d.jsx(Fp,{className:"h-3.5 w-3.5"}),t("debugDrawer.title","Debug")]}),n&&d.jsxs("div",{id:"debug-drawer-content",className:"flex flex-col border-t border-border bg-background",children:[d.jsx("div",{className:"flex border-b border-border overflow-x-auto",role:"tablist","aria-label":t("debugDrawer.title","Debug"),children:sy.map(l=>d.jsxs("button",{role:"tab","aria-selected":s===l.id,"aria-controls":`debug-tabpanel-${l.id}`,id:`debug-tab-${l.id}`,tabIndex:s===l.id?0:-1,onClick:()=>r(l.id),onKeyDown:a,className:me("flex items-center gap-1 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors",s===l.id?"border-b-2 border-primary text-primary":"text-muted-foreground hover:text-foreground"),"data-testid":`debug-tab-${l.id}`,children:[l.icon,d.jsx("span",{className:"hidden sm:inline",children:t(l.labelKey,l.fallback)})]},l.id))}),d.jsxs("div",{role:"tabpanel",id:`debug-tabpanel-${s}`,"aria-labelledby":`debug-tab-${s}`,className:"overflow-y-auto",style:{maxHeight:"40vh"},children:[s==="pipeline"&&d.jsx(TJe,{conversationId:i}),s==="costs"&&d.jsx(FJe,{conversationId:i,isActive:!0}),s==="memory"&&d.jsx(WJe,{conversationId:i}),s==="logs"&&d.jsx(KJe,{agentId:e,conversationId:i}),s==="prompt"&&d.jsx(YJe,{conversationId:i})]})]})]})}const JJe=["saving","deploying","starting","ready"];function Ape({current:i,error:e}){const{t}=ve(),n=[{key:"saving",label:t("chatDrawer.saving","Saving changes…")},{key:"deploying",label:t("chatDrawer.deploying","Deploying agent…")},{key:"starting",label:t("chatDrawer.starting","Starting conversation…")}];if(i==="error")return d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8 text-center",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10",children:d.jsx(Mo,{className:"h-6 w-6 text-destructive"})}),d.jsx("p",{className:"text-sm font-medium text-destructive",children:e||t("chatDrawer.error","Something went wrong")})]});const s=JJe.indexOf(i);return d.jsx("div",{className:"space-y-3 py-6",children:n.map((r,o)=>{const a=s>o,l=s===o;return d.jsxs("div",{className:"flex items-center gap-3 px-4",children:[a?d.jsx(Go,{className:"h-5 w-5 shrink-0 text-emerald-500"}):l?d.jsx(Xn,{className:"h-5 w-5 shrink-0 animate-spin text-primary"}):d.jsx("div",{className:"h-5 w-5 shrink-0 rounded-full border-2 border-muted-foreground/30"}),d.jsx("span",{className:me("text-sm",a&&"text-emerald-600 dark:text-emerald-400 line-through opacity-70",l&&"font-medium text-foreground",!a&&!l&&"text-muted-foreground"),children:r.label})]},r.key)})})}function eet(){const{t:i}=ve(),e=Rc(w=>w.isOpen),t=Rc(w=>w.agentName),n=Rc(w=>w.agentId),s=Rc(w=>w.step),r=Rc(w=>w.errorMessage),o=Rc(w=>w.close),a=Bi(w=>w.messages),l=Bi(w=>w.conversationId),c=Bi(w=>w.isProcessing),u=Bi(w=>w.isThinking),h=cP(),g=L.useRef(null);L.useEffect(()=>{var w;(w=g.current)==null||w.scrollIntoView({behavior:"smooth"})},[a]);const f=L.useCallback(()=>{n&&(Bi.getState().clearMessages(),Rc.getState().setStep("starting"),h.mutate({agentId:n},{onSuccess:()=>Rc.getState().setStep("ready")}))},[n,h]),m=L.useCallback(()=>{Rc.getState().setStep("idle"),Rc.getState().close()},[]),x=s==="ready",v=s==="saving"||s==="deploying"||s==="starting",_=s==="error";return d.jsx("div",{className:me("flex shrink-0 flex-col bg-background overflow-hidden transition-[width,opacity] duration-300 ease-in-out",e?"w-[420px] opacity-100 border-s border-border":"w-0 opacity-0"),"data-testid":"chat-drawer",role:"complementary","aria-label":i("chatDrawer.title","Test Chat"),children:e&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-4 py-2.5 shrink-0",children:[d.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10",children:d.jsx(Qn,{className:"h-4 w-4 text-primary","aria-hidden":"true"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground truncate",children:i("chatDrawer.title","Test Chat")}),d.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t})]}),x&&d.jsx(DEe,{}),x&&d.jsx("button",{onClick:f,className:"flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:i("chatDrawer.newConversation","New Conversation"),"aria-label":i("chatDrawer.newConversation","New Conversation"),"data-testid":"drawer-new-conversation",children:d.jsx(rse,{className:"h-4 w-4","aria-hidden":"true"})}),d.jsx("button",{onClick:o,className:"flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:i("common.close","Close"),"aria-label":i("common.close","Close"),"data-testid":"drawer-close",children:d.jsx(An,{className:"h-4 w-4","aria-hidden":"true"})})]}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[v&&d.jsx("div",{className:"flex flex-1 items-center justify-center",children:d.jsx(Ape,{current:s,error:null})}),_&&d.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4 p-6",children:[d.jsx(Ape,{current:"error",error:r}),d.jsxs("button",{onClick:m,className:"inline-flex items-center gap-1.5 rounded-lg border border-input px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-secondary","data-testid":"drawer-retry",children:[d.jsx(yi,{className:"h-4 w-4"}),i("chatDrawer.retry","Try again")]})]}),s==="idle"&&!l&&d.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center",children:[d.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-primary/10",children:d.jsx(qh,{className:"h-8 w-8 text-primary"})}),d.jsx("p",{className:"text-sm text-muted-foreground",children:i("chatDrawer.ready","Ready — type a message to test")})]}),(x||s==="idle"&&l)&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex-1 overflow-y-auto","aria-live":"polite","aria-relevant":"additions",children:a.length===0?d.jsx("div",{className:"flex h-full items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx(Qn,{className:"mx-auto h-10 w-10 text-muted-foreground/30"}),d.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:i("chatDrawer.ready","Ready — type a message to test")})]})}):d.jsxs("div",{className:"py-3",children:[a.map(w=>d.jsx(LEe,{message:w},w.id)),u&&d.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm text-muted-foreground animate-pulse",children:[d.jsx(Xn,{className:"h-4 w-4 animate-spin"}),d.jsx("span",{className:"italic",children:i("chat.thinking")})]}),d.jsx("div",{ref:g})]})}),d.jsx(tet,{}),l&&d.jsx(BEe,{conversationId:l,agentId:n}),d.jsx(net,{disabled:!l,isProcessing:c})]})]})]})})}function tet(){const i=Bi(n=>n.quickReplies),e=Bi(n=>n.isProcessing),t=Sse();return i.length===0||e?null:d.jsx("div",{className:"flex flex-wrap gap-1.5 border-t border-border px-3 py-2 shrink-0",children:i.map((n,s)=>d.jsx("button",{type:"button",onClick:()=>t.mutate({message:n}),className:"rounded-full border border-primary/30 bg-primary/5 px-2.5 py-1 text-xs font-medium text-primary transition-colors hover:bg-primary/15","data-testid":"drawer-quick-reply",children:n},`${n}-${s}`))})}function net({disabled:i=!1,isProcessing:e=!1}){const{t}=ve(),[n,s]=L.useState(""),r=L.useRef(null),o=Sse(),a=L.useCallback(()=>{const u=n.trim();!u||i||e||(o.mutate({message:u}),s(""),r.current&&(r.current.style.height="auto"))},[n,i,e,o]),l=L.useCallback(()=>{const u=r.current;u&&(u.style.height="auto",u.style.height=`${Math.min(u.scrollHeight,120)}px`)},[]),c=n.trim().length>0&&!i&&!e;return d.jsx("div",{className:"border-t border-border bg-background p-3 shrink-0",children:d.jsxs("div",{className:"flex items-end gap-2",children:[d.jsx("textarea",{ref:r,"data-testid":"drawer-chat-input",value:n,onChange:u=>{s(u.target.value),l()},onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),a())},placeholder:t("chat.placeholder"),disabled:i,rows:1,className:me("flex-1 resize-none rounded-xl border border-input bg-card px-3 py-2.5 text-sm","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","max-h-[120px] min-h-[40px]")}),d.jsx("button",{onClick:a,disabled:!c,className:me("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl transition-colors",c?"bg-primary text-primary-foreground hover:bg-primary/90 cursor-pointer":"bg-muted text-muted-foreground cursor-not-allowed"),"aria-label":t("chat.send"),"data-testid":"drawer-chat-send",children:e?d.jsx(Xn,{className:"h-4 w-4 animate-spin"}):d.jsx(F2,{className:"h-4 w-4"})})]})})}const iet=[{icon:Qn,titleKey:"onboarding.welcome.buildAgents",descKey:"onboarding.welcome.buildAgentsDesc",gradient:"from-violet-500 to-indigo-600"},{icon:lx,titleKey:"onboarding.welcome.designWorkflows",descKey:"onboarding.welcome.designWorkflowsDesc",gradient:"from-emerald-500 to-teal-600"},{icon:_p,titleKey:"onboarding.welcome.testRealtime",descKey:"onboarding.welcome.testRealtimeDesc",gradient:"from-blue-500 to-cyan-600"},{icon:IH,titleKey:"onboarding.welcome.monitorOperate",descKey:"onboarding.welcome.monitorOperateDesc",gradient:"from-amber-500 to-orange-600"}],qT=3;function set(){const{t:i}=ve(),e=Ys(c=>c.showWelcome),t=Ys(c=>c.dismissWelcome),n=Ys(c=>c.startChapter),[s,r]=L.useState(0),o=L.useCallback(()=>{t(),n("dashboard")},[t,n]),a=L.useCallback(()=>{t()},[t]),l=L.useRef(null);return L.useEffect(()=>{var h;if(!e)return;const c=document.body.style.overflow;document.body.style.overflow="hidden";const u=g=>{switch(g.key){case"ArrowRight":g.preventDefault(),r(f=>Math.min(f+1,qT-1));break;case"ArrowLeft":g.preventDefault(),r(f=>Math.max(f-1,0));break;case"Escape":g.preventDefault(),a();break;case"Tab":{if(!l.current)break;const f=l.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(f.length===0)break;const m=f[0],x=f[f.length-1];if(!m||!x)break;g.shiftKey&&document.activeElement===m?(g.preventDefault(),x.focus()):!g.shiftKey&&document.activeElement===x&&(g.preventDefault(),m.focus());break}}};return document.addEventListener("keydown",u),(h=l.current)==null||h.focus(),()=>{document.removeEventListener("keydown",u),document.body.style.overflow=c}},[e,a]),e?Tg.createPortal(d.jsx("div",{className:"welcome-modal-backdrop fixed inset-0 z-10000 flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-label":i("onboarding.welcome.title"),"data-testid":"welcome-modal",children:d.jsxs("div",{ref:l,className:"welcome-modal-card w-full max-w-xl rounded-2xl shadow-2xl outline-none",tabIndex:-1,children:[d.jsxs("div",{className:"relative min-h-[380px] p-8",children:[s===0&&d.jsxs("div",{className:"flex flex-col items-center text-center animate-[fadeIn_300ms_ease-out]",children:[d.jsxs("div",{className:"relative mb-6",children:[d.jsx("div",{className:"absolute -inset-4 rounded-full bg-primary/10 blur-xl"}),d.jsx("div",{className:"relative flex h-20 w-20 items-center justify-center rounded-2xl bg-linear-to-br from-primary to-primary/60 shadow-lg shadow-primary/25",children:d.jsx(hl,{className:"h-10 w-10 text-primary-foreground"})})]}),d.jsx("h2",{className:"text-2xl font-bold text-white",children:i("onboarding.welcome.title")}),d.jsx("p",{className:"mt-2 text-lg text-sidebar-foreground/70",children:i("onboarding.welcome.subtitle")}),d.jsx("div",{className:"mt-4 h-0.5 w-16 rounded-full bg-linear-to-r from-transparent via-primary to-transparent"}),d.jsx("p",{className:"mt-4 max-w-sm text-sm leading-relaxed text-sidebar-foreground/50",children:i("onboarding.welcome.introText","EDDI Manager is your command center for building, testing, and operating conversational AI agents.")})]}),s===1&&d.jsxs("div",{className:"animate-[fadeIn_300ms_ease-out]",children:[d.jsx("h2",{className:"mb-2 text-center text-xl font-bold text-white",children:i("onboarding.welcome.capabilitiesTitle")}),d.jsx("p",{className:"mb-5 text-center text-sm text-sidebar-foreground/50",children:i("onboarding.welcome.capabilitiesSubtitle","Everything you need to build production-ready AI agents")}),d.jsx("div",{className:"grid grid-cols-2 gap-3",children:iet.map(c=>{const u=c.icon;return d.jsxs("div",{className:"rounded-xl border border-sidebar-border/50 bg-sidebar-border/10 p-4",children:[d.jsx("div",{className:me("mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-linear-to-br text-white shadow-md",c.gradient),children:d.jsx(u,{className:"h-5 w-5"})}),d.jsx("p",{className:"text-sm font-semibold text-white",children:i(c.titleKey)}),d.jsx("p",{className:"mt-1 text-xs leading-relaxed text-sidebar-foreground/60",children:i(c.descKey)})]},c.titleKey)})})]}),s===2&&d.jsxs("div",{className:"flex flex-col items-center text-center animate-[fadeIn_300ms_ease-out]",children:[d.jsxs("div",{className:"relative mb-6",children:[d.jsx("div",{className:"absolute -inset-4 rounded-full bg-emerald-500/10 blur-xl"}),d.jsx("div",{className:"relative flex h-20 w-20 items-center justify-center rounded-2xl bg-linear-to-br from-emerald-500 to-teal-600 shadow-lg",children:d.jsx(Bh,{className:"h-10 w-10 text-white"})})]}),d.jsx("h2",{className:"text-2xl font-bold text-white",children:i("onboarding.welcome.readyTitle")}),d.jsx("p",{className:"mt-2 text-sm text-sidebar-foreground/60",children:i("onboarding.welcome.readySubtitle")}),d.jsxs("div",{className:"mt-8 flex flex-col items-center gap-3 sm:flex-row",children:[d.jsxs("button",{onClick:o,className:"inline-flex items-center gap-2 rounded-xl bg-primary px-6 py-3 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:bg-primary/90 hover:shadow-xl hover:shadow-primary/30 active:scale-[0.97]","data-testid":"welcome-start-tour",children:[d.jsx(hl,{className:"h-4 w-4"}),i("onboarding.welcome.startTour")]}),d.jsx("button",{onClick:a,className:"inline-flex items-center gap-2 rounded-xl border border-sidebar-border px-6 py-3 text-sm font-medium text-sidebar-foreground/70 transition-colors hover:border-sidebar-foreground/30 hover:text-sidebar-foreground","data-testid":"welcome-explore",children:i("onboarding.welcome.exploreOwn")})]})]})]}),d.jsxs("div",{className:"flex items-center justify-between border-t border-sidebar-border px-6 py-4",children:[d.jsx("button",{onClick:()=>r(c=>Math.max(c-1,0)),disabled:s===0,className:me("rounded-lg p-1.5 transition-colors",s===0?"invisible":"text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent/10"),"aria-label":i("onboarding.tour.back"),children:d.jsx(zl,{className:"h-4 w-4"})}),d.jsx("div",{className:"flex items-center gap-2",children:Array.from({length:qT}).map((c,u)=>d.jsx("button",{onClick:()=>r(u),className:me("carousel-dot h-2 rounded-full transition-all",u===s?"carousel-dot-active w-6 bg-primary":"w-2 bg-sidebar-foreground/30 hover:bg-sidebar-foreground/50"),"aria-label":`Panel ${u+1}`},u))}),d.jsx("button",{onClick:()=>r(c=>Math.min(c+1,qT-1)),disabled:s===qT-1,className:me("rounded-lg p-1.5 transition-colors",s===qT-1?"invisible":"text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent/10"),"aria-label":i("onboarding.tour.next"),children:d.jsx(Bh,{className:"h-4 w-4"})})]})]})}),document.body):null}function ret(i,e=8){const[t,n]=L.useState(null),s=L.useCallback(()=>{if(!i){n(null);return}const r=document.querySelector(i);if(!r){n(null);return}const o=r.getBoundingClientRect();n({top:o.top-e,left:o.left-e,width:o.width+e*2,height:o.height+e*2})},[i,e]);return L.useEffect(()=>{s();const r=()=>requestAnimationFrame(s);return window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0)}},[s]),t}function oet({targetSelector:i,padding:e=8,onOverlayClick:t}){const[n,s]=L.useState(null),r=L.useCallback(()=>{const o=document.querySelector(i);if(!o){s(null);return}const a=o.getBoundingClientRect(),l=window.innerHeight,c=window.innerWidth,u=Math.max(0,a.top)-e,h=Math.max(0,a.left)-e,g=Math.min(l,a.bottom)+e,f=Math.min(c,a.right)+e;s({top:u,left:h,width:f-h,height:g-u})},[i,e]);return L.useEffect(()=>{r();let o=0;const a=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(r)};return window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{cancelAnimationFrame(o),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[r]),L.useEffect(()=>{const o=document.querySelector(i);if(!o)return;const a=o.getBoundingClientRect(),l=window.innerHeight,c=window.innerWidth,u=a.top>=-50&&a.top<=l-100,h=a.left>=0&&a.right<=c;(!u||!h)&&(o.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(r,400))},[i,r]),n?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-9997",onClick:t,"data-testid":"tour-overlay-backdrop","aria-hidden":"true"}),d.jsx("div",{className:"tour-spotlight",style:{position:"fixed",top:n.top,left:n.left,width:n.width,height:n.height,zIndex:9998,pointerEvents:"none"},"data-testid":"tour-spotlight","aria-hidden":"true"})]}):null}const wy=340,uf=200,ch=12,sk=16;function aet(i,e){const t=window.innerWidth,n=window.innerHeight,s=Math.max(0,i.top),r=Math.min(n,i.top+i.height),o=Math.max(0,r-s),a=s+o/2,l=Math.max(0,i.left),c=Math.min(t,i.left+i.width),u=Math.max(0,c-l),h=l+u/2,g=n-r,f=s,m=t-c,x=l;let v;e==="auto"?g>=uf+ch?v="bottom":f>=uf+ch?v="top":m>=wy+ch*2?v="right":x>=wy+ch*2?v="left":v="bottom":(v=e,v==="bottom"&&g=uf+ch&&(v="top"):v==="top"&&f=uf+ch&&(v="bottom"));let _=0,w=0;switch(v){case"bottom":_=r+ch,w=h-wy/2;break;case"top":_=s-ch,w=h-wy/2;break;case"right":_=a-uf/2,w=c+ch;break;case"left":_=a-uf/2,w=l-wy-ch;break}return w=Math.max(sk,Math.min(w,t-wy-sk)),v!=="top"?_=Math.max(sk,Math.min(_,n-uf-sk)):_=Math.max(uf+sk,Math.min(_,n-sk)),{top:_,left:w,resolved:v}}function cet({chapterTitleKey:i,titleKey:e,descriptionKey:t,currentStep:n,totalSteps:s,placement:r,targetRect:o,onNext:a,onPrev:l,onSkip:c,isFirstStep:u,isLastStep:h}){const{t:g}=ve(),{top:f,left:m,resolved:x}=aet(o,r),v=(n+1)/s*100;return d.jsx("div",{className:me("tour-tooltip fixed z-9999",x==="top"&&"-translate-y-full"),style:{top:f,left:m,width:wy},role:"dialog","aria-label":g(e),"data-testid":"tour-tooltip",children:d.jsxs("div",{className:"rounded-xl border border-primary/20 bg-sidebar text-sidebar-foreground shadow-2xl shadow-black/30 overflow-hidden",children:[d.jsx("div",{className:"h-1 w-full bg-sidebar-border",children:d.jsx("div",{className:"h-full bg-primary transition-all duration-500 ease-out",style:{width:`${v}%`}})}),d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-primary",children:g(i)}),d.jsx("span",{className:"text-[11px] font-medium text-sidebar-foreground/50",children:g("onboarding.tour.stepOf",{current:n+1,total:s})})]}),d.jsx("h3",{className:"text-[15px] font-semibold text-white leading-tight",children:g(e)}),d.jsx("p",{className:"mt-1.5 text-[13px] leading-relaxed text-sidebar-foreground/70",children:g(t)}),d.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[d.jsxs("button",{onClick:l,disabled:u,className:me("inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",u?"invisible":"text-sidebar-foreground/60 hover:text-sidebar-foreground hover:bg-sidebar-accent/10"),"data-testid":"tour-back",children:[d.jsx(zl,{className:"h-3.5 w-3.5"}),g("onboarding.tour.back")]}),d.jsxs("button",{onClick:c,className:"inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs font-medium text-sidebar-foreground/40 hover:text-sidebar-foreground/70 transition-colors","data-testid":"tour-skip",children:[d.jsx(An,{className:"h-3 w-3"}),g("onboarding.tour.skip")]}),d.jsx("button",{onClick:a,className:"inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-1.5 text-xs font-semibold text-primary-foreground shadow-sm transition-all hover:bg-primary/90 active:scale-[0.97]","data-testid":"tour-next",children:h?d.jsxs(d.Fragment,{children:[d.jsx(hl,{className:"h-3.5 w-3.5"}),g("onboarding.tour.finish")]}):d.jsxs(d.Fragment,{children:[g("onboarding.tour.next"),d.jsx(Bh,{className:"h-3.5 w-3.5"})]})})]})]})]})})}function det(){const i=Ys(m=>m.activeChapter),e=Ys(m=>m.currentStep),t=Ys(m=>m.nextStep),n=Ys(m=>m.prevStep),s=Ys(m=>m.skipChapter),r=Ys(m=>m.completeChapter),o=i?xse[i]:null,a=(o==null?void 0:o.steps.length)??0,l=Math.min(e,Math.max(0,a-1)),c=(o==null?void 0:o.steps[l])??null,u=l===0,h=l===a-1,g=ret((c==null?void 0:c.target)??"",(c==null?void 0:c.padding)??8),f=L.useCallback(()=>{h?r():t()},[h,r,t]);return L.useEffect(()=>{if(!i)return;const m=x=>{var _;const v=(_=x.target)==null?void 0:_.tagName;if(!(v==="INPUT"||v==="TEXTAREA"||v==="SELECT"))switch(x.key){case"ArrowRight":case"Enter":x.preventDefault(),f();break;case"ArrowLeft":x.preventDefault(),u||n();break;case"Escape":x.preventDefault(),s();break}};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[i,f,u,n,s]),L.useEffect(()=>{if(!i)return;const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}},[i]),!i||!o||!c||!g?null:Tg.createPortal(d.jsxs(d.Fragment,{children:[d.jsx(oet,{targetSelector:c.target,padding:c.padding??8}),d.jsx(cet,{chapterTitleKey:o.titleKey,titleKey:c.titleKey,descriptionKey:c.descriptionKey,currentStep:l,totalSteps:a,placement:c.placement,targetRect:g,onNext:f,onPrev:n,onSkip:s,isFirstStep:u,isLastStep:h})]}),document.body)}function uet(){const{t:i}=ve(),e=Ys(f=>f.offeredChapter),t=Ys(f=>f.acceptOffer),n=Ys(f=>f.dismissOffer),s=Ys(f=>f.dismissAllOffers),[r,o]=L.useState(!1),[a,l]=L.useState(!1),c=e?xse[e]:null;L.useEffect(()=>{if(!e){o(!1),l(!1);return}const f=setTimeout(()=>o(!0),600),m=setTimeout(()=>{u()},12e3);return()=>{clearTimeout(f),clearTimeout(m)}},[e]);const u=()=>{l(!0),setTimeout(()=>{n(),l(!1),o(!1)},300)},h=()=>{l(!0),setTimeout(()=>{s(),l(!1),o(!1)},300)},g=()=>{o(!1),t()};return!e||!c||!r?null:Tg.createPortal(d.jsx("div",{className:`fixed bottom-6 inset-x-0 z-50 flex justify-center pointer-events-none transition-all duration-300 ${a?"translate-y-4 opacity-0":"translate-y-0 opacity-100"}`,"data-testid":"tour-offer-bar",children:d.jsxs("div",{className:"pointer-events-auto flex items-center gap-3 rounded-xl border border-primary/20 bg-sidebar px-4 py-2.5 shadow-xl shadow-black/20 backdrop-blur-sm",children:[d.jsx(hl,{className:"h-4 w-4 text-primary shrink-0"}),d.jsx("span",{className:"text-sm text-sidebar-foreground/80",children:i("onboarding.offer.message",{page:i(c.titleKey),defaultValue:"New here? Take the {{page}}"})}),d.jsx("button",{onClick:g,className:"rounded-lg bg-primary px-3 py-1 text-xs font-semibold text-primary-foreground transition-all hover:bg-primary/90 active:scale-[0.97]","data-testid":"tour-offer-accept",children:i("onboarding.offer.accept","Show me")}),d.jsx("button",{onClick:h,className:"text-[11px] text-sidebar-foreground/40 hover:text-sidebar-foreground/70 transition-colors whitespace-nowrap","data-testid":"tour-offer-dismiss-all",children:i("onboarding.offer.dontAsk","Don't ask again")}),d.jsx("button",{onClick:u,className:"rounded p-0.5 text-sidebar-foreground/30 hover:text-sidebar-foreground/60 transition-colors","aria-label":i("common.close","Close"),"data-testid":"tour-offer-dismiss",children:d.jsx(An,{className:"h-3.5 w-3.5"})})]})}),document.body)}function het(){const{t:i}=ve(),[e,t]=L.useState(!1);return!window.__EDDI_MOCK_ACTIVE__||new URLSearchParams(window.location.search).get("hideMockBanner")==="true"||e?null:d.jsxs("div",{className:"relative flex items-center justify-center gap-2 bg-amber-500/90 px-4 py-1.5 text-xs font-medium text-amber-950 dark:bg-amber-600/90 dark:text-amber-50",children:[d.jsx(Ui,{className:"h-3.5 w-3.5 shrink-0"}),d.jsx("span",{children:i("mockBanner.message","Demo Mode — Displaying sample data. Connect an EDDI backend for real data.")}),d.jsx("button",{onClick:()=>t(!0),className:"absolute inset-e-2 top-1/2 -translate-y-1/2 rounded p-0.5 hover:bg-amber-600/30 dark:hover:bg-amber-800/40 transition-colors","aria-label":i("common.dismiss","Dismiss"),children:d.jsx(An,{className:"h-3.5 w-3.5"})})]})}function get(){const i=jp(),{t:e}=ve();L.useEffect(()=>{const t=i.pathname.replace(/^\/manage\/?/,"").split("/").filter(Boolean),n={agents:e("nav.agents"),workflows:e("nav.packages"),conversations:e("nav.conversations"),chat:e("nav.chat"),resources:e("nav.resources"),groups:e("nav.groups","Groups"),coordinator:e("nav.coordinator","Coordinator"),schedules:e("nav.schedules","Schedules"),logs:e("nav.logs","Logs"),orphans:e("nav.orphans","Orphans"),secrets:e("nav.secrets","Secrets"),audit:e("nav.audit","Audit Trail"),quotas:e("nav.quotas","Quotas"),userdata:e("userData.title","User Data"),triggers:e("nav.triggers","Triggers"),capabilities:e("nav.capabilities","Capabilities"),sync:e("nav.sync","Sync"),gdpr:e("nav.gdpr","GDPR"),wizard:e("wizard.title","Agent Wizard"),studio:e("nav.studio","Agent Studio"),properties:e("nav.properties","Properties")};if(t.length===0)document.title=`${e("nav.dashboard")} — EDDI Manager`;else{const s=t[0].replace(/view$/,""),r=n[s]??s;document.title=`${r} — EDDI Manager`}},[i.pathname,e])}function fet(){const{t:i}=ve();get();const[e,t]=L.useState(!1),[n,s]=L.useState(!1),[r,o]=L.useState(!1);return L.useEffect(()=>{const a=()=>o(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),L.useEffect(()=>{r||s(!1)},[r]),L.useEffect(()=>{if(!n)return;const a=l=>{l.key==="Escape"&&s(!1)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[n]),d.jsxs("div",{className:"flex h-screen overflow-hidden","data-testid":"app-layout",children:[d.jsx("a",{href:"#main-content",className:"skip-to-main",children:i("common.skipToMain","Skip to main content")}),!r&&d.jsx(pfe,{collapsed:e,onToggle:()=>t(a=>!a)}),r&&n&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 transition-opacity",onClick:()=>s(!1),"aria-hidden":"true","data-testid":"sidebar-overlay"}),d.jsx("div",{className:"fixed inset-y-0 start-0 z-50 w-64",children:d.jsx(pfe,{collapsed:!1,onToggle:()=>s(!1)})})]}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[d.jsx(het,{}),d.jsx(pze,{onMenuClick:()=>s(!0),sidebarVisible:n}),d.jsx("main",{id:"main-content",className:me("flex-1 overflow-auto bg-background p-6","transition-all duration-300"),children:d.jsx("div",{className:"@container/main mx-auto max-w-screen-2xl",children:d.jsx(Z6e,{})})})]}),d.jsx(eet,{}),d.jsx(set,{}),d.jsx(det,{}),d.jsx(uet,{})]})}class pet extends L.Component{constructor(t){super(t);Et(this,"reset",()=>{this.setState({error:null})});this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){}componentDidUpdate(t){this.props.resetKey!==t.resetKey&&this.state.error!==null&&this.setState({error:null})}render(){return this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.reset):d.jsx(met,{error:this.state.error,onReset:this.reset}):this.props.children}}function met({error:i,onReset:e}){const{t}=ve();return d.jsxs("div",{className:"flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-xl border border-destructive/30 bg-destructive/5 p-8",role:"alert","data-testid":"error-boundary-fallback",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3",children:d.jsx(Ui,{className:"h-6 w-6 text-destructive"})}),d.jsxs("div",{className:"text-center",children:[d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:t("errorBoundary.title","Something went wrong")}),d.jsx("p",{className:"mt-1 max-w-md text-xs text-muted-foreground",children:i.message})]}),d.jsxs("button",{onClick:e,className:"inline-flex items-center gap-1.5 rounded-lg border border-border px-4 py-2 text-xs font-medium text-foreground transition-colors hover:bg-muted",children:[d.jsx($_,{className:"h-3.5 w-3.5"}),t("errorBoundary.retry","Try Again")]})]})}function ZH(i=100,e=0,t=""){const n=new URLSearchParams({limit:String(i),index:String(e)});return t&&n.set("filter",t),Be.get(`/workflowstore/workflows/descriptors?${n.toString()}`)}function mP(i,e){return Be.get(`/workflowstore/workflows/${i}?version=${e}`)}function bet(i){return Be.post("/workflowstore/workflows",i)}function Qse(i,e,t){return Be.put(`/workflowstore/workflows/${i}?version=${e}`,t)}function xet(i,e,t){const n=new URLSearchParams({version:String(e)});return Be.delete(`/workflowstore/workflows/${i}?${n}`)}async function vet(i){const t=await Be.get(`/workflowstore/workflows/${i}/currentversion`)??1,s=(await Promise.all(Array.from({length:t},(r,o)=>o+1).map(async r=>{try{return await Be.get(`/workflowstore/workflows/descriptors?filter=${i}&version=${r}`)}catch{return[]}}))).flat();return s.length===0?Be.get(`/workflowstore/workflows/descriptors?filter=${i}`):s}function _et(i,e,t=!1){const n=new URLSearchParams({version:String(e),deepCopy:String(t)});return Be.post(`/workflowstore/workflows/${i}?${n}`)}async function yet(){const[i,e,t]=await Promise.all([aD(1e3,0).catch(()=>[]),ZH(1e3,0).catch(()=>[]),oD(1e3,0).catch(()=>[])]),n=new Set(i.map(r=>mo(r.resource).id)),s=new Set(e.map(r=>mo(r.resource).id));return{agentCount:n.size,workflowCount:s.size,conversationCount:t.length,resourceCount:0}}function Xse(i,e,t){const n={operation:"SET",document:t};return Be.patch(`/descriptorstore/descriptors/${i}?version=${e}`,n)}const Gh=["agents"],WU=50;function _0(i=20,e=0,t=""){return fn({queryKey:[...Gh,"descriptors",{limit:i,index:e,filter:t}],queryFn:()=>aD(i,e,t)})}function JH(i=""){return DSe({queryKey:[...Gh,"descriptors-infinite",{filter:i}],queryFn:({pageParam:e=0})=>aD(WU,e,i),initialPageParam:0,getNextPageParam:(e,t)=>{if(e.length===WU)return t.length*WU}})}function wet(i,e){return fn({queryKey:[...Gh,i,e],queryFn:()=>qC(i,e),enabled:!!i,placeholderData:Kie})}function HEe(i,e,t="production"){return fn({queryKey:[...Gh,"deployment",t,i,e],queryFn:()=>lP(t,i,e),enabled:!!i&&e>0,placeholderData:Kie,refetchInterval:n=>{var s;return((s=n.state.data)==null?void 0:s.status)==="IN_PROGRESS"?3e3:!1}})}function WEe(i){return fn({queryKey:[...Gh,"versions",i],queryFn:()=>Ize(i),enabled:!!i,select:e=>e.map(t=>({version:mo(t.resource).version,lastModifiedOn:t.lastModifiedOn,name:t.name})).sort((t,n)=>n.version-t.version)})}function YC(){const i=un();return Xt({mutationFn:({id:e,version:t,agent:n})=>aP(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:Gh})}})}function Cet(i,e){return fn({queryKey:[...Gh,"deploymentStatuses",i,e],queryFn:()=>Pze(i,e),enabled:!!i&&e>0,placeholderData:Kie,refetchInterval:t=>{const n=t.state.data;return n!=null&&n.some(s=>s.status==="IN_PROGRESS")?3e3:!1}})}function ket(){const i=un();return Xt({mutationFn:async({agent:e,name:t,description:n})=>{const s=await Aze(e);if((t||n)&&s.location){const r=new URL(s.location,"http://dummy"),o=r.pathname.split("/").filter(Boolean),a=o[o.length-1],l=parseInt(r.searchParams.get("version")||"1",10);await Xse(a,l,{name:t,description:n})}return s},onSuccess:()=>{i.invalidateQueries({queryKey:Gh})}})}function VEe(){const i=un();return Xt({mutationFn:({id:e,version:t})=>Hke(e,t),onSuccess:()=>{i.invalidateQueries({queryKey:Gh})}})}function zEe(){const i=un();return Xt({mutationFn:({id:e,version:t,deepCopy:n})=>Rze(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:Gh})}})}function UEe(){const i=un();return Xt({mutationFn:({environment:e="production",agentId:t,version:n})=>yse(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:Gh}),i.invalidateQueries({queryKey:["chat","deployedAgents"]})}})}function $Ee(){const i=un();return Xt({mutationFn:({environment:e="production",agentId:t,version:n})=>Mze(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:Gh}),i.invalidateQueries({queryKey:["chat","deployedAgents"]})}})}function Hg(i){const e=new Map;for(const t of i){const{id:n,version:s}=mo(t.resource),r=e.get(n);(!r||s>r.version)&&e.set(n,{...t,id:n,version:s})}return Array.from(e.values()).sort((t,n)=>n.lastModifiedOn-t.lastModifiedOn)}const gD="/administration/coordinator";async function qEe(){return Be.get(`${gD}/status`)}async function Net(){return Be.get(`${gD}/dead-letters`)}async function Eet(i){return Be.post(`${gD}/dead-letters/${i}/replay`)}async function Let(i){return Be.delete(`${gD}/dead-letters/${i}`)}async function Det(){return Be.delete(`${gD}/dead-letters`)}function Tet(){return new OEe(`${window.location.origin}${gD}/stream`,Be.getAuthHeader())}function Iet(){return fn({queryKey:["dashboard","stats"],queryFn:yet,staleTime:3e4})}function Aet(){return _0(4,0)}function Ret(i=5){return fn({queryKey:["dashboard","recent-conversations",i],queryFn:()=>oD(i),staleTime:3e4})}function Met(){return fn({queryKey:["dashboard","coordinator-status"],queryFn:qEe,staleTime:6e4,retry:1})}const bP="/secretstore/secrets";async function Pet(i){const e=await fetch(`${Be.getBaseUrl()}${bP}/${i}`,{headers:Be.getAuthHeader()});return e.ok?e.json():[]}async function KEe(i,e,t,n,s){const r={value:t};n&&(r.description=n),s&&(r.allowedAgents=s);const o=await fetch(`${Be.getBaseUrl()}${bP}/${i}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json",...Be.getAuthHeader()},body:JSON.stringify(r)});if(!o.ok){if(o.status===503)throw new Error("Secrets vault is not configured. Set up a secret provider in the EDDI backend.");const a=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(a.error||`Failed to store secret (HTTP ${o.status})`)}return o.json()}async function Oet(i,e){const t=await fetch(`${Be.getBaseUrl()}${bP}/${i}/${e}`,{method:"DELETE",headers:Be.getAuthHeader()});if(!t.ok&&t.status!==204){if(t.status===503)throw new Error("Secrets vault is not configured. Set up a secret provider in the EDDI backend.");const n=await t.json().catch(()=>({error:"Unknown error"}));throw new Error(n.error||`Failed to delete secret (HTTP ${t.status})`)}}async function jet(){try{const i=await fetch(`${Be.getBaseUrl()}${bP}/health`,{headers:Be.getAuthHeader()}),e=await i.json();return i.status===503?{status:"DOWN",provider:e.provider??"unknown",available:!1,error:e.error,reason:e.reason,action:e.action,docs:e.docs}:e}catch{return{status:"DOWN",provider:"unknown",available:!1}}}async function Fet(i,e,t,n){const s={value:t};n&&(s.description=n);const r=await fetch(`${Be.getBaseUrl()}${bP}/${i}/${e}/rotate`,{method:"POST",headers:{"Content-Type":"application/json",...Be.getAuthHeader()},body:JSON.stringify(s)});if(!r.ok){if(r.status===503)throw new Error("Secrets vault is not configured. Set up a secret provider in the EDDI backend.");if(r.status===404||r.status===405)return KEe(i,e,t,n);const o=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`Failed to rotate secret (HTTP ${r.status})`)}return r.json()}const xP={all:["secrets"],list:i=>["secrets","list",i],health:["secrets","health"]};function GEe(i){return fn({queryKey:xP.list(i),queryFn:()=>Pet(i),enabled:!!i})}function YEe(){const i=un();return Xt({mutationFn:e=>KEe(e.tenantId,e.keyName,e.value,e.description,e.allowedAgents),onSuccess:(e,t)=>{i.invalidateQueries({queryKey:xP.list(t.tenantId)})}})}function Bet(){const i=un();return Xt({mutationFn:e=>Oet(e.tenantId,e.keyName),onSuccess:(e,t)=>{i.invalidateQueries({queryKey:xP.list(t.tenantId)})}})}function Zse(){return fn({queryKey:xP.health,queryFn:jet,refetchInterval:3e4})}function Het(){const i=un();return Xt({mutationFn:e=>Fet(e.tenantId,e.keyName,e.newValue,e.description),onSuccess:(e,t)=>{i.invalidateQueries({queryKey:xP.list(t.tenantId)})}})}const Em=L.forwardRef(({className:i,...e},t)=>d.jsx("div",{ref:t,className:me("rounded-xl border border-border bg-card text-card-foreground shadow-sm",i),...e}));Em.displayName="Card";const QEe=L.forwardRef(({className:i,...e},t)=>d.jsx("div",{ref:t,className:me("flex flex-col space-y-1.5 p-5 pb-0",i),...e}));QEe.displayName="CardHeader";const XEe=L.forwardRef(({className:i,...e},t)=>d.jsx("h3",{ref:t,className:me("text-lg font-semibold leading-none tracking-tight",i),...e}));XEe.displayName="CardTitle";const Wet=L.forwardRef(({className:i,...e},t)=>d.jsx("p",{ref:t,className:me("text-sm text-muted-foreground",i),...e}));Wet.displayName="CardDescription";const Lm=L.forwardRef(({className:i,...e},t)=>d.jsx("div",{ref:t,className:me("p-5",i),...e}));Lm.displayName="CardContent";const Vet=L.forwardRef(({className:i,...e},t)=>d.jsx("div",{ref:t,className:me("flex items-center p-5 pt-0",i),...e}));Vet.displayName="CardFooter";function Rpe(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}function Hb(...i){return e=>{let t=!1;const n=i.map(s=>{const r=Rpe(s,e);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let s=0;s{let{children:r,...o}=n;ZEe(r)&&typeof eF=="function"&&(r=eF(r._payload));const a=L.Children.toArray(r),l=a.find(Yet);if(l){const c=l.props.children,u=a.map(h=>h===l?L.Children.count(c)>1?L.Children.only(null):L.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:L.isValidElement(c)?L.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:r})});return t.displayName=`${i}.Slot`,t}var qet=$et("Slot");function Ket(i){const e=L.forwardRef((t,n)=>{let{children:s,...r}=t;if(ZEe(s)&&typeof eF=="function"&&(s=eF(s._payload)),L.isValidElement(s)){const o=Xet(s),a=Qet(r,s.props);return s.type!==L.Fragment&&(a.ref=n?Hb(n,o):o),L.cloneElement(s,a)}return L.Children.count(s)>1?L.Children.only(null):null});return e.displayName=`${i}.SlotClone`,e}var Get=Symbol("radix.slottable");function Yet(i){return L.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===Get}function Qet(i,e){const t={...e};for(const n in e){const s=i[n],r=e[n];/^on[A-Z]/.test(n)?s&&r?t[n]=(...a)=>{const l=r(...a);return s(...a),l}:s&&(t[n]=s):n==="style"?t[n]={...s,...r}:n==="className"&&(t[n]=[s,r].filter(Boolean).join(" "))}return{...i,...t}}function Xet(i){var n,s;let e=(n=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}const Mpe=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,Ppe=yke,JEe=(i,e)=>t=>{var n;if((e==null?void 0:e.variants)==null)return Ppe(i,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:s,defaultVariants:r}=e,o=Object.keys(s).map(c=>{const u=t==null?void 0:t[c],h=r==null?void 0:r[c];if(u===null)return null;const g=Mpe(u)||Mpe(h);return s[c][g]}),a=t&&Object.entries(t).reduce((c,u)=>{let[h,g]=u;return g===void 0||(c[h]=g),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:h,className:g,...f}=u;return Object.entries(f).every(m=>{let[x,v]=m;return Array.isArray(v)?v.includes({...r,...a}[x]):{...r,...a}[x]===v})?[...c,h,g]:c},[]);return Ppe(i,o,l,t==null?void 0:t.class,t==null?void 0:t.className)},Zet=JEe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0",{variants:{variant:{primary:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 hover:shadow-md",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-secondary hover:text-secondary-foreground",ghost:"hover:bg-secondary hover:text-secondary-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 py-2.5",lg:"h-11 px-6 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"primary",size:"md"}}),Qt=L.forwardRef(({className:i,variant:e,size:t,asChild:n=!1,...s},r)=>{const o=n?qet:"button";return d.jsx(o,{className:me(Zet({variant:e,size:t,className:i})),ref:r,...s})});Qt.displayName="Button";function vi({className:i,...e}){return d.jsx("div",{className:me("animate-pulse rounded-md bg-muted",i),...e})}const Ope={READY:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",IN_PROGRESS:"bg-blue-500/10 text-blue-600 dark:text-blue-400",ERROR:"bg-red-500/10 text-red-600 dark:text-red-400",ENDED:"bg-gray-500/10 text-gray-500"};function Jet(){const{t:i}=ve(),{data:e,isLoading:t}=Iet(),{data:n,isLoading:s}=Aet(),{data:r,isLoading:o}=Ret(5),{data:a}=Met(),l=jke(),{data:c}=Zse(),{data:u=[]}=_0(50),h=L.useMemo(()=>n?Hg(n).slice(0,4):[],[n]),g=L.useMemo(()=>{const v=new Map;if(u.length>0)for(const _ of Hg(u))_.name&&v.set(_.id,_.name);return v},[u]),f=Ys(v=>v.maybeAutoStart);L.useEffect(()=>{const v=setTimeout(()=>f("dashboard"),500);return()=>clearTimeout(v)},[f]);const x=[{label:i("pages.dashboard.activeAgents"),value:(e==null?void 0:e.agentCount)??0,icon:Qn,gradient:"from-amber-500/10 to-primary/5",iconColor:"text-primary bg-primary/10",to:"/manage/agents"},{label:i("pages.dashboard.totalWorkflows"),value:(e==null?void 0:e.workflowCount)??0,icon:Hd,gradient:"from-emerald-500/10 to-emerald-500/5",iconColor:"text-emerald-600 dark:text-emerald-400 bg-emerald-500/10",to:"/manage/workflows"},{label:i("pages.dashboard.totalConversations"),value:(e==null?void 0:e.conversationCount)??0,icon:Wl,gradient:"from-blue-500/10 to-blue-500/5",iconColor:"text-blue-600 dark:text-blue-400 bg-blue-500/10",to:"/manage/conversations"},{label:i("pages.dashboard.totalResources"),value:(e==null?void 0:e.resourceCount)??0,icon:Bp,gradient:"from-violet-500/10 to-violet-500/5",iconColor:"text-violet-600 dark:text-violet-400 bg-violet-500/10",to:"/manage/resources"}].filter(v=>v.to!=="/manage/resources"||v.value>0);return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"flex items-center gap-2 text-3xl font-bold text-foreground",children:[d.jsx(zj,{className:"h-8 w-8 text-primary"}),i("pages.dashboard.title")]}),d.jsx("p",{className:"mt-1 text-muted-foreground",children:i("pages.dashboard.subtitle")})]}),d.jsxs("div",{className:"flex w-fit flex-wrap items-center gap-3 rounded-xl border border-border bg-card/50 px-4 py-2.5",role:"status","aria-label":i("dashboard.platformHealth","Platform health"),"data-testid":"platform-health-strip",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[d.jsx("span",{className:`inline-flex h-2 w-2 rounded-full ${l.status==="online"?"bg-emerald-500 animate-pulse":l.status==="offline"?"bg-red-500":"bg-muted-foreground animate-pulse"}`}),d.jsx("span",{className:"font-medium text-foreground",children:i("dashboard.platform","Platform")}),d.jsx("span",{className:"text-muted-foreground",children:l.status==="online"?i("dashboard.online","Online"):l.status==="offline"?i("dashboard.offline","Offline"):i("dashboard.checking","Checking…")})]}),d.jsx("div",{className:"h-4 w-px bg-border"}),d.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a?a.coordinatorType==="nats"?d.jsx(XSe,{className:"h-3.5 w-3.5 text-blue-500"}):d.jsx(Cb,{className:"h-3.5 w-3.5 text-purple-500"}):d.jsx(iL,{className:"h-3.5 w-3.5 text-muted-foreground"}),d.jsx("span",{className:"text-muted-foreground",children:a?a.connected?i("dashboard.coordConnected","Coordinator connected"):i("dashboard.coordDisconnected","Coordinator disconnected"):i("dashboard.coordUnknown","Coordinator —")})]}),d.jsx("div",{className:"h-4 w-px bg-border"}),d.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[c!=null&&c.available?d.jsx(Go,{className:"h-3.5 w-3.5 text-emerald-500"}):d.jsx(Ui,{className:"h-3.5 w-3.5 text-amber-500"}),d.jsx("span",{className:"text-muted-foreground",children:c!=null&&c.available?i("dashboard.vaultUp","Vault ready"):i("dashboard.vaultDown","Vault unavailable")})]})]}),d.jsx("div",{className:"cq-stat-grid","data-tour":"dashboard-stats",children:t?Array.from({length:4}).map((v,_)=>d.jsx(Em,{children:d.jsxs(Lm,{className:"flex items-center gap-4",children:[d.jsx(vi,{className:"h-12 w-12 rounded-lg"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(vi,{className:"h-3 w-20"}),d.jsx(vi,{className:"h-7 w-12"})]})]})},_)):x.map(v=>d.jsx(Kn,{to:v.to,"aria-label":`${v.label}: ${v.value}`,children:d.jsxs(Em,{className:"group relative overflow-hidden transition-all hover:shadow-lg hover:-translate-y-0.5 active:translate-y-0",children:[d.jsx("div",{className:me("absolute inset-0 bg-linear-to-br opacity-0 transition-opacity group-hover:opacity-100",v.gradient)}),d.jsxs(Lm,{className:"relative flex items-center gap-4",children:[d.jsx("div",{className:me("rounded-lg p-3",v.iconColor),children:d.jsx(v.icon,{className:"h-6 w-6"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:v.label}),d.jsx("p",{className:"text-2xl font-bold text-foreground tabular-nums",children:v.value>0?v.value.toLocaleString():d.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground/50",children:["0 ",d.jsx(Yt,{className:"h-3 w-3"})]})})]})]})]})},v.label))}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:i("pages.dashboard.quickActions")}),d.jsxs("div",{className:"flex flex-wrap gap-2","data-tour":"dashboard-actions",children:[d.jsx(Qt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/agents/wizard",children:[d.jsx(sD,{className:"h-4 w-4"}),i("wizard.title")]})}),d.jsx(Qt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/chat",children:[d.jsx(_p,{className:"h-4 w-4"}),i("nav.chat")]})}),d.jsx(Qt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/logs",children:[d.jsx(nD,{className:"h-4 w-4"}),i("dashboard.viewLogs","View Logs")]})}),d.jsx(Qt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/audit",children:[d.jsx(Ah,{className:"h-4 w-4"}),i("dashboard.auditTrail","Audit Trail")]})}),d.jsx(Qt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/secrets",children:[d.jsx(d_,{className:"h-4 w-4"}),i("dashboard.secretVault","Secret Vault")]})}),d.jsx(Qt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/groups/wizard",children:[d.jsx(j2,{className:"h-4 w-4"}),i("dashboard.createGroup","Create Group")]})})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[d.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:i("dashboard.recentConversations","Recent Conversations")}),d.jsxs(Kn,{to:"/manage/conversations",className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[i("nav.conversations"),d.jsx(Bh,{className:"h-3 w-3"})]})]}),o?d.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((v,_)=>d.jsx(Em,{children:d.jsxs(Lm,{className:"flex items-center gap-3 py-3",children:[d.jsx(vi,{className:"h-8 w-8 rounded-lg"}),d.jsxs("div",{className:"flex-1 space-y-1.5",children:[d.jsx(vi,{className:"h-3 w-40"}),d.jsx(vi,{className:"h-3 w-24"})]})]})},_))}):!r||r.length===0?d.jsx(Em,{children:d.jsxs(Lm,{className:"flex items-center gap-3 py-6 text-muted-foreground",children:[d.jsx(Wl,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm",children:i("dashboard.noConversations","No conversations yet")})]})}):d.jsx("div",{className:"flex flex-col gap-4","data-testid":"recent-conversations",children:r.map(v=>{const _=Lg(v.resource),w=g.get(v.agentId),k=v.name||w||i("agents.unnamed","Unnamed Agent");return d.jsx(Kn,{to:`/manage/conversationview/${_}`,children:d.jsx(Em,{className:"transition-all hover:shadow-sm hover:border-primary/20",children:d.jsxs(Lm,{className:"flex items-center gap-3 py-3",children:[d.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:d.jsx(Qn,{className:"h-4 w-4 text-primary"})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:k}),d.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:[_.slice(0,12),"… · v",v.agentVersion]})]}),d.jsx("span",{className:me("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide",Ope[v.conversationState]??Ope.ENDED),children:v.conversationState}),d.jsx("span",{className:"shrink-0 text-xs text-muted-foreground tabular-nums",children:v.lastModifiedOn?iC(v.lastModifiedOn):"—"})]})})},_)})})]}),d.jsxs("div",{"data-testid":"recent-agents",children:[d.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[d.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:i("pages.dashboard.recentAgents")}),d.jsxs(Kn,{to:"/manage/agents",className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[i("nav.agents"),d.jsx(Bh,{className:"h-3 w-3"})]})]}),s?d.jsx("div",{className:"cq-stat-grid",children:Array.from({length:4}).map((v,_)=>d.jsx(Em,{children:d.jsxs(Lm,{className:"space-y-3",children:[d.jsx(vi,{className:"h-5 w-3/4"}),d.jsx(vi,{className:"h-4 w-1/2"}),d.jsx(vi,{className:"h-4 w-full"})]})},_))}):h.length===0?d.jsx(Em,{children:d.jsxs(Lm,{className:"flex flex-col items-center py-8",children:[d.jsx(Qn,{className:"h-10 w-10 text-muted-foreground/50"}),d.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:i("pages.dashboard.noRecentAgents")}),d.jsx(Qt,{variant:"outline",size:"sm",className:"mt-3",asChild:!0,children:d.jsxs(Kn,{to:"/manage/agents/wizard",children:[d.jsx(Yt,{className:"h-4 w-4"}),i("agents.createAgent")]})})]})}):d.jsx("div",{className:"cq-card-grid",children:h.map(v=>d.jsx(Kn,{to:`/manage/agentview/${v.id}`,children:d.jsxs(Em,{className:"group relative overflow-hidden transition-all hover:shadow-md hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0",children:[d.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary/5 to-transparent opacity-0 transition-opacity group-hover:opacity-100"}),d.jsx(QEe,{className:"relative",children:d.jsx(XEe,{className:"truncate text-base",children:v.name||i("agents.unnamed","Unnamed Agent")})}),d.jsxs(Lm,{className:"relative pt-0",children:[d.jsx("p",{className:"text-xs text-muted-foreground truncate",children:v.description||"—"}),d.jsx("p",{className:"mt-2 text-xs text-muted-foreground/70",children:v.lastModifiedOn?iC(v.lastModifiedOn):"—"})]})]})},v.id))})]})]})}const ett={READY:{icon:qh,color:"text-emerald-500",bg:"bg-emerald-500/10",ring:"ring-emerald-500/20"},IN_PROGRESS:{icon:Yr,color:"text-amber-500",bg:"bg-amber-500/10",ring:"ring-amber-500/20"},ERROR:{icon:Ui,color:"text-destructive",bg:"bg-destructive/10",ring:"ring-destructive/20"},NOT_FOUND:{icon:mke,color:"text-muted-foreground",bg:"bg-muted",ring:"ring-border"}};function ttt({agent:i,onDuplicate:e,onDelete:t,onExport:n}){const{t:s}=ve(),[r,o]=L.useState(!1),a=L.useRef(null),{data:l}=HEe(i.id,i.version),c=UEe(),u=$Ee(),h=cP(),g=L.useCallback(()=>{o(!1),requestAnimationFrame(()=>{var T;return(T=a.current)==null?void 0:T.focus()})},[]),f=(l==null?void 0:l.status)??"NOT_FOUND",m=ett[f],x=m.icon,_={READY:s("status.deployed","Deployed"),IN_PROGRESS:s("status.deploying","Deploying..."),ERROR:s("status.error","Error"),NOT_FOUND:s("status.notDeployed","Not deployed")}[f]??f,w=f==="READY",k=c.isPending||u.isPending||f==="IN_PROGRESS";function C(){c.mutate({agentId:i.id,version:i.version},{onSuccess:()=>qe.success(s("agents.deploySuccess","Agent deployed successfully")),onError:()=>qe.error(s("agents.deployError","Deploy failed"))})}function E(){u.mutate({agentId:i.id,version:i.version},{onSuccess:()=>qe.success(s("agents.undeploySuccess","Agent undeployed")),onError:()=>qe.error(s("agents.undeployError","Undeploy failed"))})}const D=iC(i.lastModifiedOn);return d.jsxs("div",{className:me("group relative flex flex-col rounded-xl border bg-card p-5 shadow-sm transition-all duration-200","hover:shadow-md hover:border-primary/30",`ring-1 ${m.ring}`),"data-testid":`agent-card-${i.id}`,children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{className:me("inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium ring-1",m.bg,m.color,m.ring),children:[d.jsx(x,{className:"h-3.5 w-3.5"}),_]}),d.jsxs("div",{className:"relative",children:[d.jsx("button",{ref:a,onClick:()=>o(!r),className:"rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-secondary hover:text-foreground group-hover:opacity-100 focus:opacity-100 group-focus-within:opacity-100","data-testid":`agent-menu-${i.id}`,"aria-label":s("common.moreActions","More actions"),"aria-haspopup":"true","aria-expanded":r,children:d.jsx(AH,{className:"h-4 w-4","aria-hidden":"true"})}),r&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:g,"aria-hidden":"true"}),d.jsx(ntt,{onDuplicate:()=>{e(i.id,i.version),o(!1)},onExport:()=>{n==null||n(i.id,i.version),o(!1)},onDelete:()=>{t(i.id,i.version),o(!1)},onClose:g})]})]})]}),d.jsxs("div",{className:"mt-4 flex-1",children:[d.jsxs(Kn,{to:`/manage/agentview/${i.id}`,className:"text-lg font-semibold text-foreground hover:text-primary transition-colors",children:[i.name||s("agents.unnamed","Unnamed Agent"),d.jsx(Oo,{className:"ms-1 inline h-3.5 w-3.5 opacity-0 group-hover:opacity-50"})]}),d.jsx("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground/70 truncate",title:i.id,children:i.id}),d.jsx("p",{className:"mt-1 line-clamp-2 text-sm text-muted-foreground",children:i.description||s("agents.noDescription","No description")})]}),d.jsxs("div",{className:"mt-4 flex items-center justify-between border-t border-border pt-3",children:[d.jsx("span",{className:"text-xs text-muted-foreground",title:new Date(i.lastModifiedOn).toLocaleString(),children:D}),d.jsxs("div",{className:"flex items-center gap-2",children:[w&&d.jsxs("div",{className:"inline-flex",children:[d.jsxs("button",{onClick:async()=>{const T=Rc.getState(),I=Bi.getState(),R=i.name||s("agents.unnamed","Unnamed Agent");T.open(i.id,R),T.setStep("starting"),I.clearMessages(),I.setSelectedAgent(i.id,R);try{await h.mutateAsync({agentId:i.id}),T.setStep("ready")}catch(P){T.setStep("error",qs(P))}},className:"inline-flex items-center gap-1.5 rounded-s-lg bg-emerald-500/10 px-3 py-1.5 text-xs font-medium text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400","data-testid":`agent-chat-${i.id}`,"aria-label":s("agents.chat","Chat"),children:[d.jsx(Wl,{className:"h-3.5 w-3.5","aria-hidden":"true"}),s("agents.chat","Chat")]}),d.jsx("a",{href:`/chat/production/${i.id}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center rounded-e-lg border-s border-emerald-500/20 bg-emerald-500/10 px-1.5 py-1.5 text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400",title:s("agents.openExternalChat","Open in new tab"),"aria-label":s("agents.openExternalChat","Open in new tab"),"data-testid":`agent-external-chat-${i.id}`,children:d.jsx(Oo,{className:"h-3 w-3","aria-hidden":"true"})})]}),d.jsx("button",{onClick:w?E:C,disabled:k,className:me("rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",w?"bg-destructive/10 text-destructive hover:bg-destructive/20":"bg-primary/10 text-primary hover:bg-primary/20",k&&"cursor-not-allowed opacity-50"),children:k?s("common.loading"):w?s("agents.undeploy","Undeploy"):s("agents.deploy","Deploy")})]})]})]})}function ntt({onDuplicate:i,onExport:e,onDelete:t,onClose:n}){const{t:s}=ve(),r=L.useRef(null);L.useEffect(()=>{requestAnimationFrame(()=>{var l;const a=(l=r.current)==null?void 0:l.querySelector('[role="menuitem"]');a==null||a.focus()})},[]);const o=L.useCallback(a=>{var g,f;if(a.key==="Escape"){a.preventDefault(),n();return}const l=(g=r.current)==null?void 0:g.querySelectorAll('[role="menuitem"]');if(!l||l.length===0)return;const c=Array.from(l),u=c.indexOf(document.activeElement);let h=null;switch(a.key){case"ArrowDown":h=(u+1)%c.length;break;case"ArrowUp":h=(u-1+c.length)%c.length;break;case"Home":h=0;break;case"End":h=c.length-1;break;default:return}a.preventDefault(),(f=c[h])==null||f.focus()},[n]);return d.jsxs("div",{ref:r,className:"absolute inset-e-0 z-50 mt-1 w-44 rounded-lg border bg-popover py-1 shadow-lg",role:"menu","aria-label":s("common.moreActions","More actions"),onKeyDown:o,children:[d.jsxs("button",{onClick:i,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-popover-foreground hover:bg-secondary focus:bg-secondary",role:"menuitem",tabIndex:-1,children:[d.jsx(yo,{className:"h-4 w-4","aria-hidden":"true"}),s("common.duplicate","Duplicate")]}),d.jsxs("button",{onClick:e,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-popover-foreground hover:bg-secondary focus:bg-secondary disabled:opacity-50",role:"menuitem",tabIndex:-1,children:[d.jsx(m0,{className:"h-4 w-4","aria-hidden":"true"}),s("agents.export","Export")]}),d.jsxs("button",{onClick:t,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-destructive hover:bg-destructive/10 focus:bg-destructive/10",role:"menuitem",tabIndex:-1,children:[d.jsx(yn,{className:"h-4 w-4","aria-hidden":"true"}),s("common.delete")]})]})}function vP({open:i,onClose:e,title:t,children:n,testId:s,maxWidth:r="max-w-md",showClose:o=!0}){const{t:a}=ve(),l=L.useRef(null),c=L.useRef(null),u=L.useId();L.useEffect(()=>{var g;i?(c.current=document.activeElement,requestAnimationFrame(()=>{var m;const f=(m=l.current)==null?void 0:m.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');f==null||f.focus()})):(g=c.current)==null||g.focus()},[i]),L.useEffect(()=>{if(!i)return;const g=f=>{f.key==="Escape"&&(f.stopPropagation(),e())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[i,e]);const h=L.useCallback(g=>{if(g.key!=="Tab")return;const f=l.current;if(!f)return;const m=f.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(m.length===0)return;const x=m[0],v=m[m.length-1];g.shiftKey&&document.activeElement===x?(g.preventDefault(),v.focus()):!g.shiftKey&&document.activeElement===v&&(g.preventDefault(),x.focus())},[]);return i?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:e,"aria-hidden":"true"}),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:d.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":u,className:`w-full ${r} rounded-xl border bg-card shadow-2xl`,onClick:g=>g.stopPropagation(),onKeyDown:h,"data-testid":s,children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-border p-5",children:[d.jsx("h2",{id:u,className:"text-lg font-semibold text-foreground",children:t}),o&&d.jsx("button",{onClick:e,"aria-label":a("common.close","Close"),className:"rounded-md p-1 text-muted-foreground hover:bg-secondary hover:text-foreground",children:d.jsx(An,{className:"h-5 w-5"})})]}),n]})})]}):null}function itt({open:i,onClose:e}){const{t}=ve(),n=za(),[s,r]=L.useState(""),[o,a]=L.useState(""),l=ket();async function c(u){u.preventDefault();try{const h=await l.mutateAsync({agent:{workflows:[],channels:[]},name:s,description:o});if(qe.success(t("agents.createSuccess","Agent created successfully")),r(""),a(""),e(),h.location){const f=new URL(h.location,"http://dummy").pathname.split("/").filter(Boolean),m=f[f.length-1];m&&n(`/manage/agents/${m}`)}}catch(h){qe.error(qs(h))}}return d.jsx(vP,{open:i,onClose:e,title:t("agents.createTitle","Create New Agent"),testId:"create-agent-dialog",children:d.jsxs("form",{onSubmit:c,className:"space-y-4 p-5",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"agent-name",className:"mb-1.5 block text-sm font-medium text-foreground",children:t("agents.name","Name")}),d.jsx("input",{id:"agent-name",type:"text",value:s,onChange:u=>r(u.target.value),placeholder:t("agents.namePlaceholder","My Agent"),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"agent-description",className:"mb-1.5 block text-sm font-medium text-foreground",children:t("agents.description","Description")}),d.jsx("textarea",{id:"agent-description",value:o,onChange:u=>a(u.target.value),placeholder:t("agents.descriptionPlaceholder","Describe what this agent does..."),rows:3,className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring resize-none"})]}),l.isError&&d.jsx("p",{className:"text-sm text-destructive",role:"alert",children:t("common.error")}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:e,className:"rounded-lg px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-secondary transition-colors",children:t("common.cancel")}),d.jsx("button",{type:"submit",disabled:l.isPending,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-50",children:l.isPending?t("common.loading"):t("common.create")})]})]})})}function U4(i){try{const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,t=new URL(e,"http://dummy"),n=t.pathname.split("/").filter(Boolean),s=n[n.length-1]||i,r=t.searchParams.get("version"),o=r?parseInt(r,10):NaN,a=Number.isFinite(o)?o:null;return{id:s,version:a}}catch{const e=i.split("/");return{id:e[e.length-1]||i,version:null}}}function _P(i){return{...Be.getAuthHeader(),...i?{"X-Source-Authorization":i}:{}}}async function stt(i){const e=i.startsWith("http")?i:`${Be.getBaseUrl()}${i}`,t=await fetch(e,{headers:Be.getAuthHeader()});if(!t.ok)throw new Error(`Download failed: ${t.statusText}`);const n=await t.blob(),s=i.split("/").pop()||"agent-export.zip",r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=s,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(r.href)}async function rtt(i){const e=await fetch(`${Be.getBaseUrl()}/backup/import`,{method:"POST",headers:{"Content-Type":"application/zip",...Be.getAuthHeader()},body:i});if(!e.ok)throw new Error(`Import failed: ${e.statusText}`);return e.headers.get("Location")||""}async function ott(i){const e=await fetch(`${Be.getBaseUrl()}/backup/import/preview`,{method:"POST",headers:{"Content-Type":"application/zip",...Be.getAuthHeader()},body:i});if(!e.ok)throw new Error(`Preview failed: ${e.statusText}`);return e.json()}async function att(i,e){const t=new URLSearchParams({strategy:"merge"});e&&e.length>0&&t.set("selectedResources",e.join(","));const n=await fetch(`${Be.getBaseUrl()}/backup/import?${t}`,{method:"POST",headers:{"Content-Type":"application/zip",...Be.getAuthHeader()},body:i});if(!n.ok)throw new Error(`Merge import failed: ${n.statusText}`);return n.headers.get("Location")||""}async function ltt(i,e=1){return Be.post(`/backup/export/${i}/preview?agentVersion=${e}`)}async function ctt(i,e,t){const n=new URLSearchParams({agentVersion:String(e)});t.length>0&&n.set("selectedResources",t.join(","));const s=await fetch(`${Be.getBaseUrl()}/backup/export/${i}?${n}`,{method:"POST",headers:Be.getAuthHeader()});if(!s.ok)throw new Error(`Export failed: ${s.statusText}`);const r=s.headers.get("Location");r&&await stt(r)}async function dtt(i,e){const t=new URLSearchParams({targetAgentId:e}),n=await fetch(`${Be.getBaseUrl()}/backup/import/preview?${t}`,{method:"POST",headers:{"Content-Type":"application/zip",...Be.getAuthHeader()},body:i});if(!n.ok)throw new Error(`Upgrade preview failed: ${n.statusText}`);return n.json()}async function utt(i,e,t,n){const s=new URLSearchParams({strategy:"upgrade",targetAgentId:e});t!=null&&t.length&&s.set("selectedResources",t.join(",")),n!=null&&n.length&&s.set("workflowOrder",n.join(","));const r=await fetch(`${Be.getBaseUrl()}/backup/import?${s}`,{method:"POST",headers:{"Content-Type":"application/zip",...Be.getAuthHeader()},body:i});if(!r.ok)throw new Error(`Upgrade import failed: ${r.statusText}`);return r.headers.get("Location")||""}async function htt(i,e){const t=new URLSearchParams({sourceUrl:i}),n=await fetch(`${Be.getBaseUrl()}/backup/import/sync/agents?${t}`,{headers:_P(e)});if(!n.ok)throw new Error(`Failed to list remote agents: ${n.statusText}`);return n.json()}async function gtt(i,e,t,n,s){const r=new URLSearchParams({sourceUrl:i,sourceAgentId:e});t!=null&&r.set("sourceAgentVersion",String(t)),n&&r.set("targetAgentId",n);const o=await fetch(`${Be.getBaseUrl()}/backup/import/sync/preview?${r}`,{method:"POST",headers:_P(s)});if(!o.ok)throw new Error(`Sync preview failed: ${o.statusText}`);return o.json()}async function ftt(i,e,t){const n=new URLSearchParams({sourceUrl:i}),s=await fetch(`${Be.getBaseUrl()}/backup/import/sync/preview/batch?${n}`,{method:"POST",headers:{"Content-Type":"application/json",..._P(t)},body:JSON.stringify(e)});if(!s.ok)throw new Error(`Batch preview failed: ${s.statusText}`);return s.json()}async function ptt(i,e,t,n,s,r,o){const a=new URLSearchParams({sourceUrl:i,sourceAgentId:e});t!=null&&a.set("sourceAgentVersion",String(t)),n&&a.set("targetAgentId",n),s!=null&&s.length&&a.set("selectedResources",s.join(",")),r!=null&&r.length&&a.set("workflowOrder",r.join(","));const l=await fetch(`${Be.getBaseUrl()}/backup/import/sync?${a}`,{method:"POST",headers:_P(o)});if(!l.ok)throw new Error(`Sync execute failed: ${l.statusText}`)}async function mtt(i,e,t){const n=new URLSearchParams({sourceUrl:i}),s=await fetch(`${Be.getBaseUrl()}/backup/import/sync/batch?${n}`,{method:"POST",headers:{"Content-Type":"application/json",..._P(t)},body:JSON.stringify(e)});if(!s.ok)throw new Error(`Batch sync failed: ${s.statusText}`)}const yP=["agents"];function btt(){const i=un();return Xt({mutationFn:e=>rtt(e),onSuccess:()=>{i.invalidateQueries({queryKey:yP})}})}function xtt(){return Xt({mutationFn:i=>ott(i)})}function vtt(){const i=un();return Xt({mutationFn:({file:e,selectedSourceIds:t})=>att(e,t),onSuccess:()=>{i.invalidateQueries({queryKey:yP})}})}function _tt(i,e,t){return fn({queryKey:["export-preview",i,e],queryFn:()=>ltt(i,e),enabled:t,staleTime:3e4})}function ytt(){return Xt({mutationFn:({agentId:i,version:e,selectedResourceIds:t})=>ctt(i,e,t)})}function wtt(){return Xt({mutationFn:({file:i,targetAgentId:e})=>dtt(i,e)})}function Ctt(){const i=un();return Xt({mutationFn:({file:e,targetAgentId:t,selectedSourceIds:n,workflowOrder:s})=>utt(e,t,n,s),onSuccess:()=>{i.invalidateQueries({queryKey:yP})}})}function Stt(){return Xt({mutationFn:({sourceUrl:i,sourceAuth:e})=>htt(i,e)})}function ktt(){return Xt({mutationFn:({sourceUrl:i,sourceAgentId:e,sourceVersion:t,targetAgentId:n,sourceAuth:s})=>gtt(i,e,t,n,s)})}function Ntt(){return Xt({mutationFn:({sourceUrl:i,mappings:e,sourceAuth:t})=>ftt(i,e,t)})}function Ett(){const i=un();return Xt({mutationFn:({sourceUrl:e,sourceAgentId:t,sourceVersion:n,targetAgentId:s,selectedResources:r,workflowOrder:o,sourceAuth:a})=>ptt(e,t,n,s,r,o,a),onSuccess:()=>{i.invalidateQueries({queryKey:yP})}})}function Ltt(){const i=un();return Xt({mutationFn:({sourceUrl:e,requests:t,sourceAuth:n})=>mtt(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:yP})}})}function eLe({url:i,auth:e,onUrlChange:t,onAuthChange:n,onConnected:s}){const{t:r}=ve(),[o,a]=L.useState(!1),[l,c]=L.useState("idle"),[u,h]=L.useState(0),[g,f]=L.useState(null),m=Stt();function x(){i.trim()&&(c("connecting"),f(null),m.mutate({sourceUrl:i.trim(),sourceAuth:e.trim()},{onSuccess:v=>{c("connected"),h(v.length),s(v)},onError:v=>{c("error"),f(v.message)}}))}return d.jsxs("form",{className:"space-y-3","data-testid":"sync-config-panel",onSubmit:v=>{v.preventDefault(),x()},children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:r("syncPage.sourceUrl","Source EDDI Instance URL")}),d.jsx("input",{type:"url",value:i,onChange:v=>{t(v.target.value),l!=="idle"&&c("idle")},placeholder:"https://staging.eddi.example.com",className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"sync-url-input"})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:r("syncPage.authToken","Authorization Token")}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:o?"text":"password",value:e,onChange:v=>n(v.target.value),placeholder:"Bearer eyJhb...",className:"w-full rounded-lg border border-input bg-background px-3 py-2 pe-10 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"sync-auth-input"}),d.jsx("button",{type:"button",onClick:()=>a(!o),className:"absolute end-2 top-1/2 -translate-y-1/2 rounded p-1 text-muted-foreground hover:text-foreground",children:o?d.jsx(Bb,{className:"h-4 w-4"}):d.jsx(Hh,{className:"h-4 w-4"})})]}),d.jsx("p",{className:"text-[11px] text-muted-foreground",children:r("syncPage.authHint","Optional. Sent as X-Source-Authorization header.")})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs(Qt,{type:"submit",disabled:!i.trim()||m.isPending,"data-testid":"sync-connect-btn",children:[m.isPending?d.jsx(Xn,{className:"h-4 w-4 animate-spin"}):d.jsx(Wu,{className:"h-4 w-4"}),r("syncPage.connect","Connect")]}),l==="connected"&&d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-medium text-emerald-600 dark:text-emerald-400",children:[d.jsx(Jie,{className:"h-4 w-4"}),r("syncPage.connected","Connected")," — ",u," ",r("syncPage.agentsFound","agents")]}),l==="error"&&d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-medium text-destructive",children:[d.jsx(Mo,{className:"h-4 w-4"}),g||r("syncPage.connectionFailed","Connection failed")]})]})]})}function Dtt({dragging:i,onDragging:e,onFile:t}){const{t:n}=ve(),s=L.useRef(null);function r(a){a.preventDefault(),e(!1);const l=a.dataTransfer.files[0];l!=null&&l.name.endsWith(".zip")&&t(l)}function o(a){var c;const l=(c=a.target.files)==null?void 0:c[0];l!=null&&l.name.endsWith(".zip")&&t(l)}return d.jsxs("div",{className:`flex-1 flex flex-col items-center justify-center gap-4 rounded-lg border-2 border-dashed p-8 transition-colors cursor-pointer ${i?"border-primary bg-primary/5 scale-[1.01]":"border-border hover:border-primary/50"}`,onDragOver:a=>a.preventDefault(),onDragEnter:()=>e(!0),onDragLeave:()=>e(!1),onDrop:r,onClick:()=>{var a;return(a=s.current)==null?void 0:a.click()},"data-testid":"import-drop-zone",children:[d.jsx(nse,{className:"h-12 w-12 text-muted-foreground"}),d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:n("importDialog.dropZone","Drop a .zip file here or click to browse")}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n("importDialog.dropZoneHint","Exported agent archive (.zip)")})]}),d.jsx("input",{ref:s,type:"file",accept:".zip",onChange:o,className:"hidden","data-testid":"import-file-input"})]})}function Ttt({file:i,strategy:e,onStrategyChange:t,onBack:n,onNext:s,isLoading:r,isPreviewing:o,error:a}){const{t:l}=ve();return d.jsxs("div",{className:"flex-1 space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-secondary/50 p-3",children:[d.jsx(nse,{className:"h-5 w-5 text-primary shrink-0"}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:i.name}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[(i.size/1024).toFixed(1)," KB"]})]})]}),d.jsxs("fieldset",{className:"space-y-2",children:[d.jsx("legend",{className:"text-sm font-medium text-foreground mb-2",children:l("importDialog.strategyLabel","Import Strategy")}),d.jsx(V5,{value:"create",current:e,onChange:t,icon:d.jsx(Yt,{className:"h-4 w-4 text-emerald-500"}),label:l("importDialog.createNew","Create as new agent"),desc:l("importDialog.createNewDesc","Creates a fresh copy with new IDs. Best for first-time import."),testId:"strategy-create"}),d.jsx(V5,{value:"merge",current:e,onChange:t,icon:d.jsx(yi,{className:"h-4 w-4 text-blue-500"}),label:l("importDialog.mergeSync","Merge / sync with existing"),desc:l("importDialog.mergeSyncDesc","Updates existing resources if previously imported. Creates new ones if not found."),testId:"strategy-merge"}),d.jsx(V5,{value:"upgrade",current:e,onChange:t,icon:d.jsx(h_,{className:"h-4 w-4 text-amber-500"}),label:l("importDialog.upgradeExisting","Upgrade existing agent"),desc:l("importDialog.upgradeDesc","Match resources structurally against a target agent. Best for promoting across environments."),testId:"strategy-upgrade"}),d.jsx(V5,{value:"sync",current:e,onChange:t,icon:d.jsx(Wu,{className:"h-4 w-4 text-violet-500"}),label:l("importDialog.syncRemote","Sync from remote instance"),desc:l("importDialog.syncDesc","Connect to another EDDI instance and sync a specific agent live."),testId:"strategy-sync"})]}),a&&d.jsx("p",{className:"text-sm text-destructive",children:a}),d.jsxs("div",{className:"flex justify-between pt-2",children:[d.jsxs(Qt,{variant:"ghost",onClick:n,disabled:r,children:[d.jsx(zl,{className:"h-4 w-4"}),l("common.back","Back")]}),d.jsxs(Qt,{onClick:s,disabled:r,"data-testid":"import-confirm-strategy",children:[o?l("common.loading","Loading..."):e==="create"?l("importDialog.importNow","Import Now"):e==="merge"?l("importDialog.previewChanges","Preview Changes"):l("common.next","Next"),d.jsx(Bh,{className:"h-4 w-4"})]})]})]})}function V5({value:i,current:e,onChange:t,icon:n,label:s,desc:r,testId:o}){return d.jsxs("label",{className:`flex items-start gap-3 rounded-lg border p-3 cursor-pointer transition-colors ${e===i?"border-primary bg-primary/5":"border-border hover:border-primary/30"}`,"data-testid":o,children:[d.jsx("input",{type:"radio",name:"strategy",value:i,checked:e===i,onChange:()=>t(i),className:"mt-0.5 accent-primary"}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[n,d.jsx("span",{className:"text-sm font-medium text-foreground",children:s})]}),d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:r})]})]})}const Itt={agent:"bg-purple-500/10 text-purple-500",workflow:"bg-blue-500/10 text-blue-500",behavior:"bg-amber-500/10 text-amber-500",rules:"bg-amber-500/10 text-amber-500",httpcalls:"bg-green-500/10 text-green-500",apicalls:"bg-green-500/10 text-green-500",langchain:"bg-pink-500/10 text-pink-500",llm:"bg-pink-500/10 text-pink-500",output:"bg-cyan-500/10 text-cyan-500",property:"bg-orange-500/10 text-orange-500",propertysetter:"bg-orange-500/10 text-orange-500",dictionary:"bg-teal-500/10 text-teal-500",regulardictionary:"bg-teal-500/10 text-teal-500",mcpcalls:"bg-indigo-500/10 text-indigo-500",rag:"bg-violet-500/10 text-violet-500",snippet:"bg-rose-500/10 text-rose-500",snippets:"bg-rose-500/10 text-rose-500"};function Jse({type:i}){const e=i.replace(/\.json$/,"");return d.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${Itt[e]||"bg-secondary text-muted-foreground"}`,children:e})}function tLe({action:i}){const{t:e}=ve();switch(i){case"CREATE":return d.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-emerald-500",children:[d.jsx(Yt,{className:"h-3 w-3"})," ",e("sync.actionCreate","New")]});case"UPDATE":return d.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-blue-500",children:[d.jsx(yi,{className:"h-3 w-3"})," ",e("sync.actionUpdate","Update")]});case"SKIP":return d.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-muted-foreground",children:[d.jsx(Ns,{className:"h-3 w-3"})," ",e("sync.actionSkip","Up to date")]});case"CONFLICT":return d.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-destructive",children:[d.jsx(Ui,{className:"h-3 w-3"})," ",e("sync.actionConflict","Conflict")]});default:return d.jsx("span",{className:"text-xs text-muted-foreground",children:i})}}class Att{diff(e,t,n={}){let s;typeof n=="function"?(s=n,n={}):"callback"in n&&(s=n.callback);const r=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(r,n)),l=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,l,n,s)}diffWithOptionsObj(e,t,n,s){var r;const o=w=>{if(w=this.postProcess(w,n),s){setTimeout(function(){s(w)},0);return}else return w},a=t.length,l=e.length;let c=1,u=a+l;n.maxEditLength!=null&&(u=Math.min(u,n.maxEditLength));const h=(r=n.timeout)!==null&&r!==void 0?r:1/0,g=Date.now()+h,f=[{oldPos:-1,lastComponent:void 0}];let m=this.extractCommon(f[0],t,e,0,n);if(f[0].oldPos+1>=l&&m+1>=a)return o(this.buildValues(f[0].lastComponent,t,e));let x=-1/0,v=1/0;const _=()=>{for(let w=Math.max(x,-c);w<=Math.min(v,c);w+=2){let k;const C=f[w-1],E=f[w+1];C&&(f[w-1]=void 0);let D=!1;if(E){const I=E.oldPos-w;D=E&&0<=I&&I=l&&m+1>=a)return o(this.buildValues(k.lastComponent,t,e))||!0;f[w]=k,k.oldPos+1>=l&&(v=Math.min(v,w-1)),m+1>=a&&(x=Math.max(x,w+1))}c++};if(s)(function w(){setTimeout(function(){if(c>u||Date.now()>g)return s(void 0);_()||w()},0)})();else for(;c<=u&&Date.now()<=g;){const w=_();if(w)return w}}addToPath(e,t,n,s,r){const o=e.lastComponent;return o&&!r.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+s,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+s,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,s,r){const o=t.length,a=n.length;let l=e.oldPos,c=l-s,u=0;for(;c+1g.length?m:g}),u.value=this.join(h)}else u.value=this.join(t.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return s}}class Rtt extends Att{constructor(){super(...arguments),this.tokenize=Ott}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(` +`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(` +`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(` +`)&&(e=e.slice(0,-1)),t.endsWith(` +`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}}const Mtt=new Rtt;function Ptt(i,e,t){return Mtt.diff(i,e,t)}function Ott(i,e){e.stripTrailingCr&&(i=i.replace(/\r\n/g,` +`));const t=[],n=i.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let s=0;s{if(!i&&!e)return null;const s=jpe(i),r=jpe(e);return s===r?"identical":Ptt(r||"",s||"")},[i,e]);return n===null?null:n==="identical"?d.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 text-sm text-muted-foreground bg-secondary/30 rounded-lg",children:[d.jsx(cHe,{className:"h-4 w-4"}),t("importDialog.contentIdentical","Content identical")]}):d.jsxs("div",{className:"overflow-auto rounded-lg border bg-card text-xs font-mono max-h-80",children:[d.jsx("div",{className:"flex items-center justify-between px-3 py-1.5 border-b bg-secondary/50 text-[10px] text-muted-foreground",children:d.jsxs("span",{children:[t("importDialog.targetContent","Target")," → ",t("importDialog.sourceContent","Source")]})}),d.jsx("div",{className:"p-0",children:n.map((s,r)=>s.value.split(` +`).filter((a,l,c)=>!(l===c.length-1&&a==="")).map((a,l)=>d.jsxs("div",{className:s.added?"bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 border-s-2 border-emerald-500":s.removed?"bg-red-500/10 text-red-700 dark:text-red-400 border-s-2 border-red-500":"text-muted-foreground border-s-2 border-transparent",children:[d.jsx("span",{className:"inline-block w-6 text-end pe-2 text-muted-foreground/50 select-none",children:s.added?"+":s.removed?"−":" "}),a]},`${r}-${l}`)))})]})}function jpe(i){if(!i)return"";try{const e=JSON.parse(i);return JSON.stringify(eY(e),null,2)}catch{return i}}function eY(i){return Array.isArray(i)?i.map(eY):i!==null&&typeof i=="object"?Object.keys(i).sort().reduce((e,t)=>(e[t]=eY(i[t]),e),{}):i}function jtt({preview:i,strategy:e,selected:t,expandedDiff:n,workflowOrder:s,isLoading:r,error:o,onToggleResource:a,onToggleAll:l,onExpandDiff:c,onMoveWorkflow:u,onBack:h,onExecute:g}){const{t:f}=ve(),m=e==="upgrade"||e==="sync";return d.jsxs("div",{className:"flex-1 flex flex-col space-y-4 min-h-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(nse,{className:"h-5 w-5 text-primary shrink-0"}),d.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[i.sourceAgentName||i.sourceAgentId||"Agent",i.targetAgentName&&d.jsxs("span",{className:"text-muted-foreground font-normal",children:[" → ",i.targetAgentName]})]})]}),d.jsx("div",{className:"flex-1 overflow-auto rounded-lg border min-h-0",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"sticky top-0 bg-secondary/80 backdrop-blur-sm",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-3 py-2 text-start w-8",children:d.jsx("input",{type:"checkbox",checked:t.size===i.resources.length,onChange:l,className:"accent-primary"})}),d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase",children:f("importDialog.resource","Resource")}),d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase",children:f("importDialog.type","Type")}),m&&d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase",children:f("importDialog.match","Match")}),d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase",children:f("importDialog.action","Action")}),m&&d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase w-8"})]})}),d.jsx("tbody",{className:"divide-y divide-border",children:i.resources.map(x=>d.jsx(Btt,{resource:x,checked:t.has(x.sourceId),onToggle:()=>a(x.sourceId),showMatch:m,showDiff:m,expanded:n===x.sourceId,onExpand:()=>c(n===x.sourceId?null:x.sourceId),workflowOrder:s,onMoveWorkflow:u},x.sourceId))})]})}),d.jsxs("div",{className:"flex gap-3 text-xs text-muted-foreground",children:[d.jsxs("span",{children:[i.resources.filter(x=>x.action==="CREATE").length," ",f("importDialog.new","new")]}),d.jsxs("span",{children:[i.resources.filter(x=>x.action==="UPDATE").length," ",f("importDialog.updated","updated")]}),d.jsxs("span",{children:[i.resources.filter(x=>x.action==="SKIP").length," ",f("importDialog.unchanged","unchanged")]}),d.jsxs("span",{children:[t.size," ",f("importDialog.selected","selected")]})]}),o&&d.jsx("p",{className:"text-sm text-destructive",children:o}),d.jsxs("div",{className:"flex justify-between pt-2",children:[d.jsxs(Qt,{variant:"ghost",onClick:h,disabled:r,children:[d.jsx(zl,{className:"h-4 w-4"}),f("common.back","Back")]}),d.jsxs(Qt,{onClick:g,disabled:r||t.size===0,"data-testid":"import-confirm-merge",children:[e==="sync"?f("importDialog.syncNow","Sync Now"):e==="upgrade"?f("importDialog.upgradeNow","Upgrade Now"):f("importDialog.mergeNow","Import Selected"),d.jsx(Ns,{className:"h-4 w-4"})]})]})]})}function Ftt({strategy:i}){if(!i)return null;const e={position:"pos",type:"type",name:"name",originId:"ID"};return d.jsx("span",{className:"inline-flex rounded-full bg-secondary px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:e[i]||i})}function Btt({resource:i,checked:e,onToggle:t,showMatch:n,showDiff:s,expanded:r,onExpand:o,workflowOrder:a,onMoveWorkflow:l}){const c=i.action==="UPDATE"&&(i.sourceContent||i.targetContent),u=i.resourceType==="workflow"&&i.action==="CREATE",h=a.indexOf(i.sourceId);return d.jsxs(L.Fragment,{children:[d.jsxs("tr",{className:`transition-colors ${e?"bg-primary/5":""}`,children:[d.jsx("td",{className:"px-3 py-2",children:d.jsx("input",{type:"checkbox",checked:e,onChange:t,className:"accent-primary"})}),d.jsx("td",{className:"px-3 py-2 font-medium text-foreground",children:d.jsxs("div",{className:"flex items-center gap-1.5",children:[i.name||i.sourceId.substring(0,12),u&&h>=0&&d.jsxs("span",{className:"flex items-center gap-0.5 ms-1",children:[d.jsx("button",{onClick:()=>l(i.sourceId,-1),disabled:h===0,className:"rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-30",title:"Move up",children:d.jsx(Ih,{className:"h-3 w-3"})}),d.jsx("button",{onClick:()=>l(i.sourceId,1),disabled:h===a.length-1,className:"rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-30",title:"Move down",children:d.jsx(Od,{className:"h-3 w-3"})})]})]})}),d.jsx("td",{className:"px-3 py-2",children:d.jsx(Jse,{type:i.resourceType})}),n&&d.jsx("td",{className:"px-3 py-2",children:d.jsx(Ftt,{strategy:i.matchStrategy})}),d.jsx("td",{className:"px-3 py-2",children:d.jsx(tLe,{action:i.action})}),s&&d.jsx("td",{className:"px-3 py-2",children:c&&d.jsx("button",{onClick:o,className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:r?d.jsx(Ln,{className:"h-4 w-4"}):d.jsx(xs,{className:"h-4 w-4"})})})]}),r&&c&&d.jsx("tr",{children:d.jsx("td",{colSpan:n?6:5,className:"px-3 py-2",children:d.jsx(nLe,{sourceContent:i.sourceContent,targetContent:i.targetContent})})})]})}function Htt({open:i,onClose:e,onSuccess:t}){const{t:n}=ve(),[s,r]=L.useState("upload"),[o,a]=L.useState(null),[l,c]=L.useState("create"),[u,h]=L.useState(null),[g,f]=L.useState(new Set),[m,x]=L.useState(null),[v,_]=L.useState(null),[w,k]=L.useState([]),[C,E]=L.useState(!1),[D,T]=L.useState(null),[I,R]=L.useState(""),[P,j]=L.useState(""),[B,H]=L.useState([]),[$,q]=L.useState(null),[V,X]=L.useState(null),[ae,ne]=L.useState(null),W=btt(),Y=xtt(),G=vtt(),U=wtt(),ue=Ctt(),fe=ktt(),Le=Ett(),tt=L.useCallback(()=>{r("upload"),a(null),c("create"),h(null),f(new Set),x(null),_(null),k([]),E(!1),T(null),R(""),j(""),H([]),q(null),X(null),ne(null)},[]);function ge(){tt(),e()}function he(mt){a(mt),r("strategy")}function We(){x(null),l==="create"&&o?(r("importing"),W.mutate(o,{onSuccess:()=>{t(),ge()},onError:mt=>{x(mt.message),r("strategy")}})):l==="merge"&&o?Y.mutate(o,{onSuccess:mt=>{h(mt);const $t=new Set(mt.resources.map(Tn=>Tn.sourceId));f($t),r("preview")},onError:mt=>x(mt.message)}):(l==="upgrade"||l==="sync")&&r("target")}function Ie(){x(null),l==="upgrade"&&o&&D?U.mutate({file:o,targetAgentId:D},{onSuccess:mt=>{h(mt);const $t=new Set(mt.resources.map(Pi=>Pi.sourceId));f($t);const Tn=mt.resources.filter(Pi=>Pi.resourceType==="workflow"&&Pi.action==="CREATE").sort((Pi,Ti)=>Pi.workflowIndex-Ti.workflowIndex).map(Pi=>Pi.sourceId);k(Tn),r("preview")},onError:mt=>x(mt.message)}):l==="sync"&&$&&I&&fe.mutate({sourceUrl:I,sourceAgentId:$,sourceVersion:V,targetAgentId:ae,sourceAuth:P},{onSuccess:mt=>{h(mt);const $t=new Set(mt.resources.map(Tn=>Tn.sourceId));f($t),r("preview")},onError:mt=>x(mt.message)})}function _t(){x(null),r("importing");const mt=Array.from(g);l==="merge"&&o?G.mutate({file:o,selectedSourceIds:mt},{onSuccess:()=>{t(),ge()},onError:$t=>{x($t.message),r("preview")}}):l==="upgrade"&&o&&D?ue.mutate({file:o,targetAgentId:D,selectedSourceIds:mt,workflowOrder:w},{onSuccess:()=>{t(),ge()},onError:$t=>{x($t.message),r("preview")}}):l==="sync"&&$&&I&&Le.mutate({sourceUrl:I,sourceAgentId:$,sourceVersion:V,targetAgentId:ae,selectedResources:mt,workflowOrder:w.length>0?w:null,sourceAuth:P},{onSuccess:()=>{t(),ge()},onError:$t=>{x($t.message),r("preview")}})}function ut(mt){f($t=>{const Tn=new Set($t);return Tn.has(mt)?Tn.delete(mt):Tn.add(mt),Tn})}function Wt(){u&&(g.size===u.resources.length?f(new Set):f(new Set(u.resources.map(mt=>mt.sourceId))))}function Re(mt,$t){k(Tn=>{const Pi=Tn.indexOf(mt);if(Pi<0)return Tn;const Ti=Pi+$t;if(Ti<0||Ti>=Tn.length)return Tn;const cs=[...Tn];return[cs[Pi],cs[Ti]]=[cs[Ti],cs[Pi]],cs})}if(!i)return null;const Me=W.isPending||Y.isPending||G.isPending||U.isPending||ue.isPending||fe.isPending||Le.isPending,pt=l==="upgrade"&&!!D||l==="sync"&&!!$;return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:Me?void 0:ge}),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:d.jsxs("div",{className:"w-full max-w-2xl rounded-xl border bg-card p-6 shadow-2xl max-h-[85vh] flex flex-col",onClick:mt=>mt.stopPropagation(),"data-testid":"import-agent-dialog",children:[d.jsxs("div",{className:"flex items-center justify-between mb-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n("importDialog.title","Import Agent")}),d.jsx("button",{onClick:ge,disabled:Me,className:"rounded-md p-1 text-muted-foreground hover:bg-secondary hover:text-foreground disabled:opacity-50",children:d.jsx(An,{className:"h-5 w-5"})})]}),s==="upload"&&d.jsx(Dtt,{dragging:C,onDragging:E,onFile:he}),s==="strategy"&&o&&d.jsx(Ttt,{file:o,strategy:l,onStrategyChange:c,onBack:()=>{a(null),r("upload")},onNext:We,isLoading:Me,isPreviewing:Y.isPending,error:m}),s==="target"&&d.jsx(Wtt,{strategy:l,targetAgentId:D,onSelectTarget:T,syncUrl:I,syncAuth:P,remoteAgents:B,sourceAgent:$,syncTargetId:ae,onSyncUrlChange:R,onSyncAuthChange:j,onRemoteAgents:H,onSourceAgent:(mt,$t)=>{q(mt),X($t)},onSyncTarget:ne,error:m,isLoading:Me,isPreviewing:U.isPending||fe.isPending,canNext:pt,onBack:()=>r("strategy"),onNext:Ie}),s==="preview"&&u&&d.jsx(jtt,{preview:u,strategy:l,selected:g,expandedDiff:v,workflowOrder:w,isLoading:Me,error:m,onToggleResource:ut,onToggleAll:Wt,onExpandDiff:_,onMoveWorkflow:Re,onBack:()=>r(l==="merge"?"strategy":"target"),onExecute:_t}),s==="importing"&&d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 py-8",children:[d.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-muted-foreground border-t-primary"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:n("importDialog.importing","Importing agent...")})]})]})})]})}function Wtt({strategy:i,targetAgentId:e,onSelectTarget:t,syncUrl:n,syncAuth:s,remoteAgents:r,sourceAgent:o,syncTargetId:a,onSyncUrlChange:l,onSyncAuthChange:c,onRemoteAgents:u,onSourceAgent:h,onSyncTarget:g,error:f,isLoading:m,isPreviewing:x,canNext:v,onBack:_,onNext:w}){const{t:k}=ve();return d.jsxs("div",{className:"flex-1 space-y-4",children:[i==="upgrade"&&d.jsx(Vtt,{targetAgentId:e,onSelect:t}),i==="sync"&&d.jsx(ztt,{syncUrl:n,syncAuth:s,remoteAgents:r,sourceAgent:o,syncTargetId:a,onUrlChange:l,onAuthChange:c,onRemoteAgents:u,onSourceAgent:h,onSyncTarget:g}),f&&d.jsx("p",{className:"text-sm text-destructive",children:f}),d.jsxs("div",{className:"flex justify-between pt-2",children:[d.jsxs(Qt,{variant:"ghost",onClick:_,disabled:m,children:[d.jsx(zl,{className:"h-4 w-4"}),k("common.back","Back")]}),d.jsxs(Qt,{onClick:w,disabled:m||!v,"data-testid":"import-target-next",children:[x?k("common.loading","Loading..."):k("importDialog.previewChanges","Preview Changes"),d.jsx(Bh,{className:"h-4 w-4"})]})]})]})}function Vtt({targetAgentId:i,onSelect:e}){const{t}=ve(),{data:n}=JH(),s=Hg((n==null?void 0:n.pages.flat())??[]);return d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:t("importDialog.selectTargetAgent","Select target agent")}),d.jsx("p",{className:"text-xs text-muted-foreground",children:t("importDialog.upgradeTargetHint","The imported resources will be structurally matched against this agent.")}),d.jsxs("select",{value:i||"",onChange:r=>e(r.target.value),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"upgrade-target-select",children:[d.jsx("option",{value:"",children:t("importDialog.chooseAgent","— Choose an agent —")}),s.map(r=>d.jsxs("option",{value:r.id,children:[r.name||r.id," (v",r.version,")"]},r.id))]})]})}function ztt({syncUrl:i,syncAuth:e,remoteAgents:t,sourceAgent:n,syncTargetId:s,onUrlChange:r,onAuthChange:o,onRemoteAgents:a,onSourceAgent:l,onSyncTarget:c}){const{t:u}=ve(),{data:h}=JH(),g=Hg((h==null?void 0:h.pages.flat())??[]);return d.jsxs("div",{className:"space-y-4",children:[d.jsx(eLe,{url:i,auth:e,onUrlChange:r,onAuthChange:o,onConnected:a}),t.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:u("importDialog.sourceAgent","Source agent (remote)")}),d.jsxs("select",{value:n||"",onChange:f=>{const m=t.find(x=>{const{id:v}=U4(x.resource);return v===f.target.value});if(m){const{id:x,version:v}=U4(m.resource);l(x,v)}},className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"sync-source-select",children:[d.jsx("option",{value:"",children:u("importDialog.chooseAgent","— Choose an agent —")}),t.map(f=>{const{id:m}=U4(f.resource);return d.jsx("option",{value:m,children:f.name||m},m)})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:u("importDialog.targetAgent","Target agent (local)")}),d.jsxs("select",{value:s||"",onChange:f=>c(f.target.value||null),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"sync-target-select",children:[d.jsx("option",{value:"",children:u("importDialog.createNewTarget","Create new agent")}),g.map(f=>d.jsxs("option",{value:f.id,children:[f.name||f.id," (v",f.version,")"]},f.id))]})]})]})]})}function iLe({open:i,onClose:e,agentId:t,agentVersion:n}){const{t:s}=ve(),[r,o]=L.useState(new Set),{data:a,isLoading:l,isError:c,error:u}=_tt(t,n,i),h=ytt(),g=L.useMemo(()=>a?a.resources.map(D=>D.resourceId):[],[a]);L.useEffect(()=>{g.length>0&&o(new Set(g))},[g]);const f=L.useMemo(()=>a?new Set(a.resources.filter(D=>D.required).map(D=>D.resourceId)):new Set,[a]),m=L.useMemo(()=>{if(!a)return[];const D=new Map;for(const T of a.resources){if(T.resourceType==="agent")continue;const I=T.parentWorkflowId||"__snippets__";if(!D.has(I)){const R=T.parentWorkflowId?a.resources.find(P=>P.resourceId===T.parentWorkflowId&&P.resourceType==="workflow"):null;D.set(I,{workflowId:T.parentWorkflowId,workflowName:(R==null?void 0:R.name)||T.parentWorkflowId,workflowIndex:(R==null?void 0:R.workflowIndex)??-1,resources:[]})}T.resourceType!=="workflow"&&D.get(I).resources.push(T)}return Array.from(D.values()).sort((T,I)=>T.workflowIndex-I.workflowIndex)},[a]),x=a==null?void 0:a.resources.find(D=>D.resourceType==="agent"),v=(a==null?void 0:a.resources.filter(D=>D.resourceType==="workflow"))??[];function _(D){f.has(D)||o(T=>{const I=new Set(T);return I.has(D)?I.delete(D):I.add(D),I})}function w(){r.size===g.length?o(new Set(f)):o(new Set(g))}function k(){h.mutate({agentId:t,version:n,selectedResourceIds:Array.from(r)},{onSuccess:()=>C()})}function C(){o(new Set),e()}if(!i)return null;const E=h.isPending;return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:E?void 0:C}),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:d.jsxs("div",{className:"w-full max-w-lg rounded-xl border bg-card p-6 shadow-2xl max-h-[80vh] flex flex-col",onClick:D=>D.stopPropagation(),"data-testid":"export-agent-dialog",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:s("exportDialog.title","Export Agent")}),d.jsx("button",{onClick:C,disabled:E,className:"rounded-md p-1 text-muted-foreground hover:bg-secondary hover:text-foreground disabled:opacity-50",children:d.jsx(An,{className:"h-5 w-5"})})]}),l&&d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 py-12",children:[d.jsx(Xn,{className:"h-8 w-8 animate-spin text-primary"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:s("exportDialog.loading","Loading resource tree...")})]}),c&&d.jsx("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 py-12",children:d.jsx("p",{className:"text-sm text-destructive",children:(u==null?void 0:u.message)||s("common.error")})}),a&&!l&&d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:s("exportDialog.selectResources","Select resources to export")}),d.jsxs("div",{className:"flex-1 overflow-auto min-h-0 space-y-1 rounded-lg border p-3 bg-secondary/20",children:[x&&d.jsx(z5,{resource:x,checked:r.has(x.resourceId),required:!0,indent:0}),v.map(D=>{const T=m.find(I=>I.workflowId===D.resourceId);return d.jsxs("div",{children:[d.jsx(z5,{resource:D,checked:r.has(D.resourceId),required:D.required,indent:1}),T==null?void 0:T.resources.map(I=>d.jsx(z5,{resource:I,checked:r.has(I.resourceId),required:I.required,indent:2,onToggle:()=>_(I.resourceId)},I.resourceId))]},D.resourceId)}),m.filter(D=>!D.workflowId).map(D=>D.resources.length>0?d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mt-2 mb-1 ps-2",children:s("exportDialog.snippets","Snippets")}),D.resources.map(T=>d.jsx(z5,{resource:T,checked:r.has(T.resourceId),required:T.required,indent:1,onToggle:()=>_(T.resourceId)},T.resourceId))]},"snippets"):null)]}),d.jsxs("div",{className:"flex items-center justify-between pt-4 border-t mt-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{type:"checkbox",checked:r.size===g.length,onChange:w,className:"accent-primary","data-testid":"select-all-checkbox"}),d.jsx("span",{className:"text-xs text-muted-foreground",children:r.size===g.length?s("exportDialog.allSelected","All resources selected"):s("exportDialog.countSelected","{{count}} of {{total}} resources selected",{count:r.size,total:g.length})})]}),d.jsxs(Qt,{onClick:k,disabled:E||r.size===0,"data-testid":"export-confirm-btn",children:[E?d.jsx(Xn,{className:"h-4 w-4 animate-spin"}):d.jsx(m0,{className:"h-4 w-4"}),s("exportDialog.exportSelected","Export Selected")]})]})]})]})})]})}function z5({resource:i,checked:e,required:t,indent:n,onToggle:s}){const r=n===0?"ps-2":n===1?"ps-6":"ps-10";return d.jsxs("label",{className:`flex items-center gap-2 rounded-md px-2 py-1.5 text-sm cursor-pointer hover:bg-secondary/50 transition-colors ${r} ${e?"text-foreground":"text-muted-foreground"}`,children:[d.jsx("input",{type:"checkbox",checked:e,disabled:t,onChange:s,className:"accent-primary disabled:opacity-60"}),d.jsx(Jse,{type:i.resourceType}),d.jsx("span",{className:"truncate flex-1",children:i.name||i.resourceId.slice(0,12)}),t&&d.jsx(RH,{className:"h-3 w-3 text-muted-foreground/50 shrink-0"})]})}function sLe({open:i,onClose:e,type:t,wizardPath:n,onQuickCreate:s}){const{t:r}=ve(),o=za(),a=()=>{e(),o(n)},l=t==="agent"?r("common.agent","Agent"):r("common.group","Group");return d.jsx(vP,{open:i,onClose:e,title:r("createOrWizard.title",{type:l,defaultValue:`New ${l}`}),testId:"create-or-wizard-dialog",maxWidth:"max-w-2xl",children:d.jsx("div",{className:"p-6 sm:p-8",children:d.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-6",children:[d.jsxs("button",{onClick:s,className:"group flex flex-col items-start gap-4 rounded-xl border-2 border-border bg-card p-6 text-start transition-all hover:-translate-y-1 hover:border-primary/60 hover:shadow-xl","data-testid":"choice-quick-create",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10 text-primary transition-colors group-hover:bg-primary/20",children:d.jsx(Yt,{className:"h-6 w-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-base font-semibold text-foreground",children:r("createOrWizard.quickCreate","Quick Create")}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-relaxed",children:r("createOrWizard.quickCreateDesc","Set a name and description, configure details later.")})]})]}),d.jsxs("button",{onClick:a,className:"group flex flex-col items-start gap-4 rounded-xl border-2 border-border bg-card p-6 text-start transition-all hover:-translate-y-1 hover:border-amber-500/60 hover:shadow-xl","data-testid":"choice-wizard",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-lg bg-amber-500/10 text-amber-500 transition-colors group-hover:bg-amber-500/20",children:d.jsx(sD,{className:"h-6 w-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-base font-semibold text-foreground",children:r("createOrWizard.guidedSetup","Guided Setup")}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-relaxed",children:r("createOrWizard.guidedSetupDesc","Step-by-step wizard with LLM provider, prompts, and deployment.")})]})]})]})})})}function g_(i,e,{checkForDefaultPrevented:t=!0}={}){return function(s){if(i==null||i(s),t===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Utt(i,e){const t=L.createContext(e),n=r=>{const{children:o,...a}=r,l=L.useMemo(()=>a,Object.values(a));return d.jsx(t.Provider,{value:l,children:o})};n.displayName=i+"Provider";function s(r){const o=L.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${r}\` must be used within \`${i}\``)}return[n,s]}function $tt(i,e=[]){let t=[];function n(r,o){const a=L.createContext(o),l=t.length;t=[...t,o];const c=h=>{var _;const{scope:g,children:f,...m}=h,x=((_=g==null?void 0:g[i])==null?void 0:_[l])||a,v=L.useMemo(()=>m,Object.values(m));return d.jsx(x.Provider,{value:v,children:f})};c.displayName=r+"Provider";function u(h,g){var x;const f=((x=g==null?void 0:g[i])==null?void 0:x[l])||a,m=L.useContext(f);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${r}\``)}return[c,u]}const s=()=>{const r=t.map(o=>L.createContext(o));return function(a){const l=(a==null?void 0:a[i])||r;return L.useMemo(()=>({[`__scope${i}`]:{...a,[i]:l}}),[a,l])}};return s.scopeName=i,[n,qtt(s,...e)]}function qtt(...i){const e=i[0];if(i.length===1)return e;const t=()=>{const n=i.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(r){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const h=l(r)[`__scope${c}`];return{...a,...h}},{});return L.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}var z2=globalThis!=null&&globalThis.document?L.useLayoutEffect:()=>{},Ktt=kH[" useId ".trim().toString()]||(()=>{}),Gtt=0;function Sb(i){const[e,t]=L.useState(Ktt());return z2(()=>{t(n=>n??String(Gtt++))},[i]),i||(e?`radix-${e}`:"")}var Ytt=kH[" useInsertionEffect ".trim().toString()]||z2;function Qtt({prop:i,defaultProp:e,onChange:t=()=>{},caller:n}){const[s,r,o]=Xtt({defaultProp:e,onChange:t}),a=i!==void 0,l=a?i:s;{const u=L.useRef(i!==void 0);L.useEffect(()=>{const h=u.current;h!==a&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}const c=L.useCallback(u=>{var h;if(a){const g=Ztt(u)?u(i):u;g!==i&&((h=o.current)==null||h.call(o,g))}else r(u)},[a,i,r,o]);return[l,c]}function Xtt({defaultProp:i,onChange:e}){const[t,n]=L.useState(i),s=L.useRef(t),r=L.useRef(e);return Ytt(()=>{r.current=e},[e]),L.useEffect(()=>{var o;s.current!==t&&((o=r.current)==null||o.call(r,t),s.current=t)},[t,s]),[t,n,r]}function Ztt(i){return typeof i=="function"}function Jtt(i){const e=ent(i),t=L.forwardRef((n,s)=>{const{children:r,...o}=n,a=L.Children.toArray(r),l=a.find(nnt);if(l){const c=l.props.children,u=a.map(h=>h===l?L.Children.count(c)>1?L.Children.only(null):L.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:L.isValidElement(c)?L.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:r})});return t.displayName=`${i}.Slot`,t}function ent(i){const e=L.forwardRef((t,n)=>{const{children:s,...r}=t;if(L.isValidElement(s)){const o=snt(s),a=int(r,s.props);return s.type!==L.Fragment&&(a.ref=n?Hb(n,o):o),L.cloneElement(s,a)}return L.Children.count(s)>1?L.Children.only(null):null});return e.displayName=`${i}.SlotClone`,e}var tnt=Symbol("radix.slottable");function nnt(i){return L.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===tnt}function int(i,e){const t={...e};for(const n in e){const s=i[n],r=e[n];/^on[A-Z]/.test(n)?s&&r?t[n]=(...a)=>{const l=r(...a);return s(...a),l}:s&&(t[n]=s):n==="style"?t[n]={...s,...r}:n==="className"&&(t[n]=[s,r].filter(Boolean).join(" "))}return{...i,...t}}function snt(i){var n,s;let e=(n=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}var rnt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yl=rnt.reduce((i,e)=>{const t=Jtt(`Primitive.${e}`),n=L.forwardRef((s,r)=>{const{asChild:o,...a}=s,l=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:r})});return n.displayName=`Primitive.${e}`,{...i,[e]:n}},{});function ont(i,e){i&&Tg.flushSync(()=>i.dispatchEvent(e))}function U2(i){const e=L.useRef(i);return L.useEffect(()=>{e.current=i}),L.useMemo(()=>(...t)=>{var n;return(n=e.current)==null?void 0:n.call(e,...t)},[])}function ant(i,e=globalThis==null?void 0:globalThis.document){const t=U2(i);L.useEffect(()=>{const n=s=>{s.key==="Escape"&&t(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[t,e])}var lnt="DismissableLayer",tY="dismissableLayer.update",cnt="dismissableLayer.pointerDownOutside",dnt="dismissableLayer.focusOutside",Fpe,rLe=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oLe=L.forwardRef((i,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:r,onInteractOutside:o,onDismiss:a,...l}=i,c=L.useContext(rLe),[u,h]=L.useState(null),g=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=L.useState({}),m=QC(e,T=>h(T)),x=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),_=x.indexOf(v),w=u?x.indexOf(u):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,C=w>=_,E=gnt(T=>{const I=T.target,R=[...c.branches].some(P=>P.contains(I));!C||R||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},g),D=fnt(T=>{const I=T.target;[...c.branches].some(P=>P.contains(I))||(r==null||r(T),o==null||o(T),T.defaultPrevented||a==null||a())},g);return ant(T=>{w===c.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},g),L.useEffect(()=>{if(u)return t&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Fpe=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Bpe(),()=>{t&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Fpe)}},[u,g,t,c]),L.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Bpe())},[u,c]),L.useEffect(()=>{const T=()=>f({});return document.addEventListener(tY,T),()=>document.removeEventListener(tY,T)},[]),d.jsx(Yl.div,{...l,ref:m,style:{pointerEvents:k?C?"auto":"none":void 0,...i.style},onFocusCapture:g_(i.onFocusCapture,D.onFocusCapture),onBlurCapture:g_(i.onBlurCapture,D.onBlurCapture),onPointerDownCapture:g_(i.onPointerDownCapture,E.onPointerDownCapture)})});oLe.displayName=lnt;var unt="DismissableLayerBranch",hnt=L.forwardRef((i,e)=>{const t=L.useContext(rLe),n=L.useRef(null),s=QC(e,n);return L.useEffect(()=>{const r=n.current;if(r)return t.branches.add(r),()=>{t.branches.delete(r)}},[t.branches]),d.jsx(Yl.div,{...i,ref:s})});hnt.displayName=unt;function gnt(i,e=globalThis==null?void 0:globalThis.document){const t=U2(i),n=L.useRef(!1),s=L.useRef(()=>{});return L.useEffect(()=>{const r=a=>{if(a.target&&!n.current){let l=function(){aLe(cnt,t,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",r),e.removeEventListener("click",s.current)}},[e,t]),{onPointerDownCapture:()=>n.current=!0}}function fnt(i,e=globalThis==null?void 0:globalThis.document){const t=U2(i),n=L.useRef(!1);return L.useEffect(()=>{const s=r=>{r.target&&!n.current&&aLe(dnt,t,{originalEvent:r},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Bpe(){const i=new CustomEvent(tY);document.dispatchEvent(i)}function aLe(i,e,t,{discrete:n}){const s=t.originalEvent.target,r=new CustomEvent(i,{bubbles:!1,cancelable:!0,detail:t});e&&s.addEventListener(i,e,{once:!0}),n?ont(s,r):s.dispatchEvent(r)}var VU="focusScope.autoFocusOnMount",zU="focusScope.autoFocusOnUnmount",Hpe={bubbles:!1,cancelable:!0},pnt="FocusScope",lLe=L.forwardRef((i,e)=>{const{loop:t=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:r,...o}=i,[a,l]=L.useState(null),c=U2(s),u=U2(r),h=L.useRef(null),g=QC(e,x=>l(x)),f=L.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;L.useEffect(()=>{if(n){let x=function(k){if(f.paused||!a)return;const C=k.target;a.contains(C)?h.current=C:sv(h.current,{select:!0})},v=function(k){if(f.paused||!a)return;const C=k.relatedTarget;C!==null&&(a.contains(C)||sv(h.current,{select:!0}))},_=function(k){if(document.activeElement===document.body)for(const E of k)E.removedNodes.length>0&&sv(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",v);const w=new MutationObserver(_);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),w.disconnect()}}},[n,a,f.paused]),L.useEffect(()=>{if(a){Vpe.add(f);const x=document.activeElement;if(!a.contains(x)){const _=new CustomEvent(VU,Hpe);a.addEventListener(VU,c),a.dispatchEvent(_),_.defaultPrevented||(mnt(ynt(cLe(a)),{select:!0}),document.activeElement===x&&sv(a))}return()=>{a.removeEventListener(VU,c),setTimeout(()=>{const _=new CustomEvent(zU,Hpe);a.addEventListener(zU,u),a.dispatchEvent(_),_.defaultPrevented||sv(x??document.body,{select:!0}),a.removeEventListener(zU,u),Vpe.remove(f)},0)}}},[a,c,u,f]);const m=L.useCallback(x=>{if(!t&&!n||f.paused)return;const v=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,_=document.activeElement;if(v&&_){const w=x.currentTarget,[k,C]=bnt(w);k&&C?!x.shiftKey&&_===C?(x.preventDefault(),t&&sv(k,{select:!0})):x.shiftKey&&_===k&&(x.preventDefault(),t&&sv(C,{select:!0})):_===w&&x.preventDefault()}},[t,n,f.paused]);return d.jsx(Yl.div,{tabIndex:-1,...o,ref:g,onKeyDown:m})});lLe.displayName=pnt;function mnt(i,{select:e=!1}={}){const t=document.activeElement;for(const n of i)if(sv(n,{select:e}),document.activeElement!==t)return}function bnt(i){const e=cLe(i),t=Wpe(e,i),n=Wpe(e.reverse(),i);return[t,n]}function cLe(i){const e=[],t=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function Wpe(i,e){for(const t of i)if(!xnt(t,{upTo:e}))return t}function xnt(i,{upTo:e}){if(getComputedStyle(i).visibility==="hidden")return!0;for(;i;){if(e!==void 0&&i===e)return!1;if(getComputedStyle(i).display==="none")return!0;i=i.parentElement}return!1}function vnt(i){return i instanceof HTMLInputElement&&"select"in i}function sv(i,{select:e=!1}={}){if(i&&i.focus){const t=document.activeElement;i.focus({preventScroll:!0}),i!==t&&vnt(i)&&e&&i.select()}}var Vpe=_nt();function _nt(){let i=[];return{add(e){const t=i[0];e!==t&&(t==null||t.pause()),i=zpe(i,e),i.unshift(e)},remove(e){var t;i=zpe(i,e),(t=i[0])==null||t.resume()}}}function zpe(i,e){const t=[...i],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}function ynt(i){return i.filter(e=>e.tagName!=="A")}var wnt="Portal",dLe=L.forwardRef((i,e)=>{var a;const{container:t,...n}=i,[s,r]=L.useState(!1);z2(()=>r(!0),[]);const o=t||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?JCe.createPortal(d.jsx(Yl.div,{...n,ref:e}),o):null});dLe.displayName=wnt;function Cnt(i,e){return L.useReducer((t,n)=>e[t][n]??t,i)}var e7=i=>{const{present:e,children:t}=i,n=Snt(e),s=typeof t=="function"?t({present:n.isPresent}):L.Children.only(t),r=QC(n.ref,knt(s));return typeof t=="function"||n.isPresent?L.cloneElement(s,{ref:r}):null};e7.displayName="Presence";function Snt(i){const[e,t]=L.useState(),n=L.useRef(null),s=L.useRef(i),r=L.useRef("none"),o=i?"mounted":"unmounted",[a,l]=Cnt(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return L.useEffect(()=>{const c=U5(n.current);r.current=a==="mounted"?c:"none"},[a]),z2(()=>{const c=n.current,u=s.current;if(u!==i){const g=r.current,f=U5(c);i?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&g!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=i}},[i,l]),z2(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,h=f=>{const x=U5(n.current).includes(CSS.escape(f.animationName));if(f.target===e&&x&&(l("ANIMATION_END"),!s.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},g=f=>{f.target===e&&(r.current=U5(n.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:L.useCallback(c=>{n.current=c?getComputedStyle(c):null,t(c)},[])}}function U5(i){return(i==null?void 0:i.animationName)||"none"}function knt(i){var n,s;let e=(n=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}var UU=0;function Nnt(){L.useEffect(()=>{const i=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",i[0]??Upe()),document.body.insertAdjacentElement("beforeend",i[1]??Upe()),UU++,()=>{UU===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),UU--}},[])}function Upe(){const i=document.createElement("span");return i.setAttribute("data-radix-focus-guard",""),i.tabIndex=0,i.style.outline="none",i.style.opacity="0",i.style.position="fixed",i.style.pointerEvents="none",i}var Qf=function(){return Qf=Object.assign||function(e){for(var t,n=1,s=arguments.length;n"u")return znt;var e=Unt(i),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-t+e[2]-e[0])}},qnt=fLe(),VN="data-scroll-locked",Knt=function(i,e,t,n){var s=i.left,r=i.top,o=i.right,a=i.gap;return t===void 0&&(t="margin"),` + .`.concat(Lnt,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(a,"px ").concat(n,`; + } + body[`).concat(VN,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([e&&"position: relative ".concat(n,";"),t==="margin"&&` + padding-left: `.concat(s,`px; + padding-top: `).concat(r,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(n,`; + `),t==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat($4,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(q4,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat($4," .").concat($4,` { + right: 0 `).concat(n,`; + } + + .`).concat(q4," .").concat(q4,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(VN,`] { + `).concat(Dnt,": ").concat(a,`px; + } +`)},qpe=function(){var i=parseInt(document.body.getAttribute(VN)||"0",10);return isFinite(i)?i:0},Gnt=function(){L.useEffect(function(){return document.body.setAttribute(VN,(qpe()+1).toString()),function(){var i=qpe()-1;i<=0?document.body.removeAttribute(VN):document.body.setAttribute(VN,i.toString())}},[])},Ynt=function(i){var e=i.noRelative,t=i.noImportant,n=i.gapMode,s=n===void 0?"margin":n;Gnt();var r=L.useMemo(function(){return $nt(s)},[s]);return L.createElement(qnt,{styles:Knt(r,!e,s,t?"":"!important")})},nY=!1;if(typeof window<"u")try{var $5=Object.defineProperty({},"passive",{get:function(){return nY=!0,!0}});window.addEventListener("test",$5,$5),window.removeEventListener("test",$5,$5)}catch{nY=!1}var rk=nY?{passive:!1}:!1,Qnt=function(i){return i.tagName==="TEXTAREA"},pLe=function(i,e){if(!(i instanceof Element))return!1;var t=window.getComputedStyle(i);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!Qnt(i)&&t[e]==="visible")},Xnt=function(i){return pLe(i,"overflowY")},Znt=function(i){return pLe(i,"overflowX")},Kpe=function(i,e){var t=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=mLe(i,n);if(s){var r=bLe(i,n),o=r[1],a=r[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==t.body);return!1},Jnt=function(i){var e=i.scrollTop,t=i.scrollHeight,n=i.clientHeight;return[e,t,n]},eit=function(i){var e=i.scrollLeft,t=i.scrollWidth,n=i.clientWidth;return[e,t,n]},mLe=function(i,e){return i==="v"?Xnt(e):Znt(e)},bLe=function(i,e){return i==="v"?Jnt(e):eit(e)},tit=function(i,e){return i==="h"&&e==="rtl"?-1:1},nit=function(i,e,t,n,s){var r=tit(i,window.getComputedStyle(e).direction),o=r*n,a=t.target,l=e.contains(a),c=!1,u=o>0,h=0,g=0;do{if(!a)break;var f=bLe(i,a),m=f[0],x=f[1],v=f[2],_=x-v-r*m;(m||_)&&mLe(i,a)&&(h+=_,g+=m);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&Math.abs(h)<1||!u&&Math.abs(g)<1)&&(c=!0),c},q5=function(i){return"changedTouches"in i?[i.changedTouches[0].clientX,i.changedTouches[0].clientY]:[0,0]},Gpe=function(i){return[i.deltaX,i.deltaY]},Ype=function(i){return i&&"current"in i?i.current:i},iit=function(i,e){return i[0]===e[0]&&i[1]===e[1]},sit=function(i){return` + .block-interactivity-`.concat(i,` {pointer-events: none;} + .allow-interactivity-`).concat(i,` {pointer-events: all;} +`)},rit=0,ok=[];function oit(i){var e=L.useRef([]),t=L.useRef([0,0]),n=L.useRef(),s=L.useState(rit++)[0],r=L.useState(fLe)[0],o=L.useRef(i);L.useEffect(function(){o.current=i},[i]),L.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(s));var x=Ent([i.lockRef.current],(i.shards||[]).map(Ype),!0).filter(Boolean);return x.forEach(function(v){return v.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),x.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(s))})}}},[i.inert,i.lockRef.current,i.shards]);var a=L.useCallback(function(x,v){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var _=q5(x),w=t.current,k="deltaX"in x?x.deltaX:w[0]-_[0],C="deltaY"in x?x.deltaY:w[1]-_[1],E,D=x.target,T=Math.abs(k)>Math.abs(C)?"h":"v";if("touches"in x&&T==="h"&&D.type==="range")return!1;var I=window.getSelection(),R=I&&I.anchorNode,P=R?R===D||R.contains(D):!1;if(P)return!1;var j=Kpe(T,D);if(!j)return!0;if(j?E=T:(E=T==="v"?"h":"v",j=Kpe(T,D)),!j)return!1;if(!n.current&&"changedTouches"in x&&(k||C)&&(n.current=E),!E)return!0;var B=n.current||E;return nit(B,v,x,B==="h"?k:C)},[]),l=L.useCallback(function(x){var v=x;if(!(!ok.length||ok[ok.length-1]!==r)){var _="deltaY"in v?Gpe(v):q5(v),w=e.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&iit(E.delta,_)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var k=(o.current.shards||[]).map(Ype).filter(Boolean).filter(function(E){return E.contains(v.target)}),C=k.length>0?a(v,k[0]):!o.current.noIsolation;C&&v.cancelable&&v.preventDefault()}}},[]),c=L.useCallback(function(x,v,_,w){var k={name:x,delta:v,target:_,should:w,shadowParent:ait(_)};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(C){return C!==k})},1)},[]),u=L.useCallback(function(x){t.current=q5(x),n.current=void 0},[]),h=L.useCallback(function(x){c(x.type,Gpe(x),x.target,a(x,i.lockRef.current))},[]),g=L.useCallback(function(x){c(x.type,q5(x),x.target,a(x,i.lockRef.current))},[]);L.useEffect(function(){return ok.push(r),i.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",l,rk),document.addEventListener("touchmove",l,rk),document.addEventListener("touchstart",u,rk),function(){ok=ok.filter(function(x){return x!==r}),document.removeEventListener("wheel",l,rk),document.removeEventListener("touchmove",l,rk),document.removeEventListener("touchstart",u,rk)}},[]);var f=i.removeScrollBar,m=i.inert;return L.createElement(L.Fragment,null,m?L.createElement(r,{styles:sit(s)}):null,f?L.createElement(Ynt,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function ait(i){for(var e=null;i!==null;)i instanceof ShadowRoot&&(e=i.host,i=i.host),i=i.parentNode;return e}const lit=Ont(gLe,oit);var xLe=L.forwardRef(function(i,e){return L.createElement(t7,Qf({},i,{ref:e,sideCar:lit}))});xLe.classNames=t7.classNames;var cit=function(i){if(typeof document>"u")return null;var e=Array.isArray(i)?i[0]:i;return e.ownerDocument.body},ak=new WeakMap,K5=new WeakMap,G5={},GU=0,vLe=function(i){return i&&(i.host||vLe(i.parentNode))},dit=function(i,e){return e.map(function(t){if(i.contains(t))return t;var n=vLe(t);return n&&i.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",i,". Doing nothing"),null)}).filter(function(t){return!!t})},uit=function(i,e,t,n){var s=dit(e,Array.isArray(i)?i:[i]);G5[t]||(G5[t]=new WeakMap);var r=G5[t],o=[],a=new Set,l=new Set(s),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};s.forEach(c);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(g){if(a.has(g))u(g);else try{var f=g.getAttribute(n),m=f!==null&&f!=="false",x=(ak.get(g)||0)+1,v=(r.get(g)||0)+1;ak.set(g,x),r.set(g,v),o.push(g),x===1&&m&&K5.set(g,!0),v===1&&g.setAttribute(t,"true"),m||g.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",g,_)}})};return u(e),a.clear(),GU++,function(){o.forEach(function(h){var g=ak.get(h)-1,f=r.get(h)-1;ak.set(h,g),r.set(h,f),g||(K5.has(h)||h.removeAttribute(n),K5.delete(h)),f||h.removeAttribute(t)}),GU--,GU||(ak=new WeakMap,ak=new WeakMap,K5=new WeakMap,G5={})}},hit=function(i,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(i)?i:[i]),s=cit(i);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),uit(n,s,t,"aria-hidden")):function(){return null}};function git(i){const e=fit(i),t=L.forwardRef((n,s)=>{const{children:r,...o}=n,a=L.Children.toArray(r),l=a.find(mit);if(l){const c=l.props.children,u=a.map(h=>h===l?L.Children.count(c)>1?L.Children.only(null):L.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:L.isValidElement(c)?L.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:r})});return t.displayName=`${i}.Slot`,t}function fit(i){const e=L.forwardRef((t,n)=>{const{children:s,...r}=t;if(L.isValidElement(s)){const o=xit(s),a=bit(r,s.props);return s.type!==L.Fragment&&(a.ref=n?Hb(n,o):o),L.cloneElement(s,a)}return L.Children.count(s)>1?L.Children.only(null):null});return e.displayName=`${i}.SlotClone`,e}var pit=Symbol("radix.slottable");function mit(i){return L.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===pit}function bit(i,e){const t={...e};for(const n in e){const s=i[n],r=e[n];/^on[A-Z]/.test(n)?s&&r?t[n]=(...a)=>{const l=r(...a);return s(...a),l}:s&&(t[n]=s):n==="style"?t[n]={...s,...r}:n==="className"&&(t[n]=[s,r].filter(Boolean).join(" "))}return{...i,...t}}function xit(i){var n,s;let e=(n=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}var n7="Dialog",[_Le]=$tt(n7),[vit,Jg]=_Le(n7),yLe=i=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:s,onOpenChange:r,modal:o=!0}=i,a=L.useRef(null),l=L.useRef(null),[c,u]=Qtt({prop:n,defaultProp:s??!1,onChange:r,caller:n7});return d.jsx(vit,{scope:e,triggerRef:a,contentRef:l,contentId:Sb(),titleId:Sb(),descriptionId:Sb(),open:c,onOpenChange:u,onOpenToggle:L.useCallback(()=>u(h=>!h),[u]),modal:o,children:t})};yLe.displayName=n7;var wLe="DialogTrigger",_it=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Jg(wLe,t),r=QC(e,s.triggerRef);return d.jsx(Yl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":nre(s.open),...n,ref:r,onClick:g_(i.onClick,s.onOpenToggle)})});_it.displayName=wLe;var ere="DialogPortal",[yit,CLe]=_Le(ere,{forceMount:void 0}),SLe=i=>{const{__scopeDialog:e,forceMount:t,children:n,container:s}=i,r=Jg(ere,e);return d.jsx(yit,{scope:e,forceMount:t,children:L.Children.map(n,o=>d.jsx(e7,{present:t||r.open,children:d.jsx(dLe,{asChild:!0,container:s,children:o})}))})};SLe.displayName=ere;var tF="DialogOverlay",kLe=L.forwardRef((i,e)=>{const t=CLe(tF,i.__scopeDialog),{forceMount:n=t.forceMount,...s}=i,r=Jg(tF,i.__scopeDialog);return r.modal?d.jsx(e7,{present:n||r.open,children:d.jsx(Cit,{...s,ref:e})}):null});kLe.displayName=tF;var wit=git("DialogOverlay.RemoveScroll"),Cit=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Jg(tF,t);return d.jsx(xLe,{as:wit,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(Yl.div,{"data-state":nre(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),oC="DialogContent",NLe=L.forwardRef((i,e)=>{const t=CLe(oC,i.__scopeDialog),{forceMount:n=t.forceMount,...s}=i,r=Jg(oC,i.__scopeDialog);return d.jsx(e7,{present:n||r.open,children:r.modal?d.jsx(Sit,{...s,ref:e}):d.jsx(kit,{...s,ref:e})})});NLe.displayName=oC;var Sit=L.forwardRef((i,e)=>{const t=Jg(oC,i.__scopeDialog),n=L.useRef(null),s=QC(e,t.contentRef,n);return L.useEffect(()=>{const r=n.current;if(r)return hit(r)},[]),d.jsx(ELe,{...i,ref:s,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g_(i.onCloseAutoFocus,r=>{var o;r.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:g_(i.onPointerDownOutside,r=>{const o=r.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&r.preventDefault()}),onFocusOutside:g_(i.onFocusOutside,r=>r.preventDefault())})}),kit=L.forwardRef((i,e)=>{const t=Jg(oC,i.__scopeDialog),n=L.useRef(!1),s=L.useRef(!1);return d.jsx(ELe,{...i,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var o,a;(o=i.onCloseAutoFocus)==null||o.call(i,r),r.defaultPrevented||(n.current||(a=t.triggerRef.current)==null||a.focus(),r.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:r=>{var l,c;(l=i.onInteractOutside)==null||l.call(i,r),r.defaultPrevented||(n.current=!0,r.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=r.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&s.current&&r.preventDefault()}})}),ELe=L.forwardRef((i,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:r,...o}=i,a=Jg(oC,t),l=L.useRef(null),c=QC(e,l);return Nnt(),d.jsxs(d.Fragment,{children:[d.jsx(lLe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:r,children:d.jsx(oLe,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nre(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(Nit,{titleId:a.titleId}),d.jsx(Lit,{contentRef:l,descriptionId:a.descriptionId})]})]})}),tre="DialogTitle",LLe=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Jg(tre,t);return d.jsx(Yl.h2,{id:s.titleId,...n,ref:e})});LLe.displayName=tre;var DLe="DialogDescription",TLe=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Jg(DLe,t);return d.jsx(Yl.p,{id:s.descriptionId,...n,ref:e})});TLe.displayName=DLe;var ILe="DialogClose",ALe=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Jg(ILe,t);return d.jsx(Yl.button,{type:"button",...n,ref:e,onClick:g_(i.onClick,()=>s.onOpenChange(!1))})});ALe.displayName=ILe;function nre(i){return i?"open":"closed"}var RLe="DialogTitleWarning",[ian,MLe]=Utt(RLe,{contentName:oC,titleName:tre,docsSlug:"dialog"}),Nit=({titleId:i})=>{const e=MLe(RLe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return L.useEffect(()=>{i&&(document.getElementById(i)||console.error(t))},[t,i]),null},Eit="DialogDescriptionWarning",Lit=({contentRef:i,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${MLe(Eit).contentName}}.`;return L.useEffect(()=>{var r;const s=(r=i.current)==null?void 0:r.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(n))},[n,i,e]),null},ire=yLe,sre=SLe,rre=kLe,ore=NLe,PLe=LLe,OLe=TLe,jLe=ALe;function pl({open:i,onOpenChange:e,title:t,description:n,confirmLabel:s="Delete",cancelLabel:r="Cancel",onConfirm:o,variant:a="destructive",isPending:l=!1}){const c=a==="destructive"?"text-destructive":"text-amber-500",u=a==="destructive"?"bg-destructive/10":"bg-amber-500/10";return d.jsx(ire,{open:i,onOpenChange:e,children:d.jsxs(sre,{children:[d.jsx(rre,{className:"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),d.jsxs(ore,{className:me("fixed inset-x-0 top-[50%] z-50 mx-auto w-full max-w-md translate-y-[-50%]","rounded-xl border border-border bg-card p-6 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:[d.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[d.jsx("div",{className:me("rounded-full p-3",u),children:d.jsx(Ui,{className:me("h-6 w-6",c)})}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(PLe,{className:"text-lg font-semibold text-foreground",children:t}),d.jsx(OLe,{className:"text-sm text-muted-foreground",children:n})]})]}),d.jsxs("div",{className:"mt-6 flex gap-3",children:[d.jsx(Qt,{variant:"outline",className:"flex-1",onClick:()=>e(!1),disabled:l,children:r}),d.jsx(Qt,{variant:"destructive",className:"flex-1",onClick:()=>{o()},disabled:l,children:l?"…":s})]}),d.jsxs(jLe,{className:"absolute inset-e-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[d.jsx(An,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})})}function wP({icon:i,title:e,description:t,actionLabel:n,onAction:s}){return d.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border-2 border-dashed border-border py-16",children:[d.jsx(i,{className:"h-12 w-12 text-muted-foreground/50"}),d.jsx("p",{className:"mt-4 text-lg font-medium text-muted-foreground",children:e}),t&&d.jsx("p",{className:"mt-1 text-sm text-muted-foreground/70",children:t}),n&&s&&d.jsx(Qt,{className:"mt-4",size:"md",onClick:s,children:n})]})}function yp({message:i,onRetry:e,retryLabel:t="Retry"}){return d.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border border-destructive/30 bg-destructive/5 py-16",children:[d.jsx(Mo,{className:"h-12 w-12 text-destructive"}),d.jsx("p",{className:"mt-4 text-lg font-medium text-destructive",children:i}),e&&d.jsx(Qt,{variant:"ghost",className:"mt-4 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:e,children:t})]})}function FLe({onLoadMore:i,isFetchingMore:e,hasMore:t}){const n=L.useRef(null);return L.useEffect(()=>{if(!t||e)return;const s=n.current;if(!s)return;const r=new IntersectionObserver(([o])=>{o!=null&&o.isIntersecting&&i()},{rootMargin:"200px"});return r.observe(s),()=>r.disconnect()},[t,e,i]),t?d.jsx("div",{ref:n,className:"flex items-center justify-center py-6","aria-live":"polite",children:e&&d.jsxs(d.Fragment,{children:[d.jsx(Xn,{className:"h-5 w-5 animate-spin text-muted-foreground","aria-hidden":"true"}),d.jsx("span",{className:"sr-only",children:"Loading more items…"})]})}):null}function fD({view:i,onChange:e}){const{t}=ve(),n=L.useCallback(s=>{if(s.key==="ArrowLeft"||s.key==="ArrowRight"){s.preventDefault();const r=i==="card"?"list":"card";e(r),requestAnimationFrame(()=>{const o=document.querySelector(`[data-testid="view-toggle-${r}"]`);o==null||o.focus()})}},[i,e]);return d.jsxs("div",{className:"inline-flex items-center rounded-lg border border-input bg-background p-0.5",role:"radiogroup","aria-label":t("common.viewMode","View mode"),"data-testid":"view-toggle",onKeyDown:n,children:[d.jsx("button",{type:"button",role:"radio","aria-checked":i==="card","aria-label":t("common.cardView","Card view"),tabIndex:i==="card"?0:-1,onClick:()=>e("card"),className:me("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",i==="card"?"bg-secondary text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),"data-testid":"view-toggle-card",children:d.jsx(GHe,{className:"h-4 w-4","aria-hidden":"true"})}),d.jsx("button",{type:"button",role:"radio","aria-checked":i==="list","aria-label":t("common.listView","List view"),tabIndex:i==="list"?0:-1,onClick:()=>e("list"),className:me("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",i==="list"?"bg-secondary text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),"data-testid":"view-toggle-list",children:d.jsx(ske,{className:"h-4 w-4","aria-hidden":"true"})})]})}const BLe="eddi-view-mode";function uL(i){try{const e=localStorage.getItem(`${BLe}-${i}`);if(e==="card"||e==="list")return e}catch{}return"card"}function CP(i,e){try{localStorage.setItem(`${BLe}-${i}`,e)}catch{}}function Dit(){const{t:i}=ve(),[e,t]=L.useState(""),[n,s]=L.useState(!1),[r,o]=L.useState(!1),[a,l]=L.useState(!1),[c,u]=L.useState(null),[h,g]=L.useState(null),[f,m]=L.useState(()=>uL("agents")),[x,v]=L.useState("modified"),[_,w]=L.useState("desc"),k=Ys(W=>W.maybeAutoStart);L.useEffect(()=>{const W=setTimeout(()=>k("agents"),500);return()=>clearTimeout(W)},[k]);const{data:C,isLoading:E,isError:D,refetch:T,fetchNextPage:I,hasNextPage:R,isFetchingNextPage:P}=JH(e),j=VEe(),B=zEe(),H=L.useMemo(()=>{const W=(C==null?void 0:C.pages.flat())??[];return[...Hg(W)].sort((G,U)=>{let ue=0;return x==="name"?ue=(G.name??"").localeCompare(U.name??""):x==="version"?ue=G.version-U.version:ue=new Date(G.lastModifiedOn).getTime()-new Date(U.lastModifiedOn).getTime(),_==="asc"?ue:-ue})},[C,x,_]),$=L.useCallback(W=>{x===W?w(Y=>Y==="asc"?"desc":"asc"):(v(W),w(W==="modified"?"desc":"asc"))},[x]);function q(){qe.success(i("agents.importSuccess","Agent imported successfully"))}function V(W,Y){u({id:W,version:Y})}function X(){c&&j.mutate(c,{onSuccess:()=>{qe.success(i("common.delete")+" ✓"),u(null)},onError:W=>qe.error(qs(W))})}function ae(W,Y){B.mutate({id:W,version:Y,deepCopy:!0},{onSuccess:()=>qe.success(i("agentDetail.duplicateSuccess")),onError:G=>qe.error(qs(G))})}function ne(W){m(W),CP("agents",W)}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"flex items-center gap-2 text-3xl font-bold text-foreground",children:[d.jsx(Qn,{className:"h-8 w-8 text-primary"}),i("pages.agents.title")]}),d.jsx("p",{className:"mt-1 text-muted-foreground",children:i("pages.agents.subtitle")})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs(Qt,{variant:"outline",onClick:()=>l(!0),"data-testid":"import-agent-btn",children:[d.jsx(h_,{className:"h-4 w-4"}),i("agents.import","Import")]}),d.jsxs(Qt,{onClick:()=>s(!0),"data-testid":"create-agent-btn",children:[d.jsx(Yt,{className:"h-4 w-4"}),i("createOrWizard.newAgent","New Agent")]})]})]}),d.jsxs("div",{className:"flex items-center gap-3","data-tour":"agents-search",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(Cr,{className:"absolute inset-s-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),d.jsx("input",{type:"text",value:e,onChange:W=>t(W.target.value),placeholder:i("common.search"),"aria-label":i("common.search"),className:"w-full rounded-lg border border-input bg-background py-2.5 ps-10 pe-4 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-shadow","data-testid":"agent-search"})]}),d.jsx(fD,{view:f,onChange:ne})]}),d.jsxs("div",{"data-tour":"agents-content",children:[E&&d.jsx("div",{className:"cq-card-grid","data-testid":"agents-loading",children:Array.from({length:4}).map((W,Y)=>d.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 space-y-3",children:[d.jsx(vi,{className:"h-5 w-3/4"}),d.jsx(vi,{className:"h-4 w-1/2"}),d.jsx(vi,{className:"h-4 w-full"}),d.jsx(vi,{className:"h-8 w-1/3"})]},Y))}),D&&d.jsx(yp,{message:i("common.error"),onRetry:()=>T(),retryLabel:i("common.retry")}),!E&&!D&&H.length===0&&d.jsx(wP,{icon:Qn,title:i(e?"common.noResults":"agents.empty"),description:e?void 0:i("agents.emptyDescription","Use the wizard to create a fully configured agent in minutes."),actionLabel:e?void 0:i("agents.createAgent"),onAction:e?void 0:()=>s(!0)}),!E&&!D&&H.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[i("agents.count",{count:H.length}),R&&"+"]}),f==="card"?d.jsx("div",{className:"cq-card-grid","data-testid":"agent-grid",children:H.map(W=>d.jsx(ttt,{agent:W,onDuplicate:ae,onDelete:V,onExport:(Y,G)=>g({id:Y,version:G})},W.id))}):d.jsx("div",{className:"overflow-hidden rounded-xl border bg-card shadow-sm","data-testid":"agent-list",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border bg-secondary/50",children:[d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground","aria-sort":x==="name"?_==="asc"?"ascending":"descending":void 0,children:d.jsxs("button",{onClick:()=>$("name"),className:"inline-flex items-center gap-1 hover:text-foreground transition-colors","aria-label":i("common.sortByName","Sort by name"),children:[i("common.name","Name"),x==="name"?_==="asc"?d.jsx(Ih,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(Od,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(rp,{className:"h-3 w-3 opacity-30","aria-hidden":"true"})]})}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground",children:i("common.id","ID")}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground","aria-sort":x==="version"?_==="asc"?"ascending":"descending":void 0,children:d.jsxs("button",{onClick:()=>$("version"),className:"inline-flex items-center gap-1 hover:text-foreground transition-colors","aria-label":i("common.sortByVersion","Sort by version"),children:[i("common.version","Version"),x==="version"?_==="asc"?d.jsx(Ih,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(Od,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(rp,{className:"h-3 w-3 opacity-30","aria-hidden":"true"})]})}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground","aria-sort":x==="modified"?_==="asc"?"ascending":"descending":void 0,children:d.jsxs("button",{onClick:()=>$("modified"),className:"inline-flex items-center gap-1 hover:text-foreground transition-colors","aria-label":i("common.sortByModified","Sort by last modified"),children:[i("common.modified","Modified"),x==="modified"?_==="asc"?d.jsx(Ih,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(Od,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(rp,{className:"h-3 w-3 opacity-30","aria-hidden":"true"})]})}),d.jsx("th",{className:"px-5 py-3 text-end text-xs font-medium uppercase tracking-wider text-muted-foreground",children:i("conversations.actions","Actions")})]})}),d.jsx("tbody",{className:"divide-y divide-border",children:H.map(W=>d.jsxs("tr",{className:"hover:bg-secondary/30 transition-colors",children:[d.jsx("td",{className:"px-5 py-3",children:d.jsxs(Kn,{to:`/manage/agentview/${W.id}`,className:"text-sm font-medium text-foreground hover:text-primary transition-colors",children:[W.name||i("agents.unnamed","Unnamed Agent"),d.jsx(Oo,{className:"ms-1 inline h-3 w-3 opacity-40"})]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[W.id.slice(0,12),"…"]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:["v",W.version]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsx("span",{className:"text-sm text-muted-foreground",children:new Date(W.lastModifiedOn).toLocaleString()})}),d.jsx("td",{className:"px-5 py-3 text-end",children:d.jsxs("div",{className:"inline-flex items-center gap-1",children:[d.jsx("button",{onClick:()=>ae(W.id,W.version),className:"rounded-md p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",title:i("common.duplicate","Duplicate"),"aria-label":i("common.duplicate","Duplicate"),children:d.jsx(yo,{className:"h-4 w-4","aria-hidden":"true"})}),d.jsx("button",{onClick:()=>g({id:W.id,version:W.version}),className:"rounded-md p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",title:i("agents.export","Export"),"aria-label":i("agents.export","Export"),children:d.jsx(m0,{className:"h-4 w-4","aria-hidden":"true"})}),d.jsx("button",{onClick:()=>V(W.id,W.version),className:"rounded-md p-1.5 text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",title:i("common.delete"),"aria-label":i("common.delete"),children:d.jsx(yn,{className:"h-4 w-4","aria-hidden":"true"})})]})})]},W.id))})]})}),d.jsx(FLe,{onLoadMore:()=>I(),isFetchingMore:P,hasMore:!!R})]})]}),d.jsx(sLe,{open:n,onClose:()=>s(!1),type:"agent",wizardPath:"/manage/agents/wizard",onQuickCreate:()=>{s(!1),o(!0)}}),d.jsx(itt,{open:r,onClose:()=>o(!1)}),d.jsx(Htt,{open:a,onClose:()=>l(!1),onSuccess:q}),d.jsx(pl,{open:c!==null,onOpenChange:W=>!W&&u(null),title:i("agents.confirmDelete"),description:i("agents.confirmDeleteDescription","This action cannot be undone. The agent and all its data will be permanently removed."),confirmLabel:i("common.delete"),cancelLabel:i("common.cancel"),onConfirm:X,isPending:j.isPending}),h&&d.jsx(iLe,{open:!0,onClose:()=>g(null),agentId:h.id,agentVersion:h.version})]})}const y0=["workflows"],YU=50;function Tit(i=100,e=0,t=""){return fn({queryKey:[...y0,"descriptors",{limit:i,index:e,filter:t}],queryFn:()=>ZH(i,e,t)})}function Iit(i=""){return DSe({queryKey:[...y0,"descriptors-infinite",{filter:i}],queryFn:({pageParam:e=0})=>ZH(YU,e,i),initialPageParam:0,getNextPageParam:(e,t)=>{if(e.length===YU)return t.length*YU}})}function Ait(i,e){return fn({queryKey:[...y0,i,e],queryFn:()=>mP(i,e),enabled:!!i&&e>0})}function Rit(i){return fn({queryKey:[...y0,i,"versions"],queryFn:()=>vet(i),enabled:!!i})}function Mit(i){const e=new URL(i,"http://dummy"),t=e.pathname.split("/").filter(Boolean),n=t[t.length-1],s=parseInt(e.searchParams.get("version")||"1",10);return{id:n,version:s}}function Pit(){const i=un();return Xt({mutationFn:async({config:e,name:t,description:n})=>{const s=await bet(e);if((t||n)&&s.location){const{id:r,version:o}=Mit(s.location);await Xse(r,o,{name:t,description:n})}return s},onSuccess:()=>{i.invalidateQueries({queryKey:y0})}})}function Oit(){const i=un();return Xt({mutationFn:({id:e,version:t,config:n})=>Qse(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:y0})}})}function HLe(){const i=un();return Xt({mutationFn:({id:e,version:t})=>xet(e,t),onSuccess:()=>{i.invalidateQueries({queryKey:y0})}})}function jit(){const i=un();return Xt({mutationFn:({id:e,version:t,deepCopy:n})=>_et(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:y0})}})}function Fit(){const i=un();return Xt({mutationFn:async({agentId:e,version:t,workflows:n})=>{const s=await qC(e,t);return aP(e,t,{...s,workflows:n})},onSuccess:()=>{i.invalidateQueries({queryKey:["agents"]})}})}function Bit(i){const e=new Map;for(const t of i){const{id:n,version:s}=mo(t.resource),r=e.get(n);(!r||s>r.version)&&e.set(n,{...t,id:n,version:s})}return Array.from(e.values()).sort((t,n)=>n.lastModifiedOn-t.lastModifiedOn)}function WLe(i){return fn({queryKey:["latest-versions",...i.slice().sort()],queryFn:async()=>{const e={},t=new Set,n=[];for(const s of i)if(!(!s||!s.includes("://")))try{const{id:r}=mo(s);if(t.has(r))continue;t.add(r);const o=s.startsWith("eddi://")?s.replace("eddi://","http://"):s,l=new URL(o,"http://dummy").pathname.split("/").filter(Boolean);l.length>=3&&n.push({uri:s,id:r,store:l[0],plural:l[1]})}catch{}return await Promise.all(n.map(async({id:s,store:r,plural:o})=>{try{const a=await Be.get(`/${r}/${o}/descriptors?filter=${s}&includePreviousVersions=true`);let l=1;for(const c of a)try{const{version:u}=mo(c.resource);u>l&&(l=u)}catch{}e[s]=l}catch{}})),e},enabled:i.length>0,staleTime:3e4})}const VLe="/capabilities";async function zLe(i,e="highest_confidence"){return Be.get(`${VLe}?skill=${encodeURIComponent(i)}&strategy=${encodeURIComponent(e)}`)}async function Hit(){const i=await Be.get(`${VLe}/skills`);return Array.isArray(i)?i:[]}function are(){return fn({queryKey:["capabilities","skills"],queryFn:Hit})}function Wit(i,e){return fn({queryKey:["capabilities","search",i,e],queryFn:()=>zLe(i,e),enabled:!!i.trim()})}function Vit(){const{data:i,isLoading:e,isError:t,refetch:n}=are(),s=K8e({queries:(i??[]).map(l=>({queryKey:["capabilities","search",l,"all"],queryFn:()=>zLe(l,"all"),enabled:!!i,staleTime:3e4}))}),r=(i??[]).map((l,c)=>{var u,h;return{skill:l,matches:((u=s[c])==null?void 0:u.data)??[],isLoading:((h=s[c])==null?void 0:h.isLoading)??!0}}),o=e||s.some(l=>l.isLoading),a=s.some(l=>l.isError);return{registry:r,isLoading:o,isError:t||a,refetchSkills:n,refetchMatches:()=>s.forEach(l=>{l.isError&&l.refetch()})}}function fs({label:i,defaultOpen:e=!0,icon:t,accent:n,variant:s="inline",children:r}){const[o,a]=L.useState(e);return s==="card"?d.jsxs("section",{className:"rounded-xl border bg-card shadow-sm",children:[d.jsxs("button",{type:"button",onClick:()=>a(!o),className:"flex w-full items-center gap-2 border-b border-border p-5 text-start",children:[o?d.jsx(Ln,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(xs,{className:"h-4 w-4 text-muted-foreground"}),t&&d.jsx(t,{className:`h-5 w-5 ${n??"text-primary"}`}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:i})]}),o&&d.jsx("div",{className:"p-5 space-y-4",children:r})]}):d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>a(!o),className:"mb-1.5 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground hover:text-foreground transition-colors",children:[o?d.jsx(Ln,{className:"h-3 w-3"}):d.jsx(xs,{className:"h-3 w-3"}),t&&d.jsx(t,{className:`h-3.5 w-3.5 ${n??""}`}),i]}),o&&d.jsx("div",{className:"space-y-2",children:r})]})}const iY="vault:",sY="${vault:",rY="eddivault:",oY="${eddivault:";function Qpe(i){return i.startsWith(iY)||i.startsWith(sY)||i.startsWith(rY)||i.startsWith(oY)}function zit(i){return i.startsWith(sY)?i.slice(sY.length,i.endsWith("}")?-1:void 0):i.startsWith(oY)?i.slice(oY.length,i.endsWith("}")?-1:void 0):i.startsWith(iY)?i.slice(iY.length):i.startsWith(rY)?i.slice(rY.length):i}function Uit(i){const e=i.indexOf("/");return e>=0?i.slice(e+1):i}function $it(i){const e=i.indexOf("/");return e>=0?i.slice(0,e):void 0}function Xpe(i){return`\${vault:${i}}`}function qit({onClose:i,tenantId:e,onSuccess:t}){const{t:n}=ve(),[s,r]=L.useState(""),[o,a]=L.useState(""),[l,c]=L.useState(""),[u,h]=L.useState(!1),g=YEe(),f=L.useCallback(()=>{r(""),a(""),c(""),h(!1)},[]),m=L.useCallback(()=>{f(),i()},[f,i]),x=()=>{!s.trim()||!o.trim()||g.mutate({tenantId:e,keyName:s.trim(),value:o.trim(),description:l.trim()||void 0},{onSuccess:()=>{qe.success(n("secrets.storeSuccess",{key:s.trim(),defaultValue:`Secret "${s.trim()}" stored`}));const _=s.trim();f(),t(_),i()},onError:_=>qe.error(_ instanceof Error?_.message:String(_))})},v=d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:m,onKeyDown:_=>{_.key==="Escape"&&m()},children:d.jsxs("div",{className:"w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-2xl",onClick:_=>_.stopPropagation(),role:"dialog","aria-modal":"true",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n("secrets.createTitle","Add Secret")}),d.jsx("button",{onClick:m,className:"rounded-lg p-1.5 text-muted-foreground hover:bg-muted transition-colors",children:d.jsx(An,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"mt-4 space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-muted-foreground",children:n("secrets.keyNameLabel","Key Name")}),d.jsx("input",{type:"text",value:s,onChange:_=>r(_.target.value),placeholder:n("secrets.keyNamePlaceholder","e.g. openaiKey"),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",autoFocus:!0,autoComplete:"off"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-muted-foreground",children:n("secrets.valueLabel","Secret Value")}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:u?"text":"password",value:o,onChange:_=>a(_.target.value),placeholder:n("secrets.valuePlaceholder","Enter secret value…"),className:"h-9 w-full rounded-lg border border-input bg-background pe-10 ps-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",autoComplete:"off"}),d.jsx("button",{type:"button",onClick:()=>h(!u),className:"absolute inset-e-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:u?d.jsx(Hh,{className:"h-4 w-4"}):d.jsx(Bb,{className:"h-4 w-4"})})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-muted-foreground",children:n("secrets.descriptionLabel","Description (optional)")}),d.jsx("input",{type:"text",value:l,onChange:_=>c(_.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",autoComplete:"off"})]})]}),d.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[d.jsx("button",{onClick:m,className:"rounded-lg px-4 py-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted",children:n("common.cancel","Cancel")}),d.jsxs("button",{onClick:x,disabled:!s.trim()||!o.trim()||g.isPending,className:"inline-flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",children:[g.isPending?d.jsx(Xn,{className:"h-4 w-4 animate-spin"}):null,n("secrets.store","Store Secret")]})]})]})});return Tg.createPortal(v,document.body)}function Kit({secrets:i,secretsLoading:e,vaultAvailable:t,filter:n,onFilterChange:s,highlightedIndex:r,onSelect:o,onCreate:a,onClose:l,vaultError:c}){const{t:u}=ve(),h=L.useRef(null),g=L.useRef(null);L.useEffect(()=>{const x=setTimeout(()=>{var v;return(v=h.current)==null?void 0:v.focus()},50);return()=>clearTimeout(x)},[]),L.useEffect(()=>{var v;if(r<0||!g.current)return;(v=g.current.querySelectorAll("[data-vault-item]")[r])==null||v.scrollIntoView({block:"nearest"})},[r]);const f=L.useMemo(()=>{if(!n.trim())return i;const x=n.toLowerCase();return i.filter(v=>v.keyName.toLowerCase().includes(x)||(v.description??"").toLowerCase().includes(x))},[i,n]),m=x=>{x.key==="Escape"?(x.preventDefault(),l()):x.key==="ArrowDown"||x.key==="ArrowUp"?x.preventDefault():x.key==="Enter"&&(x.preventDefault(),r>=0&&rs(x.target.value),placeholder:u("secretPicker.filterPlaceholder","Search vault keys…"),className:"h-6 flex-1 border-none bg-transparent text-xs text-foreground placeholder:text-muted-foreground/60 focus:outline-none",autoComplete:"off","data-testid":"vault-popup-filter"})]}),d.jsx("div",{ref:g,className:"max-h-48 overflow-y-auto",children:t?e?d.jsxs("div",{className:"flex items-center justify-center gap-2 py-4 text-xs text-muted-foreground",children:[d.jsx(Xn,{className:"h-3.5 w-3.5 animate-spin"}),u("secretPicker.loading","Loading keys…")]}):f.length===0?d.jsx("div",{className:"px-3 py-3 text-center text-xs text-muted-foreground",children:n.trim()?u("secretPicker.noMatch",'No keys matching "{{filter}}"',{filter:n}):u("secretPicker.emptyVault","No secrets stored yet")}):f.map((x,v)=>d.jsxs("button",{type:"button","data-vault-item":!0,onClick:()=>o(x.keyName),className:`flex w-full items-start gap-2 px-3 py-2 text-start text-xs transition-colors ${v===r?"bg-primary/10 text-foreground":"text-foreground hover:bg-secondary/50"}`,"data-testid":`vault-key-${x.keyName}`,children:[d.jsx(d_,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-500"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate font-mono font-medium",children:x.keyName}),x.description&&d.jsx("span",{className:"block truncate text-[10px] text-muted-foreground",children:x.description})]})]},x.keyName)):d.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 text-xs text-muted-foreground",children:[d.jsx(Ui,{className:"h-3.5 w-3.5 shrink-0 text-amber-500"}),d.jsx("span",{children:c||u("secretPicker.vaultDown","Vault is not configured — set up a secret provider in the EDDI backend")})]})}),t&&d.jsx("div",{className:"border-t border-border",children:d.jsxs("button",{type:"button",onClick:a,className:"flex w-full items-center gap-2 px-3 py-2 text-xs text-muted-foreground transition-colors hover:bg-secondary/50 hover:text-foreground","data-testid":"vault-popup-create",children:[d.jsx(Yt,{className:"h-3 w-3"}),u("secretPicker.createNew","Create new secret")]})})]})}function qd({value:i,onChange:e,readOnly:t,tenantId:n="default",placeholder:s,testId:r="secret-key-picker"}){var G;const{t:o}=ve(),[a,l]=L.useState(!1),[c,u]=L.useState(!1),[h,g]=L.useState(""),[f,m]=L.useState(-1),[x,v]=L.useState(!1),_=L.useRef(null),{data:w,isLoading:k}=GEe(n),{data:C}=Zse(),E=(C==null?void 0:C.available)!==!1,D=(C==null?void 0:C.reason)||(C==null?void 0:C.error),T=L.useMemo(()=>(w??[]).map(U=>({keyName:U.keyName,description:U.description})).sort((U,ue)=>U.keyName.localeCompare(ue.keyName)),[w]),I=L.useMemo(()=>new Set(T.map(U=>U.keyName)),[T]),R=Qpe(i),P=R?zit(i):"",j=$it(P),B=j===void 0||j===n?Uit(P):P,H=I.has(B),$=R?((G=T.find(U=>U.keyName===B))==null?void 0:G.description)??null:null,q=L.useMemo(()=>{if(!h.trim())return T;const U=h.toLowerCase();return T.filter(ue=>ue.keyName.toLowerCase().includes(U)||(ue.description??"").toLowerCase().includes(U))},[T,h]),V=L.useCallback(()=>{t||(g(""),m(-1),u(!0))},[t]),X=L.useCallback(()=>{u(!1),g(""),m(-1)},[]),ae=L.useCallback(U=>{e(Xpe(U)),X()},[e,X]),ne=L.useCallback(()=>{t||e("")},[t,e]),W=L.useCallback(U=>{e(U),Qpe(U)&&U.endsWith("}")&&X()},[e,X]),Y=L.useCallback(U=>{if(!c){U.key==="ArrowDown"&&E&&(U.preventDefault(),V());return}U.key==="Escape"?(U.preventDefault(),X()):U.key==="ArrowDown"?(U.preventDefault(),m(ue=>ueue>0?ue-1:q.length-1)):U.key==="Enter"&&(U.preventDefault(),f>=0&&f{if(!c)return;const U=ue=>{_.current&&!_.current.contains(ue.target)&&X()};return document.addEventListener("mousedown",U),()=>document.removeEventListener("mousedown",U)},[c,X]),R?d.jsx("div",{ref:_,className:"relative","data-testid":r,children:d.jsxs("div",{className:`flex h-7 items-center gap-1.5 rounded-md border px-2 ${t?"border-amber-500/30 bg-amber-500/5":"border-amber-500/50 bg-amber-500/10"}`,title:$?`${P} — ${$}`:P,children:[d.jsx(d_,{className:"h-3 w-3 shrink-0 text-amber-600 dark:text-amber-400"}),d.jsx("span",{className:"flex-1 truncate font-mono text-xs font-medium text-amber-700 dark:text-amber-300",children:P}),!k&&!H&&P&&d.jsx("span",{title:o("secretPicker.keyNotFound","This key was not found in the vault"),children:d.jsx(Ui,{className:"h-3 w-3 shrink-0 text-amber-500"})}),!t&&d.jsx("button",{type:"button",onClick:ne,className:"rounded p-0.5 text-amber-600/70 transition-colors hover:text-amber-700 dark:text-amber-400/70 dark:hover:text-amber-300","aria-label":o("secretPicker.clearVault","Clear vault reference"),"data-testid":`${r}-clear`,children:d.jsx(An,{className:"h-3 w-3"})})]})}):d.jsxs("div",{ref:_,className:"relative","data-testid":r,children:[d.jsxs("div",{className:"flex items-stretch",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx("input",{type:a?"text":"password",value:i,onChange:U=>W(U.target.value),onKeyDown:Y,readOnly:t,placeholder:s??o("secretPicker.placeholder","API key or ${vault:key-name}"),dir:"ltr",className:`h-7 w-full border border-input bg-background pe-14 ps-2 font-mono text-xs text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:ring-1 focus:ring-ring ${E&&!t?"rounded-s-md rounded-e-none":"rounded-md"}`,"data-testid":`${r}-input`}),d.jsx("button",{type:"button",onClick:()=>l(U=>!U),disabled:t,className:"absolute inset-e-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",tabIndex:-1,"aria-label":a?"Hide":"Show",children:a?d.jsx(Bb,{className:"h-3 w-3"}):d.jsx(Hh,{className:"h-3 w-3"})})]}),E&&!t&&d.jsxs("button",{type:"button",onClick:()=>c?X():V(),title:o("secretPicker.pickFromVault","Pick from vault"),className:`flex h-7 items-center gap-0.5 border border-s-0 border-input px-1.5 text-xs transition-colors ${c?"rounded-e-md bg-primary/10 text-primary":"rounded-e-md bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,"data-testid":`${r}-vault-btn`,children:[d.jsx(d_,{className:"h-3 w-3"}),d.jsx(Ln,{className:`h-2.5 w-2.5 transition-transform ${c?"rotate-180":""}`})]})]}),c&&d.jsx(Kit,{secrets:T,secretsLoading:k,vaultAvailable:E,filter:h,onFilterChange:U=>{g(U),m(-1)},highlightedIndex:f,onSelect:ae,onCreate:()=>{X(),v(!0)},onClose:X,vaultError:D}),x&&d.jsx(qit,{onClose:()=>v(!1),tenantId:n,onSuccess:U=>{e(Xpe(U))}})]})}function K4({value:i,onCommit:e,delay:t=600,...n}){const[s,r]=L.useState(i),o=L.useRef(null);L.useEffect(()=>r(i),[i]);const a=L.useCallback(l=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>e(l),t)},[e,t]);return L.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),d.jsx("input",{...n,value:s,onChange:l=>{r(l.target.value),a(l.target.value)}})}function Dm({value:i,onCommit:e,delay:t=600,fallback:n=0,...s}){const[r,o]=L.useState(String(i)),a=L.useRef(null);L.useEffect(()=>o(String(i)),[i]);const l=L.useCallback(c=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{e(parseFloat(c)||n)},t)},[e,t,n]);return L.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),d.jsx("input",{...s,type:"number",value:r,onChange:c=>{o(c.target.value),l(c.target.value)}})}const Git=["signInterAgentMessages","signMcpInvocations","requirePeerVerification"],Yit=L.memo(function({agent:e,agentId:t,version:n}){var m,x,v,_,w,k,C,E;const{t:s}=ve(),r=YC(),[o,a]=L.useState(null),[l,c]=L.useState(null);L.useEffect(()=>{if(l){const D=setTimeout(()=>c(null),8e3);return()=>clearTimeout(D)}},[l]);const u=Git.some(D=>{var T;return(T=e.security)==null?void 0:T[D]});function h(D){var I;if(!(((I=e.security)==null?void 0:I[D])??!1)){a(D);return}g(D,!0)}function g(D,T){c(null),r.mutate({id:t,version:n,agent:{...e,security:{...e.security,[D]:!T}}},{onError:I=>{nP(I)&&I.status===400?c(I.message):c(I instanceof Error?I.message:String(I))}})}function f(){o&&(g(o,!1),a(null))}return d.jsxs(fs,{label:s("agentDetail.securityIdentity","Security & Identity"),icon:Ah,accent:"text-rose-500",variant:"card",defaultOpen:!!((m=e.security)!=null&&m.signInterAgentMessages||(x=e.security)!=null&&x.signMcpInvocations||(v=e.identity)!=null&&v.agentDid),children:[d.jsxs("div",{className:"space-y-3","data-testid":"identity-section",children:[d.jsxs("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[d.jsx(rL,{className:"h-3.5 w-3.5"}),s("agentDetail.identity","Cryptographic Identity")]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:s("agentDetail.agentDid","Agent DID")}),d.jsx(K4,{type:"text",value:((_=e.identity)==null?void 0:_.agentDid)??"",onCommit:D=>r.mutate({id:t,version:n,agent:{...e,identity:{...e.identity,agentDid:D||void 0}}}),placeholder:"did:eddi:agent:...",className:"h-8 w-full rounded-md border border-input bg-background px-2 text-xs text-foreground font-mono focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:s("agentDetail.publicKey","Public Key")}),d.jsx("input",{type:"text",value:((w=e.identity)==null?void 0:w.publicKey)??"",readOnly:!0,placeholder:s("agentDetail.publicKeyHint","Auto-generated on first signing"),className:"h-8 w-full rounded-md border border-input bg-muted/50 px-2 text-xs text-muted-foreground font-mono"})]})]}),(((C=(k=e.identity)==null?void 0:k.keys)==null?void 0:C.length)??0)>0?d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"mb-1 block text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:s("agentDetail.publicKeys","Public Keys")}),d.jsx("div",{className:"space-y-1",children:e.identity.keys.map((D,T)=>d.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/30 px-2.5 py-1.5",children:[d.jsx("span",{className:"inline-flex items-center rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-semibold text-primary",children:s("agentDetail.keyVersion","Key v{{version}}",{version:D.version??T})}),d.jsx("span",{className:"flex-1 truncate font-mono text-[10px] text-muted-foreground",dir:"ltr",children:D.publicKeyB64?`${D.publicKeyB64.slice(0,24)}…`:"—"}),D.validUntilMs!=null&&D.validUntilMs>0&&D.validUntilMs{var R;return d.jsxs("label",{className:"flex items-start gap-2.5 py-1",children:[d.jsx("input",{type:"checkbox",checked:((R=e.security)==null?void 0:R[D])??!1,onChange:()=>h(D),disabled:r.isPending,className:"mt-0.5 h-3.5 w-3.5 rounded border-input accent-primary","data-testid":`security-flag-${D}`}),d.jsxs("div",{children:[d.jsx("span",{className:"text-xs font-medium text-foreground",children:T}),d.jsx("p",{className:"text-[10px] text-muted-foreground",children:I})]})]},D)})]}),d.jsx(pl,{open:!!o,onOpenChange:D=>{D||a(null)},title:s("agentDetail.securityFlagConfirmTitle","Enable security flag?"),description:s("agentDetail.securityFlagConfirmDesc","Cryptographic signing is not yet available in this version. Enabling this flag will cause the backend to reject saves with HTTP 400. Are you sure you want to proceed?"),confirmLabel:s("agentDetail.securityFlagConfirmBtn","Enable anyway"),cancelLabel:s("common.cancel","Cancel"),onConfirm:f})]})}),Qit=Bke;function Xit({value:i,onChange:e,onSelect:t,placeholder:n}){const{data:s}=are(),[r,o]=L.useState(!1),[a,l]=L.useState(-1),c=L.useRef(null),u=L.useMemo(()=>{if(!s||!i.trim())return[];const g=i.trim().toLowerCase();return s.filter(f=>f.toLowerCase().includes(g))},[s,i]);L.useEffect(()=>{function g(f){c.current&&!c.current.contains(f.target)&&o(!1)}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);function h(g){g.key==="ArrowDown"?(g.preventDefault(),l(f=>Math.min(f+1,u.length-1)),o(!0)):g.key==="ArrowUp"?(g.preventDefault(),l(f=>Math.max(f-1,0))):g.key==="Enter"?(g.preventDefault(),a>=0&&a{e(g.target.value),o(!0),l(-1)},onFocus:()=>{i.trim()&&o(!0)},onKeyDown:h,placeholder:n,className:"h-8 w-full rounded-md border border-input bg-background ps-7 pe-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"skill-autocomplete-input",autoComplete:"off"}),r&&u.length>0&&d.jsx("div",{className:"absolute z-50 mt-1 max-h-40 w-full overflow-auto rounded-lg border border-border bg-card shadow-lg","data-testid":"skill-autocomplete-dropdown",children:u.map((g,f)=>d.jsx("button",{type:"button",onMouseDown:m=>{m.preventDefault(),t(g),o(!1)},onMouseEnter:()=>l(f),className:`w-full px-3 py-1.5 text-start text-xs transition-colors ${f===a?"bg-primary/10 text-primary":"text-foreground hover:bg-secondary"}`,children:g},g))})]})}function Zit({attributes:i,onChange:e,disabled:t}){const{t:n}=ve(),s=Object.entries(i),[r,o]=L.useState(""),[a,l]=L.useState(""),c=L.useRef(i);L.useEffect(()=>{c.current=i},[i]);const u=L.useRef(null);L.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);function h(){r.trim()&&(e({...c.current,[r.trim()]:a.trim()}),o(""),l(""))}function g(m){u.current&&(clearTimeout(u.current),u.current=null);const x={...c.current};delete x[m],e(x)}function f(m,x){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{e({...c.current,[m]:x})},600)}return d.jsxs("div",{className:"space-y-1.5 ps-3 border-s-2 border-violet-500/20",children:[s.map(([m,x])=>d.jsx(Jit,{attrKey:m,attrValue:x,onCommit:v=>f(m,v),onRemove:()=>g(m),disabled:t},m)),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("input",{type:"text",value:r,onChange:m=>o(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),h())},placeholder:n("agentDetail.attributeKey","key"),disabled:t,className:"h-6 w-20 rounded border border-input bg-background px-1.5 text-[10px] text-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50","data-testid":"attribute-key-input"}),d.jsx("input",{type:"text",value:a,onChange:m=>l(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),h())},placeholder:n("agentDetail.attributeValue","value"),disabled:t,className:"h-6 flex-1 rounded border border-input bg-background px-1.5 text-[10px] text-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50","data-testid":"attribute-value-input"}),d.jsx("button",{type:"button",onClick:h,disabled:!r.trim()||t,className:"rounded p-0.5 text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",title:n("agentDetail.addAttribute","Add attribute"),children:d.jsx(Yt,{className:"h-3 w-3"})})]})]})}function Jit({attrKey:i,attrValue:e,onCommit:t,onRemove:n,disabled:s}){const[r,o]=L.useState(e),a=L.useRef(null);L.useEffect(()=>o(e),[e]),L.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);function l(c){o(c),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>t(c),600)}return d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"shrink-0 rounded bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-medium text-violet-600 dark:text-violet-400",children:i}),d.jsx("input",{type:"text",value:r,onChange:c=>l(c.target.value),disabled:s,className:"h-6 flex-1 rounded border border-input bg-background px-1.5 text-[10px] text-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50"}),d.jsx("button",{type:"button",onClick:n,disabled:s,className:"rounded p-0.5 text-muted-foreground hover:text-destructive transition-colors disabled:opacity-50",children:d.jsx(An,{className:"h-3 w-3"})})]})}const est=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=ve(),r=YC(),[o,a]=L.useState(""),[l,c]=L.useState(null),u=e.capabilities??[];function h(x){if(!x.trim())return;if(u.some(_=>_.skill===x.trim())){qe.error(s("agentDetail.skillAlreadyExists","This skill is already declared"));return}const v=[...u,{skill:x.trim(),confidence:"medium",attributes:{}}];r.mutate({id:t,version:n,agent:{...e,capabilities:v}}),a("")}function g(x){const v=u.filter((_,w)=>w!==x);r.mutate({id:t,version:n,agent:{...e,capabilities:v}}),l===x&&c(null)}function f(x,v){const _=u.map((w,k)=>k===x?{...w,confidence:v}:w);r.mutate({id:t,version:n,agent:{...e,capabilities:_}})}function m(x,v){const _=u.map((w,k)=>k===x?{...w,attributes:v}:w);r.mutate({id:t,version:n,agent:{...e,capabilities:_}})}return d.jsx(fs,{label:s("agentDetail.capabilities","Capabilities"),icon:hl,accent:"text-violet-500",variant:"card",defaultOpen:u.length>0,children:d.jsxs("div",{className:"space-y-3","data-testid":"capabilities-section",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground",children:s("agentDetail.capabilitiesDesc","Declared skills for A2A agent card and capability registry. Other agents discover these when choosing delegation targets.")}),u.length>0&&d.jsx("div",{className:"space-y-2",children:u.map((x,v)=>d.jsxs("div",{className:"rounded-lg border border-border bg-background overflow-hidden","data-testid":`capability-entry-${v}`,children:[d.jsxs("div",{className:"flex items-center gap-2 p-2.5",children:[d.jsx("button",{type:"button",onClick:()=>c(l===v?null:v),className:"text-muted-foreground hover:text-foreground transition-colors",title:s("agentDetail.toggleAttributes","Toggle attributes"),children:d.jsx(hl,{className:"h-3.5 w-3.5 text-violet-500"})}),d.jsx("span",{className:"flex-1 text-xs font-medium text-foreground",children:x.skill}),d.jsxs("select",{value:x.confidence??"medium",onChange:_=>f(v,_.target.value),className:`h-7 rounded-full border px-2 text-[10px] font-semibold focus:outline-none focus:ring-1 focus:ring-ring ${Qit[x.confidence??"medium"]??""}`,"data-testid":`confidence-select-${v}`,children:[d.jsx("option",{value:"low",children:s("agentDetail.confidenceLow","Low")}),d.jsx("option",{value:"medium",children:s("agentDetail.confidenceMedium","Medium")}),d.jsx("option",{value:"high",children:s("agentDetail.confidenceHigh","High")})]}),x.attributes&&Object.keys(x.attributes).length>0&&d.jsxs("button",{type:"button",onClick:()=>c(l===v?null:v),className:"rounded-full bg-violet-500/10 px-1.5 py-0.5 text-[9px] font-medium text-violet-600 dark:text-violet-400 hover:bg-violet-500/20 transition-colors",children:[Object.keys(x.attributes).length," ",s("agentDetail.attrs","attrs")]}),d.jsx("button",{type:"button",onClick:()=>g(v),disabled:r.isPending,className:"rounded p-1 text-muted-foreground hover:text-destructive transition-colors",children:d.jsx(An,{className:"h-3.5 w-3.5"})})]}),l===v&&d.jsxs("div",{className:"border-t border-border bg-violet-500/[0.02] px-3 py-2.5",children:[d.jsx("p",{className:"mb-1.5 text-[10px] font-medium text-muted-foreground",children:s("agentDetail.attributesLabel","Attributes")}),d.jsx(Zit,{attributes:x.attributes??{},onChange:_=>m(v,_),disabled:r.isPending})]})]},`${x.skill}-${v}`))}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx(Xit,{value:o,onChange:a,onSelect:h,placeholder:s("agentDetail.capabilityPlaceholder","Search or type a skill name...")}),d.jsx("button",{type:"button",onClick:()=>h(o),disabled:!o.trim()||r.isPending,className:"inline-flex h-8 items-center gap-1 rounded-md border border-input px-2 text-xs font-medium text-foreground transition-colors hover:bg-secondary disabled:opacity-50","data-testid":"add-capability-btn",children:d.jsx(Yt,{className:"h-3 w-3"})})]})]})})}),tst=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=ve(),r=YC(),o=e.enableMemoryTools??!1,a=e.userMemoryConfig??{},l=a.dream??{},c=a.guardrails??{};function u(m){r.mutate({id:t,version:n,agent:{...e,...m}})}function h(m){u({userMemoryConfig:{...a,...m}})}function g(m){h({dream:{...l,...m}})}function f(m){h({guardrails:{...c,...m}})}return d.jsx(fs,{label:s("agentDetail.userMemory","User Memory"),icon:Hl,accent:"text-teal-500",variant:"card",defaultOpen:o,children:d.jsxs("div",{className:"space-y-4","data-testid":"user-memory-section",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:s("agentDetail.userMemoryDesc","Persistent per-user memory with LLM tools (remember/recall/forget). Basic longTerm property persistence always works regardless of this toggle.")}),d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-foreground",children:[d.jsx("input",{type:"checkbox",checked:o,onChange:()=>u({enableMemoryTools:!o}),disabled:r.isPending,className:"h-3.5 w-3.5 rounded border-input accent-primary"}),d.jsx(Hl,{className:"h-3.5 w-3.5 text-teal-500"}),s("agentDetail.enableMemoryTools","Enable Memory Tools")]}),o&&d.jsxs("div",{className:"space-y-4 rounded-lg border border-teal-500/20 bg-teal-500/5 p-4",children:[d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.defaultVisibility","Default Visibility")}),d.jsxs("select",{value:a.defaultVisibility??"self",onChange:m=>h({defaultVisibility:m.target.value}),className:"h-7 w-full rounded border border-input bg-background px-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring",children:[d.jsx("option",{value:"self",children:s("agentDetail.visibilitySelf","self")}),d.jsx("option",{value:"global",children:s("agentDetail.visibilityGlobal","global")})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxRecallEntries","Max Recall")}),d.jsx(Dm,{value:a.maxRecallEntries??50,onCommit:m=>h({maxRecallEntries:m}),fallback:50,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxEntriesPerUser","Max per User")}),d.jsx(Dm,{value:a.maxEntriesPerUser??500,onCommit:m=>h({maxEntriesPerUser:m}),fallback:500,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.onCapReached","On Cap Reached")}),d.jsxs("select",{value:a.onCapReached??"evict_oldest",onChange:m=>h({onCapReached:m.target.value}),className:"h-7 w-full rounded border border-input bg-background px-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring",children:[d.jsx("option",{value:"evict_oldest",children:s("agentDetail.onCapEvict","Evict Oldest")}),d.jsx("option",{value:"reject",children:s("agentDetail.onCapReject","Reject")})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.recallOrder","Recall Order")}),d.jsxs("select",{value:a.recallOrder??"most_recent",onChange:m=>h({recallOrder:m.target.value}),className:"h-7 w-full rounded border border-input bg-background px-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring",children:[d.jsx("option",{value:"most_recent",children:s("agentDetail.recallMostRecent","Most Recent")}),d.jsx("option",{value:"most_relevant",children:s("agentDetail.recallMostRelevant","Most Relevant")})]})]})]}),d.jsxs("div",{className:"space-y-2 border-t border-teal-500/20 pt-3",children:[d.jsx("h4",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:s("agentDetail.guardrails","Write Guardrails")}),d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxKeyLength","Max Key Length")}),d.jsx(Dm,{value:c.maxKeyLength??100,onCommit:m=>f({maxKeyLength:m}),fallback:100,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxValueLength","Max Value Length")}),d.jsx(Dm,{value:c.maxValueLength??1e3,onCommit:m=>f({maxValueLength:m}),fallback:1e3,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxWritesPerTurn","Max Writes/Turn")}),d.jsx(Dm,{value:c.maxWritesPerTurn??10,onCommit:m=>f({maxWritesPerTurn:m}),fallback:10,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]})]})]}),d.jsxs("div",{className:"space-y-2 border-t border-teal-500/20 pt-3",children:[d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-foreground",children:[d.jsx("input",{type:"checkbox",checked:l.enabled??!1,onChange:()=>g({enabled:!(l.enabled??!1)}),disabled:r.isPending,className:"h-3.5 w-3.5 rounded border-input accent-primary"}),d.jsx(dke,{className:"h-3.5 w-3.5 text-indigo-400"}),s("agentDetail.dreamConsolidation","Dream Consolidation")]}),d.jsx("p",{className:"text-[10px] text-muted-foreground ps-5",children:s("agentDetail.dreamDesc","Background LLM job that resolves contradictions, prunes stale entries, and optionally summarizes interactions.")}),l.enabled&&d.jsxs("div",{className:"space-y-3 ps-5",children:[d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamSchedule","Schedule (cron)")}),d.jsx(K4,{type:"text",value:l.schedule??"0 3 * * *",onCommit:m=>g({schedule:m}),placeholder:"0 3 * * *",className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground font-mono focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamLlmProvider","LLM Provider")}),d.jsx(K4,{type:"text",value:l.llmProvider??"anthropic",onCommit:m=>g({llmProvider:m}),className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamLlmModel","LLM Model")}),d.jsx(K4,{type:"text",value:l.llmModel??"claude-sonnet-4-6",onCommit:m=>g({llmModel:m}),placeholder:"claude-sonnet-4-6",className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground font-mono focus:outline-none focus:ring-1 focus:ring-ring"})]})]}),d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamMaxCost","Max Cost/Run ($)")}),d.jsx(Dm,{value:l.maxCostPerRun??5,onCommit:m=>g({maxCostPerRun:m}),fallback:5,step:.01,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamPruneDays","Prune After (days)")}),d.jsx(Dm,{value:l.pruneStaleAfterDays??90,onCommit:m=>g({pruneStaleAfterDays:m}),fallback:90,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamBatchSize","Batch Size")}),d.jsx(Dm,{value:l.batchSize??50,onCommit:m=>g({batchSize:m}),fallback:50,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsxs("label",{className:"inline-flex items-center gap-1.5 text-xs text-foreground",children:[d.jsx("input",{type:"checkbox",checked:l.detectContradictions??!0,onChange:m=>g({detectContradictions:m.target.checked}),className:"h-3.5 w-3.5 rounded border-input accent-primary"}),s("agentDetail.detectContradictions","Detect contradictions")]}),d.jsxs("label",{className:"inline-flex items-center gap-1.5 text-xs text-foreground",children:[d.jsx("input",{type:"checkbox",checked:l.summarizeInteractions??!1,onChange:m=>g({summarizeInteractions:m.target.checked}),className:"h-3.5 w-3.5 rounded border-input accent-primary"}),s("agentDetail.summarizeInteractions","Summarize interactions")]})]})]})]})]})]})})}),nst=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=ve(),r=YC(),o=e.memoryPolicy??{},a=o.strictWriteDiscipline??{},l=a.enabled??!1;function c(u){r.mutate({id:t,version:n,agent:{...e,memoryPolicy:{...o,strictWriteDiscipline:{...a,...u}}}})}return d.jsx(fs,{label:s("agentDetail.memoryPolicy","Memory Policy"),icon:sfe,accent:"text-rose-500",variant:"card",defaultOpen:l,children:d.jsxs("div",{className:"space-y-3","data-testid":"memory-policy-section",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:s("agentDetail.memoryPolicyDesc","Strict Write Discipline governs what happens when property updates fail during a conversation step. Choose how the engine handles partially committed data.")}),d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-foreground",children:[d.jsx("input",{type:"checkbox",checked:l,onChange:()=>c({enabled:!l}),disabled:r.isPending,className:"h-3.5 w-3.5 rounded border-input accent-primary","data-testid":"swd-enable"}),d.jsx(sfe,{className:"h-3.5 w-3.5 text-rose-500"}),s("agentDetail.enableSwd","Enable Strict Write Discipline")]}),l&&d.jsx("div",{className:"space-y-3 rounded-lg border border-rose-500/20 bg-rose-500/5 p-3",children:d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:s("agentDetail.onFailure","On Failure Strategy")}),d.jsxs("select",{value:a.onFailure??"digest",onChange:u=>c({onFailure:u.target.value}),disabled:r.isPending,className:"h-8 w-full rounded-md border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-60","data-testid":"swd-on-failure",children:[d.jsx("option",{value:"digest",children:s("agentDetail.onFailureDigest","Digest — rollback changes, report summary to LLM")}),d.jsx("option",{value:"exclude_all",children:s("agentDetail.onFailureExclude","Exclude All — silently drop all property updates")}),d.jsx("option",{value:"keep_all",children:s("agentDetail.onFailureKeep","Keep All — keep changes and log warning")})]})]})})]})})}),ist=["before_tool","before_action"],sst=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=ve(),r=YC(),o=e.sessionManagement??{},a=o.autoSnapshot??{};function l(u){r.mutate({id:t,version:n,agent:{...e,sessionManagement:{...o,...u}}})}function c(u){l({autoSnapshot:{...a,...u}})}return d.jsx(fs,{label:s("agentDetail.sessionManagement","Session Management"),icon:rL,accent:"text-teal-500",variant:"card",defaultOpen:a.enabled??!1,children:d.jsxs("div",{className:"space-y-4","data-testid":"session-management-section",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:s("agentDetail.sessionManagementDesc","Memory checkpoints capture conversation state before risky operations, enabling clean rollback on failure.")}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-foreground",children:[d.jsx("input",{type:"checkbox",checked:a.enabled??!1,onChange:()=>c({enabled:!(a.enabled??!1)}),disabled:r.isPending,className:"h-3.5 w-3.5 rounded border-input accent-primary","data-testid":"auto-snapshot-enabled"}),s("agentDetail.autoSnapshotEnable","Enable automatic checkpoints")]}),a.enabled&&d.jsxs("div",{className:"space-y-3 ps-5",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-[10px] text-muted-foreground",children:s("agentDetail.triggerOn","Trigger On")}),d.jsx("div",{className:"flex flex-wrap gap-2",children:ist.map(u=>{const h=(a.triggerOn??[]).includes(u);return d.jsx("button",{type:"button",onClick:()=>{const g=a.triggerOn??[],f=h?g.filter(m=>m!==u):[...g,u];c({triggerOn:f.length>0?f:void 0})},disabled:r.isPending,className:`inline-flex items-center gap-1 rounded-md border px-2.5 py-1 text-[10px] font-medium transition-colors ${h?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground hover:text-foreground hover:border-foreground/30"}`,children:u==="before_tool"?s("agentDetail.triggerBeforeTool","Before tool execution"):s("agentDetail.triggerBeforeAction","Before action")},u)})})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("label",{className:"text-xs text-foreground whitespace-nowrap",children:s("agentDetail.maxCheckpoints","Max Checkpoints")}),d.jsx(Dm,{value:o.maxCheckpointsPerConversation??10,onCommit:u=>l({maxCheckpointsPerConversation:u}),min:1,max:100,className:"h-7 w-20 rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s("agentDetail.maxCheckpointsHint","per conversation")})]})]})]}),d.jsxs("div",{className:"border-t border-border pt-3 space-y-2",children:[d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-muted-foreground cursor-not-allowed",title:s("agentDetail.forkingDisabledTooltip","Available in a future release"),children:[d.jsx("input",{type:"checkbox",checked:o.forkingEnabled??!1,disabled:!0,className:"h-3.5 w-3.5 rounded border-input accent-primary opacity-50","data-testid":"forking-enabled"}),s("agentDetail.forkingEnabled","Session Forking"),d.jsxs("span",{className:"text-[9px] font-normal text-muted-foreground/70",children:["(",s("agentDetail.comingSoon","coming soon"),")"]})]}),d.jsx("p",{className:"text-[10px] text-muted-foreground ps-5",children:s("agentDetail.forkingNote","Session forking endpoint (POST /v6/conversations/{id}/fork) is not yet available.")}),d.jsxs("div",{className:"flex items-center gap-2 ps-5 opacity-50 cursor-not-allowed",children:[d.jsx("label",{className:"text-xs text-foreground whitespace-nowrap",children:s("agentDetail.maxForks","Max Forks")}),d.jsx("input",{type:"number",value:o.maxForksPerConversation??5,disabled:!0,className:"h-7 w-20 rounded border border-input bg-muted/50 px-2 text-xs text-muted-foreground",title:s("agentDetail.forkingDisabledTooltip","Available in a future release")}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s("agentDetail.maxForksHint","per conversation")})]})]})]})})});function rst(){return typeof window<"u"?`${window.location.origin}/integrations/slack/events`:""}function ost(){const{t:i}=ve(),[e,t]=L.useState(!1),n=rst(),[s,r]=L.useState(!1);function o(){navigator.clipboard.writeText(n).then(()=>{r(!0),qe.success(i("agentDetail.slackWebhookCopied","Webhook URL copied")),setTimeout(()=>r(!1),2e3)}).catch(()=>{qe.error(i("common.copyFailed","Failed to copy to clipboard"))})}return d.jsxs("div",{className:"rounded-lg border border-indigo-500/20 bg-indigo-500/5",children:[d.jsxs("button",{type:"button",onClick:()=>t(!e),className:"flex w-full items-center gap-2 px-4 py-2.5 text-start",children:[d.jsx(QHe,{className:"h-4 w-4 text-indigo-500 shrink-0"}),d.jsx("span",{className:"flex-1 text-xs font-semibold text-indigo-600 dark:text-indigo-400",children:i("agentDetail.slackSetupGuide","Slack Setup Guide")}),d.jsx(Fb,{className:`h-3.5 w-3.5 text-indigo-500/50 transition-transform ${e?"rotate-180":""}`})]}),e&&d.jsxs("div",{className:"space-y-4 border-t border-indigo-500/20 px-4 py-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("agentDetail.slackWebhookUrl","Webhook URL")}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("code",{className:"flex-1 rounded-md border border-input bg-background px-2.5 py-1.5 font-mono text-xs text-foreground break-all",children:n}),d.jsx("button",{type:"button",onClick:o,className:"shrink-0 rounded-md border border-input p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",title:i("common.copy","Copy"),children:s?d.jsx(Ns,{className:"h-3.5 w-3.5 text-emerald-500"}):d.jsx(yo,{className:"h-3.5 w-3.5"})})]})]}),d.jsxs("ol",{className:"space-y-1.5 text-xs text-muted-foreground",children:[d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-indigo-500/10 text-[10px] font-bold text-indigo-500",children:"1"}),i("agentDetail.slackStep1","Create a Slack App at api.slack.com/apps and install it to your workspace.")]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-indigo-500/10 text-[10px] font-bold text-indigo-500",children:"2"}),i("agentDetail.slackStep2","Copy the Bot Token (xoxb-…) and Signing Secret into the EDDI vault and configure channels below.")]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-indigo-500/10 text-[10px] font-bold text-indigo-500",children:"3"}),d.jsxs("span",{children:[i("agentDetail.slackStep3","Then enable Event Subscriptions in your Slack App, paste the Webhook URL above, and subscribe to:"),d.jsx("code",{className:"ms-1 rounded bg-muted px-1 py-0.5 font-mono text-[10px]",children:"app_mention"}),","," ",d.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[10px]",children:"message.im"})]})]})]}),d.jsx("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed",children:i("agentDetail.slackSetupNote","Important: Configure the channel below before enabling Event Subscriptions — Slack sends a URL verification challenge that requires the signing secret to be configured in EDDI.")}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("agentDetail.slackRequiredScopes","Required Bot Token Scopes")}),d.jsx("div",{className:"flex flex-wrap gap-1",children:["app_mentions:read","chat:write","channels:history","groups:history","im:history","mpim:history"].map(a=>d.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:a},a))})]})]})]})}function ast({channel:i,index:e,onUpdate:t,onRemove:n,disabled:s}){const{t:r}=ve(),o=L.useMemo(()=>i.config??{},[i.config]),a=L.useRef(o);L.useEffect(()=>{a.current=o},[o]);const[l,c]=L.useState(o.channelId??""),[u,h]=L.useState(o.groupId??""),[g,f]=L.useState(!1),m=L.useRef(null),x=L.useRef(null);L.useEffect(()=>c(o.channelId??""),[o.channelId]),L.useEffect(()=>h(o.groupId??""),[o.groupId]),L.useEffect(()=>()=>{m.current&&clearTimeout(m.current),x.current&&clearTimeout(x.current)},[]);function v(C){m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{t(e,{...a.current,channelId:C})},600)}function _(C){x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{if(C.trim())t(e,{...a.current,groupId:C});else{const{groupId:E,...D}=a.current;t(e,D)}},600)}function w(C,E){t(e,{...a.current,[C]:E})}const k=!l||/^C[A-Z0-9]+$/.test(l);return d.jsxs("div",{className:"rounded-lg border border-border bg-background","data-testid":`slack-channel-${e}`,children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(vp,{className:"h-4 w-4 text-indigo-500"}),d.jsx("span",{className:"text-xs font-semibold text-foreground",children:r("agentDetail.slackChannel","Slack Channel")}),l&&d.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:l})]}),d.jsx("button",{type:"button",onClick:()=>f(!0),disabled:s,className:"rounded p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors disabled:opacity-50",title:r("agentDetail.removeChannel","Remove channel"),"data-testid":`remove-channel-${e}`,children:d.jsx(yn,{className:"h-3.5 w-3.5"})})]}),d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-[10px] font-medium text-muted-foreground",children:[r("agentDetail.channelId","Channel ID")," ",d.jsx("span",{className:"text-destructive",children:"*"})]}),d.jsx("input",{type:"text",value:l,onChange:C=>{const E=C.target.value;c(E),v(E)},disabled:s,placeholder:"C0123ABCDEF",className:`h-8 w-full rounded-md border bg-background px-2.5 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-60 ${k?"border-input":"border-amber-500"}`,"data-testid":`channel-id-${e}`}),!k&&d.jsx("p",{className:"mt-0.5 text-[10px] text-amber-600 dark:text-amber-400",children:r("agentDetail.channelIdHint","Channel IDs start with C followed by uppercase alphanumeric characters")})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-[10px] font-medium text-muted-foreground",children:[r("agentDetail.botToken","Bot Token")," ",d.jsx("span",{className:"text-destructive",children:"*"})]}),d.jsx(qd,{value:o.botToken??"",onChange:C=>w("botToken",C),readOnly:s,placeholder:r("agentDetail.botTokenPlaceholder","xoxb-… or ${vault:slack-bot-token}"),testId:`bot-token-${e}`}),d.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground/70",children:r("agentDetail.botTokenHint","Slack Bot User OAuth Token. Use a vault reference for security.")})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-[10px] font-medium text-muted-foreground",children:[r("agentDetail.signingSecret","Signing Secret")," ",d.jsx("span",{className:"text-destructive",children:"*"})]}),d.jsx(qd,{value:o.signingSecret??"",onChange:C=>w("signingSecret",C),readOnly:s,placeholder:r("agentDetail.signingSecretPlaceholder","Hex string or ${vault:slack-signing-secret}"),testId:`signing-secret-${e}`}),d.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground/70",children:r("agentDetail.signingSecretHint","From your Slack App's Basic Information page. Use a vault reference for security.")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-[10px] font-medium text-muted-foreground",children:r("agentDetail.groupIdOptional","Group ID (optional)")}),d.jsx("input",{type:"text",value:u,onChange:C=>{const E=C.target.value;h(E),_(E)},disabled:s,placeholder:r("agentDetail.groupIdPlaceholder","Multi-agent group config ID"),className:"h-8 w-full rounded-md border border-input bg-background px-2.5 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-60","data-testid":`group-id-${e}`}),d.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground/70",children:r("agentDetail.groupIdHint",'Set this to enable "group: question" multi-agent discussions from this Slack channel.')})]})]}),d.jsx(pl,{open:g,onOpenChange:f,title:r("agentDetail.removeChannelConfirm","Remove this Slack channel connector?"),description:r("agentDetail.removeChannelDesc","This action will permanently disconnect this channel."),confirmLabel:r("common.delete","Delete"),cancelLabel:r("common.cancel","Cancel"),onConfirm:()=>{n(e),f(!1)},isPending:s})]})}const lst=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=ve(),r=YC(),o=e.channels??[],a=o.filter(g=>g.type==="slack"),l=a.length>0;function c(){const g={type:"slack",config:{channelId:"",botToken:"",signingSecret:""}};r.mutate({id:t,version:n,agent:{...e,channels:[...o,g]}})}function u(g,f){let m=0;const x=o.map(v=>{if(v.type==="slack"){if(m===g)return m++,{...v,config:f};m++}return v});r.mutate({id:t,version:n,agent:{...e,channels:x}})}function h(g){let f=0;const m=o.filter(x=>{if(x.type==="slack"){if(f===g)return f++,!1;f++}return!0});r.mutate({id:t,version:n,agent:{...e,channels:m}})}return d.jsx(fs,{label:s("agentDetail.channels","Channel Connectors"),icon:Fb,accent:"text-indigo-500",variant:"card",defaultOpen:l,children:d.jsxs("div",{className:"space-y-4","data-testid":"channels-section",children:[d.jsx(ost,{}),d.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:s("agentDetail.channelsDesc","Connect this agent to Slack channels. Each channel connector is independently configured with its own credentials, supporting multi-workspace setups.")}),!l&&d.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-border py-8 text-center",children:[d.jsx(Fb,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"mt-2 text-sm font-medium text-muted-foreground",children:s("agentDetail.noChannels","No channels configured")}),d.jsx("p",{className:"mt-0.5 max-w-xs text-xs text-muted-foreground/70",children:s("agentDetail.noChannelsDesc","Add a Slack channel to let users interact with this agent from Slack.")})]}),a.map((g,f)=>d.jsx(ast,{channel:g,index:f,onUpdate:u,onRemove:h,disabled:r.isPending},`slack-chan-${f}`)),d.jsxs("button",{type:"button",onClick:c,disabled:r.isPending,className:"inline-flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-indigo-500/30 bg-indigo-500/5 px-4 py-2.5 text-xs font-medium text-indigo-600 transition-colors hover:bg-indigo-500/10 hover:border-indigo-500/50 disabled:opacity-50 dark:text-indigo-400","data-testid":"add-slack-channel-btn",children:[d.jsx(Yt,{className:"h-3.5 w-3.5"}),s("agentDetail.addSlackChannel","Add Slack Channel")]})]})})}),ULe={READY:{icon:qh,color:"text-emerald-500",bg:"bg-emerald-500/10"},IN_PROGRESS:{icon:Yr,color:"text-amber-500",bg:"bg-amber-500/10"},ERROR:{icon:Ui,color:"text-destructive",bg:"bg-destructive/10"},NOT_FOUND:{icon:mke,color:"text-muted-foreground",bg:"bg-muted"}},cst={production:"agentDetail.envProduction",test:"agentDetail.envTest"};function dst(){var Ie,_t,ut,Wt,Re;const{id:i}=f0(),{t:e}=ve(),t=za(),n=un(),[s,r]=L.useState(void 0),[o,a]=L.useState(!1),[l,c]=L.useState(null),[u,h]=L.useState(!1),[g,f]=L.useState(!1);L.useEffect(()=>{r(void 0)},[i]);const{data:m}=WEe(i),x=s??((Ie=m==null?void 0:m[0])==null?void 0:Ie.version)??1,{data:v,isLoading:_,isError:w,refetch:k}=wet(i,x),{data:C}=HEe(i,x),{data:E}=Cet(i,x),D=UEe(),T=$Ee(),I=VEe(),R=zEe(),P=Fit(),j=cP(),B=(C==null?void 0:C.status)??"NOT_FOUND",H=ULe[B],$=H.icon,V={READY:e("status.deployed","Deployed"),IN_PROGRESS:e("status.deploying","Deploying..."),ERROR:e("status.error","Error"),NOT_FOUND:e("status.notDeployed","Not deployed")}[B]??B,X=B==="READY",ae=D.isPending||T.isPending||B==="IN_PROGRESS",ne=L.useMemo(()=>((v==null?void 0:v.workflows)??[]).filter(Me=>Me.includes("://")),[v==null?void 0:v.workflows]),{data:W}=WLe(ne);L.useEffect(()=>{if(l){const Me=setTimeout(()=>c(null),3e3);return()=>clearTimeout(Me)}},[l]);function Y(){D.mutate({agentId:i,version:x},{onSuccess:()=>qe.success(e("agents.deploySuccess","Deployment started")),onError:Me=>qe.error(qs(Me))})}function G(){T.mutate({agentId:i,version:x},{onSuccess:()=>qe.success(e("agents.undeploySuccess","Agent undeployed")),onError:Me=>qe.error(qs(Me))})}function U(){I.mutate({id:i,version:x},{onSuccess:()=>{qe.success(e("common.delete")+" ✓"),h(!1),t("/manage/agents")},onError:Me=>qe.error(qs(Me))})}async function ue(){try{const Me=await R.mutateAsync({id:i,version:x,deepCopy:!0});qe.success(e("agentDetail.duplicateSuccess"));const{id:pt}=mo(Me.location);t(`/manage/agentview/${pt}`)}catch(Me){qe.error(qs(Me))}}function fe(Me){if(!(v!=null&&v.workflows))return;const pt=v.workflows.filter(mt=>mt!==Me);P.mutate({agentId:i,version:x,workflows:pt},{onSuccess:()=>qe.success(e("agentDetail.workflowRemoved","Workflow removed")),onError:mt=>qe.error(qs(mt))})}function Le(Me){const pt=(v==null?void 0:v.workflows)??[];pt.includes(Me)||(P.mutate({agentId:i,version:x,workflows:[...pt,Me]},{onSuccess:()=>qe.success(e("agentDetail.workflowAdded","Workflow added")),onError:mt=>qe.error(qs(mt))}),a(!1))}function tt(Me,pt){if(!(v!=null&&v.workflows))return;const mt=v.workflows.map($t=>$t===Me?$t.replace(/([?&]version=)\d+/,`$1${pt}`):$t);P.mutate({agentId:i,version:x,workflows:mt},{onSuccess:()=>qe.success(e("agentDetail.workflowUpdated","Workflow updated to latest version")),onError:$t=>qe.error(qs($t))})}const ge=L.useCallback(Me=>{r(Me)},[]);if(_&&!v)return d.jsx("div",{className:"flex items-center justify-center py-20","data-testid":"agent-detail-loading",children:d.jsx(yi,{className:"h-8 w-8 animate-spin text-primary"})});if(w||!v)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(Zpe,{}),d.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border border-destructive/30 bg-destructive/5 py-16",children:[d.jsx(Mo,{className:"h-12 w-12 text-destructive"}),d.jsx("p",{className:"mt-4 text-lg font-medium text-destructive",children:e("common.error")}),d.jsx("button",{onClick:()=>k(),className:"mt-4 rounded-lg bg-destructive/10 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/20",children:e("common.retry")})]})]});const he=((_t=m==null?void 0:m[0])==null?void 0:_t.version)??x,We=xMe.version===x))==null?void 0:ut.name)||e("agentDetail.title","Agent Detail")}),d.jsxs("p",{className:"font-mono text-sm text-muted-foreground",children:[i,d.jsxs("span",{className:"ms-2 inline-flex items-center rounded-md bg-primary/10 px-1.5 py-0.5 text-xs font-semibold text-primary",children:["v",x]})]})]})]}),m&&m.length>0&&d.jsx(ust,{versions:m,current:x,onChange:ge})]}),d.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs("div",{className:me("inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium",H.bg,H.color),"data-testid":"deployment-status",children:[d.jsx($,{className:"h-4 w-4"}),V]}),d.jsx("button",{onClick:X?G:Y,disabled:ae,className:me("rounded-lg px-4 py-2 text-sm font-medium transition-colors",X?"bg-destructive/10 text-destructive hover:bg-destructive/20":"bg-primary text-primary-foreground hover:bg-primary/90",ae&&"cursor-not-allowed opacity-50"),"data-testid":"deploy-btn",children:e(ae?"common.loading":X?"agents.undeploy":"agents.deploy")}),!X&&!ae&&d.jsxs("button",{onClick:async()=>{const Me=Rc.getState(),pt=Bi.getState();Me.open(i,i),Me.setStep("deploying");try{await yse("production",i,x);for(let mt=0;mt<15;mt++){await new Promise(Tn=>setTimeout(Tn,2e3));const $t=await lP("production",i,x);if($t.status==="READY")break;if($t.status==="ERROR")throw new Error("Deploy failed")}n.invalidateQueries({queryKey:["agents"]}),n.invalidateQueries({queryKey:["chat","deployedAgents"]}),Me.setStep("starting"),pt.clearMessages(),pt.setSelectedAgent(i,i),await j.mutateAsync({agentId:i}),Me.setStep("ready")}catch(mt){Me.setStep("error",qs(mt))}},disabled:j.isPending,className:"inline-flex items-center gap-1.5 rounded-lg bg-emerald-500/10 px-4 py-2 text-sm font-medium text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400 disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"deploy-chat-btn",children:[d.jsx(qh,{className:"h-4 w-4","aria-hidden":"true"}),e("agents.deployAndChat","Deploy & Chat")]}),d.jsxs("div",{className:"inline-flex",children:[d.jsxs("button",{onClick:async()=>{const Me=Rc.getState(),pt=Bi.getState();if(Me.open(i,i),X){Me.setStep("starting"),pt.clearMessages(),pt.setSelectedAgent(i,i);try{await j.mutateAsync({agentId:i}),Me.setStep("ready")}catch(mt){Me.setStep("error",qs(mt))}}},disabled:j.isPending,className:me("inline-flex items-center gap-1.5 bg-emerald-500/10 px-4 py-2 text-sm font-medium text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400 disabled:opacity-50 disabled:cursor-not-allowed",X?"rounded-s-lg":"rounded-lg"),"data-testid":"chat-btn","aria-label":e("agents.chat","Chat"),children:[d.jsx(Wl,{className:"h-4 w-4","aria-hidden":"true"}),e("agents.chat","Chat")]}),X&&d.jsx("a",{href:`/chat/production/${i}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center rounded-e-lg border-s border-emerald-500/20 bg-emerald-500/10 px-2.5 py-2 text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400",title:e("agents.openExternalChat","Open in new tab"),"aria-label":e("agents.openExternalChat","Open in new tab"),"data-testid":"external-chat-btn",children:d.jsx(Oo,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[d.jsxs(Kn,{to:`/manage/studio/${i}`,className:"inline-flex items-center gap-1.5 rounded-lg bg-primary/10 px-3 py-1.5 text-xs font-medium text-primary hover:bg-primary/20 transition-colors","data-testid":"open-studio-btn",children:[d.jsx(hl,{className:"h-3.5 w-3.5"}),e("agentDetail.openStudio","Open in Studio")]}),d.jsxs("button",{onClick:ue,disabled:R.isPending,className:"inline-flex items-center gap-1.5 rounded-lg border border-input px-3 py-1.5 text-xs font-medium text-foreground hover:bg-secondary transition-colors disabled:opacity-50","data-testid":"duplicate-agent-btn",children:[d.jsx(yo,{className:"h-3.5 w-3.5"}),R.isPending?e("agentDetail.duplicating"):e("agentDetail.duplicate")]}),d.jsxs("button",{onClick:()=>f(!0),className:"inline-flex items-center gap-1.5 rounded-lg border border-input px-3 py-1.5 text-xs font-medium text-foreground hover:bg-secondary transition-colors","data-testid":"export-agent-btn",children:[d.jsx(m0,{className:"h-3.5 w-3.5"}),e("agents.export","Export")]}),d.jsx("button",{onClick:()=>h(!0),className:"inline-flex items-center gap-1.5 rounded-lg bg-destructive/10 px-3 py-1.5 text-xs font-medium text-destructive hover:bg-destructive/20 transition-colors","data-testid":"delete-agent-btn","aria-label":e("agents.deleteAgent","Delete agent"),children:d.jsx(yn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]}),We&&d.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-amber-400/30 bg-amber-50 px-4 py-3 dark:bg-amber-900/15 dark:border-amber-700/30","data-testid":"non-latest-warning",children:[d.jsx(To,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 shrink-0"}),d.jsx("p",{className:"flex-1 text-sm text-amber-800 dark:text-amber-300",children:e("agentDetail.viewingOldVersion","You are viewing version {{current}}. Latest is version {{latest}}.",{current:x,latest:he})}),d.jsx("button",{onClick:()=>ge(he),className:"rounded-md bg-amber-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-amber-700 transition-colors shrink-0",children:e("agentDetail.switchToLatest","Switch to latest")})]}),l&&d.jsx("div",{className:me("rounded-lg px-4 py-2 text-sm font-medium transition-all",l.type==="success"?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-destructive/10 text-destructive"),"data-testid":"save-feedback",role:"status","aria-live":"polite",children:l.text}),E&&E.length>0&&d.jsx(hst,{statuses:E,onDeploy:Me=>D.mutate({environment:Me,agentId:i,version:x},{onError:pt=>qe.error(qs(pt))}),onUndeploy:Me=>T.mutate({environment:Me,agentId:i,version:x},{onError:pt=>qe.error(qs(pt))}),isBusy:ae}),d.jsxs("section",{className:"rounded-xl border bg-card shadow-sm",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-border p-5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Hd,{className:"h-5 w-5 text-primary"}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e("agentDetail.packages","Workflows")}),d.jsx("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:((Wt=v.workflows)==null?void 0:Wt.length)??0})]}),d.jsxs("button",{onClick:()=>a(!o),className:"inline-flex items-center gap-1.5 rounded-lg bg-primary/10 px-3 py-1.5 text-sm font-medium text-primary hover:bg-primary/20 transition-colors","data-testid":"add-workflow-btn",children:[d.jsx(Yt,{className:"h-4 w-4"}),e("agentDetail.addWorkflow","Add Workflow")]})]}),d.jsxs("div",{className:"divide-y divide-border",children:[(!v.workflows||v.workflows.length===0)&&d.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[d.jsx(Hd,{className:"h-10 w-10 opacity-50"}),d.jsx("p",{className:"mt-3 text-sm",children:e("agentDetail.noWorkflows","No workflows added yet")})]}),(Re=v.workflows)==null?void 0:Re.map(Me=>{const{id:pt,version:mt}=mo(Me),$t=W==null?void 0:W[pt],Tn=$t!==void 0&&$t>mt,Pi=`/manage/workflowview/${pt}?agentId=${i}&agentVer=${x}`;return d.jsxs("div",{className:me("group flex items-center gap-3 px-5 py-4 transition-colors",Tn?"bg-amber-50/50 dark:bg-amber-900/10 hover:bg-amber-50 dark:hover:bg-amber-900/20":"hover:bg-secondary/50"),children:[d.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 shrink-0",children:d.jsx(Hd,{className:"h-4 w-4 text-primary"})}),d.jsxs(Kn,{to:Pi,className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground group-hover:text-primary transition-colors truncate",children:pt}),d.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[d.jsxs("span",{className:"inline-flex items-center rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:["v",mt]}),Tn&&d.jsx("span",{className:"text-[10px] text-amber-600 dark:text-amber-400 font-medium",children:e("agentDetail.outdated","outdated")})]})]}),d.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[Tn&&d.jsxs("button",{onClick:Ti=>{Ti.preventDefault(),tt(Me,$t)},disabled:P.isPending,className:"inline-flex items-center gap-1 rounded-md bg-amber-100 px-2 py-1 text-[10px] font-semibold text-amber-800 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50 transition-colors disabled:opacity-50",title:e("agentDetail.updateToLatest","Update to latest version"),"data-testid":`update-workflow-${pt}`,children:[d.jsx(QSe,{className:"h-3 w-3"}),"v",$t]}),d.jsxs(Kn,{to:Pi,className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2.5 py-1 text-xs font-medium text-primary hover:bg-primary/20 transition-colors",children:[e("agentDetail.openWorkflow","Open"),d.jsx(Oo,{className:"h-3 w-3"})]}),d.jsx("button",{onClick:()=>fe(Me),disabled:P.isPending,className:"rounded-md p-1.5 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors disabled:opacity-50",title:e("common.delete"),children:d.jsx(yn,{className:"h-4 w-4"})})]})]},Me)})]})]}),o&&d.jsx(gst,{currentWorkflows:v.workflows??[],onAdd:Le,onClose:()=>a(!1)}),d.jsx(mst,{agent:v,agentId:i,version:x}),d.jsx(Yit,{agent:v,agentId:i,version:x}),d.jsx(est,{agent:v,agentId:i,version:x}),d.jsx(tst,{agent:v,agentId:i,version:x}),d.jsx(nst,{agent:v,agentId:i,version:x}),d.jsx(sst,{agent:v,agentId:i,version:x}),d.jsx(lst,{agent:v,agentId:i,version:x}),d.jsx(pst,{agent:v}),d.jsx(pl,{open:u,onOpenChange:h,title:e("agents.confirmDelete"),description:e("agents.confirmDeleteDescription","This action cannot be undone. The agent and all its data will be permanently removed."),confirmLabel:e("common.delete"),cancelLabel:e("common.cancel"),onConfirm:U,isPending:I.isPending}),d.jsx(iLe,{open:g,onClose:()=>f(!1),agentId:i,agentVersion:x})]})}function Zpe(){const{t:i}=ve();return d.jsxs(Kn,{to:"/manage/agents",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[d.jsx(zl,{className:"h-4 w-4"}),i("agentDetail.backToAgents","Back to Agents")]})}function ust({versions:i,current:e,onChange:t}){return i.length<=1?d.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground","data-testid":"version-badge",children:["v",e]}):d.jsx("select",{value:e,onChange:n=>t(Number(n.target.value)),className:"rounded-md border border-input bg-background px-2.5 py-1 text-xs font-medium text-foreground shadow-sm transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1","data-testid":"version-picker",children:i.map(n=>d.jsxs("option",{value:n.version,children:["v",n.version,n.lastModifiedOn?` — ${iC(n.lastModifiedOn)}`:""]},n.version))})}function hst({statuses:i,onDeploy:e,onUndeploy:t,isBusy:n}){const{t:s}=ve(),r={READY:s("status.deployed","Deployed"),IN_PROGRESS:s("status.deploying","Deploying..."),ERROR:s("status.error","Error"),NOT_FOUND:s("status.notDeployed","Not deployed")};return d.jsxs("section",{className:"overflow-hidden rounded-xl border bg-card shadow-sm","data-testid":"env-badges",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-5 py-3",children:[d.jsx(Cb,{className:"h-5 w-5 text-primary"}),d.jsx("h2",{className:"text-sm font-semibold text-foreground",children:s("agentDetail.environments","Environments")})]}),d.jsx("div",{className:"grid grid-cols-1 gap-0 divide-y divide-border sm:grid-cols-2 sm:divide-x sm:divide-y-0",children:i.map(({environment:o,status:a})=>{const l=ULe[a],c=l.icon,u=a==="READY";return d.jsxs("div",{className:"flex items-center justify-between gap-3 px-5 py-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:me("rounded-full p-1.5",l.bg),children:d.jsx(c,{className:me("h-3.5 w-3.5",l.color)})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:s(cst[o]??o)}),d.jsx("p",{className:me("text-xs",l.color),children:r[a]??a})]})]}),d.jsx("button",{onClick:()=>u?t(o):e(o),disabled:n,className:me("rounded-md px-2.5 py-1 text-xs font-medium transition-colors",u?"bg-destructive/10 text-destructive hover:bg-destructive/20":"bg-primary/10 text-primary hover:bg-primary/20",n&&"cursor-not-allowed opacity-50"),children:s(u?"agents.undeploy":"agents.deploy")})]},o)})})]})}function gst({currentWorkflows:i,onAdd:e,onClose:t}){const{t:n}=ve(),[s,r]=L.useState(""),{data:o,isLoading:a}=Tit(100,0,s),l=(o??[]).filter(c=>!i.includes(c.resource));return d.jsxs("section",{className:"rounded-xl border bg-card shadow-sm",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-border p-5",children:[d.jsx("h3",{className:"text-lg font-semibold text-foreground",children:n("agentDetail.selectWorkflow","Select Workflow to Add")}),d.jsx("button",{onClick:t,className:"text-sm text-muted-foreground hover:text-foreground",children:n("common.cancel")})]}),d.jsx("div",{className:"p-5",children:d.jsx("input",{type:"text",value:s,onChange:c=>r(c.target.value),placeholder:n("common.search"),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})}),d.jsxs("div",{className:"max-h-64 divide-y divide-border overflow-y-auto",children:[a&&d.jsx("div",{className:"flex items-center justify-center py-8",children:d.jsx(yi,{className:"h-5 w-5 animate-spin text-primary"})}),!a&&l.length===0&&d.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:n("common.noResults")}),l.map(c=>d.jsxs("button",{onClick:()=>e(c.resource),className:"flex w-full items-center justify-between px-5 py-3 text-start hover:bg-secondary/50 transition-colors",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:c.name||mo(c.resource).id}),d.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:c.description||n("agents.noDescription","No description")})]}),d.jsx(Yt,{className:"h-4 w-4 text-primary"})]},c.resource))]})]})}function fst(i){const e=/("(?:[^"\\]|\\.)*")\s*:|"(?:[^"\\]|\\.)*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|\btrue\b|\bfalse\b|\bnull\b/g,t=[];let n=0,s,r=0;for(;(s=e.exec(i))!==null;){s.index>n&&t.push(i.slice(n,s.index));const o=s[0];if(r++,o.endsWith(":")){const a=o.slice(0,-1);t.push(d.jsx("span",{className:"text-primary",children:a},`k${r}`),":")}else o.startsWith('"')?t.push(d.jsx("span",{className:"text-emerald-600 dark:text-emerald-400",children:o},`s${r}`)):o==="true"||o==="false"?t.push(d.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:o},`b${r}`)):o==="null"?t.push(d.jsx("span",{className:"text-muted-foreground italic",children:o},`n${r}`)):t.push(d.jsx("span",{className:"text-sky-600 dark:text-sky-400",children:o},`d${r}`));n=s.index+o.length}return nn(!t),className:"flex w-full items-center justify-between p-5 text-start","aria-expanded":t,"aria-controls":"raw-config-content",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Kh,{className:"h-5 w-5 text-muted-foreground","aria-hidden":"true"}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e("agentDetail.rawConfig","Raw Configuration")})]}),t?d.jsx(Ln,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(xs,{className:"h-4 w-4 text-muted-foreground"})]}),t&&d.jsx("div",{className:"border-t border-border p-5",id:"raw-config-content",children:d.jsx("pre",{className:"overflow-x-auto rounded-lg bg-secondary p-4 text-sm font-mono leading-relaxed",children:fst(JSON.stringify(i,null,2))})})]})}function mst({agent:i,agentId:e,version:t}){const{t:n}=ve(),s=YC(),[r,o]=L.useState(""),[a,l]=L.useState(i.description??""),[c,u]=L.useState(!1),[h,g]=L.useState(null);L.useEffect(()=>l(i.description??""),[i.description]);const f=i.a2aEnabled??!1;function m(){s.mutate({id:e,version:t,agent:{...i,a2aEnabled:!f}})}function x(){a!==(i.description??"")&&s.mutate({id:e,version:t,agent:{...i,description:a}})}function v(){const R=r.trim();if(!R)return;const P=i.a2aSkills??[];P.includes(R)||(s.mutate({id:e,version:t,agent:{...i,a2aSkills:[...P,R]}}),o(""))}function _(R){const P=(i.a2aSkills??[]).filter((j,B)=>B!==R);s.mutate({id:e,version:t,agent:{...i,a2aSkills:P}})}function w(R,P){navigator.clipboard.writeText(R).then(()=>{g(P),setTimeout(()=>g(null),2e3)})}const k=window.location.origin,C=`${k}/a2a/agents/${e}/agent.json`,E=`${k}/a2a/agents/${e}`,D={name:`EDDI Agent ${e}`,description:i.description||"EDDI conversational AI agent",url:E,provider:"EDDI",version:"6.0.0",capabilities:{streaming:!1,pushNotifications:!1,stateTransitionHistory:!0},skills:i.a2aSkills&&i.a2aSkills.length>0?i.a2aSkills.map(R=>({id:R.toLowerCase().replace(/ /g,"-"),name:R,description:`Skill: ${R}`})):[{id:"chat",name:"Conversational AI",description:"General conversational AI agent powered by EDDI"}]},[T,I]=L.useState(!1);return d.jsxs("section",{className:"rounded-xl border bg-card shadow-sm","data-testid":"a2a-section",children:[d.jsxs("button",{type:"button",onClick:()=>I(!T),className:me("flex w-full items-center gap-2 p-5 text-start",T&&"border-b border-border"),children:[T?d.jsx(Ln,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(xs,{className:"h-4 w-4 text-muted-foreground"}),d.jsx(MG,{className:"h-5 w-5 text-primary"}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n("agentDetail.a2aSection","Agent-to-Agent (A2A)")}),f&&d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-xs font-medium text-emerald-600 dark:text-emerald-400",children:[d.jsx(U_,{className:"h-3 w-3"}),n("agentDetail.a2aEnabled","Enabled")]})]}),T&&d.jsx("div",{className:"p-5",children:f?d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:n("agentDetail.a2aDescription","Agent Description")}),d.jsx("input",{type:"text",value:a,onChange:R=>l(R.target.value),onBlur:x,onKeyDown:R=>{R.key==="Enter"&&(R.preventDefault(),x())},placeholder:n("agentDetail.a2aDescPlaceholder","What does this agent do?"),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-shadow","data-testid":"a2a-description"}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n("agentDetail.a2aDescHint","Shown in the Agent Card — helps other agents understand what this agent does")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:n("agentDetail.a2aSkills","A2A Skills")}),d.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-2",children:[(i.a2aSkills??[]).map((R,P)=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:[R,d.jsx("button",{type:"button",onClick:()=>_(P),className:"rounded p-0.5 hover:bg-primary/20 transition-colors","aria-label":`Remove ${R}`,children:d.jsx(An,{className:"h-3 w-3"})})]},P)),(i.a2aSkills??[]).length===0&&d.jsx("span",{className:"text-xs text-muted-foreground italic",children:n("agentDetail.a2aNoSkills","No skills — a default 'chat' skill will be used")})]}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx("input",{type:"text",value:r,onChange:R=>o(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(R.preventDefault(),v())},placeholder:n("agentDetail.a2aSkillPlaceholder","e.g. translation, code-review"),className:"h-8 flex-1 rounded-md border border-input bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"a2a-skill-input"}),d.jsx("button",{type:"button",onClick:v,className:"inline-flex h-8 items-center gap-1 rounded-md border border-input px-2 text-xs font-medium text-foreground transition-colors hover:bg-secondary",children:d.jsx(Yt,{className:"h-3 w-3"})})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:n("agentDetail.a2aEndpoints","Endpoints")}),d.jsx("div",{className:"space-y-1.5",children:[{method:"GET",url:C,label:"card"},{method:"POST",url:E,label:"rpc"}].map(({method:R,url:P,label:j})=>d.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-secondary/50 px-3 py-2",children:[d.jsx("span",{className:me("rounded px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider",R==="GET"?"bg-sky-500/10 text-sky-600 dark:text-sky-400":"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"),children:R}),d.jsx("code",{className:"flex-1 truncate font-mono text-xs text-foreground",dir:"ltr",children:P}),d.jsx("button",{type:"button",onClick:()=>w(P,j),className:"rounded p-1 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Copy URL","data-testid":`copy-url-${j}`,children:h===j?d.jsx("span",{className:"text-[10px] font-medium text-emerald-500",children:"✓"}):d.jsx(yo,{className:"h-3.5 w-3.5"})})]},j))})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>u(!c),className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors","data-testid":"a2a-card-toggle",children:[c?d.jsx(Ln,{className:"h-3 w-3"}):d.jsx(xs,{className:"h-3 w-3"}),n("agentDetail.agentCardPreview","Agent Card Preview")]}),c&&d.jsx("pre",{className:"mt-2 max-h-48 overflow-auto rounded-lg bg-secondary p-3 text-xs text-foreground font-mono",children:JSON.stringify(D,null,2)})]})]}):d.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[d.jsx(MG,{className:"h-10 w-10 text-muted-foreground/50"}),d.jsx("p",{className:"mt-3 text-sm text-muted-foreground max-w-md",children:n("agentDetail.a2aEnabledDesc","Make this agent discoverable by other agents via the A2A protocol. Other EDDI instances can find and call this agent as a tool.")}),d.jsxs("button",{onClick:m,disabled:s.isPending,className:"mt-4 inline-flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-all hover:bg-primary/90 hover:shadow-md disabled:opacity-50","data-testid":"enable-a2a-btn",children:[d.jsx(U_,{className:"h-4 w-4"}),n("agentDetail.a2aEnable","Enable A2A")]})]})})]})}function bst({workflow:i,onDuplicate:e,onDelete:t}){const{t:n}=ve(),[s,r]=L.useState(!1),o=xst(i.lastModifiedOn);return d.jsxs("div",{className:me("group relative flex flex-col rounded-xl border bg-card p-5 shadow-sm transition-all duration-200","hover:shadow-md hover:border-primary/30"),"data-testid":`workflow-card-${i.id}`,children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsx("div",{className:"rounded-lg bg-primary/10 p-2",children:d.jsx(Hd,{className:"h-5 w-5 text-primary"})}),d.jsxs("div",{className:"relative",children:[d.jsx("button",{onClick:()=>r(!s),className:"rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-secondary hover:text-foreground group-hover:opacity-100","data-testid":`workflow-menu-${i.id}`,children:d.jsx(AH,{className:"h-4 w-4"})}),s&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>r(!1)}),d.jsxs("div",{className:"absolute inset-e-0 z-50 mt-1 w-44 rounded-lg border bg-popover py-1 shadow-lg",children:[d.jsxs("button",{onClick:()=>{e(i.id,i.version),r(!1)},className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-popover-foreground hover:bg-secondary",children:[d.jsx(yo,{className:"h-4 w-4"}),n("common.duplicate","Duplicate")]}),d.jsxs("button",{onClick:()=>{t(i.id,i.version),r(!1)},className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-destructive hover:bg-destructive/10",children:[d.jsx(yn,{className:"h-4 w-4"}),n("common.delete")]})]})]})]})]}),d.jsxs("div",{className:"mt-4 flex-1",children:[d.jsxs(Kn,{to:`/manage/workflowview/${i.id}`,className:"text-lg font-semibold text-foreground hover:text-primary transition-colors",children:[i.name||n("packages.unnamed","Unnamed Workflow"),d.jsx(Oo,{className:"ms-1 inline h-3.5 w-3.5 opacity-0 group-hover:opacity-50"})]}),d.jsx("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground/70 truncate",title:i.id,children:i.id}),d.jsx("p",{className:"mt-1 line-clamp-2 text-sm text-muted-foreground",children:i.description||n("packages.noDescription","No description")})]}),d.jsxs("div",{className:"mt-4 flex items-center justify-between border-t border-border pt-3",children:[d.jsx("span",{className:"text-xs text-muted-foreground",title:new Date(i.lastModifiedOn).toLocaleString(),children:o}),d.jsxs("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:["v",i.version]})]})]})}function xst(i){const t=Date.now()-i,n=Math.floor(t/6e4),s=Math.floor(t/36e5),r=Math.floor(t/864e5);return n<1?"Just now":n<60?`${n}m ago`:s<24?`${s}h ago`:r<30?`${r}d ago`:new Date(i).toLocaleDateString()}function vst({open:i,onClose:e}){const{t}=ve(),n=za(),s=Pit(),[r,o]=L.useState(""),[a,l]=L.useState("");async function c(u){u.preventDefault();try{const h=await s.mutateAsync({config:{workflowSteps:[]},name:r,description:a});if(qe.success(t("packages.createSuccess","Workflow created successfully")),o(""),l(""),e(),h.location){const f=new URL(h.location,"http://dummy").pathname.split("/").filter(Boolean),m=f[f.length-1];m&&n(`/manage/workflowview/${m}`)}}catch(h){qe.error(qs(h))}}return d.jsx(vP,{open:i,onClose:e,title:t("packages.createTitle","Create New Workflow"),testId:"create-workflow-dialog",children:d.jsxs("form",{onSubmit:c,className:"space-y-4 p-5",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workflow-name",className:"mb-1.5 block text-sm font-medium text-foreground",children:t("packages.name","Name")}),d.jsx("input",{id:"workflow-name",type:"text",value:r,onChange:u=>o(u.target.value),placeholder:t("packages.namePlaceholder","My Workflow"),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workflow-description",className:"mb-1.5 block text-sm font-medium text-foreground",children:t("packages.description","Description")}),d.jsx("textarea",{id:"workflow-description",value:a,onChange:u=>l(u.target.value),placeholder:t("packages.descriptionPlaceholder","Describe what this workflow does..."),rows:3,className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring resize-none"})]}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:e,className:"rounded-lg px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:t("common.cancel")}),d.jsx("button",{type:"submit",disabled:s.isPending,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",children:s.isPending?t("common.loading"):t("common.create")})]})]})})}function _st(){const{t:i}=ve(),[e,t]=L.useState(""),[n,s]=L.useState(!1),[r,o]=L.useState(null),[a,l]=L.useState(()=>uL("workflows")),[c,u]=L.useState("modified"),[h,g]=L.useState("desc"),f=Ys(H=>H.maybeAutoStart);L.useEffect(()=>{const H=setTimeout(()=>f("workflows"),500);return()=>clearTimeout(H)},[f]);const{data:m,isLoading:x,isError:v,refetch:_,fetchNextPage:w,hasNextPage:k,isFetchingNextPage:C}=Iit(e),E=HLe(),D=jit(),T=L.useMemo(()=>{const H=(m==null?void 0:m.pages.flat())??[];return[...Bit(H)].sort((q,V)=>{let X=0;return c==="name"?X=(q.name??"").localeCompare(V.name??""):c==="version"?X=q.version-V.version:X=new Date(q.lastModifiedOn).getTime()-new Date(V.lastModifiedOn).getTime(),h==="asc"?X:-X})},[m,c,h]),I=L.useCallback(H=>{c===H?g($=>$==="asc"?"desc":"asc"):(u(H),g(H==="modified"?"desc":"asc"))},[c]);function R(H,$){o({id:H,version:$})}function P(){r&&E.mutate(r,{onSuccess:()=>{qe.success(i("common.delete")+" ✓"),o(null)},onError:H=>qe.error(qs(H))})}function j(H,$){D.mutate({id:H,version:$,deepCopy:!1},{onSuccess:()=>{qe.success(i("common.duplicate","Duplicate")+" ✓")},onError:q=>qe.error(qs(q))})}function B(H){l(H),CP("workflows",H)}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"flex items-center gap-2 text-3xl font-bold text-foreground",children:[d.jsx(Hd,{className:"h-8 w-8 text-primary"}),i("pages.packages.title")]}),d.jsx("p",{className:"mt-1 text-muted-foreground",children:i("pages.packages.subtitle")})]}),d.jsxs(Qt,{onClick:()=>s(!0),"data-testid":"create-workflow-btn",children:[d.jsx(Yt,{className:"h-4 w-4"}),i("packages.createWorkflow")]})]}),d.jsxs("div",{className:"flex items-center gap-3","data-tour":"workflows-search",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(Cr,{className:"absolute inset-s-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),d.jsx("input",{type:"text",value:e,onChange:H=>t(H.target.value),placeholder:i("common.search"),className:"w-full rounded-lg border border-input bg-background py-2.5 ps-10 pe-4 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-shadow","data-testid":"workflow-search"})]}),d.jsx(fD,{view:a,onChange:B})]}),d.jsxs("div",{"data-tour":"workflows-content",children:[x&&d.jsx("div",{className:"cq-card-grid",children:Array.from({length:4}).map((H,$)=>d.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 space-y-3",children:[d.jsx(vi,{className:"h-5 w-3/4"}),d.jsx(vi,{className:"h-4 w-1/2"}),d.jsx(vi,{className:"h-4 w-full"})]},$))}),v&&d.jsx(yp,{message:i("common.error"),onRetry:()=>_(),retryLabel:i("common.retry")}),!x&&!v&&T.length===0&&d.jsx(wP,{icon:Hd,title:i(e?"common.noResults":"packages.empty"),description:e?void 0:i("packages.emptyDescription","Workflows define the processing pipeline for your agents."),actionLabel:e?void 0:i("packages.createWorkflow"),onAction:e?void 0:()=>s(!0)}),!x&&!v&&T.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[i("packages.count",{count:T.length}),k&&"+"]}),a==="card"?d.jsx("div",{className:"cq-card-grid","data-testid":"workflow-grid",children:T.map(H=>d.jsx(bst,{workflow:H,onDuplicate:j,onDelete:R},H.resource))}):d.jsx("div",{className:"overflow-hidden rounded-xl border bg-card shadow-sm","data-testid":"workflow-list",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border bg-secondary/50",children:[d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>I("name"),children:d.jsxs("span",{className:"inline-flex items-center gap-1",children:[i("common.name","Name"),c==="name"?h==="asc"?d.jsx(Ih,{className:"h-3 w-3"}):d.jsx(Od,{className:"h-3 w-3"}):d.jsx(rp,{className:"h-3 w-3 opacity-30"})]})}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground",children:i("common.id","ID")}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>I("version"),children:d.jsxs("span",{className:"inline-flex items-center gap-1",children:[i("common.version","Version"),c==="version"?h==="asc"?d.jsx(Ih,{className:"h-3 w-3"}):d.jsx(Od,{className:"h-3 w-3"}):d.jsx(rp,{className:"h-3 w-3 opacity-30"})]})}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>I("modified"),children:d.jsxs("span",{className:"inline-flex items-center gap-1",children:[i("common.modified","Modified"),c==="modified"?h==="asc"?d.jsx(Ih,{className:"h-3 w-3"}):d.jsx(Od,{className:"h-3 w-3"}):d.jsx(rp,{className:"h-3 w-3 opacity-30"})]})}),d.jsx("th",{className:"px-5 py-3 text-end text-xs font-medium uppercase tracking-wider text-muted-foreground",children:i("conversations.actions","Actions")})]})}),d.jsx("tbody",{className:"divide-y divide-border",children:T.map(H=>d.jsxs("tr",{className:"hover:bg-secondary/30 transition-colors",children:[d.jsx("td",{className:"px-5 py-3",children:d.jsxs(Kn,{to:`/manage/workflowview/${H.id}`,className:"text-sm font-medium text-foreground hover:text-primary transition-colors",children:[H.name||i("packages.unnamed","Unnamed Workflow"),d.jsx(Oo,{className:"ms-1 inline h-3 w-3 opacity-40"})]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[H.id.slice(0,12),"…"]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:["v",H.version]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsx("span",{className:"text-sm text-muted-foreground",children:new Date(H.lastModifiedOn).toLocaleString()})}),d.jsx("td",{className:"px-5 py-3 text-end",children:d.jsxs("div",{className:"inline-flex items-center gap-1",children:[d.jsx("button",{onClick:()=>j(H.id,H.version),className:"rounded-md p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",title:i("common.duplicate","Duplicate"),children:d.jsx(yo,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>R(H.id,H.version),className:"rounded-md p-1.5 text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",title:i("common.delete"),children:d.jsx(yn,{className:"h-4 w-4"})})]})})]},H.resource))})]})}),d.jsx(FLe,{onLoadMore:()=>w(),isFetchingMore:C,hasMore:!!k})]})]}),d.jsx(vst,{open:n,onClose:()=>s(!1)}),d.jsx(pl,{open:r!==null,onOpenChange:H=>!H&&o(null),title:i("packages.confirmDelete"),description:i("packages.confirmDeleteDescription","This action cannot be undone. The workflow and all its data will be permanently removed."),confirmLabel:i("common.delete"),cancelLabel:i("common.cancel"),onConfirm:P,isPending:E.isPending})]})}function yst(){for(var i=arguments.length,e=new Array(i),t=0;tn=>{e.forEach(s=>s(n))},e)}const i7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pD(i){const e=Object.prototype.toString.call(i);return e==="[object Window]"||e==="[object global]"}function lre(i){return"nodeType"in i}function Xd(i){var e,t;return i?pD(i)?i:lre(i)&&(e=(t=i.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function cre(i){const{Document:e}=Xd(i);return i instanceof e}function SP(i){return pD(i)?!1:i instanceof Xd(i).HTMLElement}function $Le(i){return i instanceof Xd(i).SVGElement}function mD(i){return i?pD(i)?i.document:lre(i)?cre(i)?i:SP(i)||$Le(i)?i.ownerDocument:document:document:document}const wp=i7?L.useLayoutEffect:L.useEffect;function dre(i){const e=L.useRef(i);return wp(()=>{e.current=i}),L.useCallback(function(){for(var t=arguments.length,n=new Array(t),s=0;s{i.current=setInterval(n,s)},[]),t=L.useCallback(()=>{i.current!==null&&(clearInterval(i.current),i.current=null)},[]);return[e,t]}function $2(i,e){e===void 0&&(e=[i]);const t=L.useRef(i);return wp(()=>{t.current!==i&&(t.current=i)},e),t}function kP(i,e){const t=L.useRef();return L.useMemo(()=>{const n=i(t.current);return t.current=n,n},[...e])}function nF(i){const e=dre(i),t=L.useRef(null),n=L.useCallback(s=>{s!==t.current&&(e==null||e(s,t.current)),t.current=s},[]);return[t,n]}function aY(i){const e=L.useRef();return L.useEffect(()=>{e.current=i},[i]),e.current}let QU={};function NP(i,e){return L.useMemo(()=>{if(e)return e;const t=QU[i]==null?0:QU[i]+1;return QU[i]=t,i+"-"+t},[i,e])}function qLe(i){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s{const a=Object.entries(o);for(const[l,c]of a){const u=r[l];u!=null&&(r[l]=u+i*c)}return r},{...e})}}const zN=qLe(1),q2=qLe(-1);function Cst(i){return"clientX"in i&&"clientY"in i}function ure(i){if(!i)return!1;const{KeyboardEvent:e}=Xd(i.target);return e&&i instanceof e}function Sst(i){if(!i)return!1;const{TouchEvent:e}=Xd(i.target);return e&&i instanceof e}function lY(i){if(Sst(i)){if(i.touches&&i.touches.length){const{clientX:e,clientY:t}=i.touches[0];return{x:e,y:t}}else if(i.changedTouches&&i.changedTouches.length){const{clientX:e,clientY:t}=i.changedTouches[0];return{x:e,y:t}}}return Cst(i)?{x:i.clientX,y:i.clientY}:null}const K2=Object.freeze({Translate:{toString(i){if(!i)return;const{x:e,y:t}=i;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(i){if(!i)return;const{scaleX:e,scaleY:t}=i;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(i){if(i)return[K2.Translate.toString(i),K2.Scale.toString(i)].join(" ")}},Transition:{toString(i){let{property:e,duration:t,easing:n}=i;return e+" "+t+"ms "+n}}}),Jpe="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function kst(i){return i.matches(Jpe)?i:i.querySelector(Jpe)}const Nst={display:"none"};function Est(i){let{id:e,value:t}=i;return gt.createElement("div",{id:e,style:Nst},t)}function Lst(i){let{id:e,announcement:t,ariaLiveType:n="assertive"}=i;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return gt.createElement("div",{id:e,style:s,role:"status","aria-live":n,"aria-atomic":!0},t)}function Dst(){const[i,e]=L.useState("");return{announce:L.useCallback(n=>{n!=null&&e(n)},[]),announcement:i}}const KLe=L.createContext(null);function Tst(i){const e=L.useContext(KLe);L.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of ");return e(i)},[i,e])}function Ist(){const[i]=L.useState(()=>new Set),e=L.useCallback(n=>(i.add(n),()=>i.delete(n)),[i]);return[L.useCallback(n=>{let{type:s,event:r}=n;i.forEach(o=>{var a;return(a=o[s])==null?void 0:a.call(o,r)})},[i]),e]}const Ast={draggable:` + To pick up a draggable item, press the space bar. + While dragging, use the arrow keys to move the item. + Press space again to drop the item in its new position, or press escape to cancel. + `},Rst={onDragStart(i){let{active:e}=i;return"Picked up draggable item "+e.id+"."},onDragOver(i){let{active:e,over:t}=i;return t?"Draggable item "+e.id+" was moved over droppable area "+t.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(i){let{active:e,over:t}=i;return t?"Draggable item "+e.id+" was dropped over droppable area "+t.id:"Draggable item "+e.id+" was dropped."},onDragCancel(i){let{active:e}=i;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function Mst(i){let{announcements:e=Rst,container:t,hiddenTextDescribedById:n,screenReaderInstructions:s=Ast}=i;const{announce:r,announcement:o}=Dst(),a=NP("DndLiveRegion"),[l,c]=L.useState(!1);if(L.useEffect(()=>{c(!0)},[]),Tst(L.useMemo(()=>({onDragStart(h){let{active:g}=h;r(e.onDragStart({active:g}))},onDragMove(h){let{active:g,over:f}=h;e.onDragMove&&r(e.onDragMove({active:g,over:f}))},onDragOver(h){let{active:g,over:f}=h;r(e.onDragOver({active:g,over:f}))},onDragEnd(h){let{active:g,over:f}=h;r(e.onDragEnd({active:g,over:f}))},onDragCancel(h){let{active:g,over:f}=h;r(e.onDragCancel({active:g,over:f}))}}),[r,e])),!l)return null;const u=gt.createElement(gt.Fragment,null,gt.createElement(Est,{id:n,value:s.draggable}),gt.createElement(Lst,{id:a,announcement:o}));return t?Tg.createPortal(u,t):u}var Ia;(function(i){i.DragStart="dragStart",i.DragMove="dragMove",i.DragEnd="dragEnd",i.DragCancel="dragCancel",i.DragOver="dragOver",i.RegisterDroppable="registerDroppable",i.SetDroppableDisabled="setDroppableDisabled",i.UnregisterDroppable="unregisterDroppable"})(Ia||(Ia={}));function iF(){}function eme(i,e){return L.useMemo(()=>({sensor:i,options:e??{}}),[i,e])}function Pst(){for(var i=arguments.length,e=new Array(i),t=0;t[...e].filter(n=>n!=null),[...e])}const Wg=Object.freeze({x:0,y:0});function GLe(i,e){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))}function YLe(i,e){let{data:{value:t}}=i,{data:{value:n}}=e;return t-n}function Ost(i,e){let{data:{value:t}}=i,{data:{value:n}}=e;return n-t}function tme(i){let{left:e,top:t,height:n,width:s}=i;return[{x:e,y:t},{x:e+s,y:t},{x:e,y:t+n},{x:e+s,y:t+n}]}function QLe(i,e){if(!i||i.length===0)return null;const[t]=i;return t[e]}function nme(i,e,t){return e===void 0&&(e=i.left),t===void 0&&(t=i.top),{x:e+i.width*.5,y:t+i.height*.5}}const jst=i=>{let{collisionRect:e,droppableRects:t,droppableContainers:n}=i;const s=nme(e,e.left,e.top),r=[];for(const o of n){const{id:a}=o,l=t.get(a);if(l){const c=GLe(nme(l),s);r.push({id:a,data:{droppableContainer:o,value:c}})}}return r.sort(YLe)},Fst=i=>{let{collisionRect:e,droppableRects:t,droppableContainers:n}=i;const s=tme(e),r=[];for(const o of n){const{id:a}=o,l=t.get(a);if(l){const c=tme(l),u=s.reduce((g,f,m)=>g+GLe(c[m],f),0),h=Number((u/4).toFixed(4));r.push({id:a,data:{droppableContainer:o,value:h}})}}return r.sort(YLe)};function Bst(i,e){const t=Math.max(e.top,i.top),n=Math.max(e.left,i.left),s=Math.min(e.left+e.width,i.left+i.width),r=Math.min(e.top+e.height,i.top+i.height),o=s-n,a=r-t;if(n{let{collisionRect:e,droppableRects:t,droppableContainers:n}=i;const s=[];for(const r of n){const{id:o}=r,a=t.get(o);if(a){const l=Bst(a,e);l>0&&s.push({id:o,data:{droppableContainer:r,value:l}})}}return s.sort(Ost)};function Wst(i,e,t){return{...i,scaleX:e&&t?e.width/t.width:1,scaleY:e&&t?e.height/t.height:1}}function XLe(i,e){return i&&e?{x:i.left-e.left,y:i.top-e.top}:Wg}function Vst(i){return function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r({...o,top:o.top+i*a.y,bottom:o.bottom+i*a.y,left:o.left+i*a.x,right:o.right+i*a.x}),{...t})}}const zst=Vst(1);function Ust(i){if(i.startsWith("matrix3d(")){const e=i.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(i.startsWith("matrix(")){const e=i.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function $st(i,e,t){const n=Ust(e);if(!n)return i;const{scaleX:s,scaleY:r,x:o,y:a}=n,l=i.left-o-(1-s)*parseFloat(t),c=i.top-a-(1-r)*parseFloat(t.slice(t.indexOf(" ")+1)),u=s?i.width/s:i.width,h=r?i.height/r:i.height;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l}}const qst={ignoreTransform:!1};function bD(i,e){e===void 0&&(e=qst);let t=i.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:u}=Xd(i).getComputedStyle(i);c&&(t=$st(t,c,u))}const{top:n,left:s,width:r,height:o,bottom:a,right:l}=t;return{top:n,left:s,width:r,height:o,bottom:a,right:l}}function ime(i){return bD(i,{ignoreTransform:!0})}function Kst(i){const e=i.innerWidth,t=i.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function Gst(i,e){return e===void 0&&(e=Xd(i).getComputedStyle(i)),e.position==="fixed"}function Yst(i,e){e===void 0&&(e=Xd(i).getComputedStyle(i));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const r=e[s];return typeof r=="string"?t.test(r):!1})}function s7(i,e){const t=[];function n(s){if(e!=null&&t.length>=e||!s)return t;if(cre(s)&&s.scrollingElement!=null&&!t.includes(s.scrollingElement))return t.push(s.scrollingElement),t;if(!SP(s)||$Le(s)||t.includes(s))return t;const r=Xd(i).getComputedStyle(s);return s!==i&&Yst(s,r)&&t.push(s),Gst(s,r)?t:n(s.parentNode)}return i?n(i):t}function ZLe(i){const[e]=s7(i,1);return e??null}function XU(i){return!i7||!i?null:pD(i)?i:lre(i)?cre(i)||i===mD(i).scrollingElement?window:SP(i)?i:null:null}function JLe(i){return pD(i)?i.scrollX:i.scrollLeft}function eDe(i){return pD(i)?i.scrollY:i.scrollTop}function cY(i){return{x:JLe(i),y:eDe(i)}}var nl;(function(i){i[i.Forward=1]="Forward",i[i.Backward=-1]="Backward"})(nl||(nl={}));function tDe(i){return!i7||!i?!1:i===document.scrollingElement}function nDe(i){const e={x:0,y:0},t=tDe(i)?{height:window.innerHeight,width:window.innerWidth}:{height:i.clientHeight,width:i.clientWidth},n={x:i.scrollWidth-t.width,y:i.scrollHeight-t.height},s=i.scrollTop<=e.y,r=i.scrollLeft<=e.x,o=i.scrollTop>=n.y,a=i.scrollLeft>=n.x;return{isTop:s,isLeft:r,isBottom:o,isRight:a,maxScroll:n,minScroll:e}}const Qst={x:.2,y:.2};function Xst(i,e,t,n,s){let{top:r,left:o,right:a,bottom:l}=t;n===void 0&&(n=10),s===void 0&&(s=Qst);const{isTop:c,isBottom:u,isLeft:h,isRight:g}=nDe(i),f={x:0,y:0},m={x:0,y:0},x={height:e.height*s.y,width:e.width*s.x};return!c&&r<=e.top+x.height?(f.y=nl.Backward,m.y=n*Math.abs((e.top+x.height-r)/x.height)):!u&&l>=e.bottom-x.height&&(f.y=nl.Forward,m.y=n*Math.abs((e.bottom-x.height-l)/x.height)),!g&&a>=e.right-x.width?(f.x=nl.Forward,m.x=n*Math.abs((e.right-x.width-a)/x.width)):!h&&o<=e.left+x.width&&(f.x=nl.Backward,m.x=n*Math.abs((e.left+x.width-o)/x.width)),{direction:f,speed:m}}function Zst(i){if(i===document.scrollingElement){const{innerWidth:r,innerHeight:o}=window;return{top:0,left:0,right:r,bottom:o,width:r,height:o}}const{top:e,left:t,right:n,bottom:s}=i.getBoundingClientRect();return{top:e,left:t,right:n,bottom:s,width:i.clientWidth,height:i.clientHeight}}function iDe(i){return i.reduce((e,t)=>zN(e,cY(t)),Wg)}function Jst(i){return i.reduce((e,t)=>e+JLe(t),0)}function ert(i){return i.reduce((e,t)=>e+eDe(t),0)}function trt(i,e){if(e===void 0&&(e=bD),!i)return;const{top:t,left:n,bottom:s,right:r}=e(i);ZLe(i)&&(s<=0||r<=0||t>=window.innerHeight||n>=window.innerWidth)&&i.scrollIntoView({block:"center",inline:"center"})}const nrt=[["x",["left","right"],Jst],["y",["top","bottom"],ert]];let hre=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=s7(t),s=iDe(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[r,o,a]of nrt)for(const l of o)Object.defineProperty(this,l,{get:()=>{const c=a(n),u=s[r]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}};class fA{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...t)})},this.target=e}add(e,t,n){var s;(s=this.target)==null||s.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function irt(i){const{EventTarget:e}=Xd(i);return i instanceof e?i:mD(i)}function ZU(i,e){const t=Math.abs(i.x),n=Math.abs(i.y);return typeof e=="number"?Math.sqrt(t**2+n**2)>e:"x"in e&&"y"in e?t>e.x&&n>e.y:"x"in e?t>e.x:"y"in e?n>e.y:!1}var yh;(function(i){i.Click="click",i.DragStart="dragstart",i.Keydown="keydown",i.ContextMenu="contextmenu",i.Resize="resize",i.SelectionChange="selectionchange",i.VisibilityChange="visibilitychange"})(yh||(yh={}));function sme(i){i.preventDefault()}function srt(i){i.stopPropagation()}var is;(function(i){i.Space="Space",i.Down="ArrowDown",i.Right="ArrowRight",i.Left="ArrowLeft",i.Up="ArrowUp",i.Esc="Escape",i.Enter="Enter",i.Tab="Tab"})(is||(is={}));const sDe={start:[is.Space,is.Enter],cancel:[is.Esc],end:[is.Space,is.Enter,is.Tab]},rrt=(i,e)=>{let{currentCoordinates:t}=e;switch(i.code){case is.Right:return{...t,x:t.x+25};case is.Left:return{...t,x:t.x-25};case is.Down:return{...t,y:t.y+25};case is.Up:return{...t,y:t.y-25}}};class gre{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new fA(mD(t)),this.windowListeners=new fA(Xd(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(yh.Resize,this.handleCancel),this.windowListeners.add(yh.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(yh.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&trt(n),t(Wg)}handleKeyDown(e){if(ure(e)){const{active:t,context:n,options:s}=this.props,{keyboardCodes:r=sDe,coordinateGetter:o=rrt,scrollBehavior:a="smooth"}=s,{code:l}=e;if(r.end.includes(l)){this.handleEnd(e);return}if(r.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:Wg;this.referenceCoordinates||(this.referenceCoordinates=u);const h=o(e,{active:t,context:n.current,currentCoordinates:u});if(h){const g=q2(h,u),f={x:0,y:0},{scrollableAncestors:m}=n.current;for(const x of m){const v=e.code,{isTop:_,isRight:w,isLeft:k,isBottom:C,maxScroll:E,minScroll:D}=nDe(x),T=Zst(x),I={x:Math.min(v===is.Right?T.right-T.width/2:T.right,Math.max(v===is.Right?T.left:T.left+T.width/2,h.x)),y:Math.min(v===is.Down?T.bottom-T.height/2:T.bottom,Math.max(v===is.Down?T.top:T.top+T.height/2,h.y))},R=v===is.Right&&!w||v===is.Left&&!k,P=v===is.Down&&!C||v===is.Up&&!_;if(R&&I.x!==h.x){const j=x.scrollLeft+g.x,B=v===is.Right&&j<=E.x||v===is.Left&&j>=D.x;if(B&&!g.y){x.scrollTo({left:j,behavior:a});return}B?f.x=x.scrollLeft-j:f.x=v===is.Right?x.scrollLeft-E.x:x.scrollLeft-D.x,f.x&&x.scrollBy({left:-f.x,behavior:a});break}else if(P&&I.y!==h.y){const j=x.scrollTop+g.y,B=v===is.Down&&j<=E.y||v===is.Up&&j>=D.y;if(B&&!g.x){x.scrollTo({top:j,behavior:a});return}B?f.y=x.scrollTop-j:f.y=v===is.Down?x.scrollTop-E.y:x.scrollTop-D.y,f.y&&x.scrollBy({top:-f.y,behavior:a});break}}this.handleMove(e,zN(q2(h,this.referenceCoordinates),f))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}gre.activators=[{eventName:"onKeyDown",handler:(i,e,t)=>{let{keyboardCodes:n=sDe,onActivation:s}=e,{active:r}=t;const{code:o}=i.nativeEvent;if(n.start.includes(o)){const a=r.activatorNode.current;return a&&i.target!==a?!1:(i.preventDefault(),s==null||s({event:i.nativeEvent}),!0)}return!1}}];function rme(i){return!!(i&&"distance"in i)}function ome(i){return!!(i&&"delay"in i)}class fre{constructor(e,t,n){var s;n===void 0&&(n=irt(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:o}=r;this.props=e,this.events=t,this.document=mD(o),this.documentListeners=new fA(this.document),this.listeners=new fA(n),this.windowListeners=new fA(Xd(o)),this.initialCoordinates=(s=lY(r))!=null?s:Wg,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(yh.Resize,this.handleCancel),this.windowListeners.add(yh.DragStart,sme),this.windowListeners.add(yh.VisibilityChange,this.handleCancel),this.windowListeners.add(yh.ContextMenu,sme),this.documentListeners.add(yh.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ome(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(rme(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:s}=this.props;s(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(yh.Click,srt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(yh.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:s,props:r}=this,{onMove:o,options:{activationConstraint:a}}=r;if(!s)return;const l=(t=lY(e))!=null?t:Wg,c=q2(s,l);if(!n&&a){if(rme(a)){if(a.tolerance!=null&&ZU(c,a.tolerance))return this.handleCancel();if(ZU(c,a.distance))return this.handleStart()}if(ome(a)&&ZU(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}e.cancelable&&e.preventDefault(),o(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===is.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const ort={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class pre extends fre{constructor(e){const{event:t}=e,n=mD(t.target);super(e,ort,n)}}pre.activators=[{eventName:"onPointerDown",handler:(i,e)=>{let{nativeEvent:t}=i,{onActivation:n}=e;return!t.isPrimary||t.button!==0?!1:(n==null||n({event:t}),!0)}}];const art={move:{name:"mousemove"},end:{name:"mouseup"}};var dY;(function(i){i[i.RightClick=2]="RightClick"})(dY||(dY={}));class lrt extends fre{constructor(e){super(e,art,mD(e.event.target))}}lrt.activators=[{eventName:"onMouseDown",handler:(i,e)=>{let{nativeEvent:t}=i,{onActivation:n}=e;return t.button===dY.RightClick?!1:(n==null||n({event:t}),!0)}}];const JU={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class crt extends fre{constructor(e){super(e,JU)}static setup(){return window.addEventListener(JU.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(JU.move.name,e)};function e(){}}}crt.activators=[{eventName:"onTouchStart",handler:(i,e)=>{let{nativeEvent:t}=i,{onActivation:n}=e;const{touches:s}=t;return s.length>1?!1:(n==null||n({event:t}),!0)}}];var pA;(function(i){i[i.Pointer=0]="Pointer",i[i.DraggableRect=1]="DraggableRect"})(pA||(pA={}));var sF;(function(i){i[i.TreeOrder=0]="TreeOrder",i[i.ReversedTreeOrder=1]="ReversedTreeOrder"})(sF||(sF={}));function drt(i){let{acceleration:e,activator:t=pA.Pointer,canScroll:n,draggingRect:s,enabled:r,interval:o=5,order:a=sF.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:h,threshold:g}=i;const f=hrt({delta:h,disabled:!r}),[m,x]=wst(),v=L.useRef({x:0,y:0}),_=L.useRef({x:0,y:0}),w=L.useMemo(()=>{switch(t){case pA.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case pA.DraggableRect:return s}},[t,s,l]),k=L.useRef(null),C=L.useCallback(()=>{const D=k.current;if(!D)return;const T=v.current.x*_.current.x,I=v.current.y*_.current.y;D.scrollBy(T,I)},[]),E=L.useMemo(()=>a===sF.TreeOrder?[...c].reverse():c,[a,c]);L.useEffect(()=>{if(!r||!c.length||!w){x();return}for(const D of E){if((n==null?void 0:n(D))===!1)continue;const T=c.indexOf(D),I=u[T];if(!I)continue;const{direction:R,speed:P}=Xst(D,I,w,e,g);for(const j of["x","y"])f[j][R[j]]||(P[j]=0,R[j]=0);if(P.x>0||P.y>0){x(),k.current=D,m(C,o),v.current=P,_.current=R;return}}v.current={x:0,y:0},_.current={x:0,y:0},x()},[e,C,n,x,r,o,JSON.stringify(w),JSON.stringify(f),m,c,E,u,JSON.stringify(g)])}const urt={x:{[nl.Backward]:!1,[nl.Forward]:!1},y:{[nl.Backward]:!1,[nl.Forward]:!1}};function hrt(i){let{delta:e,disabled:t}=i;const n=aY(e);return kP(s=>{if(t||!n||!s)return urt;const r={x:Math.sign(e.x-n.x),y:Math.sign(e.y-n.y)};return{x:{[nl.Backward]:s.x[nl.Backward]||r.x===-1,[nl.Forward]:s.x[nl.Forward]||r.x===1},y:{[nl.Backward]:s.y[nl.Backward]||r.y===-1,[nl.Forward]:s.y[nl.Forward]||r.y===1}}},[t,e,n])}function grt(i,e){const t=e!=null?i.get(e):void 0,n=t?t.node.current:null;return kP(s=>{var r;return e==null?null:(r=n??s)!=null?r:null},[n,e])}function frt(i,e){return L.useMemo(()=>i.reduce((t,n)=>{const{sensor:s}=n,r=s.activators.map(o=>({eventName:o.eventName,handler:e(o.handler,n)}));return[...t,...r]},[]),[i,e])}var G2;(function(i){i[i.Always=0]="Always",i[i.BeforeDragging=1]="BeforeDragging",i[i.WhileDragging=2]="WhileDragging"})(G2||(G2={}));var uY;(function(i){i.Optimized="optimized"})(uY||(uY={}));const ame=new Map;function prt(i,e){let{dragging:t,dependencies:n,config:s}=e;const[r,o]=L.useState(null),{frequency:a,measure:l,strategy:c}=s,u=L.useRef(i),h=v(),g=$2(h),f=L.useCallback(function(_){_===void 0&&(_=[]),!g.current&&o(w=>w===null?_:w.concat(_.filter(k=>!w.includes(k))))},[g]),m=L.useRef(null),x=kP(_=>{if(h&&!t)return ame;if(!_||_===ame||u.current!==i||r!=null){const w=new Map;for(let k of i){if(!k)continue;if(r&&r.length>0&&!r.includes(k.id)&&k.rect.current){w.set(k.id,k.rect.current);continue}const C=k.node.current,E=C?new hre(l(C),C):null;k.rect.current=E,E&&w.set(k.id,E)}return w}return _},[i,r,t,h,l]);return L.useEffect(()=>{u.current=i},[i]),L.useEffect(()=>{h||f()},[t,h]),L.useEffect(()=>{r&&r.length>0&&o(null)},[JSON.stringify(r)]),L.useEffect(()=>{h||typeof a!="number"||m.current!==null||(m.current=setTimeout(()=>{f(),m.current=null},a))},[a,h,f,...n]),{droppableRects:x,measureDroppableContainers:f,measuringScheduled:r!=null};function v(){switch(c){case G2.Always:return!1;case G2.BeforeDragging:return t;default:return!t}}}function rDe(i,e){return kP(t=>i?t||(typeof e=="function"?e(i):i):null,[e,i])}function mrt(i,e){return rDe(i,e)}function brt(i){let{callback:e,disabled:t}=i;const n=dre(e),s=L.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:r}=window;return new r(n)},[n,t]);return L.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function r7(i){let{callback:e,disabled:t}=i;const n=dre(e),s=L.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:r}=window;return new r(n)},[t]);return L.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function xrt(i){return new hre(bD(i),i)}function lme(i,e,t){e===void 0&&(e=xrt);const[n,s]=L.useState(null);function r(){s(l=>{if(!i)return null;if(i.isConnected===!1){var c;return(c=l??t)!=null?c:null}const u=e(i);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const o=brt({callback(l){if(i)for(const c of l){const{type:u,target:h}=c;if(u==="childList"&&h instanceof HTMLElement&&h.contains(i)){r();break}}}}),a=r7({callback:r});return wp(()=>{r(),i?(a==null||a.observe(i),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),o==null||o.disconnect())},[i]),n}function vrt(i){const e=rDe(i);return XLe(i,e)}const cme=[];function _rt(i){const e=L.useRef(i),t=kP(n=>i?n&&n!==cme&&i&&e.current&&i.parentNode===e.current.parentNode?n:s7(i):cme,[i]);return L.useEffect(()=>{e.current=i},[i]),t}function yrt(i){const[e,t]=L.useState(null),n=L.useRef(i),s=L.useCallback(r=>{const o=XU(r.target);o&&t(a=>a?(a.set(o,cY(o)),new Map(a)):null)},[]);return L.useEffect(()=>{const r=n.current;if(i!==r){o(r);const a=i.map(l=>{const c=XU(l);return c?(c.addEventListener("scroll",s,{passive:!0}),[c,cY(c)]):null}).filter(l=>l!=null);t(a.length?new Map(a):null),n.current=i}return()=>{o(i),o(r)};function o(a){a.forEach(l=>{const c=XU(l);c==null||c.removeEventListener("scroll",s)})}},[s,i]),L.useMemo(()=>i.length?e?Array.from(e.values()).reduce((r,o)=>zN(r,o),Wg):iDe(i):Wg,[i,e])}function dme(i,e){e===void 0&&(e=[]);const t=L.useRef(null);return L.useEffect(()=>{t.current=null},e),L.useEffect(()=>{const n=i!==Wg;n&&!t.current&&(t.current=i),!n&&t.current&&(t.current=null)},[i]),t.current?q2(i,t.current):Wg}function wrt(i){L.useEffect(()=>{if(!i7)return;const e=i.map(t=>{let{sensor:n}=t;return n.setup==null?void 0:n.setup()});return()=>{for(const t of e)t==null||t()}},i.map(e=>{let{sensor:t}=e;return t}))}function Crt(i,e){return L.useMemo(()=>i.reduce((t,n)=>{let{eventName:s,handler:r}=n;return t[s]=o=>{r(o,e)},t},{}),[i,e])}function oDe(i){return L.useMemo(()=>i?Kst(i):null,[i])}const ume=[];function Srt(i,e){e===void 0&&(e=bD);const[t]=i,n=oDe(t?Xd(t):null),[s,r]=L.useState(ume);function o(){r(()=>i.length?i.map(l=>tDe(l)?n:new hre(e(l),l)):ume)}const a=r7({callback:o});return wp(()=>{a==null||a.disconnect(),o(),i.forEach(l=>a==null?void 0:a.observe(l))},[i]),s}function krt(i){if(!i)return null;if(i.children.length>1)return i;const e=i.children[0];return SP(e)?e:i}function Nrt(i){let{measure:e}=i;const[t,n]=L.useState(null),s=L.useCallback(c=>{for(const{target:u}of c)if(SP(u)){n(h=>{const g=e(u);return h?{...h,width:g.width,height:g.height}:g});break}},[e]),r=r7({callback:s}),o=L.useCallback(c=>{const u=krt(c);r==null||r.disconnect(),u&&(r==null||r.observe(u)),n(u?e(u):null)},[e,r]),[a,l]=nF(o);return L.useMemo(()=>({nodeRef:a,rect:t,setRef:l}),[t,a,l])}const Ert=[{sensor:pre,options:{}},{sensor:gre,options:{}}],Lrt={current:{}},G4={draggable:{measure:ime},droppable:{measure:ime,strategy:G2.WhileDragging,frequency:uY.Optimized},dragOverlay:{measure:bD}};class mA extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))==null?void 0:n.node.current)!=null?t:void 0}}const Drt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new mA,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:iF},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:G4,measureDroppableContainers:iF,windowRect:null,measuringScheduled:!1},Trt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:iF,draggableNodes:new Map,over:null,measureDroppableContainers:iF},o7=L.createContext(Trt),aDe=L.createContext(Drt);function Irt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new mA}}}function Art(i,e){switch(e.type){case Ia.DragStart:return{...i,draggable:{...i.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case Ia.DragMove:return i.draggable.active==null?i:{...i,draggable:{...i.draggable,translate:{x:e.coordinates.x-i.draggable.initialCoordinates.x,y:e.coordinates.y-i.draggable.initialCoordinates.y}}};case Ia.DragEnd:case Ia.DragCancel:return{...i,draggable:{...i.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ia.RegisterDroppable:{const{element:t}=e,{id:n}=t,s=new mA(i.droppable.containers);return s.set(n,t),{...i,droppable:{...i.droppable,containers:s}}}case Ia.SetDroppableDisabled:{const{id:t,key:n,disabled:s}=e,r=i.droppable.containers.get(t);if(!r||n!==r.key)return i;const o=new mA(i.droppable.containers);return o.set(t,{...r,disabled:s}),{...i,droppable:{...i.droppable,containers:o}}}case Ia.UnregisterDroppable:{const{id:t,key:n}=e,s=i.droppable.containers.get(t);if(!s||n!==s.key)return i;const r=new mA(i.droppable.containers);return r.delete(t),{...i,droppable:{...i.droppable,containers:r}}}default:return i}}function Rrt(i){let{disabled:e}=i;const{active:t,activatorEvent:n,draggableNodes:s}=L.useContext(o7),r=aY(n),o=aY(t==null?void 0:t.id);return L.useEffect(()=>{if(!e&&!n&&r&&o!=null){if(!ure(r)||document.activeElement===r.target)return;const a=s.get(o);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const h=kst(u);if(h){h.focus();break}}})}},[n,e,s,o,r]),null}function Mrt(i,e){let{transform:t,...n}=e;return i!=null&&i.length?i.reduce((s,r)=>r({transform:s,...n}),t):t}function Prt(i){return L.useMemo(()=>({draggable:{...G4.draggable,...i==null?void 0:i.draggable},droppable:{...G4.droppable,...i==null?void 0:i.droppable},dragOverlay:{...G4.dragOverlay,...i==null?void 0:i.dragOverlay}}),[i==null?void 0:i.draggable,i==null?void 0:i.droppable,i==null?void 0:i.dragOverlay])}function Ort(i){let{activeNode:e,measure:t,initialRect:n,config:s=!0}=i;const r=L.useRef(!1),{x:o,y:a}=typeof s=="boolean"?{x:s,y:s}:s;wp(()=>{if(!o&&!a||!e){r.current=!1;return}if(r.current||!n)return;const c=e==null?void 0:e.node.current;if(!c||c.isConnected===!1)return;const u=t(c),h=XLe(u,n);if(o||(h.x=0),a||(h.y=0),r.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const g=ZLe(c);g&&g.scrollBy({top:h.y,left:h.x})}},[e,o,a,n,t])}const lDe=L.createContext({...Wg,scaleX:1,scaleY:1});var uv;(function(i){i[i.Uninitialized=0]="Uninitialized",i[i.Initializing=1]="Initializing",i[i.Initialized=2]="Initialized"})(uv||(uv={}));const jrt=L.memo(function(e){var t,n,s,r;let{id:o,accessibility:a,autoScroll:l=!0,children:c,sensors:u=Ert,collisionDetection:h=Hst,measuring:g,modifiers:f,...m}=e;const x=L.useReducer(Art,void 0,Irt),[v,_]=x,[w,k]=Ist(),[C,E]=L.useState(uv.Uninitialized),D=C===uv.Initialized,{draggable:{active:T,nodes:I,translate:R},droppable:{containers:P}}=v,j=T!=null?I.get(T):null,B=L.useRef({initial:null,translated:null}),H=L.useMemo(()=>{var Cs;return T!=null?{id:T,data:(Cs=j==null?void 0:j.data)!=null?Cs:Lrt,rect:B}:null},[T,j]),$=L.useRef(null),[q,V]=L.useState(null),[X,ae]=L.useState(null),ne=$2(m,Object.values(m)),W=NP("DndDescribedBy",o),Y=L.useMemo(()=>P.getEnabled(),[P]),G=Prt(g),{droppableRects:U,measureDroppableContainers:ue,measuringScheduled:fe}=prt(Y,{dragging:D,dependencies:[R.x,R.y],config:G.droppable}),Le=grt(I,T),tt=L.useMemo(()=>X?lY(X):null,[X]),ge=nu(),he=mrt(Le,G.draggable.measure);Ort({activeNode:T!=null?I.get(T):null,config:ge.layoutShiftCompensation,initialRect:he,measure:G.draggable.measure});const We=lme(Le,G.draggable.measure,he),Ie=lme(Le?Le.parentElement:null),_t=L.useRef({activatorEvent:null,active:null,activeNode:Le,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:I,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ut=P.getNodeFor((t=_t.current.over)==null?void 0:t.id),Wt=Nrt({measure:G.dragOverlay.measure}),Re=(n=Wt.nodeRef.current)!=null?n:Le,Me=D?(s=Wt.rect)!=null?s:We:null,pt=!!(Wt.nodeRef.current&&Wt.rect),mt=vrt(pt?null:We),$t=oDe(Re?Xd(Re):null),Tn=_rt(D?ut??Le:null),Pi=Srt(Tn),Ti=Mrt(f,{transform:{x:R.x-mt.x,y:R.y-mt.y,scaleX:1,scaleY:1},activatorEvent:X,active:H,activeNodeRect:We,containerNodeRect:Ie,draggingNodeRect:Me,over:_t.current.over,overlayNodeRect:Wt.rect,scrollableAncestors:Tn,scrollableAncestorRects:Pi,windowRect:$t}),cs=tt?zN(tt,R):null,ds=yrt(Tn),zr=dme(ds),Ye=dme(ds,[We]),yt=zN(Ti,zr),sn=Me?zst(Me,Ti):null,In=H&&sn?h({active:H,collisionRect:sn,droppableRects:U,droppableContainers:Y,pointerCoordinates:cs}):null,On=QLe(In,"id"),[ws,ir]=L.useState(null),Nr=pt?Ti:zN(Ti,Ye),$i=Wst(Nr,(r=ws==null?void 0:ws.rect)!=null?r:null,We),Rs=L.useRef(null),mi=L.useCallback((Cs,Vs)=>{let{sensor:rn,options:Cn}=Vs;if($.current==null)return;const ai=I.get($.current);if(!ai)return;const li=Cs.nativeEvent,sr=new rn({active:$.current,activeNode:ai,event:li,options:Cn,context:_t,onAbort(Ni){if(!I.get(Ni))return;const{onDragAbort:zs}=ne.current,Ei={id:Ni};zs==null||zs(Ei),w({type:"onDragAbort",event:Ei})},onPending(Ni,Bo,zs,Ei){if(!I.get(Ni))return;const{onDragPending:Qr}=ne.current,_l={id:Ni,constraint:Bo,initialCoordinates:zs,offset:Ei};Qr==null||Qr(_l),w({type:"onDragPending",event:_l})},onStart(Ni){const Bo=$.current;if(Bo==null)return;const zs=I.get(Bo);if(!zs)return;const{onDragStart:Ei}=ne.current,lo={activatorEvent:li,active:{id:Bo,data:zs.data,rect:B}};Tg.unstable_batchedUpdates(()=>{Ei==null||Ei(lo),E(uv.Initializing),_({type:Ia.DragStart,initialCoordinates:Ni,active:Bo}),w({type:"onDragStart",event:lo}),V(Rs.current),ae(li)})},onMove(Ni){_({type:Ia.DragMove,coordinates:Ni})},onEnd:Ii(Ia.DragEnd),onCancel:Ii(Ia.DragCancel)});Rs.current=sr;function Ii(Ni){return async function(){const{active:zs,collisions:Ei,over:lo,scrollAdjustedTranslate:Qr}=_t.current;let _l=null;if(zs&&Qr){const{cancelDrop:$a}=ne.current;_l={activatorEvent:li,active:zs,collisions:Ei,delta:Qr,over:lo},Ni===Ia.DragEnd&&typeof $a=="function"&&await Promise.resolve($a(_l))&&(Ni=Ia.DragCancel)}$.current=null,Tg.unstable_batchedUpdates(()=>{_({type:Ni}),E(uv.Uninitialized),ir(null),V(null),ae(null),Rs.current=null;const $a=Ni===Ia.DragEnd?"onDragEnd":"onDragCancel";if(_l){const yl=ne.current[$a];yl==null||yl(_l),w({type:$a,event:_l})}})}}},[I]),ta=L.useCallback((Cs,Vs)=>(rn,Cn)=>{const ai=rn.nativeEvent,li=I.get(Cn);if($.current!==null||!li||ai.dndKit||ai.defaultPrevented)return;const sr={active:li};Cs(rn,Vs.options,sr)===!0&&(ai.dndKit={capturedBy:Vs.sensor},$.current=Cn,mi(rn,Vs))},[I,mi]),Er=frt(u,ta);wrt(u),wp(()=>{We&&C===uv.Initializing&&E(uv.Initialized)},[We,C]),L.useEffect(()=>{const{onDragMove:Cs}=ne.current,{active:Vs,activatorEvent:rn,collisions:Cn,over:ai}=_t.current;if(!Vs||!rn)return;const li={active:Vs,activatorEvent:rn,collisions:Cn,delta:{x:yt.x,y:yt.y},over:ai};Tg.unstable_batchedUpdates(()=>{Cs==null||Cs(li),w({type:"onDragMove",event:li})})},[yt.x,yt.y]),L.useEffect(()=>{const{active:Cs,activatorEvent:Vs,collisions:rn,droppableContainers:Cn,scrollAdjustedTranslate:ai}=_t.current;if(!Cs||$.current==null||!Vs||!ai)return;const{onDragOver:li}=ne.current,sr=Cn.get(On),Ii=sr&&sr.rect.current?{id:sr.id,rect:sr.rect.current,data:sr.data,disabled:sr.disabled}:null,Ni={active:Cs,activatorEvent:Vs,collisions:rn,delta:{x:ai.x,y:ai.y},over:Ii};Tg.unstable_batchedUpdates(()=>{ir(Ii),li==null||li(Ni),w({type:"onDragOver",event:Ni})})},[On]),wp(()=>{_t.current={activatorEvent:X,active:H,activeNode:Le,collisionRect:sn,collisions:In,droppableRects:U,draggableNodes:I,draggingNode:Re,draggingNodeRect:Me,droppableContainers:P,over:ws,scrollableAncestors:Tn,scrollAdjustedTranslate:yt},B.current={initial:Me,translated:sn}},[H,Le,In,sn,I,Re,Me,U,P,ws,Tn,yt]),drt({...ge,delta:R,draggingRect:sn,pointerCoordinates:cs,scrollableAncestors:Tn,scrollableAncestorRects:Pi});const fr=L.useMemo(()=>({active:H,activeNode:Le,activeNodeRect:We,activatorEvent:X,collisions:In,containerNodeRect:Ie,dragOverlay:Wt,draggableNodes:I,droppableContainers:P,droppableRects:U,over:ws,measureDroppableContainers:ue,scrollableAncestors:Tn,scrollableAncestorRects:Pi,measuringConfiguration:G,measuringScheduled:fe,windowRect:$t}),[H,Le,We,X,In,Ie,Wt,I,P,U,ws,ue,Tn,Pi,G,fe,$t]),vl=L.useMemo(()=>({activatorEvent:X,activators:Er,active:H,activeNodeRect:We,ariaDescribedById:{draggable:W},dispatch:_,draggableNodes:I,over:ws,measureDroppableContainers:ue}),[X,Er,H,We,_,W,I,ws,ue]);return gt.createElement(KLe.Provider,{value:k},gt.createElement(o7.Provider,{value:vl},gt.createElement(aDe.Provider,{value:fr},gt.createElement(lDe.Provider,{value:$i},c)),gt.createElement(Rrt,{disabled:(a==null?void 0:a.restoreFocus)===!1})),gt.createElement(Mst,{...a,hiddenTextDescribedById:W}));function nu(){const Cs=(q==null?void 0:q.autoScrollEnabled)===!1,Vs=typeof l=="object"?l.enabled===!1:l===!1,rn=D&&!Cs&&!Vs;return typeof l=="object"?{...l,enabled:rn}:{enabled:rn}}}),Frt=L.createContext(null),hme="button",Brt="Draggable";function Hrt(i){let{id:e,data:t,disabled:n=!1,attributes:s}=i;const r=NP(Brt),{activators:o,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:h,over:g}=L.useContext(o7),{role:f=hme,roleDescription:m="draggable",tabIndex:x=0}=s??{},v=(l==null?void 0:l.id)===e,_=L.useContext(v?lDe:Frt),[w,k]=nF(),[C,E]=nF(),D=Crt(o,e),T=$2(t);wp(()=>(h.set(e,{id:e,key:r,node:w,activatorNode:C,data:T}),()=>{const R=h.get(e);R&&R.key===r&&h.delete(e)}),[h,e]);const I=L.useMemo(()=>({role:f,tabIndex:x,"aria-disabled":n,"aria-pressed":v&&f===hme?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[n,f,x,v,m,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:I,isDragging:v,listeners:n?void 0:D,node:w,over:g,setNodeRef:k,setActivatorNodeRef:E,transform:_}}function Wrt(){return L.useContext(aDe)}const Vrt="Droppable",zrt={timeout:25};function Urt(i){let{data:e,disabled:t=!1,id:n,resizeObserverConfig:s}=i;const r=NP(Vrt),{active:o,dispatch:a,over:l,measureDroppableContainers:c}=L.useContext(o7),u=L.useRef({disabled:t}),h=L.useRef(!1),g=L.useRef(null),f=L.useRef(null),{disabled:m,updateMeasurementsFor:x,timeout:v}={...zrt,...s},_=$2(x??n),w=L.useCallback(()=>{if(!h.current){h.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),f.current=null},v)},[v]),k=r7({callback:w,disabled:m||!o}),C=L.useCallback((I,R)=>{k&&(R&&(k.unobserve(R),h.current=!1),I&&k.observe(I))},[k]),[E,D]=nF(C),T=$2(e);return L.useEffect(()=>{!k||!E.current||(k.disconnect(),h.current=!1,k.observe(E.current))},[E,k]),L.useEffect(()=>(a({type:Ia.RegisterDroppable,element:{id:n,key:r,disabled:t,node:E,rect:g,data:T}}),()=>a({type:Ia.UnregisterDroppable,key:r,id:n})),[n]),L.useEffect(()=>{t!==u.current.disabled&&(a({type:Ia.SetDroppableDisabled,id:n,key:r,disabled:t}),u.current.disabled=t)},[n,r,t,a]),{active:o,rect:g,isOver:(l==null?void 0:l.id)===n,node:E,over:l,setNodeRef:D}}function mre(i,e,t){const n=i.slice();return n.splice(t<0?n.length+t:t,0,n.splice(e,1)[0]),n}function $rt(i,e){return i.reduce((t,n,s)=>{const r=e.get(n);return r&&(t[s]=r),t},Array(i.length))}function Y5(i){return i!==null&&i>=0}function qrt(i,e){if(i===e)return!0;if(i.length!==e.length)return!1;for(let t=0;t{let{rects:e,activeIndex:t,overIndex:n,index:s}=i;const r=mre(e,n,t),o=e[s],a=r[s];return!a||!o?null:{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}},Q5={scaleX:1,scaleY:1},Grt=i=>{var e;let{activeIndex:t,activeNodeRect:n,index:s,rects:r,overIndex:o}=i;const a=(e=r[t])!=null?e:n;if(!a)return null;if(s===t){const c=r[o];return c?{x:0,y:tt&&s<=o?{x:0,y:-a.height-l,...Q5}:s=o?{x:0,y:a.height+l,...Q5}:{x:0,y:0,...Q5}};function Yrt(i,e,t){const n=i[e],s=i[e-1],r=i[e+1];return n?tn.map(D=>typeof D=="object"&&"id"in D?D.id:D),[n]),m=o!=null,x=o?f.indexOf(o.id):-1,v=c?f.indexOf(c.id):-1,_=L.useRef(f),w=!qrt(f,_.current),k=v!==-1&&x===-1||w,C=Krt(r);wp(()=>{w&&m&&u(f)},[w,f,m,u]),L.useEffect(()=>{_.current=f},[f]);const E=L.useMemo(()=>({activeIndex:x,containerId:h,disabled:C,disableTransforms:k,items:f,overIndex:v,useDragOverlay:g,sortedRects:$rt(f,l),strategy:s}),[x,h,C.draggable,C.droppable,k,f,v,l,g,s]);return gt.createElement(uDe.Provider,{value:E},e)}const Xrt=i=>{let{id:e,items:t,activeIndex:n,overIndex:s}=i;return mre(t,n,s).indexOf(e)},Zrt=i=>{let{containerId:e,isSorting:t,wasDragging:n,index:s,items:r,newIndex:o,previousItems:a,previousContainerId:l,transition:c}=i;return!c||!n||a!==r&&s===o?!1:t?!0:o!==s&&e===l},Jrt={duration:200,easing:"ease"},hDe="transform",eot=K2.Transition.toString({property:hDe,duration:0,easing:"linear"}),tot={roleDescription:"sortable"};function not(i){let{disabled:e,index:t,node:n,rect:s}=i;const[r,o]=L.useState(null),a=L.useRef(t);return wp(()=>{if(!e&&t!==a.current&&n.current){const l=s.current;if(l){const c=bD(n.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&o(u)}}t!==a.current&&(a.current=t)},[e,t,n,s]),L.useEffect(()=>{r&&o(null)},[r]),r}function iot(i){let{animateLayoutChanges:e=Zrt,attributes:t,disabled:n,data:s,getNewIndex:r=Xrt,id:o,strategy:a,resizeObserverConfig:l,transition:c=Jrt}=i;const{items:u,containerId:h,activeIndex:g,disabled:f,disableTransforms:m,sortedRects:x,overIndex:v,useDragOverlay:_,strategy:w}=L.useContext(uDe),k=sot(n,f),C=u.indexOf(o),E=L.useMemo(()=>({sortable:{containerId:h,index:C,items:u},...s}),[h,s,C,u]),D=L.useMemo(()=>u.slice(u.indexOf(o)),[u,o]),{rect:T,node:I,isOver:R,setNodeRef:P}=Urt({id:o,data:E,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...l}}),{active:j,activatorEvent:B,activeNodeRect:H,attributes:$,setNodeRef:q,listeners:V,isDragging:X,over:ae,setActivatorNodeRef:ne,transform:W}=Hrt({id:o,data:E,attributes:{...tot,...t},disabled:k.draggable}),Y=yst(P,q),G=!!j,U=G&&!m&&Y5(g)&&Y5(v),ue=!_&&X,fe=ue&&U?W:null,tt=U?fe??(a??w)({rects:x,activeNodeRect:H,activeIndex:g,overIndex:v,index:C}):null,ge=Y5(g)&&Y5(v)?r({id:o,items:u,activeIndex:g,overIndex:v}):C,he=j==null?void 0:j.id,We=L.useRef({activeId:he,items:u,newIndex:ge,containerId:h}),Ie=u!==We.current.items,_t=e({active:j,containerId:h,isDragging:X,isSorting:G,id:o,index:C,items:u,newIndex:We.current.newIndex,previousItems:We.current.items,previousContainerId:We.current.containerId,transition:c,wasDragging:We.current.activeId!=null}),ut=not({disabled:!_t,index:C,node:I,rect:T});return L.useEffect(()=>{G&&We.current.newIndex!==ge&&(We.current.newIndex=ge),h!==We.current.containerId&&(We.current.containerId=h),u!==We.current.items&&(We.current.items=u)},[G,ge,h,u]),L.useEffect(()=>{if(he===We.current.activeId)return;if(he!=null&&We.current.activeId==null){We.current.activeId=he;return}const Re=setTimeout(()=>{We.current.activeId=he},50);return()=>clearTimeout(Re)},[he]),{active:j,activeIndex:g,attributes:$,data:E,rect:T,index:C,newIndex:ge,items:u,isOver:R,isSorting:G,isDragging:X,listeners:V,node:I,overIndex:v,over:ae,setNodeRef:Y,setActivatorNodeRef:ne,setDroppableNodeRef:P,setDraggableNodeRef:q,transform:ut??tt,transition:Wt()};function Wt(){if(ut||Ie&&We.current.newIndex===C)return eot;if(!(ue&&!ure(B)||!c)&&(G||_t))return K2.Transition.toString({...c,property:hDe})}}function sot(i,e){var t,n;return typeof i=="boolean"?{draggable:i,droppable:!1}:{draggable:(t=i==null?void 0:i.draggable)!=null?t:e.draggable,droppable:(n=i==null?void 0:i.droppable)!=null?n:e.droppable}}function rF(i){if(!i)return!1;const e=i.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const rot=[is.Down,is.Right,is.Up,is.Left],oot=(i,e)=>{let{context:{active:t,collisionRect:n,droppableRects:s,droppableContainers:r,over:o,scrollableAncestors:a}}=e;if(rot.includes(i.code)){if(i.preventDefault(),!t||!n)return;const l=[];r.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const g=s.get(h.id);if(g)switch(i.code){case is.Down:n.topg.top&&l.push(h);break;case is.Left:n.left>g.left&&l.push(h);break;case is.Right:n.left1&&(u=c[1].id),u!=null){const h=r.get(t.id),g=r.get(u),f=g?s.get(g.id):null,m=g==null?void 0:g.node.current;if(m&&f&&h&&g){const v=s7(m).some((D,T)=>a[T]!==D),_=gDe(h,g),w=aot(h,g),k=v||!_?{x:0,y:0}:{x:w?n.width-f.width:0,y:w?n.height-f.height:0},C={x:f.left,y:f.top};return k.x&&k.y?C:q2(C,k)}}}};function gDe(i,e){return!rF(i)||!rF(e)?!1:i.data.current.sortable.containerId===e.data.current.sortable.containerId}function aot(i,e){return!rF(i)||!rF(e)||!gDe(i,e)?!1:i.data.current.sortable.indexpme(e.type)-pme(t.type))}function hot(i){try{const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,n=new URL(e,"http://dummy").pathname.split("/").filter(Boolean);if(n.length>=3){const s={rulestore:"rules",apicallstore:"apicalls",llmstore:"llm",outputstore:"output",dictionarystore:"dictionary",propertysetterstore:"propertysetter",mcpcallsstore:"mcpcalls",ragstore:"rag",snippetstore:"snippets",parserstore:"parser"},r=n[0],o=n[2];if(r&&o)return{slug:s[r]??r,id:o}}}catch{}return null}function got({items:i,onChange:e,onRemove:t,disabled:n=!1,workflowId:s,workflowVersion:r,agentId:o,agentVer:a,latestVersions:l,onUpdateVersion:c,onEditInline:u}){const{t:h}=ve(),g=Pst(eme(pre,{activationConstraint:{distance:5}}),eme(gre,{coordinateGetter:oot}));function f(m){const{active:x,over:v}=m;if(v&&x.id!==v.id){const _=i.findIndex(k=>k.id===x.id),w=i.findIndex(k=>k.id===v.id);_!==-1&&w!==-1&&e(mre(i,_,w))}}return i.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground","data-testid":"pipeline-empty",children:[d.jsx(sP,{className:"h-10 w-10 opacity-50"}),d.jsx("p",{className:"mt-3 text-sm",children:h("packageEditor.noTasks","No tasks in this workflow")}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground/70",children:h("packageEditor.addHint","Add tasks to build your processing pipeline")})]}):d.jsx(jrt,{sensors:g,collisionDetection:jst,onDragEnd:f,children:d.jsx(Qrt,{items:i.map(m=>m.id),strategy:Grt,children:d.jsx("div",{className:"divide-y divide-border","data-testid":"pipeline-list",role:"list","aria-label":h("packageEditor.pipeline","Pipeline"),children:i.map((m,x)=>d.jsx(fot,{item:m,position:x+1,total:i.length,onRemove:()=>t(m.index),disabled:n,workflowId:s,workflowVersion:r,agentId:o,agentVer:a,latestVersions:l,onUpdateVersion:c,onEditInline:u},m.id))})})})}function fot({item:i,position:e,total:t,onRemove:n,disabled:s,workflowId:r,workflowVersion:o,agentId:a,agentVer:l,latestVersions:c,onUpdateVersion:u,onEditInline:h}){var q;const{t:g}=ve(),{attributes:f,listeners:m,setNodeRef:x,transform:v,transition:_,isDragging:w}=iot({id:i.id,disabled:s}),k={transform:K2.Transform.toString(v),transition:_,opacity:w?.5:1,zIndex:w?50:void 0},C=i.extension,E=hL(C.type),D=hY(C.type),T=(q=C.config)==null?void 0:q.uri,I=T?hot(T):null;let R=!1,P=0,j=0;if(T&&I&&c){const V=T.match(/[?&]version=(\d+)/);P=V?parseInt(V[1],10):1,j=c[I.id]??P,R=j>P}function B(){if(!T||!u)return;const V=T.replace(/([?&]version=)\d+/,`$1${j}`);u(i.index,V)}const H=I?(()=>{let V=`/manage/resources/${I.slug}/${I.id}`;const X=new URLSearchParams;r&&o&&(X.set("wfId",r),X.set("wfVer",String(o))),a&&X.set("agentId",a),l&&X.set("agentVer",l);const ae=X.toString();return ae&&(V+=`?${ae}`),V})():null,$=C.type==="eddi://ai.labs.parser"&&!T&&h!=null;return d.jsxs("div",{ref:x,style:k,className:`group flex items-center gap-3 px-5 py-3 transition-colors ${w?"bg-primary/5 shadow-lg rounded-lg":R?"bg-amber-50/50 dark:bg-amber-900/10 hover:bg-amber-50 dark:hover:bg-amber-900/20":"hover:bg-secondary/50"}`,role:"listitem","data-testid":`pipeline-item-${i.index}`,children:[d.jsx("button",{...f,...m,className:"cursor-grab rounded-md p-1 text-muted-foreground hover:bg-secondary active:cursor-grabbing disabled:cursor-not-allowed disabled:opacity-50",tabIndex:0,"aria-label":g("packageEditor.reorder","Reorder task"),disabled:s,children:d.jsx(jHe,{className:"h-4 w-4"})}),d.jsx("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-bold text-primary",children:e}),d.jsx(E,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),H?d.jsxs(Kn,{to:H,className:"min-w-0 flex-1",children:[d.jsx("p",{className:"text-sm font-medium text-foreground group-hover:text-primary transition-colors",children:D}),d.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[d.jsx("span",{className:"text-xs text-muted-foreground truncate",children:I.id}),d.jsxs("span",{className:"inline-flex items-center rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:["v",P]})]})]}):d.jsx("div",{className:"min-w-0 flex-1",children:d.jsx("p",{className:"text-sm font-medium text-foreground",children:D})}),d.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[R&&d.jsxs("button",{onClick:B,disabled:s,className:"inline-flex items-center gap-1 rounded-md bg-amber-100 px-1.5 py-0.5 text-[10px] font-semibold text-amber-800 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50 transition-colors shrink-0",title:g("packageEditor.updateToLatest","Update to latest version"),"data-testid":`update-version-${i.index}`,children:[d.jsx(QSe,{className:"h-3 w-3"}),"v",j]}),H&&d.jsxs(Kn,{to:H,className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs font-medium text-primary hover:bg-primary/20 transition-colors",children:[d.jsx(Oo,{className:"h-3 w-3"}),g("common.edit","Edit")]}),$&&d.jsxs("button",{type:"button",onClick:()=>h==null?void 0:h(i.index),disabled:s,className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs font-medium text-primary hover:bg-primary/20 transition-colors disabled:opacity-50","data-testid":`configure-inline-${i.index}`,children:[d.jsx(ase,{className:"h-3 w-3"}),g("parserEditor.configure","Configure")]}),d.jsx("button",{onClick:n,disabled:s,className:"rounded-md p-1.5 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors disabled:opacity-50",title:g("common.delete"),"data-testid":`remove-ext-${i.index}`,children:d.jsx(yn,{className:"h-4 w-4"})})]}),e

`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class SPt extends S2e{_renderOne(e,t){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Zu((i,e)=>{const t=i.getColor(f2e);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||i.defines(fve)){const n=i.getColor(fve);n&&(e.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${n}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${n}; }`),Fg(i.type)&&(e.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}});class kPt extends N0{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let n=[],s=0;for(let l=0,c=t.length;l{if(l.options.zIndexc.options.zIndex)return 1;const u=l.options.className,h=c.options.className;return uh?1:z.compareRangesUsingStarts(l.range,c.range)});const r=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,a=[];for(let l=r;l<=o;l++){const c=l-r;a[c]=""}this._renderWholeLineDecorations(e,n,a),this._renderNormalDecorations(e,n,a),this._renderResult=a}_renderWholeLineDecorations(e,t,n){const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let o=0,a=t.length;o',u=Math.max(l.range.startLineNumber,s),h=Math.min(l.range.endLineNumber,r);for(let g=u;g<=h;g++){const f=g-s;n[f]+=c}}}_renderNormalDecorations(e,t,n){const s=e.visibleRange.startLineNumber;let r=null,o=!1,a=null,l=!1;for(let c=0,u=t.length;c';a[g]+=_}}}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class NPt extends Xl{constructor(e,t,n,s){super(e);const r=this._context.configuration.options,o=r.get(117),a=r.get(83),l=r.get(49),c=r.get(120),u=r.get(158),h={listenOnDomNode:n.domNode,className:"editor-scrollable "+TQ(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:o.scrollByPage,inertialScroll:u};this.scrollbar=this._register(new nW(t.domNode,h,this._context.viewLayout.getScrollable())),$g.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=Yn(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const g=(f,m,x)=>{const v={};{const _=f.scrollTop;_&&(v.scrollTop=this._context.viewLayout.getCurrentScrollTop()+_,f.scrollTop=0)}if(x){const _=f.scrollLeft;_&&(v.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+_,f.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(v,1)};this._register(de(n.domNode,"scroll",f=>g(n.domNode,!0,!0))),this._register(de(t.domNode,"scroll",f=>g(t.domNode,!0,!1))),this._register(de(s.domNode,"scroll",f=>g(s.domNode,!0,!1))),this._register(de(this.scrollbarDomNode.domNode,"scroll",f=>g(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(165);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(81).side==="right"?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(117)||e.hasChanged(83)||e.hasChanged(49)){const t=this._context.configuration.options,n=t.get(117),s=t.get(83),r=t.get(49),o=t.get(120),a={vertical:n.vertical,horizontal:n.horizontal,verticalScrollbarSize:n.verticalScrollbarSize,horizontalScrollbarSize:n.horizontalScrollbarSize,scrollByPage:n.scrollByPage,handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:s,fastScrollSensitivity:r,scrollPredominantAxis:o};this.scrollbar.updateOptions(a)}return e.hasChanged(165)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+TQ(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class IQ{constructor(e,t,n,s,r){this.startLineNumber=e,this.endLineNumber=t,this.className=n,this.tooltip=s,this._decorationToRenderBrand=void 0,this.zIndex=r??0}}class EPt{constructor(e,t,n){this.className=e,this.zIndex=t,this.tooltip=n}}class LPt{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class k2e extends N0{_render(e,t,n){const s=[];for(let a=e;a<=t;a++){const l=a-e;s[l]=new LPt}if(n.length===0)return s;n.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.classNames)continue;const c=Math.max(a,n),u=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new te(c,0)),h=this._context.viewModel.glyphLanes.getLanesAtLine(u.lineNumber).indexOf(r.preference.lane);t.push(new IPt(c,h,r.preference.zIndex,r))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((n,s)=>n.lineNumber===s.lineNumber?n.laneIndex===s.laneIndex?n.zIndex===s.zIndex?s.type===n.type?n.type===0&&s.type===0?n.className0;){const s=t.peek();if(!s)break;const r=t.takeWhile(a=>a.lineNumber===s.lineNumber&&a.laneIndex===s.laneIndex);if(!r||r.length===0)break;const o=r[0];if(o.type===0){const a=[];for(const l of r){if(l.zIndex!==o.zIndex||l.type!==o.type)break;(a.length===0||a[a.length-1]!==l.className)&&a.push(l.className)}n.push(o.accept(a.join(" ")))}else o.widget.renderInfo={lineNumber:o.lineNumber,laneIndex:o.laneIndex}}this._decorationGlyphsToRender=n}render(e){if(!this._glyphMargin){for(const n of Object.values(this._widgets))n.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const n of Object.values(this._widgets))if(!n.renderInfo)n.domNode.setDisplay("none");else{const s=e.viewportData.relativeVerticalOffset[n.renderInfo.lineNumber-e.viewportData.startLineNumber],r=this._glyphMarginLeft+n.renderInfo.laneIndex*this._lineHeight;n.domNode.setDisplay("block"),n.domNode.setTop(s),n.domNode.setLeft(r),n.domNode.setWidth(t),n.domNode.setHeight(this._lineHeight)}for(let n=0;nthis._decorationGlyphsToRender.length;){const n=this._managedDomNodes.pop();n==null||n.domNode.remove()}}}class TPt{constructor(e,t,n,s){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.className=s,this.type=0}accept(e){return new APt(this.lineNumber,this.laneIndex,e)}}class IPt{constructor(e,t,n,s){this.lineNumber=e,this.laneIndex=t,this.zIndex=n,this.widget=s,this.type=1}}class APt{constructor(e,t,n){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=n}}function NR(i,e,t=i.length-1){const n=RPt(i,e,t);if(n!==-1)return i[n]}function RPt(i,e,t=i.length-1){for(let n=t;n>=0;n--){const s=i[n];if(e(s,n))return n}return-1}function LL(i,e){const t=DL(i,e);return t===-1?void 0:i[t]}function DL(i,e,t=0,n=i.length){let s=t,r=n;for(;s0&&(t=s)}return t}function N2e(i,e){if(i.length===0)return;let t=i[0];for(let n=1;n=0&&(t=s)}return t}function E2e(i,e){return zoe(i,(t,n)=>-e(t,n))}function PPt(i,e){if(i.length===0)return-1;let t=0;for(let n=1;n0&&(t=n)}return t}function OPt(i,e){for(const t of i){const n=e(t);if(n!==void 0)return n}}class L2e extends se{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function rW(i,e){let t=0,n=0;const s=i.length;for(;ns)throw new Nt("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=!!(r&&r.offSide);let a=-2,l=-1,c=-2,u=-1;const h=T=>{if(a!==-1&&(a===-2||a>T-1)){a=-1,l=-1;for(let I=T-2;I>=0;I--){const R=this._computeIndentLevel(I);if(R>=0){a=I,l=R;break}}}if(c===-2){c=-1,u=-1;for(let I=T;I=0){c=I,u=R;break}}}};let g=-2,f=-1,m=-2,x=-1;const v=T=>{if(g===-2){g=-1,f=-1;for(let I=T-2;I>=0;I--){const R=this._computeIndentLevel(I);if(R>=0){g=I,f=R;break}}}if(m!==-1&&(m===-2||m=0){m=I,x=R;break}}}};let _=0,w=!0,k=0,C=!0,E=0,D=0;for(let T=0;w||C;T++){const I=e-T,R=e+T;T>1&&(I<1||I1&&(R>s||R>n)&&(C=!1),T>5e4&&(w=!1,C=!1);let P=-1;if(w&&I>=1){const B=this._computeIndentLevel(I-1);B>=0?(c=I-1,u=B,P=Math.ceil(B/this.textModel.getOptions().indentSize)):(h(I),P=this._getIndentLevelForWhitespaceLine(o,l,u))}let j=-1;if(C&&R<=s){const B=this._computeIndentLevel(R-1);B>=0?(g=R-1,f=B,j=Math.ceil(B/this.textModel.getOptions().indentSize)):(v(R),j=this._getIndentLevelForWhitespaceLine(o,f,x))}if(T===0){D=P;continue}if(T===1){if(R<=s&&j>=0&&D+1===j){w=!1,_=R,k=R,E=j;continue}if(I>=1&&P>=0&&P-1===D){C=!1,_=I,k=I,E=P;continue}if(_=e,k=e,E=D,E===0)return{startLineNumber:_,endLineNumber:k,indent:E}}w&&(P>=E?_=I:w=!1),C&&(j>=E?k=R:C=!1)}return{startLineNumber:_,endLineNumber:k,indent:E}}getLinesBracketGuides(e,t,n,s){var h;const r=[];for(let g=e;g<=t;g++)r.push([]);const o=!0,a=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new z(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let l;if(n&&a.length>0){const g=(e<=n.lineNumber&&n.lineNumber<=t?a:this.textModel.bracketPairs.getBracketPairsInRange(z.fromPositions(n)).toArray()).filter(f=>z.strictContainsPosition(f.range,n));l=(h=NR(g,f=>o))==null?void 0:h.range}const c=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,u=new D2e;for(const g of a){if(!g.closingBracketRange)continue;const f=l&&g.range.equalsRange(l);if(!f&&!s.includeInactive)continue;const m=u.getInlineClassName(g.nestingLevel,g.nestingLevelOfEqualBracketType,c)+(s.highlightActive&&f?" "+u.activeClassName:""),x=g.openingBracketRange.getStartPosition(),v=g.closingBracketRange.getStartPosition(),_=s.horizontalGuides===$1.Enabled||s.horizontalGuides===$1.EnabledForActive&&f;if(g.range.startLineNumber===g.range.endLineNumber){_&&r[g.range.startLineNumber-e].push(new v1(-1,g.openingBracketRange.getEndPosition().column,m,new kA(!1,v.column),-1,-1));continue}const w=this.getVisibleColumnFromPosition(v),k=this.getVisibleColumnFromPosition(g.openingBracketRange.getStartPosition()),C=Math.min(k,w,g.minVisibleColumnIndentation+1);let E=!1;dl(this.textModel.getLineContent(g.closingBracketRange.startLineNumber))=e&&k>C&&r[x.lineNumber-e].push(new v1(C,-1,m,new kA(!1,x.column),-1,-1)),v.lineNumber<=t&&w>C&&r[v.lineNumber-e].push(new v1(C,-1,m,new kA(!E,v.column),-1,-1)))}for(const g of r)g.sort((f,m)=>f.visibleColumn-m.visibleColumn);return r}getVisibleColumnFromPosition(e){return js.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");const s=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=!!(r&&r.offSide),a=new Array(t-e+1);let l=-2,c=-1,u=-2,h=-1;for(let g=e;g<=t;g++){const f=g-e,m=this._computeIndentLevel(g-1);if(m>=0){l=g-1,c=m,a[f]=Math.ceil(m/s.indentSize);continue}if(l===-2){l=-1,c=-1;for(let x=g-2;x>=0;x--){const v=this._computeIndentLevel(x);if(v>=0){l=x,c=v;break}}}if(u!==-1&&(u===-2||u=0){u=x,h=v;break}}}a[f]=this._getIndentLevelForWhitespaceLine(o,c,h)}return a}_getIndentLevelForWhitespaceLine(e,t,n){const s=this.textModel.getOptions();return t===-1||n===-1?0:ts||this._maxIndentLeft>0&&v>this._maxIndentLeft)break;const _=x.horizontalLine?x.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",w=x.horizontalLine?(((c=e.visibleRangeForPosition(new te(u,x.horizontalLine.endColumn)))==null?void 0:c.left)??v+this._spaceWidth)-v:this._spaceWidth;f+=`
`}a[h]=f}this._renderResult=a}getGuidesByLine(e,t,n){const s=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,n,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?$1.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?$1.EnabledForActive:$1.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,r=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let o=0,a=0,l=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&n){const h=this._context.viewModel.getActiveIndentGuide(n.lineNumber,e,t);o=h.startLineNumber,a=h.endLineNumber,l=h.indent}const{indentSize:c}=this._context.viewModel.model.getOptions(),u=[];for(let h=e;h<=t;h++){const g=new Array;u.push(g);const f=s?s[h-e]:[],m=new Kb(f),x=r?r[h-e]:0;for(let v=1;v<=x;v++){const _=(v-1)*c+1,w=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||f.length===0)&&o<=h&&h<=a&&v===l;g.push(...m.takeWhile(C=>C.visibleColumn<_)||[]);const k=m.peek();(!k||k.visibleColumn!==_||k.horizontalLine)&&g.push(new v1(_,-1,`core-guide-indent lvl-${(v-1)%30}`+(w?" indent-active":""),null,-1,-1))}g.push(...m.takeWhile(v=>!0)||[])}return u}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}function vk(i){if(!(i&&i.isTransparent()))return i}Zu((i,e)=>{const t=[{bracketColor:x2e,guideColor:uPt,guideColorActive:bPt},{bracketColor:v2e,guideColor:hPt,guideColorActive:xPt},{bracketColor:_2e,guideColor:gPt,guideColorActive:vPt},{bracketColor:y2e,guideColor:fPt,guideColorActive:_Pt},{bracketColor:w2e,guideColor:pPt,guideColorActive:yPt},{bracketColor:C2e,guideColor:mPt,guideColorActive:wPt}],n=new D2e,s=[{indentColor:YP,indentColorActive:QP},{indentColor:zMt,indentColorActive:GMt},{indentColor:UMt,indentColorActive:YMt},{indentColor:$Mt,indentColorActive:QMt},{indentColor:qMt,indentColorActive:XMt},{indentColor:KMt,indentColorActive:ZMt}],r=t.map(a=>{const l=i.getColor(a.bracketColor),c=i.getColor(a.guideColor),u=i.getColor(a.guideColorActive),h=vk(vk(c)??(l==null?void 0:l.transparent(.3))),g=vk(vk(u)??l);if(!(!h||!g))return{guideColor:h,guideColorActive:g}}).filter(Ao),o=s.map(a=>{const l=i.getColor(a.indentColor),c=i.getColor(a.indentColorActive),u=vk(l),h=vk(c);if(!(!u||!h))return{indentColor:u,indentColorActive:h}}).filter(Ao);if(r.length>0){for(let a=0;a<30;a++){const l=r[a%r.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${l.guideColor}; --guide-color-active: ${l.guideColorActive}; }`)}e.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),e.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),e.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),e.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),e.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),e.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(o.length>0){for(let a=0;a<30;a++){const l=o[a%o.length];e.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${l.indentColor}; --indent-color-active: ${l.indentColorActive}; }`)}e.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),e.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}});const ZB=class ZB extends N0{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new te(1,1),this._renderResult=null,this._activeModelLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(75);const t=e.get(76);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(109);const n=e.get(165);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let n=!1;return this._activeModelLineNumber!==this._lastCursorModelPosition.lineNumber&&(this._activeModelLineNumber=this._lastCursorModelPosition.lineNumber,n=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(n=!0),n}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new te(e,1));if(t.column!==1)return"";const n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderLineNumbers===2){const s=Math.abs(this._lastCursorModelPosition.lineNumber-n);return s===0?''+n+"":String(s)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===n||n%10===0)return String(n);const s=this._context.viewModel.getLineCount();return n===s?String(n):""}return String(n)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const t=xc?this._lineHeight%2===0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(c=>!!c.options.lineNumberClassName);r.sort((c,u)=>z.compareRangesUsingEnds(c.range,u.range));let o=0;const a=this._context.viewModel.getLineCount(),l=[];for(let c=n;c<=s;c++){const u=c-n,h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new te(c,1)).lineNumber;let g=this._getLineRenderLineNumber(c),f="";for(;o${g}`}this._renderResult=l}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};ZB.CLASS_NAME="line-numbers";let a6=ZB;Zu((i,e)=>{const t=i.getColor(HMt),n=i.getColor(ePt);n?e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):t&&e.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${t.transparent(.4)}; }`)});const JN="monaco-mouse-cursor-text";class Y${get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class l6{constructor(e,t){this.themeType=t;const n=e.options,s=n.get(59);this.renderWhitespace=n.get(113),this.experimentalWhitespaceRendering=n.get(47),this.renderControlCharacters=n.get(108),this.spaceWidth=s.spaceWidth,this.middotWidth=s.middotWidth,this.wsmiddotWidth=s.wsmiddotWidth,this.useMonospaceOptimizations=s.isMonospace&&!n.get(40),this.canUseHalfwidthRightwardsArrow=s.canUseHalfwidthRightwardsArrow,this.lineHeight=n.get(75),this.stopRenderingLineAfter=n.get(133),this.fontLigatures=n.get(60),this.verticalScrollbarSize=n.get(117).verticalScrollbarSize,this.useGpu=n.get(46)==="on"}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.experimentalWhitespaceRendering===e.experimentalWhitespaceRendering&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.useGpu===e.useGpu}}class BPt{constructor(){this._currentVisibleRange=new z(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class HPt{constructor(e,t,n,s,r,o,a){this.minimalReveal=e,this.lineNumber=t,this.startColumn=n,this.endColumn=s,this.startScrollTop=r,this.stopScrollTop=o,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class WPt{constructor(e,t,n,s,r){this.minimalReveal=e,this.selections=t,this.startScrollTop=n,this.stopScrollTop=s,this.scrollType=r,this.type="selections";let o=t[0].startLineNumber,a=t[0].endLineNumber;for(let l=1,c=t.length;lnew sb(t,this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,$g.write(this.domNode,8),this.domNode.setClassName(`view-lines ${JN}`),Po(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new pi(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new pi(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new BPt,this._horizontalRevealRequest=null,this._stickyScrollEnabled=r.get(131).enabled,this._maxNumberStickyLines=r.get(131).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(166)&&(this._maxLineWidth=0);const t=this._context.configuration.options,n=t.get(59),s=t.get(166);return this._lineHeight=t.get(75),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._isViewportWrapping=s.isViewportWrapping,this._revealHorizontalRightPadding=t.get(114),this._cursorSurroundingLines=t.get(35),this._cursorSurroundingLinesStyle=t.get(36),this._canUseLayerHinting=!t.get(39),this._stickyScrollEnabled=t.get(131).enabled,this._maxNumberStickyLines=t.get(131).maxLineCount,Po(this.domNode,n),this._onOptionsMaybeChanged(),e.hasChanged(165)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new l6(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let r=n;r<=s;r++)this._visibleLines.getVisibleLine(r).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let s=!1;for(let r=t;r<=n;r++)s=this._visibleLines.getVisibleLine(r).onSelectionChanged()||s;return s}onDecorationsChanged(e){{const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=t;s<=n;s++)this._visibleLines.getVisibleLine(s).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e,this._viewLineOptions.useGpu);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(t===-1)return!1;let n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new HPt(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new WPt(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const r=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(n,r),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const n=this._getViewLineDomNode(e);if(n===null)return null;const s=this._getLineNumberFor(n);if(s===-1||s<1||s>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(s)===1)return new te(s,1);const r=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(so)return null;let a=this._visibleLines.getVisibleLine(s).getColumnOfNodeOffset(e,t);const l=this._context.viewModel.getLineMinColumn(s);return an)return-1;const s=new Y$(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getWidth(s);return this._updateLineWidthsSlowIfDomDidLayout(s),r}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const n=e.endLineNumber,s=z.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!s)return null;const r=[];let o=0;const a=new Y$(this.domNode.domNode,this._textRangeRestingSpot);let l=0;t&&(l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new te(s.startLineNumber,1)).lineNumber);const c=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let h=s.startLineNumber;h<=s.endLineNumber;h++){if(hu)continue;const g=h===s.startLineNumber?s.startColumn:1,f=h!==n,m=f?this._context.viewModel.getLineMaxColumn(h):s.endColumn,v=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(h,g,m,a);if(v){if(t&&hthis._visibleLines.getEndLineNumber())return null;const s=new Y$(this.domNode.domNode,this._textRangeRestingSpot),r=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,n,s);return this._updateLineWidthsSlowIfDomDidLayout(s),r}_lineIsRenderedRTL(e){return ethis._visibleLines.getEndLineNumber()?!1:this._visibleLines.getVisibleLine(e).isRenderedRTL()}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new XAe(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();let s=1,r=!0;for(let o=t;o<=n;o++){const a=this._visibleLines.getVisibleLine(o);if(e&&!a.getWidthIsFast()){r=!1;continue}s=Math.max(s,a.getWidth(null))}return r&&t===1&&n===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(s),r}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let r=n;r<=s;r++){const o=this._visibleLines.getVisibleLine(r);if(o.needsMonospaceFontCheck()){const a=o.getWidth(null);a>t&&(t=a,e=r)}}if(e!==-1&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let r=n;r<=s;r++)this._visibleLines.getVisibleLine(r).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const n=this._horizontalRevealRequest;if(e.startLineNumber<=n.minLineNumber&&n.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const s=this._computeScrollLeftToReveal(n);s&&(!this._isViewportWrapping&&!s.hasRTL&&this._ensureMaxLineWidth(s.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:s.scrollLeft},n.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),xc&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const n=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let r=n;r<=s;r++)if(this._visibleLines.getVisibleLine(r).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let _=r[0].startLineNumber,w=r[0].endLineNumber;for(let k=1,C=r.length;kl){if(!u)return-1;v=h}else if(o===5||o===6)if(o===6&&a<=h&&g<=c)v=a;else{const _=Math.max(5*this._lineHeight,l*.2),w=h-_,k=g-l;v=Math.max(k,w)}else if(o===1||o===2)if(o===2&&a<=h&&g<=c)v=a;else{const _=(h+g)/2;v=Math.max(0,_-l/2)}else v=this._computeMinimumScrolling(a,c,h,g,o===3,o===4);return v}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),n=this._context.configuration.options.get(165),s=t.left,r=s+t.width-n.verticalScrollbarWidth;let o=1073741824,a=0,l=!1;if(e.type==="range"){l=this._lineIsRenderedRTL(e.lineNumber);const u=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!u)return null;for(const h of u.ranges)o=Math.min(o,Math.round(h.left)),a=Math.max(a,Math.round(h.left+h.width))}else for(const u of e.selections){if(u.startLineNumber!==u.endLineNumber)return null;const h=this._visibleRangesForLineRange(u.startLineNumber,u.startColumn,u.endColumn);if(l||(l=this._lineIsRenderedRTL(u.startLineNumber)),!h)return null;for(const g of h.ranges)o=Math.min(o,Math.round(g.left)),a=Math.max(a,Math.round(g.left+g.width))}return e.minimalReveal||(o=Math.max(0,o-JB.HORIZONTAL_EXTRA_PX),a+=this._revealHorizontalRightPadding),e.type==="selections"&&a-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(s,r,o,a),maxHorizontalOffset:a,hasRTL:l}}_computeMinimumScrolling(e,t,n,s,r,o){e=e|0,t=t|0,n=n|0,s=s|0,r=!!r,o=!!o;const a=t-e;if(s-nt)return Math.max(0,s-a)}else return n;return e}};JB.HORIZONTAL_EXTRA_PX=30;let AQ=JB;class VPt extends k2e{constructor(e){super(),this._context=e;const n=this._context.configuration.options.get(165);this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const n=this._context.configuration.options.get(165);return this._decorationsLeft=n.decorationsLeft,this._decorationsWidth=n.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),n=[];let s=0;for(let r=0,o=t.length;r',l=[];for(let c=t;c<=n;c++){const u=c-t,h=s[u].getDecorations();let g="";for(const f of h){let m='
';r[a]=c}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}const fv=class fv{constructor(e,t,n,s){this._rgba8Brand=void 0,this.r=fv._clamp(e),this.g=fv._clamp(t),this.b=fv._clamp(n),this.a=fv._clamp(s)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:e|0}};fv.Empty=new fv(0,0,0,0);let Db=fv,UPt=class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new ie,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),dt(()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var s;(s=this._factories.get(e))==null||s.dispose();const n=new $Pt(this,e,t);return this._factories.set(e,n),dt(()=>{const r=this._factories.get(e);!r||r!==n||(this._factories.delete(e),r.dispose())})}async getOrCreate(e){const t=this.get(e);if(t)return t;const n=this._factories.get(e);return!n||n.isResolved?null:(await n.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const n=this._factories.get(e);return!!(!n||n.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};class $Pt extends se{get isResolved(){return this._isResolved}constructor(e,t,n){super(),this._registry=e,this._languageId=t,this._factory=n,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}let LR=class{constructor(e,t,n){this.offset=e,this.type=t,this.language=n,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};class Uoe{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class oW{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}var jc;(function(i){i[i.Increase=0]="Increase",i[i.Decrease=1]="Decrease"})(jc||(jc={}));var TL;(function(i){const e=new Map;e.set(0,Ee.symbolMethod),e.set(1,Ee.symbolFunction),e.set(2,Ee.symbolConstructor),e.set(3,Ee.symbolField),e.set(4,Ee.symbolVariable),e.set(5,Ee.symbolClass),e.set(6,Ee.symbolStruct),e.set(7,Ee.symbolInterface),e.set(8,Ee.symbolModule),e.set(9,Ee.symbolProperty),e.set(10,Ee.symbolEvent),e.set(11,Ee.symbolOperator),e.set(12,Ee.symbolUnit),e.set(13,Ee.symbolValue),e.set(15,Ee.symbolEnum),e.set(14,Ee.symbolConstant),e.set(15,Ee.symbolEnum),e.set(16,Ee.symbolEnumMember),e.set(17,Ee.symbolKeyword),e.set(28,Ee.symbolSnippet),e.set(18,Ee.symbolText),e.set(19,Ee.symbolColor),e.set(20,Ee.symbolFile),e.set(21,Ee.symbolReference),e.set(22,Ee.symbolCustomColor),e.set(23,Ee.symbolFolder),e.set(24,Ee.symbolTypeParameter),e.set(25,Ee.account),e.set(26,Ee.issues),e.set(27,Ee.tools);function t(o){let a=e.get(o);return a||(console.info("No codicon found for CompletionItemKind "+o),a=Ee.symbolProperty),a}i.toIcon=t;function n(o){switch(o){case 0:return S(728,"Method");case 1:return S(729,"Function");case 2:return S(730,"Constructor");case 3:return S(731,"Field");case 4:return S(732,"Variable");case 5:return S(733,"Class");case 6:return S(734,"Struct");case 7:return S(735,"Interface");case 8:return S(736,"Module");case 9:return S(737,"Property");case 10:return S(738,"Event");case 11:return S(739,"Operator");case 12:return S(740,"Unit");case 13:return S(741,"Value");case 14:return S(742,"Constant");case 15:return S(743,"Enum");case 16:return S(744,"Enum Member");case 17:return S(745,"Keyword");case 18:return S(746,"Text");case 19:return S(747,"Color");case 20:return S(748,"File");case 21:return S(749,"Reference");case 22:return S(750,"Custom Color");case 23:return S(751,"Folder");case 24:return S(752,"Type Parameter");case 25:return S(753,"User");case 26:return S(754,"Issue");case 27:return S(755,"Tool");case 28:return S(756,"Snippet");default:return""}}i.toLabel=n;const s=new Map;s.set("method",0),s.set("function",1),s.set("constructor",2),s.set("field",3),s.set("variable",4),s.set("class",5),s.set("struct",6),s.set("interface",7),s.set("module",8),s.set("property",9),s.set("event",10),s.set("operator",11),s.set("unit",12),s.set("value",13),s.set("constant",14),s.set("enum",15),s.set("enum-member",16),s.set("enumMember",16),s.set("keyword",17),s.set("snippet",28),s.set("text",18),s.set("color",19),s.set("file",20),s.set("reference",21),s.set("customcolor",22),s.set("folder",23),s.set("type-parameter",24),s.set("typeParameter",24),s.set("account",25),s.set("issue",26),s.set("tool",27);function r(o,a){let l=s.get(o);return typeof l>"u"&&!a&&(l=9),l}i.fromString=r})(TL||(TL={}));var lc;(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(lc||(lc={}));class T2e{constructor(e,t,n,s){this.range=e,this.text=t,this.completionKind=n,this.isSnippetText=s}equals(e){return z.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}var RQ;(function(i){i[i.Code=1]="Code",i[i.Label=2]="Label"})(RQ||(RQ={}));class aW{static fromExtensionId(e){return new aW(e,void 0,void 0)}constructor(e,t,n){this.extensionId=e,this.extensionVersion=t,this.providerId=n}toString(){let e="";return this.extensionId&&(e+=this.extensionId),this.extensionVersion&&(e+=`@${this.extensionVersion}`),this.providerId&&(e+=`:${this.providerId}`),e.length===0&&(e="unknown"),e}toStringWithoutVersion(){let e="";return this.extensionId&&(e+=this.extensionId),this.providerId&&(e+=`:${this.providerId}`),e}}var xC;(function(i){i[i.Accepted=0]="Accepted",i[i.Rejected=1]="Rejected",i[i.Ignored=2]="Ignored"})(xC||(xC={}));var DR;(function(i){i[i.Automatic=0]="Automatic",i[i.PasteAs=1]="PasteAs"})(DR||(DR={}));var fp;(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(fp||(fp={}));var IL;(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(IL||(IL={}));function qPt(i){return!!i&&kt.isUri(i.uri)&&z.isIRange(i.range)&&(z.isIRange(i.originSelectionRange)||z.isIRange(i.targetSelectionRange))}const KPt={17:S(757,"array"),16:S(758,"boolean"),4:S(759,"class"),13:S(760,"constant"),8:S(761,"constructor"),9:S(762,"enumeration"),21:S(763,"enumeration member"),23:S(764,"event"),7:S(765,"field"),0:S(766,"file"),11:S(767,"function"),10:S(768,"interface"),19:S(769,"key"),5:S(770,"method"),1:S(771,"module"),2:S(772,"namespace"),20:S(773,"null"),15:S(774,"number"),18:S(775,"object"),24:S(776,"operator"),3:S(777,"package"),6:S(778,"property"),14:S(779,"string"),22:S(780,"struct"),25:S(781,"type parameter"),12:S(782,"variable")};function GPt(i,e){return S(783,"{0} ({1})",i,KPt[e])}var d6;(function(i){const e=new Map;e.set(0,Ee.symbolFile),e.set(1,Ee.symbolModule),e.set(2,Ee.symbolNamespace),e.set(3,Ee.symbolPackage),e.set(4,Ee.symbolClass),e.set(5,Ee.symbolMethod),e.set(6,Ee.symbolProperty),e.set(7,Ee.symbolField),e.set(8,Ee.symbolConstructor),e.set(9,Ee.symbolEnum),e.set(10,Ee.symbolInterface),e.set(11,Ee.symbolFunction),e.set(12,Ee.symbolVariable),e.set(13,Ee.symbolConstant),e.set(14,Ee.symbolString),e.set(15,Ee.symbolNumber),e.set(16,Ee.symbolBoolean),e.set(17,Ee.symbolArray),e.set(18,Ee.symbolObject),e.set(19,Ee.symbolKey),e.set(20,Ee.symbolNull),e.set(21,Ee.symbolEnumMember),e.set(22,Ee.symbolStruct),e.set(23,Ee.symbolEvent),e.set(24,Ee.symbolOperator),e.set(25,Ee.symbolTypeParameter);function t(r){let o=e.get(r);return o||(console.info("No codicon found for SymbolKind "+r),o=Ee.symbolProperty),o}i.toIcon=t;const n=new Map;n.set(0,20),n.set(1,8),n.set(2,8),n.set(3,8),n.set(4,5),n.set(5,0),n.set(6,9),n.set(7,3),n.set(8,2),n.set(9,15),n.set(10,7),n.set(11,1),n.set(12,4),n.set(13,14),n.set(14,18),n.set(15,13),n.set(16,13),n.set(17,13),n.set(18,13),n.set(19,17),n.set(20,13),n.set(21,16),n.set(22,6),n.set(23,10),n.set(24,11),n.set(25,24);function s(r){let o=n.get(r);return o===void 0&&(console.info("No completion kind found for SymbolKind "+r),o=20),o}i.toCompletionKind=s})(d6||(d6={}));var Pc;let lS=(Pc=class{static fromValue(e){switch(e){case"comment":return Pc.Comment;case"imports":return Pc.Imports;case"region":return Pc.Region}return new Pc(e)}constructor(e){this.value=e}},Pc.Comment=new Pc("comment"),Pc.Imports=new Pc("imports"),Pc.Region=new Pc("region"),Pc);var MQ;(function(i){i[i.AIGenerated=1]="AIGenerated"})(MQ||(MQ={}));var TR;(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(TR||(TR={}));var PQ;(function(i){function e(t){return!t||typeof t!="object"?!1:typeof t.id=="string"&&typeof t.title=="string"}i.is=e})(PQ||(PQ={}));var u6;(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})(u6||(u6={}));class YPt{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(e=>{e&&e.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const Gs=new UPt,e9=class e9 extends se{static getInstance(){return this._INSTANCE||(this._INSTANCE=new e9),this._INSTANCE}constructor(){super(),this._onDidChange=new ie,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Gs.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const e=Gs.getColorMap();if(!e){this._colors=[Db.Empty],this._backgroundIsLight=!0;return}this._colors=[Db.Empty];for(let n=1;n=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}};e9._INSTANCE=null;let h6=e9;const QPt=(()=>{const i=[];for(let e=32;e<=126;e++)i.push(e);return i.push(65533),i})(),XPt=(i,e)=>(i-=32,i<0||i>96?e<=2?(i+96)%96:95:i);class IR{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=IR.soften(e,12/15),this.charDataLight=IR.soften(e,50/60)}static soften(e,t){const n=new Uint8ClampedArray(e.length);for(let s=0,r=e.length;se.width||n+m>e.height){console.warn("bad render request outside image data");return}const x=u?this.charDataLight:this.charDataNormal,v=XPt(s,c),_=e.width*4,w=a.r,k=a.g,C=a.b,E=r.r-w,D=r.g-k,T=r.b-C,I=Math.max(o,l),R=e.data;let P=v*g*f,j=n*_+t*4;for(let B=0;Be.width||n+h>e.height){console.warn("bad render request outside image data");return}const g=e.width*4,f=.5*(r/255),m=o.r,x=o.g,v=o.b,_=s.r-m,w=s.g-x,k=s.b-v,C=m+_*f,E=x+w*f,D=v+k*f,T=Math.max(r,a),I=e.data;let R=n*g+t*4;for(let P=0;P{const e=new Uint8ClampedArray(i.length/2);for(let t=0;t>1]=pve[i[t]]<<4|pve[i[t+1]]&15;return e},bve={1:uC(()=>mve("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:uC(()=>mve("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class NA{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let n;return bve[e]?n=new IR(bve[e](),e):n=NA.createFromSampleData(NA.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=n,n}static createSampleData(e){const t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font=`bold 16px ${e}`,n.textBaseline="middle";let s=0;for(const r of QPt)n.fillText(String.fromCharCode(r),s,16/2),s+=10;return n.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const s=NA._downsample(e,t);return new IR(s,t)}static _downsampleChar(e,t,n,s,r){const o=1*r,a=2*r;let l=s,c=0;for(let u=0;u0){const c=255/l;for(let u=0;ut===1)}function Koe(i,e){return A2e(i,e.range,t=>t===2)}function A2e(i,e,t){for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const s=i.tokenization.getLineTokens(n),r=n===e.startLineNumber,o=n===e.endLineNumber;let a=r?s.findTokenIndexAtOffset(e.startColumn-1):0;for(;ae.endColumn-1);){if(!t(s.getStandardTokenType(a)))return!1;a++}}return!0}const JPt=140,eOt=2;class eE{constructor(e,t,n){const s=e.options,r=s.get(163),o=s.get(165),a=o.minimap,l=s.get(59),c=s.get(81);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=s.get(119),this.paddingTop=s.get(96).top,this.paddingBottom=s.get(96).bottom,this.showSlider=c.showSlider,this.autohide=c.autohide,this.pixelRatio=r,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=s.get(75),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=o.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.sectionHeaderFontFamily=ZPt,this.sectionHeaderFontSize=c.sectionHeaderFontSize*r,this.sectionHeaderLetterSpacing=c.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=eE._getSectionHeaderColor(t,n.getColor(1)),this.charRenderer=uC(()=>NA.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=n.getColor(2),this.backgroundColor=eE._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=eE._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const n=e.getColor(C2t);return n?new Db(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(S2t);return t?Db._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){const n=e.getColor(zp);return n?new Db(n.rgba.r,n.rgba.g,n.rgba.b,Math.round(255*n.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class EA{constructor(e,t,n,s,r,o,a,l,c){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=n,this._computedSliderRatio=s,this.sliderTop=r,this.sliderHeight=o,this.topPaddingLineCount=a,this.startLineNumber=l,this.endLineNumber=c}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),n=Math.min(this.endLineNumber,e.endLineNumber);return t>n?null:[t,n]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,n,s,r,o,a,l,c,u,h){const g=e.pixelRatio,f=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/f),x=e.lineHeight;if(e.minimapHeightIsEditorHeight){let D=l*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(D+=Math.max(0,r-e.lineHeight-e.paddingBottom));const T=Math.max(1,Math.floor(r*r/D)),I=Math.max(0,e.minimapHeight-T),R=I/(u-r),P=c*R,j=I>0,B=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),H=Math.floor(e.paddingTop/e.lineHeight);return new EA(c,u,j,R,P,T,H,1,Math.min(a,B))}let v;if(o&&n!==a){const D=n-t+1;v=Math.floor(D*f/g)}else{const D=r/x;v=Math.floor(D*f/g)}const _=Math.floor(e.paddingTop/x);let w=Math.floor(e.paddingBottom/x);if(e.scrollBeyondLastLine){const D=r/x;w=Math.max(w,D-1)}let k;if(w>0){const D=r/x;k=(_+a+w-D-1)*f/g}else k=Math.max(0,(_+a)*f/g-v);k=Math.min(e.minimapHeight-v,k);const C=k/(u-r),E=c*C;if(m>=_+a+w){const D=k>0;return new EA(c,u,D,C,E,v,_,1,a)}else{let D;t>1?D=t+_:D=Math.max(1,c/x);let T,I=Math.max(1,Math.floor(D-E*g/f));I<_?(T=_-I+1,I=1):(T=0,I=Math.max(1,I-_)),h&&h.scrollHeight===u&&(h.scrollTop>c&&(I=Math.min(I,h.startLineNumber),T=Math.max(T,h.topPaddingLineCount)),h.scrollTop=e.paddingTop?j=(t-I+T+P)*f/g:j=c/e.paddingTop*(T+P)*f/g,new EA(c,u,!0,C,j,v,T,I,R)}}}const t9=class t9{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}};t9.INVALID=new t9(-1);let g6=t9;class xve{constructor(e,t,n){this.renderedLayout=e,this._imageData=t,this._renderedLines=new c2e({createLine:()=>g6.INVALID}),this._renderedLines._set(e.startLineNumber,n)}linesEquals(e){if(!this.scrollEquals(e))return!1;const n=this._renderedLines._get().lines;for(let s=0,r=n.length;s1){for(let _=0,w=s-1;_0&&this.minimapLines[n-1]>=e;)n--;let s=this.modelLineToMinimapLine(t)-1;for(;s+1t)return null}return[n+1,s+1]}decorationLineRangeToMinimapLineRange(e,t){let n=this.modelLineToMinimapLine(e),s=this.modelLineToMinimapLine(t);return e!==t&&s===n&&(s===this.minimapLines.length?n>1&&n--:s++),[n,s]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let n=this.minimapLines.length,s=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]=0&&!(this.minimapLines[n]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(s)}_recreateLineSampling(){this._minimapSelections=null;const e=!!this._samplingState,[t,n]=AR.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const s of n)switch(s.type){case"deleted":this._actual.onLinesDeleted(s.deleteFromLineNumber,s.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(s.insertFromLineNumber,s.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,n){if(this._samplingState){const s=[];for(let r=0,o=t-e+1;r{var s;return!((s=n.options.minimap)!=null&&s.sectionHeaderStyle)})}getSectionHeaderDecorationsInViewport(e,t){const n=this.options.sectionHeaderFontSize/this.options.minimapLineHeight;return e=Math.floor(Math.max(1,e-n)),this._getMinimapDecorationsInViewport(e,t).filter(s=>{var r;return!!((r=s.options.minimap)!=null&&r.sectionHeaderStyle)})}_getMinimapDecorationsInViewport(e,t){let n;if(this._samplingState){const r=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];n=new z(r,1,o,this._context.viewModel.getLineMaxColumn(o))}else n=new z(e,1,t,this._context.viewModel.getLineMaxColumn(t));const s=this._context.viewModel.getMinimapDecorationsInRange(n);if(this._samplingState){const r=[];for(const o of s){if(!o.options.minimap)continue;const a=o.range,l=this._samplingState.modelLineToMinimapLine(a.startLineNumber),c=this._samplingState.modelLineToMinimapLine(a.endLineNumber);r.push(new I2e(new z(l,a.startColumn,c,a.endColumn),o.options))}return r}return s}getSectionHeaderText(e,t){var o;const n=(o=e.options.minimap)==null?void 0:o.sectionHeaderText;if(!n)return null;const s=this._sectionHeaderCache.get(n);if(s)return s;const r=t(n);return this._sectionHeaderCache.set(n,r),r}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new z(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class lN extends se{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._isMouseOverMinimap=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(ove),this._domNode=Yn(document.createElement("div")),$g.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=Yn(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=Yn(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=Yn(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=Yn(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=Yn(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._hideDelayedScheduler=this._register(new pi(()=>this._hideImmediatelyIfMouseIsOutside(),500)),this._register(yr(this._domNode.domNode,Fe.MOUSE_OVER,()=>{this._isMouseOverMinimap=!0})),this._register(yr(this._domNode.domNode,Fe.MOUSE_LEAVE,()=>{this._isMouseOverMinimap=!1})),this._pointerDownListener=yr(this._domNode.domNode,Fe.POINTER_DOWN,n=>{n.preventDefault();const s=n.pointerType==="mouse",r=n.button===0;if(this._model.options.renderMinimap!==0&&this._lastRenderData){if(this._model.options.size!=="proportional"){if(r&&this._lastRenderData){const a=Zs(this._slider.domNode),l=a.top+a.height/2;this._startSliderDragging(n,l,this._lastRenderData.renderedLayout)}return}if(r||!s){const a=this._model.options.minimapLineHeight,l=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*n.offsetY;let u=Math.floor(l/a)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;u=Math.min(u,this._model.getLineCount()),this._model.revealLineNumber(u)}}}),this._sliderPointerMoveMonitor=new AD,this._sliderPointerDownListener=yr(this._slider.domNode,Fe.POINTER_DOWN,n=>{n.preventDefault(),n.stopPropagation(),n.button===0&&this._lastRenderData&&this._startSliderDragging(n,n.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Ha.addTarget(this._domNode.domNode),this._sliderTouchStartListener=de(this._domNode.domNode,Zi.Start,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(n))},{passive:!1}),this._sliderTouchMoveListener=de(this._domNode.domNode,Zi.Change,n=>{n.preventDefault(),n.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(n)},{passive:!1}),this._sliderTouchEndListener=yr(this._domNode.domNode,Zi.End,n=>{n.preventDefault(),n.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_hideSoon(){this._hideDelayedScheduler.cancel(),this._hideDelayedScheduler.schedule()}_hideImmediatelyIfMouseIsOutside(){if(this._isMouseOverMinimap){this._hideSoon();return}this._domNode.toggleClassName("active",!1)}_startSliderDragging(e,t,n){if(!e.target||!(e.target instanceof Element))return;const s=e.pageX;this._slider.toggleClassName("active",!0);const r=(o,a)=>{const l=Zs(this._domNode.domNode),c=Math.min(Math.abs(a-s),Math.abs(a-l.left),Math.abs(a-l.left-l.width));if(Xo&&c>JPt){this._model.setScrollTop(n.scrollTop);return}const u=o-t;this._model.setScrollTop(n.getDesiredScrollTopFromDelta(u))};e.pageY!==t&&r(e.pageY,s),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,o=>r(o.pageY,o.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return this._model.options.showSlider==="always"?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide==="mouseover"?e.push("minimap-autohide-mouseover"):this._model.options.autohide==="scroll"&&e.push("minimap-autohide-scroll"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Goe(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return this._lastRenderData?this._lastRenderData.onLinesChanged(e,t):!1}onLinesDeleted(e,t){var n;return(n=this._lastRenderData)==null||n.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var n;return(n=this._lastRenderData)==null||n.onLinesInserted(e,t),!0}onScrollChanged(e){return this._model.options.autohide==="scroll"&&(e.scrollTopChanged||e.scrollHeightChanged)&&(this._domNode.toggleClassName("active",!0),this._hideSoon()),this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(ove),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const n=EA.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(n.sliderNeeded?"block":"none"),this._slider.setTop(n.sliderTop),this._slider.setHeight(n.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(n.sliderHeight),this.renderDecorations(n),this._lastRenderData=this.renderLines(n)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(z.compareRangesUsingStarts);const n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);n.sort((g,f)=>(g.options.zIndex||0)-(f.options.zIndex||0));const{canvasInnerWidth:s,canvasInnerHeight:r}=this._model.options,o=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,s,r);const u=new vve(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,u,e,o),this._renderDecorationsLineHighlights(c,n,u,e,o);const h=new vve(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,h,e,o,l,a,s),this._renderDecorationsHighlights(c,n,h,e,o,l,a,s),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,n,s,r){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,a=0;for(const l of t){const c=s.intersectWithViewport(l);if(!c)continue;const[u,h]=c;for(let m=u;m<=h;m++)n.set(m,!0);const g=s.getYForLineNumber(u,r),f=s.getYForLineNumber(h,r);a>=g||(a>o&&e.fillRect(Sf,o,e.canvas.width,a-o),o=g),a=f}a>o&&e.fillRect(Sf,o,e.canvas.width,a-o)}_renderDecorationsLineHighlights(e,t,n,s,r){const o=new Map;for(let a=t.length-1;a>=0;a--){const l=t[a],c=l.options.minimap;if(!c||c.position!==1)continue;const u=s.intersectWithViewport(l.range);if(!u)continue;const[h,g]=u,f=c.getColor(this._theme.value);if(!f||f.isTransparent())continue;let m=o.get(f.toString());m||(m=f.transparent(.5).toString(),o.set(f.toString(),m)),e.fillStyle=m;for(let x=h;x<=g;x++){if(n.has(x))continue;n.set(x,!0);const v=s.getYForLineNumber(h,r);e.fillRect(Sf,v,e.canvas.width,r)}}}_renderSelectionsHighlights(e,t,n,s,r,o,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const c of t){const u=s.intersectWithViewport(c);if(!u)continue;const[h,g]=u;for(let f=h;f<=g;f++)this.renderDecorationOnLine(e,n,c,this._selectionColor,s,f,r,r,o,a,l)}}_renderDecorationsHighlights(e,t,n,s,r,o,a,l){for(const c of t){const u=c.options.minimap;if(!u)continue;const h=s.intersectWithViewport(c.range);if(!h)continue;const[g,f]=h,m=u.getColor(this._theme.value);if(!(!m||m.isTransparent()))for(let x=g;x<=f;x++)switch(u.position){case 1:this.renderDecorationOnLine(e,n,c.range,m,s,x,r,r,o,a,l);continue;case 2:{const v=s.getYForLineNumber(x,r);this.renderDecoration(e,m,2,v,eOt,r);continue}}}}renderDecorationOnLine(e,t,n,s,r,o,a,l,c,u,h){const g=r.getYForLineNumber(o,l);if(g+a<0||g>this._model.options.canvasInnerHeight)return;const{startLineNumber:f,endLineNumber:m}=n,x=f===o?n.startColumn:1,v=m===o?n.endColumn:this._model.getLineMaxColumn(o),_=this.getXOffsetForPosition(t,o,x,c,u,h),w=this.getXOffsetForPosition(t,o,v,c,u,h);this.renderDecoration(e,s,_,g,w-_,a)}getXOffsetForPosition(e,t,n,s,r,o){if(n===1)return Sf;if((n-1)*r>=o)return o;let l=e.get(t);if(!l){const c=this._model.getLineContent(t);l=[Sf];let u=Sf;for(let h=1;h=o){l[h]=o;break}l[h]=m,u=m}e.set(t,l)}return n-1v.range.startLineNumber-_.range.startLineNumber);const m=lN._fitSectionHeader.bind(null,g,o-Sf);for(const v of f){const _=e.getYForLineNumber(v.range.startLineNumber,t)+n,w=_-n,k=w+2,C=this._model.getSectionHeaderText(v,m);lN._renderSectionLabel(g,C,((x=v.options.minimap)==null?void 0:x.sectionHeaderStyle)===2,l,u,o,w,r,_,k)}}static _fitSectionHeader(e,t,n){if(!n)return n;const s="…",r=e.measureText(n).width,o=e.measureText(s).width;if(r<=t||r<=o)return n;const a=n.length,l=r/n.length,c=Math.floor((t-o)/l)-1;let u=Math.ceil(c/2);for(;u>0&&/\s/.test(n[u-1]);)--u;return n.substring(0,u)+s+n.substring(a-(c-u))}static _renderSectionLabel(e,t,n,s,r,o,a,l,c,u){t&&(e.fillStyle=s,e.fillRect(0,a,o,l),e.fillStyle=r,e.fillText(t,Sf,c)),n&&(e.beginPath(),e.moveTo(0,u),e.lineTo(o,u),e.closePath(),e.stroke())}renderLines(e){const t=e.startLineNumber,n=e.endLineNumber,s=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const q=this._lastRenderData._get();return new xve(e,q.imageData,q.lines)}const r=this._getBuffer();if(!r)return null;const[o,a,l]=lN._renderUntouchedLines(r,e.topPaddingLineCount,t,n,s,this._lastRenderData),c=this._model.getMinimapLinesRenderingData(t,n,l),u=this._model.getOptions().tabSize,h=this._model.options.defaultBackgroundColor,g=this._model.options.backgroundColor,f=this._model.options.foregroundAlpha,m=this._model.tokensColorTracker,x=m.backgroundIsLight(),v=this._model.options.renderMinimap,_=this._model.options.charRenderer(),w=this._model.options.fontScale,k=this._model.options.minimapCharWidth,E=(v===1?2:3)*w,D=s>E?Math.floor((s-E)/2):0,T=g.a/255,I=new Db(Math.round((g.r-h.r)*T+h.r),Math.round((g.g-h.g)*T+h.g),Math.round((g.b-h.b)*T+h.b),255);let R=e.topPaddingLineCount*s;const P=[];for(let q=0,V=n-t+1;q=0&&jw)return;const B=v.charCodeAt(E);if(B===9){const H=g-(E+D)%g;D+=H-1,C+=H*o}else if(B===32)C+=o;else{const H=$b(B)?2:1;for(let $=0;$w)return}}}}}class vve{constructor(e,t,n){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=n,this._values=[];for(let s=0,r=this._endLineNumber-this._startLineNumber+1;sthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class nOt extends Xl{constructor(e,t){super(e),this._viewDomNode=t;const s=this._context.configuration.options.get(165);this._widgets={},this._verticalScrollbarWidth=s.verticalScrollbarWidth,this._minimapWidth=s.minimap.minimapWidth,this._horizontalScrollbarHeight=s.horizontalScrollbarHeight,this._editorHeight=s.height,this._editorWidth=s.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=Yn(document.createElement("div")),$g.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=Yn(document.createElement("div")),$g.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const n=this._context.configuration.options.get(165);return this._verticalScrollbarWidth=n.verticalScrollbarWidth,this._minimapWidth=n.minimap.minimapWidth,this._horizontalScrollbarHeight=n.horizontalScrollbarHeight,this._editorHeight=n.height,this._editorWidth=n.width,!0}_widgetCanOverflow(e){const n=this._context.configuration.options.get(4);return(e.allowEditorOverflow||!1)&&n}addWidget(e){const t=Yn(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._widgetCanOverflow(e)?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const n=this._widgets[e.getId()],s=t?t.preference:null,r=t==null?void 0:t.stackOridinal;return n.preference===s&&n.stack===r?(this._updateMaxMinWidth(),!1):(n.preference=s,n.stack=r,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const s=this._widgets[t].domNode.domNode;delete this._widgets[t],s.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var n,s;let e=0;const t=Object.keys(this._widgets);for(let r=0,o=t.length;r0);t.sort((s,r)=>(this._widgets[s].stack||0)-(this._widgets[r].stack||0));for(let s=0,r=t.length;st.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&bs(e.data,t.data)}static equalsArr(e,t){return bs(e,t,RR.equals)}}class sOt{constructor(e,t){const n=e.options;this.lineHeight=n.get(75),this.pixelRatio=n.get(163),this.overviewRulerLanes=n.get(95),this.renderBorder=n.get(94);const s=t.getColor(nPt);this.borderColor=s?s.toString():null,this.hideCursor=n.get(68);const r=t.getColor(sW);this.cursorColorSingle=r?r.transparent(.7).toString():null;const o=t.getColor(p2e);this.cursorColorPrimary=o?o.transparent(.7).toString():null;const a=t.getColor(m2e);this.cursorColorSecondary=a?a.transparent(.7).toString():null,this.themeType=t.type;const l=n.get(81),c=l.enabled,u=l.side,h=t.getColor(iPt),g=Gs.getDefaultBackground();h?this.backgroundColor=h:c&&u==="right"?this.backgroundColor=g:this.backgroundColor=null;const m=n.get(165).overviewRuler;this.top=m.top,this.right=m.right,this.domWidth=m.width,this.domHeight=m.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[x,v]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=x,this.w=v}_initLanes(e,t,n){const s=t-e;if(n>=3){const r=Math.floor(s/3),o=Math.floor(s/3),a=s-r-o,l=e,c=l+r,u=l+r+a;return[[0,l,c,l,u,l,c,l],[0,r,a,r+a,o,r+a+o,a+o,r+a+o]]}else if(n===2){const r=Math.floor(s/2),o=s-r,a=e,l=a+r;return[[0,a,a,a,l,a,a,a],[0,r,r,r,o,r+o,r+o,r+o]]}else{const r=e,o=s;return[[0,r,r,r,r,r,r,r],[0,o,o,o,o,o,o,o]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&ye.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class rOt extends Xl{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=Yn(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Gs.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new te(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new sOt(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,n=e.selections.length;t1&&(s=t===0?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:s})}return this._cursorPositions.sort((t,n)=>te.compare(t.position,n.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return e.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return e.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(e?ye.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}const t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(RR.compareByRenderingProps),this._actualShouldRender===1&&!RR.equalsArr(this._renderedDecorations,t)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!bs(this._renderedCursorPositions,this._cursorPositions,(m,x)=>m.position.lineNumber===x.position.lineNumber&&m.color===x.color)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const n=this._settings.canvasWidth,s=this._settings.canvasHeight,r=this._settings.lineHeight,o=this._context.viewLayout,a=this._context.viewLayout.getScrollHeight(),l=s/a,c=6*this._settings.pixelRatio|0,u=c/2|0,h=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(h.fillStyle=ye.Format.CSS.formatHexA(e),h.fillRect(0,0,n,s)):(h.clearRect(0,0,n,s),h.fillStyle=ye.Format.CSS.formatHexA(e),h.fillRect(0,0,n,s)):h.clearRect(0,0,n,s);const g=this._settings.x,f=this._settings.w;for(const m of t){const x=m.color,v=m.data;h.fillStyle=x;let _=0,w=0,k=0;for(let C=0,E=v.length/3;Cs&&(B=s-u),R=B-u,P=B+u}R>k+1||D!==_?(C!==0&&h.fillRect(g[_],w,f[_],k-w),_=D,w=R,k=P):P>k&&(k=P)}h.fillRect(g[_],w,f[_],k-w)}if(!this._settings.hideCursor){const m=2*this._settings.pixelRatio|0,x=m/2|0,v=this._settings.x[7],_=this._settings.w[7];let w=-100,k=-100,C=null;for(let E=0,D=this._cursorPositions.length;Es&&(R=s-x);const P=R-x,j=P+m;P>k+1||T!==C?(E!==0&&C&&h.fillRect(v,w,_,k-w),w=P,k=j):j>k&&(k=j),C=T,h.fillStyle=T}C&&h.fillRect(v,w,_,k-w)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,s),h.moveTo(1,0),h.lineTo(n,0),h.stroke())}}class yve{constructor(e,t,n){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=n|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class R2e{constructor(e,t,n,s){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=n,this.color=s,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colorn&&(x=n-v);const _=u.color;let w=this._color2Id[_];w||(w=++this._lastAssignedId,this._color2Id[_]=w,this._id2Color[w]=_);const k=new yve(x-v,x+v,w);u.setColorZone(k),a.push(k)}return this._colorZonesInvalid=!1,a.sort(yve.compare),a}}class aOt extends oS{constructor(e,t){super(),this._context=e;const n=this._context.configuration.options;this._domNode=Yn(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new oOt(s=>this._context.viewLayout.getVerticalOffsetForLineNumber(s)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(n.get(75)),this._zoneManager.setPixelRatio(n.get(163)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(75)&&(this._zoneManager.setLineHeight(t.get(75)),this._render()),e.hasChanged(163)&&(this._zoneManager.setPixelRatio(t.get(163)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),s=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(r,n,s,e),!0}_renderOneLane(e,t,n,s){let r=0,o=0,a=0;for(const l of t){const c=l.colorId,u=l.from,h=l.to;c!==r?(e.fillRect(0,o,s,a-o),r=c,e.fillStyle=n[r],o=u,a=h):a>=u?a=Math.max(a,h):(e.fillRect(0,o,s,a-o),o=u,a=h)}e.fillRect(0,o,s,a-o)}}class lOt extends Xl{constructor(e){super(e),this.domNode=Yn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const a=Yn(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(r),this.domNode.appendChild(a),this._renderedRulers.push(a),o--}return}let n=e-t;for(;n>0;){const s=this._renderedRulers.pop();this.domNode.removeChild(s),n--}}render(e){this._ensureRulersCount();for(let t=0,n=this._rulers.length;t0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(165);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.verticalScrollbarWidth}onConfigurationChanged(e){const n=this._context.configuration.options.get(117);return this._useShadows=n.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class dOt{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class uOt{constructor(e,t){this.lineNumber=e,this.ranges=t}}function hOt(i){return new dOt(i)}function gOt(i){return new uOt(i.lineNumber,i.ranges.map(hOt))}const vr=class vr extends N0{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,n=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,n){const s=this._typicalHalfwidthCharacterWidth/4;let r=null,o=null;if(n&&n.length>0&&t.length>0){const a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!r&&c=0;c--)n[c].lineNumber===l&&(o=n[c].ranges[0]);r&&!r.startStyle&&(r=null),o&&!o.startStyle&&(o=null)}for(let a=0,l=t.length;a0){const m=t[a-1].ranges[0].left,x=t[a-1].ranges[0].left+t[a-1].ranges[0].width;y3(u-m)m&&(g.top=1),y3(h-x)'}_actualRenderOneSelection(e,t,n,s){if(s.length===0)return;const r=!!s[0].ranges[0].startStyle,o=s[0].lineNumber,a=s[s.length-1].lineNumber;for(let l=0,c=s.length;l1,c)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map(([o,a])=>o+a)}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};vr.SELECTION_CLASS_NAME="selected-text",vr.SELECTION_TOP_LEFT="top-left-radius",vr.SELECTION_BOTTOM_LEFT="bottom-left-radius",vr.SELECTION_TOP_RIGHT="top-right-radius",vr.SELECTION_BOTTOM_RIGHT="bottom-right-radius",vr.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",vr.ROUNDED_PIECE_WIDTH=10;let OQ=vr;Zu((i,e)=>{const t=i.getColor(i2t);t&&!t.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${t}; }`)});function y3(i){return i<0?-i:i}class wve{constructor(e,t,n,s,r,o,a){this.top=e,this.left=t,this.paddingLeft=n,this.width=s,this.height=r,this.textContent=o,this.textContentClassName=a}}var hb;(function(i){i[i.Single=0]="Single",i[i.MultiPrimary=1]="MultiPrimary",i[i.MultiSecondary=2]="MultiSecondary"})(hb||(hb={}));class Cve{constructor(e,t){this._context=e;const n=this._context.configuration.options,s=n.get(59);this._cursorStyle=n.get(161),this._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=n.get(38),this._isVisible=!0,this._domNode=Yn(document.createElement("div")),this._domNode.setClassName(`cursor ${JN}`),this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1)),this._domNode.setTop(0),this._domNode.setLeft(0),Po(this._domNode,s),this._domNode.setDisplay("none"),this._position=new te(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case hb.Single:this._pluralityClass="";break;case hb.MultiPrimary:this._pluralityClass="cursor-primary";break;case hb.MultiSecondary:this._pluralityClass="cursor-secondary";break}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(59);return this._cursorStyle=t.get(161),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=t.get(38),Po(this._domNode,n),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,n=this._context.viewModel.getLineContent(e),[s,r]=MEt(n,t-1);return[new te(e,s+1),n.substring(s,r)]}_prepareRender(e){let t="",n="";const[s,r]=this._getGraphemeAwarePosition(),o=this._context.viewLayout.getLineHeightForLineNumber(s.lineNumber),a=this._lineCursorHeight===0?o:Math.min(o,this._lineCursorHeight),l=(o-a)/2;if(this._cursorStyle===go.Line||this._cursorStyle===go.LineThin){const x=e.visibleRangeForPosition(s);if(!x||x.outsideRenderedLine)return null;const v=xt(this._domNode.domNode);let _;this._cursorStyle===go.Line?(_=bxe(v,this._lineCursorWidth>0?this._lineCursorWidth:2),_>2&&(t=r,n=this._getTokenClassName(s))):_=bxe(v,1);let w=x.left,k=0;_>=2&&w>=1&&(k=1,w-=k);const C=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.bigNumbersDelta+l;return new wve(C,w,k,_,a,t,n)}const c=e.linesVisibleRangesForRange(new z(s.lineNumber,s.column,s.lineNumber,s.column+r.length),!1);if(!c||c.length===0)return null;const u=c[0];if(u.outsideRenderedLine||u.ranges.length===0)return null;const h=u.ranges[0],g=r===" "?this._typicalHalfwidthCharacterWidth:h.width<1?this._typicalHalfwidthCharacterWidth:h.width;this._cursorStyle===go.Block&&(t=r,n=this._getTokenClassName(s));let f=e.getVerticalOffsetForLineNumber(s.lineNumber)-e.bigNumbersDelta,m=o;return(this._cursorStyle===go.Underline||this._cursorStyle===go.UnderlineThin)&&(f+=o-2,m=2),new wve(f,h.left,0,g,m,t,n)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),n=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(n)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${JN} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}const x2=class x2 extends Xl{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Cve(this._context,hb.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=Yn(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Yc,this._cursorFlatBlinkInterval=new ooe,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let n=0,s=this._secondaryCursors.length;nt.length){const r=this._secondaryCursors.length-t.length;for(let o=0;o{for(let s=0,r=e.ranges.length;s{this._isVisible?this._hide():this._show()},x2.BLINK_INTERVAL,xt(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},x2.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case go.Line:e+=" cursor-line-style";break;case go.Block:e+=" cursor-block-style";break;case go.Underline:e+=" cursor-underline-style";break;case go.LineThin:e+=" cursor-line-thin-style";break;case go.BlockOutline:e+=" cursor-block-outline-style";break;case go.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const t=[{class:".cursor",foreground:sW,background:Woe},{class:".cursor-primary",foreground:p2e,background:FMt},{class:".cursor-secondary",foreground:m2e,background:BMt}];for(const n of t){const s=i.getColor(n.foreground);if(s){let r=i.getColor(n.background);r||(r=s.opposite()),e.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${s}; border-color: ${s}; color: ${r}; }`),Fg(i.type)&&e.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${r}; border-right: 1px solid ${r}; }`)}}});const Q$=()=>{throw new Error("Invalid change accessor")};class fOt extends Xl{constructor(e){super(e);const t=this._context.configuration.options,n=t.get(165);this._lineHeight=t.get(75),this._contentWidth=n.contentWidth,this._contentLeft=n.contentLeft,this.domNode=Yn(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Yn(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const s of e)t.set(s.id,s);let n=!1;return this._context.viewModel.changeWhitespace(s=>{const r=Object.keys(this._zones);for(let o=0,a=r.length;o{const s={addZone:r=>(t=!0,this._addZone(n,r)),removeZone:r=>{r&&(t=this._removeZone(n,r)||t)},layoutZone:r=>{r&&(t=this._layoutZone(n,r)||t)}};pOt(e,s),s.addZone=Q$,s.removeZone=Q$,s.layoutZone=Q$}),t}_addZone(e,t){const n=this._computeWhitespaceProps(t),r={whitespaceId:e.insertWhitespace(n.afterViewLineNumber,this._getZoneOrdinal(t),n.heightInPx,n.minWidthInPx),delegate:t,isInHiddenArea:n.isInHiddenArea,isVisible:!1,domNode:Yn(t.domNode),marginDomNode:t.marginDomNode?Yn(t.marginDomNode):null};return this._safeCallOnComputedHeight(r.delegate,n.heightInPx),r.domNode.setPosition("absolute"),r.domNode.domNode.style.width="100%",r.domNode.setDisplay("none"),r.domNode.setAttribute("monaco-view-zone",r.whitespaceId),this.domNode.appendChild(r.domNode),r.marginDomNode&&(r.marginDomNode.setPosition("absolute"),r.marginDomNode.domNode.style.width="100%",r.marginDomNode.setDisplay("none"),r.marginDomNode.setAttribute("monaco-view-zone",r.whitespaceId),this.marginDomNode.appendChild(r.marginDomNode)),this._zones[r.whitespaceId]=r,this.setShouldRender(),r.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t];return delete this._zones[t],e.removeWhitespace(n.whitespaceId),n.domNode.removeAttribute("monaco-visible-view-zone"),n.domNode.removeAttribute("monaco-view-zone"),n.domNode.domNode.remove(),n.marginDomNode&&(n.marginDomNode.removeAttribute("monaco-visible-view-zone"),n.marginDomNode.removeAttribute("monaco-view-zone"),n.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const n=this._zones[t],s=this._computeWhitespaceProps(n.delegate);return n.isInHiddenArea=s.isInHiddenArea,e.changeOneWhitespace(n.whitespaceId,s.afterViewLineNumber,s.heightInPx),this._safeCallOnComputedHeight(n.delegate,s.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return this._zones.hasOwnProperty(e)?!!this._zones[e].delegate.suppressMouseDown:!1}_heightInPixels(e){return typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(n){zt(n)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(n){zt(n)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,n={};let s=!1;for(const o of t)this._zones[o.id].isInHiddenArea||(n[o.id]=o,s=!0);const r=Object.keys(this._zones);for(let o=0,a=r.length;oo)continue;const g=h.startLineNumber===o?h.startColumn:l.minColumn,f=h.endLineNumber===o?h.endColumn:l.maxColumn;g=T&&B<=I&&H===32){const q=B-1>=0?a.charCodeAt(B-1):0,V=B+1=0?a.charCodeAt(B-1):0;if(H===32&&q!==32&&q!==9)continue}if(n&&!(P&&P.start<=B&&B`):H===9?E+=`
${C?"→":"→"}
`:E+=`
${String.fromCharCode(k)}
`)}return o?(j=Math.round(j+v),``+E+""):E}_renderArrow(e,t,n){const s=t/7,r=t,o=e/2,a=n,l={x:0,y:s/2},c={x:100/125*r,y:l.y},u={x:c.x-.2*c.x,y:c.y+.2*c.x},h={x:u.x+.1*c.x,y:u.y+.1*c.x},g={x:h.x+.35*c.x,y:h.y-.35*c.x},f={x:g.x,y:-g.y},m={x:h.x,y:-h.y},x={x:u.x,y:-u.y},v={x:c.x,y:-c.y},_={x:l.x,y:-l.y};return``}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}class Sve{constructor(e){const t=e.options,n=t.get(59),s=t.get(47);s==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):s==="svg"?(this.renderWhitespace=t.get(113),this.renderWithSVG=!0):(this.renderWhitespace=t.get(113),this.renderWithSVG=!1),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(75),this.stopRenderingLineAfter=t.get(133)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class bOt{constructor(e,t,n,s){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.lineHeight=t.lineHeight|0,this.whitespaceViewportData=n,this._model=s,this.visibleRange=new z(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class xOt{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class vOt{constructor(e,t,n){this.configuration=e,this.theme=new xOt(t),this.viewModel=n,this.viewLayout=n.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}const q1=new Float32Array([1,0,1,1,0,1,0,0,0,1,1,0]);function vC(i){if(!i)throw new Error(`Value "${i}" cannot be null`);return i}function M2e(i,e,t){let n=new e.ResizeObserver(s=>{const r=s.find(l=>l.target===i);if(!r)return;if(!("devicePixelContentBoxSize"in r)){n==null||n.disconnect(),n=void 0;return}const o=r.devicePixelContentBoxSize[0].inlineSize,a=r.devicePixelContentBoxSize[0].blockSize;o>0&&a>0&&t(o,a)});try{n.observe(i,{box:["device-pixel-content-box"]})}catch{throw n.disconnect(),n=void 0,new Nt("Could not observe device pixel dimensions")}return dt(()=>n==null?void 0:n.disconnect())}var _Ot=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};let yOt=0;class MR extends se{get cacheKey(){return`${this.fontFamily}_${this.fontSize}px`}constructor(e,t,n,s){super(),this.fontSize=e,this.fontFamily=t,this.devicePixelRatio=n,this._decorationStyleCache=s,this.id=yOt++,this._workGlyph={source:null,boundingBox:{left:0,bottom:0,right:0,top:0},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0},this._workGlyphConfig={chars:void 0,tokenMetadata:0,decorationStyleSetId:0},this._antiAliasing=bn?"greyscale":"subpixel";const r=Math.ceil(this.fontSize*n);this._canvas=new OffscreenCanvas(r*3,r*3),this._ctx=vC(this._canvas.getContext("2d",{willReadFrequently:!0,alpha:this._antiAliasing==="greyscale"})),this._ctx.textBaseline="top",this._ctx.fillStyle="#FFFFFF",this._ctx.font=`${r}px ${this.fontFamily}`,this._textMetrics=this._ctx.measureText("A")}rasterizeGlyph(e,t,n,s){return e===""?{source:this._canvas,boundingBox:{top:0,left:0,bottom:-1,right:-1},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0}:this._workGlyphConfig.chars===e&&this._workGlyphConfig.tokenMetadata===t&&this._workGlyphConfig.decorationStyleSetId===n?this._workGlyph:(this._workGlyphConfig.chars=e,this._workGlyphConfig.tokenMetadata=t,this._workGlyphConfig.decorationStyleSetId=n,this._rasterizeGlyph(e,t,n,s))}_rasterizeGlyph(e,t,n,s){const r=Math.ceil(this.fontSize*this.devicePixelRatio),o=r*3;this._canvas.width!==o&&(this._canvas.width=o,this._canvas.height=o),this._ctx.save();const a=(t&15)/10,l=Ra.getBackground(t),c=s[l],u=this._decorationStyleCache.getStyleSet(n);this._antiAliasing==="subpixel"?(this._ctx.fillStyle=c,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height)):this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);const h=new S0(200),g=Ra.getFontStyle(t);g&1&&h.appendString("italic "),(u==null?void 0:u.bold)!==void 0?u.bold&&h.appendString("bold "):g&2&&h.appendString("bold "),h.appendString(`${r}px ${this.fontFamily}`),this._ctx.font=h.build();const f=r,m=r;(u==null?void 0:u.color)!==void 0?this._ctx.fillStyle=`#${u.color.toString(16).padStart(8,"0")}`:this._ctx.fillStyle=s[Ra.getForeground(t)],this._ctx.textBaseline="top",(u==null?void 0:u.opacity)!==void 0&&(this._ctx.globalAlpha=u.opacity),this._ctx.fillText(e,f+a,m),this._ctx.restore();const x=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height);if(this._antiAliasing==="subpixel"){const v=parseInt(c.substring(1,3),16),_=parseInt(c.substring(3,5),16),w=parseInt(c.substring(5,7),16);this._clearColor(x,v,_,w),this._ctx.putImageData(x,0,0)}return this._findGlyphBoundingBox(x,this._workGlyph.boundingBox),this._workGlyph.source=this._canvas,this._workGlyph.originOffset.x=this._workGlyph.boundingBox.left-f,this._workGlyph.originOffset.y=this._workGlyph.boundingBox.top-m,this._workGlyph.fontBoundingBoxAscent=this._textMetrics.fontBoundingBoxAscent,this._workGlyph.fontBoundingBoxDescent=this._textMetrics.fontBoundingBoxDescent,this._workGlyph}_clearColor(e,t,n,s){for(let r=0;r=t.left;o--){for(let a=0;a=0;o--){for(let a=0;a=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},COt=function(i,e){return function(t,n){e(t,n,i)}};let f6=class extends se{constructor(e){super(),this._logService=e,this._tasks=[],this._i=0,this._register(dt(()=>this.clear()))}enqueue(e){this._tasks.push(e),this._start()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,n=0,s=e.timeRemaining(),r=0;for(;this._ir){s-t<-20&&this._logService.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),this._start();return}s=r}this.clear()}};f6=wOt([COt(0,Ji)],f6);class SOt extends f6{_requestCallback(e){return oi().setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){oi().clearTimeout(e)}_createDeadline(e){const t=Date.now()+e;return{timeRemaining:()=>Math.max(0,t-Date.now())}}}class kOt extends f6{_requestCallback(e){return oi().requestIdleCallback(e)}_cancelCallback(e){oi().cancelIdleCallback(e)}}const NOt="requestIdleCallback"in oi()?kOt:SOt;class EOt{constructor(e,t){this._canvas=e,this._textureIndex=t,this._currentRow={x:0,y:0,h:0},this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=vC(this._canvas.getContext("2d",{willReadFrequently:!0}))}allocate(e){const t=e.boundingBox.right-e.boundingBox.left+1,n=e.boundingBox.bottom-e.boundingBox.top+1;if(t>this._canvas.width||n>this._canvas.height)throw new Nt("Glyph is too large for the atlas page");if(e.boundingBox.right-e.boundingBox.left+1>this._canvas.width-this._currentRow.x&&(this._currentRow.x=0,this._currentRow.y+=this._currentRow.h,this._currentRow.h=1),this._currentRow.y+e.boundingBox.bottom-e.boundingBox.top+1>this._canvas.height)return;this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,n,this._currentRow.x,this._currentRow.y,t,n);const s={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:this._currentRow.x,y:this._currentRow.y,w:t,h:n,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._currentRow.x+=t,this._currentRow.h=Math.max(this._currentRow.h,n),this._allocatedGlyphs.add(s),s}getUsagePreview(){const e=this._canvas.width,t=this._canvas.height,n=new OffscreenCanvas(e,t),s=vC(n.getContext("2d"));s.fillStyle="#808080",s.fillRect(0,0,e,t);const r=new Map,o=new Map;for(const a of this._allocatedGlyphs)r.set(a.y,Math.max(r.get(a.y)??0,a.h)),o.set(a.y,Math.max(o.get(a.y)??0,a.x+a.w));for(const a of this._allocatedGlyphs)s.fillStyle="#4040FF",s.fillRect(a.x,a.y,a.w,a.h),s.fillStyle="#FF0000",s.fillRect(a.x,a.y+a.h,a.w,r.get(a.y)-a.h);for(const[a,l]of o.entries())a!==this._currentRow.y&&(s.fillStyle="#FF0000",s.fillRect(l,a,e-l,r.get(a)));return n.convertToBlob()}getStats(){const e=this._canvas.width,t=this._canvas.height;let n=0,s=0;const r=e*t,o=new Map,a=new Map;for(const l of this._allocatedGlyphs)o.set(l.y,Math.max(o.get(l.y)??0,l.h)),a.set(l.y,Math.max(a.get(l.y)??0,l.x+l.w));for(const l of this._allocatedGlyphs)n+=l.w*l.h,s+=l.w*(o.get(l.y)-l.h);for(const[l,c]of a.entries())l!==this._currentRow.y&&(s+=(e-c)*o.get(l));return[`page${this._textureIndex}:`,` Total: ${r} (${e}x${t})`,` Used: ${n} (${(n/r*100).toPrecision(2)}%)`,` Wasted: ${s} (${(s/r*100).toPrecision(2)}%)`,`Efficiency: ${(n/(n+s)*100).toPrecision(2)}%`].join(` +`)}}class LOt{constructor(e,t,n){this._canvas=e,this._textureIndex=t,this._slabs=[],this._activeSlabsByDims=new M7,this._unusedRects=[],this._openRegionsByHeight=new Map,this._openRegionsByWidth=new Map,this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=vC(this._canvas.getContext("2d",{willReadFrequently:!0})),this._slabW=Math.min((n==null?void 0:n.slabW)??64<this._canvas.width||n>this._canvas.height)throw new Nt("Glyph is too large for the atlas page");if(t>this._slabW||n>this._slabH){if(this._allocatedGlyphs.size>0)return;let c=this._canvas.width;for(;t=c&&(r=void 0)}let o,a;if(!r)if(t=0;u--){const h=c[u];if(h.w>=t&&h.h>=n){o=h.x,a=h.y,t=0;u--){const h=c[u];if(h.w>=t&&h.h>=n){o=h.x,a=h.y,n=this._slabsPerRow*this._slabsPerColumn)return;r={x:Math.floor(this._slabs.length%this._slabsPerRow)*this._slabW,y:Math.floor(this._slabs.length/this._slabsPerRow)*this._slabH,entryW:s.w,entryH:s.h,count:0};const u=this._slabW%r.entryW,h=this._slabH%r.entryH;u&&kve(this._openRegionsByWidth,u,{x:r.x+this._slabW-u,w:u,y:r.y,h:this._slabH-(h??0)}),h&&kve(this._openRegionsByHeight,h,{x:r.x,w:this._slabW,y:r.y+this._slabH-h,h}),this._slabs.push(r),this._activeSlabsByDims.set(r,s.w,s.h)}const c=Math.floor(this._slabW/r.entryW);o=r.x+Math.floor(r.count%c)*r.entryW,a=r.y+Math.floor(r.count/c)*r.entryH,r.count++}this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,n,o,a,t,n);const l={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:o,y:a,w:t,h:n,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._allocatedGlyphs.add(l),l}getUsagePreview(){const e=this._canvas.width,t=this._canvas.height,n=new OffscreenCanvas(e,t),s=vC(n.getContext("2d"));s.fillStyle="#808080",s.fillRect(0,0,e,t);let r=0,o=0,a=0;const l=64<l&&(g=0,f+=h.entryH),s.fillStyle="#FF0000",s.fillRect(h.x+g,h.y+f,h.entryW,h.entryH),r+=h.entryW*h.entryH,g+=h.entryW;const m=Math.floor(l/h.entryW),x=Math.floor(c/h.entryH);h.entryW*m*h.entryH*x}for(const h of this._allocatedGlyphs)o+=h.w*h.h,s.fillStyle="#4040FF",s.fillRect(h.x,h.y,h.w,h.h);const u=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(const h of u)s.fillStyle="#FF000088",s.fillRect(h.x,h.y,h.w,h.h),a+=h.w*h.h;return s.globalAlpha=.5,s.drawImage(this._canvas,0,0),s.globalAlpha=1,n.convertToBlob()}getStats(){const e=this._canvas.width,t=this._canvas.height;let n=0,s=0,r=0,o=0,a=0;const l=e*t,c=64<c&&(x=0,v+=m.entryH),n+=m.entryW*m.entryH,x+=m.entryW;const _=Math.floor(c/m.entryW),w=Math.floor(u/m.entryH),k=m.entryW*_*m.entryH*w;r+=c*u-k}for(const m of this._allocatedGlyphs)s+=m.w*m.h;const h=Array.from(this._openRegionsByWidth.values()).flat().concat(Array.from(this._openRegionsByHeight.values()).flat());for(const m of h)a+=m.w*m.h;const g=r-a;o=n-(s-g);const f=s/(s+o+a);return[`page[${this._textureIndex}]:`,` Total: ${l}px (${e}x${t})`,` Used: ${s}px (${(s/l*100).toFixed(2)}%)`,` Wasted: ${o}px (${(o/l*100).toFixed(2)}%)`,`Restricted: ${a}px (${(a/l*100).toFixed(2)}%) (hard to allocate)`,`Efficiency: ${f===1?"100":(f*100).toFixed(2)}%`,` Slabs: ${this._slabs.length} of ${Math.floor(this._canvas.width/c)*Math.floor(this._canvas.height/u)}`].join(` +`)}}function kve(i,e,t){let n=i.get(e);n||(n=[],i.set(e,n)),n.push(t)}var DOt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Nve=function(i,e){return function(t,n){e(t,n,i)}},FQ,iw;let wg=(iw=class extends se{get version(){return this._version}get usedArea(){return this._usedArea}get source(){return this._canvas}get glyphs(){return this._glyphInOrderSet.values()}constructor(e,t,n,s,r){switch(super(),this._logService=s,this._version=0,this._usedArea={left:0,top:0,right:0,bottom:0},this._glyphMap=new M7,this._glyphInOrderSet=new Set,this._canvas=new OffscreenCanvas(t,t),this._colorMap=r.getColorTheme().tokenColorMap,n){case"shelf":this._allocator=new EOt(this._canvas,e);break;case"slab":this._allocator=new LOt(this._canvas,e);break;default:this._allocator=n(this._canvas,e);break}this._register(dt(()=>{this._canvas.width=1,this._canvas.height=1}))}getGlyph(e,t,n,s){return this._glyphMap.get(t,n,s,e.cacheKey)??this._createGlyph(e,t,n,s)}_createGlyph(e,t,n,s){if(this._glyphInOrderSet.size>=FQ.maximumGlyphCount)return;const r=e.rasterizeGlyph(t,n,s,this._colorMap),o=this._allocator.allocate(r);if(o!==void 0)return this._glyphMap.set(o,t,n,s,e.cacheKey),this._glyphInOrderSet.add(o),this._version++,this._usedArea.right=Math.max(this._usedArea.right,o.x+o.w-1),this._usedArea.bottom=Math.max(this._usedArea.bottom,o.y+o.h-1),this._logService.getLevel()===ho.Trace&&this._logService.trace("New glyph",{chars:t,tokenMetadata:n,decorationStyleSetId:s,rasterizedGlyph:r,glyph:o}),o}getUsagePreview(){return this._allocator.getUsagePreview()}getStats(){return this._allocator.getStats()}},FQ=iw,iw.maximumGlyphCount=5e3,iw);wg=FQ=DOt([Nve(3,Ji),Nve(4,Ws)],wg);var TOt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Eve=function(i,e){return function(t,n){e(t,n,i)}},dj,sw;let Qv=(sw=class extends se{get pages(){return this._pages}constructor(e,t,n,s,r){super(),this._maxTextureSize=e,this._decorationStyleCache=n,this._themeService=s,this._instantiationService=r,this._warmUpTask=this._register(new Zn),this._warmedUpRasterizers=new Set,this._pages=[],this._glyphPageIndex=new M7,this._onDidDeleteGlyphs=this._register(new ie),this.onDidDeleteGlyphs=this._onDidDeleteGlyphs.event,this._allocatorType=(t==null?void 0:t.allocatorType)??"slab",this._register(He.runAndSubscribe(this._themeService.onDidColorThemeChange,()=>{this._colorMap&&this.clear(),this._colorMap=this._themeService.getColorTheme().tokenColorMap}));const o=Math.max(1,Math.floor(oi().devicePixelRatio));this.pageSize=Math.min(1024*o,this._maxTextureSize),this._initFirstPage(),this._register(dt(()=>ii(this._pages)))}_initFirstPage(){const e=this._instantiationService.createInstance(wg,0,this.pageSize,this._allocatorType);this._pages.push(e);const t=new MR(1,"",1,this._decorationStyleCache);e.getGlyph(t,"",0,0),t.dispose()}clear(){for(const e of this._pages)e.dispose();this._pages.length=0,this._glyphPageIndex.clear(),this._warmedUpRasterizers.clear(),this._warmUpTask.clear(),this._initFirstPage(),this._onDidDeleteGlyphs.fire()}getGlyph(e,t,n,s,r){return n&=-2048,n|=Math.floor(r%1*10),this._warmedUpRasterizers.has(e.id)||(this._warmUpAtlas(e),this._warmedUpRasterizers.add(e.id)),this._tryGetGlyph(this._glyphPageIndex.get(t,n,s,e.cacheKey)??0,e,t,n,s)}_tryGetGlyph(e,t,n,s,r){return this._glyphPageIndex.set(e,n,s,r,t.cacheKey),this._pages[e].getGlyph(t,n,s,r)??(e+1=dj.maximumPageCount)throw new Error(`Attempt to create a texture atlas page past the limit ${dj.maximumPageCount}`);return this._pages.push(this._instantiationService.createInstance(wg,this._pages.length,this.pageSize,this._allocatorType)),this._glyphPageIndex.set(this._pages.length-1,t,n,s,e.cacheKey),this._pages[this._pages.length-1].getGlyph(e,t,n,s)}getStats(){return this._pages.map(e=>e.getStats())}_warmUpAtlas(e){var s;const t=this._colorMap;if(!t)throw new Nt("Cannot warm atlas without color map");(s=this._warmUpTask.value)==null||s.clear();const n=this._warmUpTask.value=this._instantiationService.createInstance(NOt);for(let r=65;r<=90;r++)for(const o of t.keys())n.enqueue(()=>{for(let a=0;a<1;a+=.1)this.getGlyph(e,String.fromCharCode(r),o<<15&16744448,0,a)});for(let r=97;r<=122;r++)for(const o of t.keys())n.enqueue(()=>{for(let a=0;a<1;a+=.1)this.getGlyph(e,String.fromCharCode(r),o<<15&16744448,0,a)});for(let r=33;r<=126;r++)for(const o of t.keys())n.enqueue(()=>{for(let a=0;a<1;a+=.1)this.getGlyph(e,String.fromCharCode(r),o<<15&16744448,0,a)})}},dj=sw,sw.maximumPageCount=16,sw);Qv=dj=TOt([Eve(3,Ws),Eve(4,ft)],Qv);var PR;(function(i){i[i.Ignore=0]="Ignore",i[i.Info=1]="Info",i[i.Warning=2]="Warning",i[i.Error=3]="Error"})(PR||(PR={}));(function(i){const e="error",t="warning",n="warn",s="info",r="ignore";function o(l){return l?h1(e,l)?i.Error:h1(t,l)||h1(n,l)?i.Warning:h1(s,l)?i.Info:i.Ignore:i.Ignore}i.fromValue=o;function a(l){switch(l){case i.Error:return e;case i.Warning:return t;case i.Info:return s;default:return r}}i.toString=a})(PR||(PR={}));var Os=PR,jD=Os;const nr=ln("notificationService");class IOt{}var uc;(function(i){async function e(s){try{if(!navigator.gpu)throw new Error("This browser does not support WebGPU");const r=await navigator.gpu.requestAdapter();if(!r)throw new Error("This browser supports WebGPU but it appears to be disabled");return X$(await r.requestDevice())}catch(r){throw s&&s(r.message),r}}i.requestDevice=e;function t(s,r,o){const a=s.createBuffer(r);return o&&s.queue.writeBuffer(a,0,cC(o)?o():o),X$(a)}i.createBuffer=t;function n(s,r){return X$(s.createTexture(r))}i.createTexture=n})(uc||(uc={}));function X$(i){return{object:i,dispose:()=>i.destroy()}}class AOt{get dataOffset(){return this._startIndex}get dirtySize(){if(!(this._startIndex===void 0||this._endIndex===void 0))return this._endIndex-this._startIndex+1}get isDirty(){return this._startIndex!==void 0}flag(e,t=1){return this._flag(e),t>1&&this._flag(e+t-1),e}_flag(e){(this._startIndex===void 0||ethis._endIndex)&&(this._endIndex=e)}clear(){this._startIndex=void 0,this._endIndex=void 0}}function ROt(i,e){return new MOt(i,e)}class MOt extends se{get entryCount(){return this._entries.size}get dirtyTracker(){return this._dirtyTracker}constructor(e,t){super(),this.propertySpecs=e,this.capacity=t,this._dirtyTracker=new AOt,this._propertySpecsMap=new Map,this._entries=new ll,this._onDidChange=this._register(new ie),this._onDidChangeBuffer=this._register(new ie),this.onDidChangeBuffer=this._onDidChangeBuffer.event,this.view=new Float32Array(t*e.length),this.buffer=this.view.buffer,this._entrySize=e.length;for(let n=0;nii(this._entries)))}createEntry(e){this._entries.size===this.capacity&&(this._expandBuffer(),this._onDidChangeBuffer.fire());const t=new POt(this.view,this._propertySpecsMap,this._dirtyTracker,this._entries.size,e),n=this._entries.push(t),s=[];return s.push(He.forward(t.onDidChange,this._onDidChange)),s.push(t.onWillDispose(()=>{const r=t.i;n(),this.view.set(this.view.subarray(r*this._entrySize+2,this._entries.size*this._entrySize+2),r*this._entrySize);for(const o of this._entries)o.i>r&&o.i--;this._dirtyTracker.flag(r,(this._entries.size-r)*this._entrySize),ii(s)})),t}_expandBuffer(){this.capacity*=2;const e=new Float32Array(this.capacity*this._entrySize);e.set(this.view),this.view=e,this.buffer=this.view.buffer}}class POt extends se{constructor(e,t,n,s,r){super(),this._view=e,this._propertySpecsMap=t,this._dirtyTracker=n,this.i=s,this._onDidChange=this._register(new ie),this.onDidChange=this._onDidChange.event,this._onWillDispose=this._register(new ie),this.onWillDispose=this._onWillDispose.event;for(const o of this._propertySpecsMap.values())this._view[this.i*this._propertySpecsMap.size+o.offset]=r[o.name];this._dirtyTracker.flag(this.i*this._propertySpecsMap.size,this._propertySpecsMap.size)}dispose(){this._onWillDispose.fire(),super.dispose()}setRaw(e){if(e.length!==this._propertySpecsMap.size)throw new Error(`Data length ${e.length} does not match the number of properties in the collection (${this._propertySpecsMap.size})`);this._view.set(e,this.i*this._propertySpecsMap.size),this._dirtyTracker.flag(this.i*this._propertySpecsMap.size,this._propertySpecsMap.size)}}const OOt=` + +struct Vertex { + @location(0) position: vec2f, +}; + +struct LayoutInfo { + canvasDims: vec2f, + viewportOffset: vec2f, + viewportDims: vec2f, +} + +struct ScrollOffset { + offset: vec2f, +} + +struct Shape { + position: vec2f, + size: vec2f, + color: vec4f, +}; + +struct VSOutput { + @builtin(position) position: vec4f, + @location(1) color: vec4f, +}; + +// Uniforms +@group(0) @binding(1) var layoutInfo: LayoutInfo; + +// Storage buffers +@group(0) @binding(0) var shapes: array; +@group(0) @binding(2) var scrollOffset: ScrollOffset; + +@vertex fn vs( + vert: Vertex, + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex : u32 +) -> VSOutput { + let shape = shapes[instanceIndex]; + + var vsOut: VSOutput; + vsOut.position = vec4f( + ( + // Top left corner + vec2f(-1, 1) + + // Convert pixel position to clipspace + vec2f( 2, -2) / layoutInfo.canvasDims * + // Shape position and size + (layoutInfo.viewportOffset - scrollOffset.offset + shape.position + vert.position * shape.size) + ), + 0.0, + 1.0 + ); + vsOut.color = shape.color; + return vsOut; +} + +@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f { + return vsOut.color; +} +`;class jOt extends oS{constructor(e,t,n,s,r,o){super(),this._context=e,this._contentLeft=t,this._devicePixelRatio=n,this._canvas=s,this._ctx=r,this._shapeBindBuffer=this._register(new Zn),this._initialized=!1,this._shapeCollection=this._register(ROt([{name:"x"},{name:"y"},{name:"width"},{name:"height"},{name:"red"},{name:"green"},{name:"blue"},{name:"alpha"}],32)),this._context.addEventHandler(this),this._initWebgpu(o)}async _initWebgpu(e){if(this._device=await e,this._store.isDisposed)return;const t=navigator.gpu.getPreferredCanvasFormat();this._ctx.configure({device:this._device,format:t,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco rectangle renderer render pass",colorAttachments:[this._renderPassColorAttachment]};let n;{const a=new Float32Array(6),l=(c=this._canvas.width,u=this._canvas.height)=>(a[0]=c,a[1]=u,a[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*oi().devicePixelRatio),a[3]=0,a[4]=a[0]-a[2],a[5]=a[1]-a[3],a);n=this._register(uc.createBuffer(this._device,{label:"Monaco rectangle renderer uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>l())).object,this._register(M2e(this._canvas,oi(),(c,u)=>{this._device.queue.writeBuffer(n,0,l(c,u))}))}const s=2;this._scrollOffsetBindBuffer=this._register(uc.createBuffer(this._device,{label:"Monaco rectangle renderer scroll offset buffer",size:s*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(s);const r=()=>uc.createBuffer(this._device,{label:"Monaco rectangle renderer shape buffer",size:this._shapeCollection.buffer.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});this._shapeBindBuffer.value=r(),this._register(He.runAndSubscribe(this._shapeCollection.onDidChangeBuffer,()=>{this._shapeBindBuffer.value=r(),this._pipeline&&this._updateBindGroup(this._pipeline,n)})),this._vertexBuffer=this._register(uc.createBuffer(this._device,{label:"Monaco rectangle renderer vertex buffer",size:q1.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},q1)).object;const o=this._device.createShaderModule({label:"Monaco rectangle renderer shader module",code:OOt});this._pipeline=this._device.createRenderPipeline({label:"Monaco rectangle renderer render pipeline",layout:"auto",vertex:{module:o,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:o,targets:[{format:t,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._updateBindGroup(this._pipeline,n),this._initialized=!0}_updateBindGroup(e,t){this._bindGroup=this._device.createBindGroup({label:"Monaco rectangle renderer bind group",layout:e.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._shapeBindBuffer.value.object}},{binding:1,resource:{buffer:t}},{binding:2,resource:{buffer:this._scrollOffsetBindBuffer}}]})}register(e,t,n,s,r,o,a,l){return this._shapeCollection.createEntry({x:e,y:t,width:n,height:s,red:r,green:o,blue:a,alpha:l})}onScrollChanged(e){if(this._device){const t=oi().devicePixelRatio;this._scrollOffsetValueBuffer[0]=this._context.viewLayout.getCurrentScrollLeft()*t,this._scrollOffsetValueBuffer[1]=this._context.viewLayout.getCurrentScrollTop()*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer)}return!0}_update(){if(!this._device)return;const e=this._shapeCollection;e.dirtyTracker.isDirty&&(this._device.queue.writeBuffer(this._shapeBindBuffer.value.object,0,e.buffer,e.dirtyTracker.dataOffset,e.dirtyTracker.dirtySize*e.view.BYTES_PER_ELEMENT),e.dirtyTracker.clear())}draw(e){if(!this._initialized)return;this._update();const t=this._device.createCommandEncoder({label:"Monaco rectangle renderer command encoder"});this._renderPassColorAttachment.view=this._ctx.getCurrentTexture().createView();const n=t.beginRenderPass(this._renderPassDescriptor);n.setPipeline(this._pipeline),n.setVertexBuffer(0,this._vertexBuffer),n.setBindGroup(0,this._bindGroup);const s=Math.ceil(this._contentLeft.get()*this._devicePixelRatio.get());n.setScissorRect(s,0,this._canvas.width-s,this._canvas.height),n.draw(q1.length/2,this._shapeCollection.entryCount),n.end();const r=t.finish();this._device.queue.submit([r])}}class FOt extends se{constructor(){super(),this._ruleCache=new Map,this._container=Oe("div.monaco-decoration-css-rule-extractor"),this._dummyElement=Oe("span"),this._container.appendChild(this._dummyElement),this._register(dt(()=>this._container.remove()))}getStyleRules(e,t){const n=this._ruleCache.get(t);if(n)return n;this._dummyElement.className=t,e.appendChild(this._container);const s=this._getStyleRules(t);return this._ruleCache.set(t,s),e.removeChild(this._container),s}_getStyleRules(e){const t=[],s=[...WP().styleSheets];for(let r=0;r({deltas:[],didChange:!1}),handleChange:(s,r)=>{if(s.didChange(i)){const o=s.change;o!==void 0&&r.deltas.push(o),r.didChange=!0}return!0}}},(s,r)=>{const o=i.read(s),a=t;r.didChange&&(t=o,e(o,a,r.deltas)),n&&(n=!1,t=o)})}function P2e(i,e){const t=new _e,n=Bg(i,(s,r,o)=>{t.clear(),e(s,r,o,t)});return{dispose(){n.dispose(),t.dispose()}}}function HOt(i,e){return P2e(i,(t,n,s,r)=>{e(t,n,s,AY(r))})}var WOt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Z$=function(i,e){return function(t,n){e(t,n,i)}},Ll,S_;let rl=(S_=class extends se{static get decorationCssRuleExtractor(){return Ll._decorationCssRuleExtractor}static get decorationStyleCache(){return Ll._decorationStyleCache}static get atlas(){if(!Ll._atlas)throw new Nt("Cannot call ViewGpuContext.textureAtlas before device is resolved");return Ll._atlas}get atlas(){return Ll.atlas}constructor(e,t,n,s){super(),this._instantiationService=t,this._notificationService=n,this.configurationService=s,this.maxGpuCols=2e3,this.canvas=Yn(document.createElement("canvas")),this.canvas.setClassName("editorCanvas"),this._register(He.runAndSubscribe(s.onDidChangeConfiguration,l=>{var c;if(!l||l.affectsConfiguration("editor.scrollbar.verticalScrollbarSize")){const u=((c=s.getValue("editor").scrollbar)==null?void 0:c.verticalScrollbarSize)??14;this.canvas.domNode.style.boxSizing="border-box",this.canvas.domNode.style.paddingRight=`${u}px`}})),this.ctx=vC(this.canvas.domNode.getContext("webgpu")),Ll.device||(Ll.device=uc.requestDevice(l=>{const c=[{label:S(78,"Use DOM-based rendering"),run:()=>this.configurationService.updateValue("editor.experimentalGpuAcceleration","off")}];this._notificationService.prompt(jD.Warning,l,c)}).then(l=>(Ll.deviceSync=l.object,Ll._atlas||(Ll._atlas=this._instantiationService.createInstance(Qv,l.object.limits.maxTextureDimension2D,void 0,Ll.decorationStyleCache)),l.object)));const r=Ft(this,oi().devicePixelRatio);this._register(de(oi(),"resize",()=>{r.set(oi().devicePixelRatio,void 0)})),this.devicePixelRatio=r,this._register(Bg(this.devicePixelRatio,()=>{var l;return(l=Ll.atlas)==null?void 0:l.clear()}));const o=Ft(this,{width:this.canvas.domNode.width,height:this.canvas.domNode.height});this._register(M2e(this.canvas.domNode,oi(),(l,c)=>{this.canvas.domNode.width=l,this.canvas.domNode.height=c,o.set({width:l,height:c},void 0)})),this.canvasDevicePixelDimensions=o;const a=Ft(this,0);this._register(this.configurationService.onDidChangeConfiguration(l=>{a.set(e.configuration.options.get(165).contentLeft,void 0)})),this.contentLeft=a,this.rectangleRenderer=this._instantiationService.createInstance(jOt,e,this.contentLeft,this.devicePixelRatio,this.canvas.domNode,this.ctx,Ll.device)}canRender(e,t,n){const s=t.getViewLineRenderingData(n);if(s.containsRTL||s.maxColumn>this.maxGpuCols)return!1;if(s.inlineDecorations.length>0){let r=!0;for(const o of s.inlineDecorations){if(o.type!==0){r=!1;break}const a=Ll._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,o.inlineClassName);if(r&&(r=a.every(l=>{if(l.selectorText.includes(":"))return!1;for(const c of l.style)if(!Lve(c,l.style))return!1;return!0})),!r)break}return r}return!0}canRenderDetailed(e,t,n){const s=t.getViewLineRenderingData(n),r=[];if(s.containsRTL&&r.push("containsRTL"),s.maxColumn>this.maxGpuCols&&r.push("maxColumn > maxGpuCols"),s.inlineDecorations.length>0){let o=!0;const a=[],l=[],c=[];for(const u of s.inlineDecorations){if(u.type!==0){a.push(u.type),o=!1;continue}const h=Ll._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,u.inlineClassName);o&&(o=h.every(g=>{if(g.selectorText.includes(":"))return l.push(g.selectorText),!1;for(const f of g.style)if(!Lve(f,g.style))return c.push(`${f}: ${g.style[f]}`),!1;return!0}))}a.length>0&&r.push(`inlineDecorations with unsupported types (${a.map(u=>`\`${u}\``).join(", ")})`),c.length>0&&r.push(`inlineDecorations with unsupported CSS rules (${c.map(u=>`\`${u}\``).join(", ")})`),l.length>0&&r.push(`inlineDecorations with unsupported CSS selectors (${l.map(u=>`\`${u}\``).join(", ")})`)}return r}},Ll=S_,S_._decorationCssRuleExtractor=new FOt,S_._decorationStyleCache=new BOt,S_);rl=Ll=WOt([Z$(1,ft),Z$(2,nr),Z$(3,Zt)],rl);const VOt=["color","font-weight","opacity"];function Lve(i,e){return!!VOt.includes(i)}function p6(i,e){return i.isBasicASCII&&e.useMonospaceOptimizations?new zOt(i):new UOt(i)}class zOt{constructor(e){this._content=e.content}getSegmentAtIndex(e){return this._content[e]}}class UOt{constructor(e){this._segments=[];const t=e.content,n=sS.Segmenter(void 0,{granularity:"grapheme"}).value,s=Array.from(n.segment(t));let r=0;for(let o=0;o layoutInfo: LayoutInfo; +@group(0) @binding(5) var atlasDims: vec2f; +@group(0) @binding(6) var scrollOffset: ScrollOffset; + +// Storage buffers +@group(0) @binding(0) var glyphInfo: array, ${Qv.maximumPageCount}>; +@group(0) @binding(1) var cells: array; + +@vertex fn vs( + vert: Vertex, + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex : u32 +) -> VSOutput { + let cell = cells[instanceIndex]; + var glyph = glyphInfo[u32(cell.textureIndex)][u32(cell.glyphIndex)]; + + var vsOut: VSOutput; + // Multiple vert.position by 2,-2 to get it into clipspace which ranged from -1 to 1 + vsOut.position = vec4f( + // Make everything relative to top left instead of center + vec2f(-1, 1) + + ((vert.position * vec2f(2, -2)) / layoutInfo.canvasDims) * glyph.size + + ((cell.position * vec2f(2, -2)) / layoutInfo.canvasDims) + + ((glyph.origin * vec2f(2, -2)) / layoutInfo.canvasDims) + + (((layoutInfo.viewportOffset - scrollOffset.offset * vec2(1, -1)) * 2) / layoutInfo.canvasDims), + 0.0, + 1.0 + ); + + vsOut.layerIndex = cell.textureIndex; + // Textures are flipped from natural direction on the y-axis, so flip it back + vsOut.texcoord = vert.position; + vsOut.texcoord = ( + // Glyph offset (0-1) + (glyph.position / atlasDims) + + // Glyph coordinate (0-1) + (vsOut.texcoord * (glyph.size / atlasDims)) + ); + + return vsOut; +} + +@group(0) @binding(2) var ourSampler: sampler; +@group(0) @binding(3) var ourTexture: texture_2d_array; + +@fragment fn fs(vsOut: VSOutput) -> @location(0) vec4f { + return textureSample(ourTexture, ourSampler, vsOut.texcoord, u32(vsOut.layerIndex)); +} +`,Af=class Af extends O2e{get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,n,s){super(e,t,n,s),this.type="viewport",this.wgsl=j2e,this._cellBindBufferLineCapacity=63,this._activeDoubleBufferIndex=0,this._visibleObjectCount=0,this._scrollInitialized=!1,this._onDidChangeBindGroupEntries=this._register(new ie),this.onDidChangeBindGroupEntries=this._onDidChangeBindGroupEntries.event,this._rebuildCellBuffer(this._cellBindBufferLineCapacity);const r=2;this._scrollOffsetBindBuffer=this._register(uc.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:r*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(r)}_rebuildCellBuffer(e){var s;(s=this._cellBindBuffer)==null||s.destroy();const t=(Math.floor(e/32)+1)*32,n=t*Af.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(uc.createBuffer(this._device,{label:"Monaco full file cell buffer",size:n,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(n),new ArrayBuffer(n)],this._cellBindBufferLineCapacity=t,this._onDidChangeBindGroupEntries.fire()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onTokensChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onLinesChanged(e){return!0}onScrollChanged(e){const t=oi().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=((e==null?void 0:e.scrollLeft)??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=((e==null?void 0:e.scrollTop)??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return!0}onLineMappingChanged(e){return!0}onZonesChanged(e){return!0}reset(){for(const e of[0,1]){const t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}}update(e,t){var H;let n="",s,r=0,o=0,a=0,l=0,c=0,u=0,h,g=0,f=0,m=0,x=0,v,_,w,k,C,E=0,D=0,T;const I=oi().devicePixelRatio;let R;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0),this._cellBindBufferLineCapacityAf.maxSupportedColumns);a++){if(s=R.getSegmentAtIndex(a),s===void 0)continue;n=s,k.isBasicASCII&&t.useMonospaceOptimizations||(r=this.glyphRasterizer.getTextMetrics(n).width),_=void 0,v=void 0,w=void 0;for(C of k.inlineDecorations){if(oC.range.endLineNumber||o===C.range.startLineNumber&&a=C.range.endColumn-1)continue;const X=rl.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,C.inlineClassName);for(const ae of X)for(const ne of ae.style){const W=((H=ae.styleMap.get(ne))==null?void 0:H.toString())??"";switch(ne){case"color":{const Y=ye.Format.CSS.parse(W);if(!Y)throw new Nt("Invalid color format "+W);_=Y.toNumber32Bit();break}case"font-weight":{$Ot(W)>=400?v=!0:v=!1;break}case"opacity":{w=qOt(W);break}default:throw new Nt("Unexpected inline decoration style")}}}if(n===" "||n===" "){if(g=((o-1)*Af.maxSupportedColumns+a)*6,P.fill(0,g,g+6),n===" "){const X=a+u;u=js.nextRenderTabStop(a+u,k.tabSize),l+=r*(u-X),u-=a+1}else l+=r;continue}const V=rl.decorationStyleCache.getOrCreateEntry(_,v,w);h=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,n,x,V,l),c=Math.round(e.relativeVerticalOffset[o-e.startLineNumber]*I+Math.floor((e.lineHeight*I-(h.fontBoundingBoxAscent+h.fontBoundingBoxDescent))/2)+h.fontBoundingBoxAscent),g=((o-e.startLineNumber)*Af.maxSupportedColumns+a)*6,P[g+0]=Math.floor(l),P[g+1]=c,P[g+4]=h.glyphIndex,P[g+5]=h.pageIndex,l+=r}f=m}E=((o-e.startLineNumber)*Af.maxSupportedColumns+m)*6,D=(o-e.startLineNumber)*Af.maxSupportedColumns*6,P.fill(0,E,D)}const B=(e.endLineNumber-e.startLineNumber+1)*j;return this._device.queue.writeBuffer(this._cellBindBuffer,0,P.buffer,0,(e.endLineNumber-e.startLineNumber)*j*Float32Array.BYTES_PER_ELEMENT),this._activeDoubleBufferIndex=this._activeDoubleBufferIndex?0:1,this._visibleObjectCount=B,B}draw(e,t){if(this._visibleObjectCount<=0)throw new Nt("Attempt to draw 0 objects");e.draw(q1.length/2,this._visibleObjectCount)}};Af.maxSupportedColumns=2e3;let BQ=Af;function $Ot(i){switch(i){case"lighter":case"normal":return 400;case"bolder":case"bold":return 700}return parseInt(i)}function qOt(i){return i.endsWith("%")?parseFloat(i.substring(0,i.length-1))/100:i.match(/^\d+(?:\.\d*)/)?parseFloat(i):1}const ua=class ua extends O2e{get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,n,s){super(e,t,n,s),this.type="fullfile",this.wgsl=j2e,this._activeDoubleBufferIndex=0,this._upToDateLines=[new Set,new Set],this._visibleObjectCount=0,this._finalRenderedLine=0,this._scrollInitialized=!1,this._queuedBufferUpdates=[[],[]];const r=ua.maxSupportedLines*ua.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(uc.createBuffer(this._device,{label:"Monaco full file cell buffer",size:r,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(r),new ArrayBuffer(r)];const o=2;this._scrollOffsetBindBuffer=this._register(uc.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:o*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(o)}onConfigurationChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}onDecorationsChanged(e){return this._invalidateAllLines(),!0}onTokensChanged(e){for(const t of e.ranges)this._invalidateLineRange(t.fromLineNumber,t.toLineNumber);return!0}onLinesDeleted(e){return this._invalidateLinesFrom(e.fromLineNumber),this._queueBufferUpdate(e),!0}onLinesInserted(e){return this._invalidateLinesFrom(e.fromLineNumber),!0}onLinesChanged(e){return this._invalidateLineRange(e.fromLineNumber,e.fromLineNumber+e.count),!0}onScrollChanged(e){const t=oi().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=((e==null?void 0:e.scrollLeft)??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=((e==null?void 0:e.scrollTop)??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return this._invalidateAllLines(),!0}onLineMappingChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}onZonesChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}_invalidateAllLines(){this._upToDateLines[0].clear(),this._upToDateLines[1].clear()}_invalidateLinesFrom(e){for(const t of[0,1]){const n=this._upToDateLines[t];for(const s of n)s>=e&&n.delete(s)}}_invalidateLineRange(e,t){for(let n=e;n<=t;n++)this._upToDateLines[0].delete(n),this._upToDateLines[1].delete(n)}reset(){this._invalidateAllLines();for(const e of[0,1]){const t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}this._finalRenderedLine=0}update(e,t){var X;let n="",s,r=0,o=0,a=0,l=0,c=0,u=0,h,g=0,f=0,m=0,x=0,v,_,w,k,C,E=0,D=0,T;const I=oi().devicePixelRatio;let R;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0);const P=new Float32Array(this._cellValueBuffers[this._activeDoubleBufferIndex]),j=ua.maxSupportedColumns*6,B=this._upToDateLines[this._activeDoubleBufferIndex];let H=3e3,$=0;const q=this._queuedBufferUpdates[this._activeDoubleBufferIndex];for(;q.length;){const ae=q.shift();switch(ae.type){case 2:case 8:case 17:{P.fill(0),H=1,$=Math.max($,this._finalRenderedLine),this._finalRenderedLine=0;break}case 10:{const ne=(ae.fromLineNumber-1)*ua.maxSupportedColumns*6,W=ae.toLineNumber*ua.maxSupportedColumns*6,Y=(this._finalRenderedLine-(ae.toLineNumber-ae.fromLineNumber+1))*ua.maxSupportedColumns*6;P.set(P.subarray(W),ne),P.fill(0,Y),H=Math.min(H,ae.fromLineNumber),$=Math.max($,this._finalRenderedLine),this._finalRenderedLine-=ae.toLineNumber-ae.fromLineNumber+1;break}}}for(o=e.startLineNumber;o<=e.endLineNumber;o++){if(!this._viewGpuContext.canRender(t,e,o)){E=(o-1)*ua.maxSupportedColumns*6,D=o*ua.maxSupportedColumns*6,P.fill(0,E,D),H=Math.min(H,o),$=Math.max($,o);continue}if(!B.has(o)){H=Math.min(H,o),$=Math.max($,o),k=e.getViewLineRenderingData(o),u=0,R=p6(k,t),r=t.spaceWidth*I,l=0,T=k.tokens,f=k.minColumn-1,m=0;for(let ae=0,ne=T.getCount();aeua.maxSupportedColumns);a++){if(s=R.getSegmentAtIndex(a),s===void 0)continue;n=s,k.isBasicASCII&&t.useMonospaceOptimizations||(r=this.glyphRasterizer.getTextMetrics(n).width),_=void 0,v=void 0,w=void 0;for(C of k.inlineDecorations){if(oC.range.endLineNumber||o===C.range.startLineNumber&&a=C.range.endColumn-1)continue;const Y=rl.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,C.inlineClassName);for(const G of Y)for(const U of G.style){const ue=((X=G.styleMap.get(U))==null?void 0:X.toString())??"";switch(U){case"color":{const fe=ye.Format.CSS.parse(ue);if(!fe)throw new Nt("Invalid color format "+ue);_=fe.toNumber32Bit();break}case"font-weight":{KOt(ue)>=400?v=!0:v=!1;break}case"opacity":{w=GOt(ue);break}default:throw new Nt("Unexpected inline decoration style")}}}if(n===" "||n===" "){if(g=((o-1)*ua.maxSupportedColumns+a)*6,P.fill(0,g,g+6),n===" "){const Y=a+u;u=js.nextRenderTabStop(a+u,k.tabSize),l+=r*(u-Y),u-=a+1}else l+=r;continue}const W=rl.decorationStyleCache.getOrCreateEntry(_,v,w);h=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,n,x,W,l),c=Math.round(e.relativeVerticalOffset[o-e.startLineNumber]*I+Math.floor((e.lineHeight*I-(h.fontBoundingBoxAscent+h.fontBoundingBoxDescent))/2)+h.fontBoundingBoxAscent),g=((o-1)*ua.maxSupportedColumns+a)*6,P[g+0]=Math.floor(l),P[g+1]=c,P[g+4]=h.glyphIndex,P[g+5]=h.pageIndex,l+=r}f=m}E=((o-1)*ua.maxSupportedColumns+m)*6,D=o*ua.maxSupportedColumns*6,P.fill(0,E,D),B.add(o)}}const V=(e.endLineNumber-e.startLineNumber+1)*j;return H=Math.min(H,ua.maxSupportedLines),$=Math.min($,ua.maxSupportedLines),H<=$&&this._device.queue.writeBuffer(this._cellBindBuffer,(H-1)*j*Float32Array.BYTES_PER_ELEMENT,P.buffer,(H-1)*j*Float32Array.BYTES_PER_ELEMENT,($-H+1)*j*Float32Array.BYTES_PER_ELEMENT),this._finalRenderedLine=Math.max(this._finalRenderedLine,$),this._activeDoubleBufferIndex=this._activeDoubleBufferIndex?0:1,this._visibleObjectCount=V,V}draw(e,t){if(this._visibleObjectCount<=0)throw new Nt("Attempt to draw 0 objects");e.draw(q1.length/2,this._visibleObjectCount,void 0,(t.startLineNumber-1)*ua.maxSupportedColumns)}_queueBufferUpdate(e){this._queuedBufferUpdates[0].push(e),this._queuedBufferUpdates[1].push(e)}};ua.maxSupportedLines=3e3,ua.maxSupportedColumns=200;let Hy=ua;function KOt(i){switch(i){case"lighter":case"normal":return 400;case"bolder":case"bold":return 700}return parseInt(i)}function GOt(i){return i.endsWith("%")?parseFloat(i.substring(0,i.length-1))/100:i.match(/^\d+(?:\.\d*)/)?parseFloat(i):1}var YOt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Dve=function(i,e){return function(t,n){e(t,n,i)}};let HQ=class extends Xl{constructor(e,t,n,s){super(e),this._viewGpuContext=t,this._instantiationService=n,this._logService=s,this._atlasGpuTextureVersions=[],this._initialized=!1,this._glyphRasterizer=this._register(new Zn),this._renderStrategy=this._register(new Zn),this.canvas=this._viewGpuContext.canvas.domNode,this._register(Pt(r=>{this._viewGpuContext.canvasDevicePixelDimensions.read(r);const o=this._lastViewportData;o&&setTimeout(()=>{o===this._lastViewportData&&this.renderText(o)})})),this.initWebgpu()}async initWebgpu(){if(this._device=rl.deviceSync||await rl.device,this._store.isDisposed)return;const e=rl.atlas;this._register(e.onDidDeleteGlyphs(()=>{this._atlasGpuTextureVersions.length=0,this._atlasGpuTextureVersions[0]=0,this._atlasGpuTextureVersions[1]=0,this._renderStrategy.value.reset()}));const t=navigator.gpu.getPreferredCanvasFormat();this._viewGpuContext.ctx.configure({device:this._device,format:t,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco render pass",colorAttachments:[this._renderPassColorAttachment]};let n;{const l=new Float32Array(6),c=(u=this.canvas.width,h=this.canvas.height)=>(l[0]=u,l[1]=h,l[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*oi().devicePixelRatio),l[3]=0,l[4]=l[0]-l[2],l[5]=l[1]-l[3],l);n=this._register(uc.createBuffer(this._device,{label:"Monaco uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>c())).object,this._register(Bg(this._viewGpuContext.canvasDevicePixelDimensions,({width:u,height:h})=>{this._device.queue.writeBuffer(n,0,c(u,h))})),this._register(Bg(this._viewGpuContext.contentLeft,()=>{this._device.queue.writeBuffer(n,0,c())}))}let s;s=this._register(uc.createBuffer(this._device,{label:"Monaco atlas info uniform buffer",size:8,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>{const l=new Float32Array(2);return l[0]=e.pageSize,l[1]=e.pageSize,l})).object;const r=this._context.configuration.options.get(58),o=this._context.configuration.options.get(61);this._glyphRasterizer.value=this._register(new MR(o,r,this._viewGpuContext.devicePixelRatio.get(),rl.decorationStyleCache)),this._register(Bg(this._viewGpuContext.devicePixelRatio,()=>{this._refreshGlyphRasterizer()})),this._renderStrategy.value=this._instantiationService.createInstance(Hy,this._context,this._viewGpuContext,this._device,this._glyphRasterizer),this._glyphStorageBuffer=this._register(uc.createBuffer(this._device,{label:"Monaco glyph storage buffer",size:Qv.maximumPageCount*(wg.maximumGlyphCount*24),usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._atlasGpuTextureVersions[0]=0,this._atlasGpuTextureVersions[1]=0,this._atlasGpuTexture=this._register(uc.createTexture(this._device,{label:"Monaco atlas texture",format:"rgba8unorm",size:{width:e.pageSize,height:e.pageSize,depthOrArrayLayers:Qv.maximumPageCount},dimension:"2d",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT})).object,this._updateAtlasStorageBufferAndTexture(),this._vertexBuffer=this._register(uc.createBuffer(this._device,{label:"Monaco vertex buffer",size:q1.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},q1)).object;const a=this._device.createShaderModule({label:"Monaco shader module",code:this._renderStrategy.value.wgsl});if(this._pipeline=this._device.createRenderPipeline({label:"Monaco render pipeline",layout:"auto",vertex:{module:a,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:a,targets:[{format:t,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._rebuildBindGroup=()=>{this._bindGroup=this._device.createBindGroup({label:"Monaco bind group",layout:this._pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._glyphStorageBuffer}},{binding:2,resource:this._device.createSampler({label:"Monaco atlas sampler",magFilter:"nearest",minFilter:"nearest"})},{binding:3,resource:this._atlasGpuTexture.createView()},{binding:4,resource:{buffer:n}},{binding:5,resource:{buffer:s}},...this._renderStrategy.value.bindGroupEntries]})},this._rebuildBindGroup(),this._initialized=!0,this._initViewportData){for(const l of this._initViewportData)this.renderText(l);this._initViewportData=void 0}}_refreshRenderStrategy(e){var n,s;if(((n=this._renderStrategy.value)==null?void 0:n.type)==="viewport"||e.endLineNumber{var r;return(r=this._rebuildBindGroup)==null?void 0:r.call(this)})),(s=this._rebuildBindGroup)==null||s.call(this)}_viewportMaxColumn(e){let t=0,n;for(let s=e.startLineNumber;s<=e.endLineNumber;s++)n=e.getViewLineRenderingData(s),t=Math.max(t,n.maxColumn);return t}_updateAtlasStorageBufferAndTexture(){for(const[e,t]of rl.atlas.pages.entries()){if(e>=Qv.maximumPageCount){console.log(`Attempt to upload atlas page [${e}], only ${Qv.maximumPageCount} are supported currently`);continue}if(t.version===this._atlasGpuTextureVersions[e])continue;this._logService.trace("Updating atlas page[",e,"] from version ",this._atlasGpuTextureVersions[e]," to version ",t.version);const n=6*wg.maximumGlyphCount,s=new Float32Array(n);let r=0;for(const o of t.glyphs)s[r+0]=o.x,s[r+0+1]=o.y,s[r+2]=o.w,s[r+2+1]=o.h,s[r+4]=o.originOffsetX,s[r+4+1]=o.originOffsetY,r+=6;if(r/6>wg.maximumGlyphCount)throw new Error(`Attempting to write more glyphs (${r/6}) than the GPUBuffer can hold (${wg.maximumGlyphCount})`);this._device.queue.writeBuffer(this._glyphStorageBuffer,e*6*wg.maximumGlyphCount*Float32Array.BYTES_PER_ELEMENT,s,0,6*wg.maximumGlyphCount),t.usedArea.right-t.usedArea.left>0&&t.usedArea.bottom-t.usedArea.top>0&&this._device.queue.copyExternalImageToTexture({source:t.source},{texture:this._atlasGpuTexture,origin:{x:t.usedArea.left,y:t.usedArea.top,z:e}},{width:t.usedArea.right-t.usedArea.left+1,height:t.usedArea.bottom-t.usedArea.top+1}),this._atlasGpuTextureVersions[e]=t.version}}prepareRender(e){throw new Nt("Should not be called")}render(e){throw new Nt("Should not be called")}onConfigurationChanged(e){return this._refreshGlyphRasterizer(),!0}onCursorStateChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onLineMappingChanged(e){return!0}onRevealRangeRequest(e){return!0}onScrollChanged(e){return!0}onThemeChanged(e){return!0}onZonesChanged(e){return!0}_refreshGlyphRasterizer(){const e=this._glyphRasterizer.value;if(!e)return;const t=this._context.configuration.options.get(58),n=this._context.configuration.options.get(61),s=this._viewGpuContext.devicePixelRatio.get();(e.fontFamily!==t||e.fontSize!==n||e.devicePixelRatio!==s)&&(this._glyphRasterizer.value=new MR(n,t,s,rl.decorationStyleCache))}renderText(e){if(this._initialized)return this._refreshRenderStrategy(e),this._renderText(e);this._initViewportData=this._initViewportData??[],this._initViewportData.push(e)}_renderText(e){this._viewGpuContext.rectangleRenderer.draw(e);const t=new l6(this._context.configuration,this._context.theme.type);this._renderStrategy.value.update(e,t),this._updateAtlasStorageBufferAndTexture();const n=this._device.createCommandEncoder({label:"Monaco command encoder"});this._renderPassColorAttachment.view=this._viewGpuContext.ctx.getCurrentTexture().createView({label:"Monaco canvas texture view"});const s=n.beginRenderPass(this._renderPassDescriptor);s.setPipeline(this._pipeline),s.setVertexBuffer(0,this._vertexBuffer);const r=Math.ceil(this._viewGpuContext.contentLeft.get()*this._viewGpuContext.devicePixelRatio.get());s.setScissorRect(r,0,this.canvas.width-r,this.canvas.height),s.setBindGroup(0,this._bindGroup),this._renderStrategy.value.draw(s,e),s.end();const o=n.finish();this._device.queue.submit([o]),this._lastViewportData=e,this._lastViewLineOptions=t}linesVisibleRangesForRange(e,t){if(!this._lastViewportData)return null;const n=e.endLineNumber,s=z.intersectRanges(e,this._lastViewportData.visibleRange);if(!s)return null;const r=this._lastViewportData.startLineNumber,o=this._lastViewportData.endLineNumber,a=this._lastViewportData,l=this._lastViewLineOptions;if(!a||!l)return null;const c=[];let u=0;t&&(u=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new te(s.startLineNumber,1)).lineNumber);for(let h=s.startLineNumber;h<=s.endLineNumber;h++){if(ho)continue;const g=h===s.startLineNumber?s.startColumn:1,f=h!==n,m=f?this._context.viewModel.getLineMaxColumn(h):s.endColumn,x=this._visibleRangesForLineRange(h,g,m);if(x){if(t&&hs.endLineNumber)return null;const o=s.getViewLineRenderingData(e),a=o.content;let l;o.isBasicASCII&&r.useMonospaceOptimizations||(l=p6(o,r));let c="",u=0,h=0;for(let x=0;x500){const k=e.modifyPosition(u.getEndPosition(),-500);u=z.fromPositions(k,u.getEndPosition())}const h=e.getValueInRange(u,1),g=e.getLineCount(),f=e.getLineMaxColumn(g);let m=c.intersectRanges(new z(t.endLineNumber,t.endColumn,g,f));if(s&&e.getValueLengthInRange(m,1)>500){const k=e.modifyPosition(m.getStartPosition(),500);m=z.fromPositions(m.getStartPosition(),k)}const x=e.getValueInRange(m,1);let v;if(o===l||o+1===l)v=e.getValueInRange(t,1);else{const k=a.intersectRanges(t),C=c.intersectRanges(t);v=e.getValueInRange(k,1)+"…"+e.getValueInRange(C,1)}s&&v.length>2*500&&(v=v.substring(0,500)+"…"+v.substring(v.length-500,v.length));let _,w;return t.getDirection()===0?(_=h.length,w=h.length+v.length):(w=h.length,_=h.length+v.length),{value:h+v+x,selection:t,selectionStart:_,selectionEnd:w,startPositionWithinEditor:u.getStartPosition(),newlineCountBeforeSelection:u.endLineNumber-u.startLineNumber}}}function WQ(i,e){var n,s,r;if(i.get(2)===1){const o=(n=e.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))==null?void 0:n.getAriaLabel(),a=(s=e.lookupKeybinding("workbench.action.showCommands"))==null?void 0:s.getAriaLabel(),l=(r=e.lookupKeybinding("workbench.action.openGlobalKeybindings"))==null?void 0:r.getAriaLabel(),c=S(61,"The editor is not accessible at this time.");return o?S(62,"{0} To enable screen reader optimized mode, use {1}",c,o):a?S(63,"{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",c,a):l?S(64,"{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",c,l):c}return i.get(8)}function Tve(i){let e=0,t=-1;do{if(t=i.indexOf(` +`,t+1),t===-1)break;e++}while(!0);return e}var XOt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Ive=function(i,e){return function(t,n){e(t,n,i)}};class ZOt{constructor(e,t,n,s,r){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=n,this.widthOfHiddenLineTextBefore=s,this.distanceToModelLineEnd=r,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new te(this.modelLineNumber,this.distanceToModelLineStart+1),n=new te(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const J$=bc;let VQ=class extends F2e{constructor(e,t,n,s,r,o){super(e),this._keybindingService=r,this._instantiationService=o,this._primaryCursorPosition=new te(1,1),this._primaryCursorVisibleRange=null,this._viewController=n,this._visibleRangeProvider=s,this._scrollLeft=0,this._scrollTop=0;const a=this._context.configuration.options,l=a.get(165);this._setAccessibilityOptions(a),this._contentLeft=l.contentLeft,this._contentWidth=l.contentWidth,this._contentHeight=l.height,this._fontInfo=a.get(59),this._emptySelectionClipboard=a.get(45),this._copyWithSyntaxHighlighting=a.get(31),this._visibleTextArea=null,this._selections=[new st(1,1,1,1)],this._modelSelections=[new st(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Yn(document.createElement("textarea")),$g.write(this.textArea,7),this.textArea.setClassName(`inputarea ${JN}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:c}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${c*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",WQ(a,this._keybindingService)),this.textArea.setAttribute("aria-required",a.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(a.get(140))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",S(65,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",a.get(104)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=Yn(document.createElement("div")),this.textAreaCover.setPosition("absolute"),t.appendChild(this.textArea),t.appendChild(this.textAreaCover);const u=new B2e,h={getDataToCopy:()=>a2e(this._context.viewModel,this._modelSelections,this._emptySelectionClipboard,this._copyWithSyntaxHighlighting),getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const m=this._selections[0];if(bn&&m.isEmpty()){const v=m.getStartPosition();let _=this._getWordBeforePosition(v);if(_.length===0&&(_=this._getCharacterBeforePosition(v)),_.length>0)return new tl(_,_.length,_.length,z.fromPositions(v),0)}if(bn&&!m.isEmpty()&&this._context.viewModel.getValueLengthInRange(m,0)<500){const v=this._context.viewModel.getValueInRange(m,0);return new tl(v,0,v.length,m,0)}if(lC&&!m.isEmpty()){const v="vscode-placeholder";return new tl(v,0,v.length,null,void 0)}return tl.EMPTY}if(Ube){const m=this._selections[0];if(m.isEmpty()){const x=m.getStartPosition(),[v,_]=this._getAndroidWordAtPosition(x);if(v.length>0)return new tl(v,_,_,z.fromPositions(x),0)}return tl.EMPTY}const f=u.fromEditorSelection(this._context.viewModel,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0);return tl.fromScreenReaderContentState(f)},deduceModelPosition:(f,m,x)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(f,m,x)},g=this._register(new kMt(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(LQ,h,g,Vc,{isAndroid:Ube,isChrome:IP,isFirefox:bc,isSafari:lC})),this._register(this._textAreaInput.onKeyDown(f=>{this._viewController.emitKeyDown(f)})),this._register(this._textAreaInput.onKeyUp(f=>{this._viewController.emitKeyUp(f)})),this._register(this._textAreaInput.onPaste(f=>{let m=!1,x=null,v=null;f.metadata&&(m=this._emptySelectionClipboard&&!!f.metadata.isFromEmptySelection,x=typeof f.metadata.multicursorText<"u"?f.metadata.multicursorText:null,v=f.metadata.mode),this._viewController.paste(f.text,m,x,v)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(f=>{f.replacePrevCharCnt||f.replaceNextCharCnt||f.positionDelta?this._viewController.compositionType(f.text,f.replacePrevCharCnt,f.replaceNextCharCnt,f.positionDelta):this._viewController.type(f.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(f=>{this._viewController.setSelection(f)})),this._register(this._textAreaInput.onCompositionStart(f=>{const m=this.textArea.domNode,x=this._modelSelections[0],{distanceToModelLineStart:v,widthOfHiddenTextBefore:_}=(()=>{const k=m.value.substring(0,Math.min(m.selectionStart,m.selectionEnd)),C=k.lastIndexOf(` +`),E=k.substring(C+1),D=E.lastIndexOf(" "),T=E.length-D-1,I=x.getStartPosition(),R=Math.min(I.column-1,T),P=I.column-1-R,j=E.substring(0,E.length-R),{tabSize:B}=this._context.viewModel.model.getOptions(),H=JOt(this.textArea.domNode.ownerDocument,j,this._fontInfo,B);return{distanceToModelLineStart:P,widthOfHiddenTextBefore:H}})(),{distanceToModelLineEnd:w}=(()=>{const k=m.value.substring(Math.max(m.selectionStart,m.selectionEnd)),C=k.indexOf(` +`),E=C===-1?k:k.substring(0,C),D=E.indexOf(" "),T=D===-1?E.length:E.length-D-1,I=x.getEndPosition(),R=Math.min(this._context.viewModel.model.getLineMaxColumn(I.lineNumber)-I.column,T);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(I.lineNumber)-I.column-R}})();this._context.viewModel.revealRange("keyboard",!0,z.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new ZOt(this._context,x.startLineNumber,v,_,w),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${JN} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(f=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${JN}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(pp.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}get domNode(){return this.textArea}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose(),this.textArea.domNode.remove(),this.textAreaCover.domNode.remove()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',n=this._context.viewModel.getLineContent(e.lineNumber),s=Ku(t,[]);let r=!0,o=e.column,a=!0,l=e.column,c=0;for(;c<50&&(r||a);){if(r&&o<=1&&(r=!1),r){const u=n.charCodeAt(o-2);s.get(u)!==0?r=!1:o--}if(a&&l>n.length&&(a=!1),a){const u=n.charCodeAt(l-1);s.get(u)!==0?a=!1:l++}c++}return[n.substring(o-1,l-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),n=Ku(this._context.configuration.options.get(148),[]);let s=e.column,r=0;for(;s>1;){const o=t.charCodeAt(s-2);if(n.get(o)!==0||r>50)return t.substring(s-1,e.column-1);r++,s--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const n=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!eo(n.charCodeAt(0)))return n}return""}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===sl.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const s=e.get(165).wrappingColumn;if(s!==-1&&this._accessibilitySupport!==1){const r=e.get(59);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(s*r.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=J$?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,n=t.get(165);this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(59),this._emptySelectionClipboard=t.get(45),this._copyWithSyntaxHighlighting=t.get(31),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:s}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${s*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",WQ(t,this._keybindingService)),this.textArea.setAttribute("aria-required",t.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(140))),(e.hasChanged(41)||e.hasChanged(104))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focus(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!pp.enabled||e.get(41)&&e.get(104)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new te(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),(t=this._visibleTextArea)==null||t.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){const n=this._visibleTextArea.visibleTextareaStart,s=this._visibleTextArea.visibleTextareaEnd,r=this._visibleTextArea.startPosition,o=this._visibleTextArea.endPosition;if(r&&o&&n&&s&&s.left>=this._scrollLeft&&n.left<=this._scrollLeft+this._contentWidth){const a=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,l=Tve(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let c=this._visibleTextArea.widthOfHiddenLineTextBefore,u=this._contentLeft+n.left-this._scrollLeft,h=s.left-n.left+1;if(uthis._contentWidth&&(h=this._contentWidth);const g=this._context.viewLayout.getLineHeightForLineNumber(r.lineNumber),f=this._context.viewModel.getFontSizeAtPosition(this._primaryCursorPosition),m=this._context.viewModel.getViewLineData(r.lineNumber),x=m.tokens.findTokenIndexAtOffset(r.column-1),v=m.tokens.findTokenIndexAtOffset(o.column-1),_=x===v,w=this._visibleTextArea.definePresentation(_?m.tokens.getPresentation(x):null);this.textArea.domNode.scrollTop=l*g,this.textArea.domNode.scrollLeft=c,this._doRender({lastRenderPosition:null,top:a,left:u,width:h,height:g,useCover:!1,color:(Gs.getColorMap()||[])[w.foreground],italic:w.italic,bold:w.bold,underline:w.underline,strikethrough:w.strikethrough,fontSize:f})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight){this._renderAtTopLeft();return}if(bn||this._accessibilitySupport===2){const n=this._primaryCursorPosition.lineNumber,s=this._context.viewLayout.getLineHeightForLineNumber(n);this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:s,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const r=this._textAreaInput.textAreaState.newlineCountBeforeSelection??Tve(this.textArea.domNode.value.substring(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=r*s;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:J$?0:1,useCover:!1})}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:J$?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,n=this.textAreaCover;Po(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setLineHeight(e.height),t.setFontSize(e.fontSize??this._fontInfo.fontSize),t.setColor(e.color?ye.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),n.setTop(e.useCover?e.top:0),n.setLeft(e.useCover?e.left:0),n.setWidth(e.useCover?e.width:0),n.setHeight(e.useCover?e.height:0);const s=this._context.configuration.options;s.get(66)?n.setClassName("monaco-editor-background textAreaCover "+c6.OUTER_CLASS_NAME):s.get(76).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+a6.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}};VQ=XOt([Ive(4,zn),Ive(5,ft)],VQ);function JOt(i,e,t,n){if(e.length===0)return 0;const s=i.createElement("div");s.style.position="absolute",s.style.top="-50000px",s.style.width="50000px";const r=i.createElement("span");Po(r,t),r.style.whiteSpace="pre",r.style.tabSize=`${n*t.spaceWidth}px`,r.append(e),s.appendChild(r),i.body.appendChild(s);const o=r.offsetWidth;return s.remove(),o}var e5t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},t5t=function(i,e){return function(t,n){e(t,n,i)}};let zQ=class extends se{constructor(e,t,n){super(),this._domNode=t,this._onFocusChange=n,this._isFocused=!1,this._isPaused=!1,this._register(de(this._domNode,"focus",()=>{e.trace("NativeEditContext.focus"),!this._isPaused&&this.refreshFocusState()})),this._register(de(this._domNode,"blur",()=>{e.trace("NativeEditContext.blur"),!this._isPaused&&this._handleFocusedChanged(!1)}))}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this.refreshFocusState()}_handleFocusedChanged(e){this._isFocused!==e&&(this._isFocused=e,this._onFocusChange(this._isFocused))}focus(){this._domNode.focus(),this.refreshFocusState()}refreshFocusState(){const e=Z_(this._domNode),t=e?e.activeElement:so(),n=this._domNode===t;this._handleFocusedChanged(n)}get isFocused(){return this._isFocused}};zQ=e5t([t5t(0,Ji)],zQ);function oI(i,e,t,n){return i.addEventListener(e,t,n),{dispose(){i.removeEventListener(e,t)}}}var n5t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},i5t=function(i,e){return function(t,n){e(t,n,i)}};const eq=Up("richScreenReaderContent",{createHTML:i=>i}),tq="data-line-number";let UQ=class extends se{constructor(e,t,n,s){super(),this._domNode=e,this._context=t,this._viewController=n,this._accessibilityService=s,this._selectionChangeListener=this._register(new Zn),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._state=OR.NULL,this._strategy=new o5t,this._renderedLines=new Map,this._renderedSelection=new st(1,1,1,1),this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){const t=oi().document.activeElement;if(!t||t!==this._domNode.domNode)return;if(this._accessibilityService.isScreenReaderOptimized()){const s=this._getScreenReaderContentLineIntervals(e);this._state.equals(s)||(this._state=s,this._renderedLines=this._renderScreenReaderContent(s)),this._renderedSelection.equalsSelection(e)||(this._renderedSelection=e,this._setSelectionOnScreenReaderContent(this._context,this._renderedLines,e))}else this._state=OR.NULL,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){const t=this._state.intervals;if(!t.length)return;const n=this._context.viewModel.viewLayout,s=t[0].startLine,r=n.getVerticalOffsetForLineNumber(s),o=n.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=o-r}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return de(this._domNode.domNode.ownerDocument,"selectionchange",()=>{if(!(oi().document.activeElement===this._domNode.domNode)||!this._accessibilityService.isScreenReaderOptimized()||!pp.enabled)return;const r=Date.now(),o=r-e;if(e=r,o<5)return;const a=r-this._ignoreSelectionChangeTime;if(this._ignoreSelectionChangeTime=0,a<100)return;const l=this._getEditorSelectionFromDomRange();l&&this._viewController.setSelection(l)})}_renderScreenReaderContent(e){const t=[],n=new Map;for(const s of e.intervals)for(let r=s.startLine;r<=s.endLine;r++){const o=this._renderLine(r);n.set(r,o),t.push(o.domNode)}return this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.replaceChildren(...t),n}_renderLine(e){const t=this._context.viewModel,n=t.getViewLineRenderingData(e),s=this._context.configuration.options,r=s.get(59),o=s.get(133),a=s.get(108),l=s.get(60),c=s.get(40),u=cl.filter(n.inlineDecorations,e,n.minColumn,n.maxColumn),h=r.isMonospace&&!c,g=l!==Gb.OFF;let f;s.get(47)==="off"?f=s.get(113):f="none";const x=new ux(h,r.canUseHalfwidthRightwardsArrow,n.content,n.continuesWithWrappedLine,n.isBasicASCII,n.containsRTL,n.minColumn-1,n.tokens,u,n.tabSize,n.startVisibleColumn,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,o,f,a,g,null,null,0,!0),v=new S0(1e4),_=PD(x,v),w=v.build(),k=(eq==null?void 0:eq.createHTML(w))??w,C=t.viewLayout.getLineHeightForLineNumber(e)+"px",E=document.createElement("div");return E.innerHTML=k,E.style.lineHeight=C,E.style.height=C,E.setAttribute(tq,e.toString()),new s5t(E,_.characterMapping)}_setSelectionOnScreenReaderContent(e,t,n){const r=oi().document.getSelection();if(!r)return;const o=n.startLineNumber,a=n.endLineNumber,l=t.get(o),c=t.get(a);if(!l||!c)return;const u=e.viewModel,h=u.model,g=u.coordinatesConverter,f=new z(o,1,o,n.selectionStartColumn),m=g.convertViewRangeToModelRange(f),x=h.getCharacterCountInRange(m),v=new z(a,1,a,n.positionColumn),_=g.convertViewRangeToModelRange(v),w=h.getCharacterCountInRange(_),k=l.characterMapping.getDomPosition(x),C=c.characterMapping.getDomPosition(w),E=l.domNode.firstChild,D=c.domNode.firstChild,T=E.childNodes,I=D.childNodes,R=T.item(k.partIndex),P=I.item(C.partIndex);!R.firstChild||!P.firstChild||(this._setIgnoreSelectionChangeTime("setRange"),r.setBaseAndExtent(R.firstChild,n.startColumn===1?0:k.charIndex+1,P.firstChild,n.endColumn===1?0:C.charIndex+1))}_getScreenReaderContentLineIntervals(e){return this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize)}_getEditorSelectionFromDomRange(){var w,k,C,E;if(!this._renderedLines)return;const e=oi().document.getSelection();if(!e||e.rangeCount===0)return;const n=e.getRangeAt(0),s=n.startContainer,r=n.endContainer,o=s.parentElement,a=r.parentElement;if(!o||!er(o)||!a||!er(a))return;const l=(w=o.parentElement)==null?void 0:w.parentElement,c=(k=a.parentElement)==null?void 0:k.parentElement;if(!l||!c)return;const u=l.getAttribute(tq),h=c.getAttribute(tq);if(!u||!h)return;const g=parseInt(u),f=parseInt(h),m=(C=this._renderedLines.get(g))==null?void 0:C.characterMapping,x=(E=this._renderedLines.get(f))==null?void 0:E.characterMapping;if(!m||!x)return;const v=SL(m,o,n.startOffset),_=SL(x,a,n.endOffset);return e.direction==="forward"?new st(g,v,f,_):new st(f,_,g,v)}};UQ=n5t([i5t(3,Zo)],UQ);class s5t{constructor(e,t){this.domNode=e,this.characterMapping=t}}class r5t{constructor(e,t){this.startLine=e,this.endLine=t}}class OR{constructor(e,t){this.intervals=t;let n="";for(const s of t)for(let r=s.startLine;r<=s.endLine;r++)n+=e.getLineContent(r)+` +`;this.value=n}equals(e){return this.value===e.value}static get NULL(){const e={getLineContent:()=>"",getLineCount:()=>1,getLineMaxColumn:()=>1,getValueInRange:()=>"",getValueLengthInRange:()=>0,modifyPosition:(t,n)=>t};return new OR(e,[])}}class o5t{constructor(){}_getPageOfLine(e,t){return Math.floor((e-1)/t)}_getRangeForPage(e,t,n){const s=t*n,r=s+1,o=Math.min(s+n,e.getLineCount());return new r5t(r,o)}fromEditorSelection(e,t,n){const s=this._getPageOfLine(t.startLineNumber,n),r=this._getRangeForPage(e,s,n),o=this._getPageOfLine(t.endLineNumber,n),a=this._getRangeForPage(e,o,n),l=[{startLine:r.startLine,endLine:r.endLine}];return s+1=t))throw new Nt(`Edits must be disjoint and sorted. Found ${n} after ${t}`);t=n.replaceRange.endExclusive}}toString(){return`[${this.replacements.map(t=>t.toString()).join(", ")}]`}normalize(){const e=[];let t;for(const n of this.replacements)if(!(n.getNewLength()===0&&n.replaceRange.length===0)){if(t&&t.replaceRange.endExclusive===n.replaceRange.start){const s=t.tryJoinTouching(n);if(s){t=s;continue}}t&&e.push(t),t=n}return t&&e.push(t),this._createNew(e)}compose(e){const t=this.normalize(),n=e.normalize();if(t.isEmpty())return n;if(n.isEmpty())return t;const s=[...t.replacements],r=[];let o=0;for(const a of n.replacements){for(;;){const h=s[0];if(!h||h.replaceRange.start+o+h.getNewLength()>=a.replaceRange.start)break;s.shift(),r.push(h),o+=h.getNewLength()-h.replaceRange.length}const l=o;let c,u;for(;;){const h=s[0];if(!h||h.replaceRange.start+o>a.replaceRange.endExclusive)break;c||(c=h),u=h,s.shift(),o+=h.getNewLength()-h.replaceRange.length}if(!c)r.push(a.delta(-o));else{const h=Math.min(c.replaceRange.start,a.replaceRange.start-l),g=a.replaceRange.start-(c.replaceRange.start+l);if(g>0){const v=c.slice(ht.emptyAt(h),new ht(0,g));r.push(v)}if(!u)throw new Nt("Invariant violation: lastIntersecting is undefined");const f=u.replaceRange.endExclusive+o-a.replaceRange.endExclusive;if(f>0){const v=u.slice(ht.ofStartAndLength(u.replaceRange.endExclusive,0),new ht(u.getNewLength()-f,u.getNewLength()));s.unshift(v),o-=v.getNewLength()-v.replaceRange.length}const m=new ht(h,a.replaceRange.endExclusive-o),x=a.slice(m,new ht(0,a.getNewLength()));r.push(x)}}for(;;){const a=s.shift();if(!a)break;r.push(a)}return this._createNew(r).normalize()}getNewRanges(){const e=[];let t=0;for(const n of this.replacements)e.push(ht.ofStartAndLength(n.replaceRange.start+t,n.getNewLength())),t+=n.getLengthDelta();return e}isEmpty(){return this.replacements.length===0}}class l5t{constructor(e){this.replaceRange=e}delta(e){return this.slice(this.replaceRange.delta(e),new ht(0,this.getNewLength()))}getLengthDelta(){return this.getNewLength()-this.replaceRange.length}toString(){return`{ ${this.replaceRange.toString()} -> ${this.getNewLength()} }`}get isEmpty(){return this.getNewLength()===0&&this.replaceRange.length===0}getRangeAfterReplace(){return new ht(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}}class c5t extends a5t{apply(e){const t=[];let n=0;for(const s of this.replacements)t.push(e.substring(n,s.replaceRange.start)),t.push(s.newText),n=s.replaceRange.endExclusive;return t.push(e.substring(n)),t.join("")}}class d5t extends l5t{constructor(e,t){super(e),this.newText=t}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){const t=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),n=Wh(t,this.newText),s=Math.min(t.length-n,this.newText.length-n,Ub(t,this.newText)),r=new ht(this.replaceRange.start+n,this.replaceRange.endExclusive-s),o=this.newText.substring(n,this.newText.length-s);return new Ko(r,o)}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){const t=this.replaceRange.substring(e),n=Wh(t,this.newText);return n===0?this:this.slice(this.replaceRange.deltaStart(n),new ht(n,this.newText.length))}removeCommonSuffix(e){const t=this.replaceRange.substring(e),n=Ub(t,this.newText);return n===0?this:this.slice(this.replaceRange.deltaEnd(-n),new ht(0,this.newText.length-n))}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}}const IN=class IN extends c5t{static compose(e){if(e.length===0)return IN.empty;let t=e[0];for(let n=1;n=s.replaceRange.start)break;i.shift(),t.push(o.delta(n))}const r=[];for(;;){const o=i[0];if(!o||!o.intersectsOrTouches(s.replaceRange))break;i.shift(),r.push(o)}for(let o=r.length-1;o>=0;o--){let a=r[o];const l=a.intersect(s.replaceRange).length;a=a.deltaEnd(-l+(o===0?s.newText.length:0));const c=a.start-s.replaceRange.start;c>0&&(a=a.delta(-c)),o!==0&&(a=a.delta(s.newText.length)),a=a.delta(-(s.newText.length-s.replaceRange.length)),i.unshift(a)}n+=s.newText.length-s.replaceRange.length}for(;;){const s=i[0];if(!s)break;i.shift(),t.push(s.delta(n))}return t}const mu=class mu{static ofLength(e,t){return new mu(e,e+t)}static fromRange(e){return new mu(e.startLineNumber,e.endLineNumber)}static fromRangeInclusive(e){return new mu(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(e.length===0)return[];let t=new Iu(e[0].slice());for(let n=1;nt)throw new Nt(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&ee.startLineNumber,$c);let jt=mu;class Iu{constructor(e=[]){this._normalizedRanges=e}get ranges(){return this._normalizedRanges}addRange(e){if(e.length===0)return;const t=ER(this._normalizedRanges,s=>s.endLineNumberExclusive>=e.startLineNumber),n=DL(this._normalizedRanges,s=>s.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){const s=this._normalizedRanges[t];this._normalizedRanges[t]=s.join(e)}else{const s=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,s)}}contains(e){const t=LL(this._normalizedRanges,n=>n.startLineNumber<=e);return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=LL(this._normalizedRanges,n=>n.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const t=[];let n=0,s=0,r=null;for(;n=o.startLineNumber?r=new jt(r.startLineNumber,Math.max(r.endLineNumberExclusive,o.endLineNumberExclusive)):(t.push(r),r=o)}return r!==null&&t.push(r),new Iu(t)}subtractFrom(e){const t=ER(this._normalizedRanges,o=>o.endLineNumberExclusive>=e.startLineNumber),n=DL(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(t===n)return new Iu([e]);const s=[];let r=e.startLineNumber;for(let o=t;or&&s.push(new jt(r,a.startLineNumber)),r=a.endLineNumberExclusive}return re.toString()).join(", ")}getIntersection(e){const t=[];let n=0,s=0;for(;nt.delta(e)))}}const hg=class hg{static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new hg(0,t.column-e.column):new hg(t.lineNumber-e.lineNumber,t.column-1)}static fromPosition(e){return new hg(e.lineNumber-1,e.column-1)}static ofRange(e){return hg.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,n=0;for(const s of e)s===` +`?(t++,n=0):n++;return new hg(t,n)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new hg(this.lineCount,this.columnCount+e.columnCount):new hg(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new z(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new z(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new z(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return jt.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new te(e.lineNumber,e.column+this.columnCount):new te(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};hg.zero=new hg(0,0);let ro=hg;class W2e{getOffsetRange(e){return new ht(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return z.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new K1.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new K1.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const t=e.replacements.map(n=>this.getTextReplacement(n));return new K1.deps.TextEdit(t)}}const Ice=class Ice{static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}};Ice._deps=void 0;let K1=Ice;function u5t(i){K1._deps=i}class lW extends W2e{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t0&&e.charAt(t-1)==="\r"?this.lineEndOffsetByLineIdx.push(t-1):this.lineEndOffsetByLineIdx.push(t));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const t=this._validatePosition(e);return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}_validatePosition(e){if(e.lineNumber<1)return new te(1,1);const t=this.textLength.lineCount+1;if(e.lineNumber>t){const s=this.getLineLength(t);return new te(t,s+1)}if(e.column<1)return new te(e.lineNumber,1);const n=this.getLineLength(e.lineNumber);return e.column-1>n?new te(e.lineNumber,n+1):e}getPosition(e){const t=DL(this.lineStartOffsetByLineIdx,r=>r<=e),n=t+1,s=e-this.lineStartOffsetByLineIdx[t]+1;return new te(n,s)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new K1.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Qoe{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new te(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new z(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new lW(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new z(e,1,e,Number.MAX_SAFE_INTEGER))}}class h5t extends Qoe{constructor(e,t){eR(t>=1),super(),this._getLineContent=e,this._lineCount=t}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let t=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let n=e.startLineNumber+1;ne[t-1],e.length)}}class Xv extends Qoe{constructor(e){super(),this.value=e,this._t=new lW(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}getTransformer(){return this._t}}class Uc{static fromStringEdit(e,t){const n=e.replacements.map(s=>Ar.fromStringReplacement(s,t));return new Uc(n)}static fromParallelReplacementsUnsorted(e){const t=e.slice().sort(_a(n=>n.range,z.compareRangesUsingStarts));return new Uc(t)}constructor(e){this.replacements=e,Y_(()=>RP(e,(t,n)=>t.range.getEndPosition().isBeforeOrEqual(n.range.getStartPosition())))}mapPosition(e){let t=0,n=0,s=0;for(const r of this.replacements){const o=r.range.getStartPosition();if(e.isBeforeOrEqual(o))break;const a=r.range.getEndPosition(),l=ro.ofText(r.text);if(e.isBefore(a)){const c=new te(o.lineNumber+t,o.column+(o.lineNumber+t===n?s:0)),u=l.addToPosition(c);return C3(c,u)}o.lineNumber+t!==n&&(s=0),t+=l.lineCount-(r.range.endLineNumber-r.range.startLineNumber),l.lineCount===0?a.lineNumber!==o.lineNumber?s+=l.columnCount-(a.column-1):s+=l.columnCount-(a.column-o.column):s=l.columnCount,n=a.lineNumber+t}return new te(e.lineNumber+t,e.column+(e.lineNumber+t===n?s:0))}mapRange(e){function t(o){return o instanceof te?o:o.getStartPosition()}function n(o){return o instanceof te?o:o.getEndPosition()}const s=t(this.mapPosition(e.getStartPosition())),r=n(this.mapPosition(e.getEndPosition()));return C3(s,r)}apply(e){let t="",n=new te(1,1);for(const r of this.replacements){const o=r.range,a=o.getStartPosition(),l=o.getEndPosition(),c=C3(n,a);c.isEmpty()||(t+=e.getValueOfRange(c)),t+=r.text,n=l}const s=C3(n,e.endPositionExclusive);return s.isEmpty()||(t+=e.getValueOfRange(s)),t}applyToString(e){const t=new Xv(e);return this.apply(t)}getNewRanges(){const e=[];let t=0,n=0,s=0;for(const r of this.replacements){const o=ro.ofText(r.text),a=te.lift({lineNumber:r.range.startLineNumber+n,column:r.range.startColumn+(r.range.startLineNumber===t?s:0)}),l=o.createRange(a);e.push(l),n=l.endLineNumber-r.range.endLineNumber,s=l.endColumn-r.range.endColumn,t=r.range.endLineNumber}return e}toReplacement(e){if(this.replacements.length===0)throw new Nt;if(this.replacements.length===1)return this.replacements[0];const t=this.replacements[0].range.getStartPosition(),n=this.replacements[this.replacements.length-1].range.getEndPosition();let s="";for(let r=0;rt.toString()).join(` +`):typeof e=="string"?this.toString(new Xv(e)):this.replacements.length===0?"":this.replacements.map(t=>{const s=e.getValueOfRange(t.range),r=z.fromPositions(new te(Math.max(1,t.range.startLineNumber-1),1),t.range.getStartPosition());let o=e.getValueOfRange(r);o.length>10&&(o="..."+o.substring(o.length-10));const a=z.fromPositions(t.range.getEndPosition(),new te(t.range.endLineNumber+1,1));let l=e.getValueOfRange(a);l.length>10&&(l=l.substring(0,10)+"...");let c=s;if(c.length>10){const h=Math.floor(5);c=c.substring(0,h)+"..."+c.substring(c.length-h)}let u=t.text;if(u.length>10){const h=Math.floor(5);u=u.substring(0,h)+"..."+u.substring(u.length-h)}return c.length===0?`${o}❰${u}❱${l}`:`${o}❰${c}↦${u}❱${l}`}).join(` +`)}}class Ar{static joinReplacements(e,t){if(e.length===0)throw new Nt;if(e.length===1)return e[0];const n=e[0].range.getStartPosition(),s=e[e.length-1].range.getEndPosition();let r="";for(let o=0;o ${t.lineNumber},${t.column}): "${this.text}"`}}function C3(i,e){if(i.lineNumber===e.lineNumber&&i.column===Number.MAX_SAFE_INTEGER)return z.fromPositions(e,e);if(!i.isBeforeOrEqual(e))throw new Nt("start must be before end");return new z(i.lineNumber,i.column,e.lineNumber,e.column)}u5t({StringEdit:Zb,StringReplacement:Ko,TextReplacement:Ar,TextEdit:Uc,TextLength:ro});var g5t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},f5t=function(i,e){return function(t,n){e(t,n,i)}};let $Q=class extends se{constructor(e,t,n,s){super(),this._domNode=e,this._context=t,this._viewController=n,this._accessibilityService=s,this._selectionChangeListener=this._register(new Zn),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._strategy=new B2e,this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){const t=this._domNode.domNode,n=oi().document.activeElement;if(!n||n!==t)return;if(this._accessibilityService.isScreenReaderOptimized()){this._state=this._getScreenReaderContentState(e),t.textContent!==this._state.value&&(this._setIgnoreSelectionChangeTime("setValue"),t.textContent=this._state.value);const r=oi().document.getSelection();if(!r)return;const o=this._getScreenReaderRange(this._state.selectionStart,this._state.selectionEnd);if(!o)return;this._setIgnoreSelectionChangeTime("setRange"),r.setBaseAndExtent(o.anchorNode,o.anchorOffset,o.focusNode,o.focusOffset)}else this._state=void 0,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){if(!this._state)return;const t=this._context.viewModel.viewLayout,n=this._state.startPositionWithinEditor.lineNumber,s=t.getVerticalOffsetForLineNumber(n),r=t.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=r-s}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return de(this._domNode.domNode.ownerDocument,"selectionchange",()=>{const t=this._accessibilityService.isScreenReaderOptimized();if(!this._state||!t||!pp.enabled||!(oi().document.activeElement===this._domNode.domNode))return;const r=oi().document.getSelection();if(!r||r.rangeCount===0)return;const a=r.getRangeAt(0),l=Date.now(),c=l-e;if(e=l,c<5)return;const u=l-this._ignoreSelectionChangeTime;this._ignoreSelectionChangeTime=0,!(u<100)&&this._viewController.setSelection(this._getEditorSelectionFromDomRange(this._context,this._state,r.direction,a))})}_getScreenReaderContentState(e){const t=this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize,this._accessibilityService.getAccessibilitySupport()===0),n=this._context.viewModel.model.getPositionAt(1/0);let s=t.value;return n.column===1&&e.getEndPosition().equals(n)&&(s+=` +`),t.value=s,t}_getScreenReaderRange(e,t){const n=this._domNode.domNode.firstChild;if(!n)return;const s=new globalThis.Range;return s.setStart(n,e),s.setEnd(n,t),{anchorNode:n,anchorOffset:e,focusNode:n,focusOffset:t}}_getEditorSelectionFromDomRange(e,t,n,s){const r=e.viewModel,o=r.model,l=r.coordinatesConverter.convertViewPositionToModelPosition(t.startPositionWithinEditor),c=o.getOffsetAt(l);let u=s.startOffset+c,h=s.endOffset+c;if(o.getEndOfLineSequence()===1){const _=t.value,w=new lW(_),k=w.getPosition(s.startOffset),C=w.getPosition(s.endOffset);u+=k.lineNumber-1,h+=C.lineNumber-1}const f=o.getPositionAt(u),m=o.getPositionAt(h),x=n==="forward"?f:m,v=n==="forward"?m:f;return st.fromPositions(x,v)}};$Q=g5t([f5t(3,Zo)],$Q);var p5t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Ave=function(i,e){return function(t,n){e(t,n,i)}};let qQ=class extends se{constructor(e,t,n,s,r){super(),this._domNode=e,this._context=t,this._viewController=n,this._keybindingService=s,this._accessibilityService=r,this._contentLeft=1,this._contentWidth=1,this._contentHeight=1,this._divWidth=1,this._primarySelection=new st(1,1,1,1),this._primaryCursorVisibleRange=null,this._state=this._register(new Zn),this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes()}onWillPaste(){var e;(e=this._state.value)==null||e.onWillPaste()}onWillCut(){var e;(e=this._state.value)==null||e.onWillCut()}handleFocusChange(e){var t;(t=this._state.value)==null||t.onFocusChange(e),this.writeScreenReaderContent()}onConfigurationChanged(e){this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes(),e.hasChanged(2)&&this.writeScreenReaderContent()}_instantiateScreenReaderContent(){const e=this._context.configuration.options.get(107);this._renderRichContent!==e&&(this._renderRichContent=e,this._state.value=this._createScreenReaderContent(e))}_createScreenReaderContent(e){return e?new UQ(this._domNode,this._context,this._viewController,this._accessibilityService):new $Q(this._domNode,this._context,this._viewController,this._accessibilityService)}_updateConfigurationSettings(){var s;const e=this._context.configuration.options,t=e.get(165),n=t.wrappingColumn;this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._contentHeight=t.height,this._fontInfo=e.get(59),this._divWidth=Math.round(n*this._fontInfo.typicalHalfwidthCharacterWidth),(s=this._state.value)==null||s.onConfigurationChanged(e)}_updateDomAttributes(){const e=this._context.configuration.options;this._domNode.domNode.setAttribute("role","textbox"),this._domNode.domNode.setAttribute("aria-required",e.get(9)?"true":"false"),this._domNode.domNode.setAttribute("aria-multiline","true"),this._domNode.domNode.setAttribute("aria-autocomplete",e.get(104)?"none":"both"),this._domNode.domNode.setAttribute("aria-roledescription",S(60,"editor")),this._domNode.domNode.setAttribute("aria-label",WQ(e,this._keybindingService));const t=this._context.viewModel.model.getOptions().tabSize,n=e.get(59).spaceWidth;this._domNode.domNode.style.tabSize=`${t*n}px`;const s=e.get(154),r=s==="inherit"?e.get(153):s,o=r==="inherit"?e.get(149):r;this._domNode.domNode.style.textWrap=o==="off"?"nowrap":"wrap"}onCursorStateChanged(e){this._primarySelection=e.selections[0]??new st(1,1,1,1)}prepareRender(e){this.writeScreenReaderContent(),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primarySelection.getPosition())}render(e){var l;if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const t=this._context.viewLayout.getCurrentScrollLeft(),n=this._contentLeft+this._primaryCursorVisibleRange.left-t;if(nthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const s=this._context.viewLayout.getCurrentScrollTop(),r=this._primarySelection.positionLineNumber,o=this._context.viewLayout.getVerticalOffsetForLineNumber(r)-s;if(o<0||o>this._contentHeight){this._renderAtTopLeft();return}const a=this._context.viewLayout.getLineHeightForLineNumber(r);this._doRender(o,this._contentLeft,this._divWidth,a),(l=this._state.value)==null||l.updateScrollTop(this._primarySelection)}_renderAtTopLeft(){this._doRender(0,0,this._contentWidth,1)}_doRender(e,t,n,s){Po(this._domNode,this._fontInfo),this._domNode.setTop(e),this._domNode.setLeft(t),this._domNode.setWidth(n),this._domNode.setHeight(s),this._domNode.setLineHeight(s)}setAriaOptions(e){e.activeDescendant?(this._domNode.setAttribute("aria-haspopup","true"),this._domNode.setAttribute("aria-autocomplete","list"),this._domNode.setAttribute("aria-activedescendant",e.activeDescendant)):(this._domNode.setAttribute("aria-haspopup","false"),this._domNode.setAttribute("aria-autocomplete","both"),this._domNode.removeAttribute("aria-activedescendant")),e.role&&this._domNode.setAttribute("role",e.role)}writeScreenReaderContent(){var e;(e=this._state.value)==null||e.updateScreenReaderContent(this._primarySelection)}};qQ=p5t([Ave(3,zn),Ave(4,Zo)],qQ);var KQ;(function(i){function e(t,n){return new t.EditContext(n)}i.create=e})(KQ||(KQ={}));class m5t{constructor(){this._nativeEditContextMapping=new Map}register(e,t){return this._nativeEditContextMapping.set(e,t),{dispose:()=>{this._nativeEditContextMapping.delete(e)}}}get(e){return this._nativeEditContextMapping.get(e)}}const Xoe=new m5t;var b5t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Rve=function(i,e){return function(t,n){e(t,n,i)}},LA;(function(i){i.NONE="edit-context-composition-none",i.SECONDARY="edit-context-composition-secondary",i.PRIMARY="edit-context-composition-primary"})(LA||(LA={}));let m6=class extends F2e{constructor(e,t,n,s,r,o,a){super(t),this._viewController=s,this._visibleRangeProvider=r,this.logService=a,this._previousEditContextSelection=new ht(0,0),this._editContextPrimarySelection=new st(1,1,1,1),this._decorations=[],this._primarySelection=new st(1,1,1,1),this._targetWindowId=-1,this._scrollTop=0,this._scrollLeft=0,this._linesVisibleRanges=null,this.domNode=new $F(document.createElement("div")),this.domNode.setClassName("native-edit-context"),this._imeTextArea=new $F(document.createElement("textarea")),this._imeTextArea.setClassName("ime-text-area"),this._imeTextArea.setAttribute("readonly","true"),this._imeTextArea.setAttribute("tabindex","-1"),this._imeTextArea.setAttribute("aria-hidden","true"),this.domNode.setAttribute("autocorrect","off"),this.domNode.setAttribute("autocapitalize","off"),this.domNode.setAttribute("autocomplete","off"),this.domNode.setAttribute("spellcheck","false"),this._updateDomAttributes(),n.appendChild(this.domNode),n.appendChild(this._imeTextArea),this._parent=n.domNode,this._focusTracker=this._register(new zQ(a,this.domNode.domNode,h=>{a.trace("NativeEditContext#handleFocusChange : ",h),this._screenReaderSupport.handleFocusChange(h),this._context.viewModel.setHasFocus(h)}));const l=xt(this.domNode.domNode);this._editContext=KQ.create(l),this.setEditContextOnDomNode(),this._screenReaderSupport=this._register(o.createInstance(qQ,this.domNode,t,this._viewController)),this._register(de(this.domNode.domNode,"copy",h=>{this.logService.trace("NativeEditContext#copy"),this._ensureClipboardGetsEditorSelection(h)})),this._register(de(this.domNode.domNode,"cut",h=>{this.logService.trace("NativeEditContext#cut"),this._screenReaderSupport.onWillCut(),this._ensureClipboardGetsEditorSelection(h),this.logService.trace("NativeEditContext#cut (before viewController.cut)"),this._viewController.cut()})),this._register(de(this.domNode.domNode,"keyup",h=>this._onKeyUp(h))),this._register(de(this.domNode.domNode,"keydown",async h=>this._onKeyDown(h))),this._register(de(this._imeTextArea.domNode,"keyup",h=>this._onKeyUp(h))),this._register(de(this._imeTextArea.domNode,"keydown",async h=>this._onKeyDown(h))),this._register(de(this.domNode.domNode,"beforeinput",async h=>{(h.inputType==="insertParagraph"||h.inputType==="insertLineBreak")&&this._onType(this._viewController,{text:` +`,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0})})),this._register(de(this.domNode.domNode,"paste",h=>{if(this.logService.trace("NativeEditContext#paste"),h.preventDefault(),!h.clipboardData)return;let[g,f]=U1.getTextData(h.clipboardData);if(this.logService.trace("NativeEditContext#paste with id : ",f==null?void 0:f.id," with text.length: ",g.length),!g)return;f=f||gp.INSTANCE.get(g);let m=!1,x=null,v=null;f&&(m=this._context.configuration.options.get(45)&&!!f.isFromEmptySelection,x=typeof f.multicursorText<"u"?f.multicursorText:null,v=f.mode),this.logService.trace("NativeEditContext#paste (before viewController.paste)"),this._viewController.paste(g,m,x,v)})),this._register(oI(this._editContext,"textformatupdate",h=>this._handleTextFormatUpdate(h))),this._register(oI(this._editContext,"characterboundsupdate",h=>this._updateCharacterBounds(h)));let c;this._register(oI(this._editContext,"textupdate",h=>{const g=h.text;if(g.length===1){const f=g.charCodeAt(0);if(eo(f)){c=g;return}if(Q_(f)&&c){const m={text:c+g,selectionEnd:h.selectionEnd,selectionStart:h.selectionStart,updateRangeStart:h.updateRangeStart-1,updateRangeEnd:h.updateRangeEnd-1};c=void 0,this._emitTypeEvent(this._viewController,m);return}}this._emitTypeEvent(this._viewController,h)})),this._register(oI(this._editContext,"compositionstart",h=>{this._updateEditContext(),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(oI(this._editContext,"compositionend",h=>{this._updateEditContext(),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}));let u=!1;this._register(pp.onDidChange(()=>{pp.enabled&&u&&(this._focusTracker.resume(),this.domNode.focus(),u=!1),!pp.enabled&&this.isFocused()&&(this._focusTracker.pause(),this._imeTextArea.focus(),u=!0)})),this._register(Xoe.register(e,this))}dispose(){this.domNode.domNode.editContext=void 0,this.domNode.domNode.blur(),this.domNode.domNode.remove(),this._imeTextArea.domNode.remove(),super.dispose()}setAriaOptions(e){this._screenReaderSupport.setAriaOptions(e)}getLastRenderData(){return this._primarySelection.getPosition()}prepareRender(e){this._screenReaderSupport.prepareRender(e),this._updateSelectionAndControlBoundsData(e)}onDidRender(){this._updateSelectionAndControlBoundsAfterRender()}render(e){this._screenReaderSupport.render(e)}onCursorStateChanged(e){return this._primarySelection=e.modelSelections[0]??new st(1,1,1,1),this._screenReaderSupport.onCursorStateChanged(e),this._updateEditContext(),!0}onConfigurationChanged(e){return this._screenReaderSupport.onConfigurationChanged(e),this._updateDomAttributes(),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.fromLineNumber+e.count-1),!0}onLinesDeleted(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.toLineNumber),!0}onLinesInserted(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.toLineNumber),!0}_updateEditContextOnLineChange(e,t){this._editContextPrimarySelection.endLineNumbert||this._updateEditContext()}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}onWillPaste(){this.logService.trace("NativeEditContext#onWillPaste"),this._onWillPaste()}_onWillPaste(){this._screenReaderSupport.onWillPaste()}onWillCopy(){this.logService.trace("NativeEditContext#onWillCopy"),this.logService.trace("NativeEditContext#isFocused : ",this.domNode.domNode===so())}writeScreenReaderContent(){this._screenReaderSupport.writeScreenReaderContent()}isFocused(){return this._focusTracker.isFocused}focus(){this._focusTracker.focus(),this.refreshFocusState()}refreshFocusState(){this._focusTracker.refreshFocusState()}setEditContextOnDomNode(){const e=xt(this.domNode.domNode),t=cR(e);this._targetWindowId!==t&&(this.domNode.domNode.editContext=this._editContext,this._targetWindowId=t)}_onKeyUp(e){this._viewController.emitKeyUp(new ki(e))}_onKeyDown(e){const t=new ki(e);t.keyCode===114&&t.stopPropagation(),this._viewController.emitKeyDown(t)}_updateDomAttributes(){const e=this._context.configuration.options;this.domNode.domNode.setAttribute("tabindex",String(e.get(140)))}_updateEditContext(){const e=this._getNewEditContextState();e&&(this._editContext.updateText(0,Number.MAX_SAFE_INTEGER,e.text??" "),this._editContext.updateSelection(e.selectionStartOffset,e.selectionEndOffset),this._editContextPrimarySelection=e.editContextPrimarySelection,this._previousEditContextSelection=new ht(e.selectionStartOffset,e.selectionEndOffset))}_emitTypeEvent(e,t){if(!this._editContext)return;const n=this._previousEditContextSelection.endExclusive,s=this._previousEditContextSelection.start;this._previousEditContextSelection=new ht(t.selectionStart,t.selectionEnd);let r=0,o=0;t.updateRangeEnd>n&&(r=t.updateRangeEnd-n),t.updateRangeStartt.updateRangeEnd&&(a+=this._editContext.text.substring(t.updateRangeEnd,n));let l=0;t.selectionStart===t.selectionEnd&&s===n&&(l=t.selectionStart-(t.updateRangeStart+t.text.length));const c={text:a,replacePrevCharCnt:o,replaceNextCharCnt:r,positionDelta:l};this._onType(e,c)}_onType(e,t){t.replacePrevCharCnt||t.replaceNextCharCnt||t.positionDelta?e.compositionType(t.text,t.replacePrevCharCnt,t.replaceNextCharCnt,t.positionDelta):e.type(t.text)}_getNewEditContextState(){const e=this._primarySelection,t=this._context.viewModel.model;if(!t.isValidRange(e))return;const n=e.startLineNumber,s=e.endLineNumber,r=t.getLineMaxColumn(s),o=new z(n,1,s,r),a=t.getValueInRange(o,0),l=e.startColumn-1,c=a.length+e.endColumn-r;return{text:a,selectionStartOffset:l,selectionEndOffset:c,editContextPrimarySelection:e}}_editContextStartPosition(){return new te(this._editContextPrimarySelection.startLineNumber,1)}_handleTextFormatUpdate(e){if(!this._editContext)return;const t=e.getTextFormats(),n=this._editContextStartPosition(),s=[];t.forEach(r=>{const o=this._context.viewModel.model,a=o.getOffsetAt(n),l=o.getPositionAt(a+r.rangeStart),c=o.getPositionAt(a+r.rangeEnd),u=z.fromPositions(l,c),h=r.underlineThickness.toLowerCase();let g=LA.NONE;switch(h){case"thin":g=LA.SECONDARY;break;case"thick":g=LA.PRIMARY;break}s.push({range:u,options:{description:"textFormatDecoration",inlineClassName:g}})}),this._decorations=this._context.viewModel.model.deltaDecorations(this._decorations,s)}_updateSelectionAndControlBoundsData(e){const t=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(this._primarySelection);if(this._primarySelection.isEmpty()){const n=e.visibleRangeForPosition(t.getStartPosition());this._linesVisibleRanges=n}else this._linesVisibleRanges=null}_updateSelectionAndControlBoundsAfterRender(){const t=this._context.configuration.options.get(165).contentLeft,n=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(this._primarySelection),s=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),r=this._context.viewLayout.getVerticalOffsetAfterLineNumber(n.endLineNumber),o=this._parent.getBoundingClientRect(),a=o.top+s-this._scrollTop,l=r-s;let c=o.left+t-this._scrollLeft,u;this._primarySelection.isEmpty()?(this._linesVisibleRanges&&(c+=this._linesVisibleRanges.left),u=0):u=o.width-t;const h=new DOMRect(c,a,u,l);this._editContext.updateSelectionBounds(h),this._editContext.updateControlBounds(h)}_updateCharacterBounds(e){const t=this._context.configuration.options,n=t.get(59).typicalHalfwidthCharacterWidth,s=t.get(165).contentLeft,r=this._parent.getBoundingClientRect(),o=[],a=new lW(this._editContext.text);for(let l=e.rangeStart;l0)for(const D of x[0].ranges){k=D.left,C=D.width;break}const E=this._context.viewLayout.getLineHeightForLineNumber(v);o.push(new DOMRect(r.left+s+k-this._scrollLeft,w,C,E))}this._editContext.updateCharacterBounds(e.rangeStart,o)}_ensureClipboardGetsEditorSelection(e){const t=this._context.configuration.options,n=t.get(45),s=t.get(31),r=this._context.viewModel.getCursorStates().map(c=>c.modelState.selection),o=a2e(this._context.viewModel,r,n,s);let a;this.logService.getLevel()===ho.Trace&&(a=aS());const l={version:1,id:a,isFromEmptySelection:o.isFromEmptySelection,multicursorText:o.multicursorText,mode:o.mode};gp.INSTANCE.set(bc?o.text.replace(/\r\n/g,` +`):o.text,l),e.preventDefault(),e.clipboardData&&U1.setTextData(e.clipboardData,o.text,o.html,l),this.logService.trace("NativeEditContext#_ensureClipboardGetsEditorSelectios with id : ",a," with text.length: ",o.text.length)}};m6=b5t([Rve(5,ft),Rve(6,Ji)],m6);class x5t extends Xl{constructor(e,t){super(e),this._viewGpuContext=t,this._gpuShapes=[],this._register(Pt(n=>this._updateEntries(n)))}onConfigurationChanged(e){return this._updateEntries(void 0),!0}prepareRender(e){}render(e){}_updateEntries(e){const t=this._context.configuration.options,n=t.get(116),s=t.get(59).typicalHalfwidthCharacterWidth,r=this._viewGpuContext.devicePixelRatio.read(e);for(let o=0,a=n.length;on.length;)this._gpuShapes.splice(-1,1)[0].dispose()}}const n9=class n9 extends N0{constructor(e,t){super(),this._viewGpuContext=t,this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onCursorStateChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return!0}prepareRender(e){const t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=e.viewportData,r=new l6(this._context.configuration,this._context.theme.type),o=[];for(let a=t;a<=n;a++){const l=a-t,c=this._viewGpuContext.canRenderDetailed(r,s,a);o[l]=c.length?`
`:""}this._renderResult=o}render(e,t){if(!this._renderResult)return"";const n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}};n9.CLASS_NAME="gpu-mark";let GQ=n9;var v5t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},_5t=function(i,e){return function(t,n){e(t,n,i)}};let YQ=class extends oS{constructor(e,t,n,s,r,o,a,l,c){super(),this._instantiationService=c,this._shouldRecomputeGlyphMarginLanes=!1,this._ownerID=t,this._widgetFocusTracker=this._register(new y5t(e,l)),this._register(this._widgetFocusTracker.onChange(()=>{this._context.viewModel.setHasWidgetFocus(this._widgetFocusTracker.hasFocus())})),this._selections=[new st(1,1,1,1)],this._renderAnimationFrame=null,this._overflowGuardContainer=Yn(document.createElement("div")),$g.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._viewController=new DMt(s,o,a,n),this._context=new vOt(s,r,o),this._context.addEventHandler(this),this._viewParts=[],this._editContextEnabled=this._context.configuration.options.get(170),this._accessibilitySupport=this._context.configuration.options.get(2),this._editContext=this._instantiateEditContext(),this._viewParts.push(this._editContext),this._linesContent=Yn(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Yn(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._context.configuration.options.get(46)==="on"&&(this._viewGpuContext=this._instantiationService.createInstance(rl,this._context)),this._scrollbar=new NPt(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new AQ(this._context,this._viewGpuContext,this._linesContent),this._viewGpuContext&&(this._viewLinesGpu=this._instantiationService.createInstance(HQ,this._context,this._viewGpuContext)),this._viewZones=new fOt(this._context),this._viewParts.push(this._viewZones);const u=new rOt(this._context);this._viewParts.push(u);const h=new cOt(this._context);this._viewParts.push(h);const g=new IMt(this._context);this._viewParts.push(g),g.addDynamicOverlay(new CPt(this._context)),g.addDynamicOverlay(new OQ(this._context)),g.addDynamicOverlay(new FPt(this._context)),g.addDynamicOverlay(new kPt(this._context)),g.addDynamicOverlay(new mOt(this._context));const f=new AMt(this._context);this._viewParts.push(f),f.addDynamicOverlay(new SPt(this._context)),f.addDynamicOverlay(new zPt(this._context)),f.addDynamicOverlay(new VPt(this._context)),f.addDynamicOverlay(new a6(this._context)),this._viewGpuContext&&f.addDynamicOverlay(new GQ(this._context,this._viewGpuContext)),this._glyphMarginWidgets=new DPt(this._context),this._viewParts.push(this._glyphMarginWidgets);const m=new c6(this._context);m.getDomNode().appendChild(this._viewZones.marginDomNode),m.getDomNode().appendChild(f.getDomNode()),m.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(m),this._contentWidgets=new MMt(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new jQ(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new nOt(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const x=this._viewGpuContext?new x5t(this._context,this._viewGpuContext):new lOt(this._context);this._viewParts.push(x);const v=new RMt(this._context);this._viewParts.push(v);const _=new tOt(this._context);if(this._viewParts.push(_),u){const w=this._scrollbar.getOverviewRulerLayoutInfo();w.parent.insertBefore(u.getDomNode(),w.insertBefore)}this._linesContent.appendChild(g.getDomNode()),"domNode"in x&&this._linesContent.appendChild(x.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(m.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._viewGpuContext&&this._overflowGuardContainer.appendChild(this._viewGpuContext.canvas),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(_.getDomNode()),this._overflowGuardContainer.appendChild(v.domNode),this.domNode.appendChild(this._overflowGuardContainer),l?(l.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),l.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new LMt(this._context,this._viewController,this._createPointerHandlerHelper()))}_instantiateEditContext(){return this._context.configuration.options.get(170)?this._instantiationService.createInstance(m6,this._ownerID,this._context,this._overflowGuardContainer,this._viewController,this._createTextAreaHandlerHelper()):this._instantiationService.createInstance(VQ,this._context,this._overflowGuardContainer,this._viewController,this._createTextAreaHandlerHelper())}_updateEditContext(){const e=this._context.configuration.options.get(170),t=this._context.configuration.options.get(2);if(this._editContextEnabled===e&&this._accessibilitySupport===t)return;this._editContextEnabled=e,this._accessibilitySupport=t;const n=this._editContext.isFocused(),s=this._viewParts.indexOf(this._editContext);this._editContext.dispose(),this._editContext=this._instantiateEditContext(),n&&this._editContext.focus(),s!==-1&&this._viewParts.splice(s,1,this._editContext)}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes;let n=[],s=0;n=n.concat(e.getAllMarginDecorations().map(r=>{var a,l;const o=((a=r.options.glyphMargin)==null?void 0:a.position)??Ug.Center;return s=Math.max(s,r.range.endLineNumber),{range:r.range,lane:o,persist:(l=r.options.glyphMargin)==null?void 0:l.persistLane}})),n=n.concat(this._glyphMarginWidgets.getWidgets().map(r=>{const o=e.validateRange(r.preference.range);return s=Math.max(s,o.endLineNumber),{range:o,lane:r.preference.lane}})),n.sort((r,o)=>z.compareRangesUsingStarts(r.range,o.range)),t.reset(s);for(const r of n)t.push(r.lane,r.range,r.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,viewLinesGpu:this._viewLinesGpu,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._editContext.domNode.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._editContext.getLastRenderData();return new tMt(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>{var s;this._flushAccumulatedAndRenderNow();const n=new te(e,t);return this._viewLines.visibleRangeForPosition(n)??((s=this._viewLinesGpu)==null?void 0:s.visibleRangeForPosition(n))??null},getLineWidth:e=>{if(this._flushAccumulatedAndRenderNow(),this._viewLinesGpu){const t=this._viewLinesGpu.getLineWidth(e);if(t!==void 0)return t}return this._viewLines.getLineWidth(e)}}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e)),linesVisibleRangesForRange:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.linesVisibleRangesForRange(e,t))}}_applyLayout(){const t=this._context.configuration.options.get(165);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._editContext.isFocused()?" focused":"";return this._context.configuration.options.get(162)+" "+TQ(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._updateEditContext(),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){var e,t;this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),(e=this._viewGpuContext)==null||e.dispose(),this._viewLines.dispose(),(t=this._viewLinesGpu)==null||t.dispose();for(const n of this._viewParts)n.dispose();super.dispose()}_scheduleRender(){var e;if(this._store.isDisposed)throw new Nt;if(this._renderAnimationFrame===null){this._editContext instanceof m6&&this._editContext.setEditContextOnDomNode();const t=this._createCoordinatedRendering();this._renderAnimationFrame=QQ.INSTANCE.scheduleCoordinatedRendering({window:xt((e=this.domNode)==null?void 0:e.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new Nt;try{return t.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new Nt;return t.renderText()},prepareRender:(n,s)=>{if(this._store.isDisposed)throw new Nt;return t.prepareRender(n,s)},render:(n,s)=>{if(this._store.isDisposed)throw new Nt;return t.render(n,s)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();Zv(()=>e.prepareRenderText());const t=Zv(()=>e.renderText());if(t){const[n,s]=t;Zv(()=>e.prepareRender(n,s)),Zv(()=>e.render(n,s))}}_getViewPartsToRender(){const e=[];let t=0;for(const n of this._viewParts)n.shouldRender()&&(e[t++]=n);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}qv.onRenderStart()},renderText:()=>{var s;if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const n=new bOt(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(n),this._viewLines.shouldRender()&&(this._viewLines.renderText(n),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),(s=this._viewLinesGpu)!=null&&s.shouldRender()&&(this._viewLinesGpu.renderText(n),this._viewLinesGpu.onDidRender()),[e,new jRt(this._context.viewLayout,n,this._viewLines,this._viewLinesGpu)]},prepareRender:(e,t)=>{for(const n of e)n.prepareRender(t)},render:(e,t)=>{for(const n of e)n.render(t),n.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const n=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),s=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();const r=this._viewLines.visibleRangeForPosition(new te(s.lineNumber,s.column));return r?r.left:-1}getTargetAtClientPoint(e,t){const n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?iW.convertViewToModelMouseTarget(n,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new aOt(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const n of this._viewParts)n.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._editContext.writeScreenReaderContent(e)}focus(){this._editContext.focus()}isFocused(){return this._editContext.isFocused()}isWidgetFocused(){return this._widgetFocusTracker.hasFocus()}setAriaOptions(e){this._editContext.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,n,s,r;this._contentWidgets.setWidgetPosition(e.widget,((t=e.position)==null?void 0:t.position)??null,((n=e.position)==null?void 0:n.secondaryPosition)??null,((s=e.position)==null?void 0:s.preference)??null,((r=e.position)==null?void 0:r.positionAffinity)??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};YQ=v5t([_5t(8,ft)],YQ);function Zv(i){try{return i()}catch(e){return zt(e),null}}const i9=class i9{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(t!==-1&&(this._coordinatedRenderings.splice(t,1),this._coordinatedRenderings.length===0)){for(const[n,s]of this._animationFrameRunners)s.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,AF(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const n of e)Zv(()=>n.prepareRenderText());const t=[];for(let n=0,s=e.length;nr.renderText())}for(let n=0,s=e.length;nr.prepareRender(a,l))}for(let n=0,s=e.length;nr.render(a,l))}}};i9.INSTANCE=new i9;let QQ=i9;class y5t extends se{constructor(e,t){super(),this._onChange=this._register(new ie),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register($u(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),t&&(this._overflowWidgetsDomNode=this._register($u(t)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class DA{constructor(e,t,n,s,r){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=n,this.breakOffsetsVisibleColumn=s,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let s=this.breakOffsets[e]-t;return e>0&&(s+=this.wrappedTextIndentLength),s}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let s=e===0?t:this.breakOffsets[e-1]+t;if(this.injectionOffsets!==null)for(let r=0;rthis.injectionOffsets[r];r++)s0?this.breakOffsets[r-1]:0,t===0)if(e<=o)s=r-1;else if(e>l)n=r+1;else break;else if(e=l)n=r+1;else break}let a=e-o;return r>0&&(a+=this.wrappedTextIndentLength),new S3(r,a)}normalizeOutputPosition(e,t,n){if(this.injectionOffsets!==null){const s=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(s,n);if(r!==s)return this.offsetInInputWithInjectionsToOutputPosition(r,n)}if(n===0){if(e>0&&t===this.getMinOutputOffset(e))return new S3(e-1,this.getMaxOutputOffset(e-1))}else if(n===1){const s=this.getOutputLineCount()-1;if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const n=this.getInjectedTextAtOffset(e);if(!n)return e;if(t===2){if(e===n.offsetInInputWithInjections+n.length&&Mve(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let s=n.offsetInInputWithInjections;if(Pve(this.injectionOptions[n.injectedTextIndex].cursorStops))return s;let r=n.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[n.injectedTextIndex]&&!(Mve(this.injectionOptions[r].cursorStops)||(s-=this.injectionOptions[r].content.length,Pve(this.injectionOptions[r].cursorStops)));)r--;return s}}else if(t===1||t===4){let s=n.offsetInInputWithInjections+n.length,r=n.injectedTextIndex;for(;r+1=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)s-=this.injectionOptions[r-1].content.length,r--;return s}AP()}getInjectedText(e,t){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.getInjectedTextAtOffset(n);return s?{options:this.injectionOptions[s.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,n=this.injectionOptions;if(t!==null){let s=0;for(let r=0;re)break;if(e<=l)return{injectedTextIndex:r,offsetInInputWithInjections:a,length:o};s+=o}}}}function Mve(i){return i==null?!0:i===Du.Right||i===Du.Both}function Pve(i){return i==null?!0:i===Du.Left||i===Du.Both}class S3{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new te(e+this.outputLineIndex,this.outputOffset+1)}}class w5t{constructor(){this.changeType=1}}class qg{static applyInjectedText(e,t){if(!t||t.length===0)return e;let n="",s=0;for(const r of t)n+=e.substring(s,r.column-1),s=r.column-1,n+=r.options.content;return n+=e.substring(s),n}static fromDecorations(e){const t=[];for(const n of e)n.options.before&&n.options.before.content.length>0&&t.push(new qg(n.ownerId,n.range.startLineNumber,n.range.startColumn,n.options.before,0)),n.options.after&&n.options.after.content.length>0&&t.push(new qg(n.ownerId,n.range.endLineNumber,n.range.endColumn,n.options.after,1));return t.sort((n,s)=>n.lineNumber===s.lineNumber?n.column===s.column?n.order-s.order:n.column-s.column:n.lineNumber-s.lineNumber),t}constructor(e,t,n,s,r){this.ownerId=e,this.lineNumber=t,this.column=n,this.options=s,this.order=r}}class Ove{constructor(e,t,n){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=n}}class C5t{constructor(e,t,n,s){this.ownerId=e,this.decorationId=t,this.lineNumber=n,this.lineHeight=s}}class S5t{constructor(e,t){this.ownerId=e,this.lineNumber=t}}class k5t{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class N5t{constructor(e,t,n,s){this.changeType=4,this.injectedTexts=s,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}class E5t{constructor(){this.changeType=5}}class tE{constructor(e,t,n,s){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=s,this.resultingSelection=null}containsEvent(e){for(let t=0,n=this.changes.length;ti});class Zoe{static create(e){return new Zoe(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,n,s,r,o){const a=[],l=[];return{addRequest:(c,u,h)=>{a.push(c),l.push(u)},finalize:()=>L5t(Uv(this.targetWindow.deref()),a,e,t,n,s,r,l)}}}function L5t(i,e,t,n,s,r,o,a){function l(R){const P=a[R];if(P){const j=qg.applyInjectedText(e[R],P),B=P.map($=>$.options),H=P.map($=>$.column-1);return new DA(H,B,[j.length],[],0)}else return null}if(s===-1){const R=[];for(let P=0,j=e.length;Pc?(j=0,B=0):H=c-V}const $=P.substr(j),q=D5t($,B,n,H,m,g);x[R]=j,v[R]=B,_[R]=$,w[R]=q[0],k[R]=q[1]}const C=m.build(),E=(nq==null?void 0:nq.createHTML(C))??C;f.innerHTML=E,f.style.position="absolute",f.style.top="10000",o==="keepAll"?(f.style.wordBreak="keep-all",f.style.overflowWrap="anywhere"):(f.style.wordBreak="inherit",f.style.overflowWrap="break-word"),i.document.body.appendChild(f);const D=document.createRange(),T=Array.prototype.slice.call(f.children,0),I=[];for(let R=0;Rne.options),X=ae.map(ne=>ne.column-1)):(V=null,X=null),I[R]=new DA(X,V,j,q,H)}return f.remove(),I}function D5t(i,e,t,n,s,r){if(r!==0){const g=String(r);s.appendString('
');const o=i.length;let a=e,l=0;const c=[],u=[];let h=0");for(let g=0;g"),c[g]=l,u[g]=a;const f=h;h=g+1"),c[i.length]=l,u[i.length]=a,s.appendString("
"),[c,u]}function T5t(i,e,t,n){if(t.length<=1)return null;const s=Array.prototype.slice.call(e.children,0),r=[];try{XQ(i,s,n,0,null,t.length-1,null,r)}catch(o){return console.log(o),null}return r.length===0?null:(r.push(t.length),r)}function XQ(i,e,t,n,s,r,o,a){if(n===r||(s=s||iq(i,e,t[n],t[n+1]),o=o||iq(i,e,t[r],t[r+1]),Math.abs(s[0].top-o[0].top)<=.1))return;if(n+1===r){a.push(r);return}const l=n+(r-n)/2|0,c=iq(i,e,t[l],t[l+1]);XQ(i,e,t,n,s,l,c,a),XQ(i,e,t,l,c,r,o,a)}function iq(i,e,t,n){return i.setStart(e[t/16384|0].firstChild,t%16384),i.setEnd(e[n/16384|0].firstChild,n%16384),i.getClientRects()}class I5t extends se{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new x7),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,n){this._editor=e,this._instantiationService=n;for(const s of t){if(this._pending.has(s.id)){zt(new Error(`Cannot have two contributions with the same id ${s.id}`));continue}this._pending.set(s.id,s)}this._instantiateSome(0),this._register(VI(xt(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register(VI(xt(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register(VI(xt(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const e={};for(const[t,n]of this._instances)typeof n.saveViewState=="function"&&(e[t]=n.saveViewState());return e}restoreViewState(e){for(const[t,n]of this._instances)typeof n.restoreViewState=="function"&&n.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;return VI(xt((e=this._editor)==null?void 0:e.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const n of t)this._instantiateById(n.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,n]of this._pending)n.instantiation===e&&t.push(n);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const n=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,n),typeof n.restoreViewState=="function"&&t.instantiation!==0&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(n){zt(n)}}}}class $2e{constructor(e,t,n,s,r,o,a){this.id=e,this.label=t,this.alias=n,this.metadata=s,this._precondition=r,this._run=o,this._contextKeyService=a}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}const XP={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};function i0(i){let e=0,t=0,n=0,s=0;for(let r=0,o=i.length;r=Bd&&(t=t-i%Bd),t}function O5t(i,e){return i.reduce((t,n)=>Xs(t,e(n)),Bl)}function q2e(i,e){return i===e}function jR(i,e){const t=i,n=e;if(n-t<=0)return Bl;const r=Math.floor(t/Bd),o=Math.floor(n/Bd),a=n-o*Bd;if(r===o){const l=t-r*Bd;return Ir(0,a-l)}else return Ir(o-r,a)}function nE(i,e){return i=e}function cN(i){return Ir(i.lineNumber-1,i.column-1)}function Y1(i,e){const t=i,n=Math.floor(t/Bd),s=t-n*Bd,r=e,o=Math.floor(r/Bd),a=r-o*Bd;return new z(n+1,s+1,o+1,a+1)}function j5t(i){const e=Xc(i);return Ir(e.length-1,e[e.length-1].length)}class gb{static fromModelContentChanges(e){return e.map(n=>{const s=z.lift(n.range);return new gb(cN(s.getStartPosition()),cN(s.getEndPosition()),j5t(n.text))}).reverse()}constructor(e,t,n){this.startOffset=e,this.endOffset=t,this.newLength=n}toString(){return`[${Bu(this.startOffset)}...${Bu(this.endOffset)}) -> ${Bu(this.newLength)}`}}class F5t{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(t=>Joe.from(t))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],n=t?this.translateOldToCur(t.offsetObj):null;return n===null?null:jR(e,n)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Ir(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Ir(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Bu(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Ir(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Ir(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(s===0){const o=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let n=0;for(;;){const r=this.lineTokens,o=r.getCount();let a=null;if(this.lineTokenOffset1e3))break;if(n>1500)break}const s=M5t(e,t,this.lineIdx,this.lineCharOffset);return new kv(s,0,-1,Hc.getEmpty(),new Wy(s))}}class U5t{constructor(e,t){this.text=e,this._offset=Bl,this.idx=0;const n=t.getRegExpStr(),s=n?new RegExp(n+`| +`,"gi"):null,r=[];let o,a=0,l=0,c=0,u=0;const h=[];for(let m=0;m<60;m++)h.push(new kv(Ir(0,m),0,-1,Hc.getEmpty(),new Wy(Ir(0,m))));const g=[];for(let m=0;m<60;m++)g.push(new kv(Ir(1,m),0,-1,Hc.getEmpty(),new Wy(Ir(1,m))));if(s)for(s.lastIndex=0;(o=s.exec(e))!==null;){const m=o.index,x=o[0];if(x===` +`)a++,l=m+1;else{if(c!==m){let v;if(u===a){const _=m-c;if(_$5t(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(e))return t}get isEmpty(){return this.map.size===0}}function $5t(i){let e=Qc(i);return/^[\w ]+/.test(i)&&(e=`\\b${e}`),/[\w ]+$/.test(i)&&(e=`${e}\\b`),e}class Y2e{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=nae.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function q5t(i){if(i.length===0)return null;if(i.length===1)return i[0];let e=0;function t(){if(e>=i.length)return null;const o=e,a=i[o].listHeight;for(e++;e=2?Q2e(o===0&&e===i.length?i:i.slice(o,e),!1):i[o]}let n=t(),s=t();if(!s)return n;for(let o=t();o;o=t())Bve(n,s)<=Bve(s,o)?(n=sq(n,s),s=o):s=sq(s,o);return sq(n,s)}function Q2e(i,e=!1){if(i.length===0)return null;if(i.length===1)return i[0];let t=i.length;for(;t>3;){const n=t>>1;for(let s=0;s=3?i[2]:null,e)}function Bve(i,e){return Math.abs(i.listHeight-e.listHeight)}function sq(i,e){return i.listHeight===e.listHeight?Lp.create23(i,e,null,!1):i.listHeight>e.listHeight?K5t(i,e):G5t(e,i)}function K5t(i,e){i=i.toMutable();let t=i;const n=[];let s;for(;;){if(e.listHeight===t.listHeight){s=e;break}if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeLastElementMutable()}for(let r=n.length-1;r>=0;r--){const o=n[r];s?o.childrenLength>=3?s=Lp.create23(o.unappendChild(),s,null,!1):(o.appendChildOfSameHeight(s),s=void 0):o.handleChildrenChanged()}return s?Lp.create23(i,s,null,!1):i}function G5t(i,e){i=i.toMutable();let t=i;const n=[];for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");n.push(t),t=t.makeFirstElementMutable()}let s=e;for(let r=n.length-1;r>=0;r--){const o=n[r];s?o.childrenLength>=3?s=Lp.create23(s,o.unprependChild(),null,!1):(o.prependChildOfSameHeight(s),s=void 0):o.handleChildrenChanged()}return s?Lp.create23(s,i,null,!1):i}class Y5t{constructor(e){this.lastOffset=Bl,this.nextNodes=[e],this.offsets=[Bl],this.idxs=[]}readLongestNodeAt(e,t){if(nE(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const n=aI(this.nextNodes);if(!n)return;const s=aI(this.offsets);if(nE(e,s))return;if(nE(s,e))if(Xs(s,n.length)<=e)this.nextNodeAfterCurrent();else{const r=rq(n);r!==-1?(this.nextNodes.push(n.getChild(r)),this.offsets.push(s),this.idxs.push(r)):this.nextNodeAfterCurrent()}else{if(t(n))return this.nextNodeAfterCurrent(),n;{const r=rq(n);if(r===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(n.getChild(r)),this.offsets.push(s),this.idxs.push(r)}}}}nextNodeAfterCurrent(){for(;;){const e=aI(this.offsets),t=aI(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const n=aI(this.nextNodes),s=rq(n,this.idxs[this.idxs.length-1]);if(s!==-1){this.nextNodes.push(n.getChild(s)),this.offsets.push(Xs(e,t.length)),this.idxs[this.idxs.length-1]=s;break}else this.idxs.pop()}}}function rq(i,e=-1){for(;;){if(e++,e>=i.childrenLength)return-1;if(i.getChild(e))return e}}function aI(i){return i.length>0?i[i.length-1]:void 0}function ZQ(i,e,t,n){return new Q5t(i,e,t,n).parseDocument()}class Q5t{constructor(e,t,n,s){if(this.tokenizer=e,this.createImmutableLists=s,this._itemsConstructed=0,this._itemsFromCache=0,n&&s)throw new Error("Not supported");this.oldNodeReader=n?new Y5t(n):void 0,this.positionMapper=new F5t(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Hc.getEmpty(),0);return e||(e=Lp.getEmpty()),e}parseList(e,t){const n=[];for(;;){let r=this.tryReadChildFromCache(e);if(!r){const o=this.tokenizer.peek();if(!o||o.kind===2&&o.bracketIds.intersects(e))break;r=this.parseChild(e,t+1)}r.kind===4&&r.childrenLength===0||n.push(r)}return this.oldNodeReader?q5t(n):Q2e(n,this.createImmutableLists)}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(t===null||!b6(t)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>t!==null&&!nE(s.length,t)?!1:s.canBeReused(e));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(e,t){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new V5t(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(t>300)return new Wy(n.length);const s=e.merge(n.bracketIds),r=this.parseList(s,t+1),o=this.tokenizer.peek();return o&&o.kind===2&&(o.bracketId===n.bracketId||o.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),FR.create(n.astNode,r,o.astNode)):FR.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}function _6(i,e){if(i.length===0)return e;if(e.length===0)return i;const t=new Kb(Hve(i)),n=Hve(e);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let s=t.dequeue();function r(c){if(c===void 0){const h=t.takeWhile(g=>!0)||[];return s&&h.unshift(s),h}const u=[];for(;s&&!b6(c);){const[h,g]=s.splitAt(c);u.push(h),c=jR(h.lengthAfter,c),s=g??t.dequeue()}return b6(c)||u.push(new Jv(!1,c,c)),u}const o=[];function a(c,u,h){if(o.length>0&&q2e(o[o.length-1].endOffset,c)){const g=o[o.length-1];o[o.length-1]=new gb(g.startOffset,u,Xs(g.newLength,h))}else o.push({startOffset:c,endOffset:u,newLength:h})}let l=Bl;for(const c of n){const u=r(c.lengthBefore);if(c.modified){const h=O5t(u,f=>f.lengthBefore),g=Xs(l,h);a(l,g,c.lengthAfter),l=g}else for(const h of u){const g=l;l=Xs(l,h.lengthBefore),h.modified&&a(g,l,h.lengthAfter)}}return o}class Jv{constructor(e,t,n){this.modified=e,this.lengthBefore=t,this.lengthAfter=n}splitAt(e){const t=jR(e,this.lengthAfter);return q2e(t,Bl)?[this,void 0]:this.modified?[new Jv(this.modified,this.lengthBefore,e),new Jv(this.modified,Bl,t)]:[new Jv(this.modified,e,e),new Jv(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${Bu(this.lengthBefore)} -> ${Bu(this.lengthAfter)}`}}function Hve(i){const e=[];let t=Bl;for(const n of i){const s=jR(t,n.startOffset);b6(s)||e.push(new Jv(!1,s,s));const r=jR(n.startOffset,n.endOffset);e.push(new Jv(!0,r,n.newLength)),t=n.endOffset}return e}class X5t extends se{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new ie,this.denseKeyProvider=new K2e,this.brackets=new Y2e(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)e.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const n=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),s=new U5t(this.textModel.getValue(),n);this.initialAstWithoutTokens=ZQ(s,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const e=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map(n=>new gb(Ir(n.fromLineNumber-1,0),Ir(n.toLineNumber,0),Ir(n.toLineNumber-n.fromLineNumber+1,0)));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=gb.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const n=_6(this.queuedTextEdits,e);this.queuedTextEdits=n,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=_6(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,n){const s=t,r=new G2e(this.textModel,this.brackets);return ZQ(r,e,s,n)}getBracketsInRange(e,t){this.flushQueue();const n=Ir(e.startLineNumber-1,e.startColumn-1),s=Ir(e.endLineNumber-1,e.endColumn-1);return new W1(r=>{const o=this.initialAstWithoutTokens||this.astWithTokens;JQ(o,Bl,o.length,n,s,r,0,0,new Map,t)})}getBracketPairsInRange(e,t){this.flushQueue();const n=cN(e.getStartPosition()),s=cN(e.getEndPosition());return new W1(r=>{const o=this.initialAstWithoutTokens||this.astWithTokens,a=new Z5t(r,t,this.textModel);eX(o,Bl,o.length,n,s,a,0,new Map)})}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return Z2e(t,Bl,t.length,cN(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return X2e(t,Bl,t.length,cN(e))}}function X2e(i,e,t,n){if(i.kind===4||i.kind===2){const s=[];for(const r of i.children)t=Xs(e,r.length),s.push({nodeOffsetStart:e,nodeOffsetEnd:t}),e=t;for(let r=s.length-1;r>=0;r--){const{nodeOffsetStart:o,nodeOffsetEnd:a}=s[r];if(nE(o,n)){const l=X2e(i.children[r],o,a,n);if(l)return l}}return null}else{if(i.kind===3)return null;if(i.kind===1){const s=Y1(e,t);return{bracketInfo:i.bracketInfo,range:s}}}return null}function Z2e(i,e,t,n){if(i.kind===4||i.kind===2){for(const s of i.children){if(t=Xs(e,s.length),nE(n,t)){const r=Z2e(s,e,t,n);if(r)return r}e=t}return null}else{if(i.kind===3)return null;if(i.kind===1){const s=Y1(e,t);return{bracketInfo:i.bracketInfo,range:s}}}return null}function JQ(i,e,t,n,s,r,o,a,l,c,u=!1){if(o>200)return!0;e:for(;;)switch(i.kind){case 4:{const h=i.childrenLength;for(let g=0;g200)return!0;let l=!0;if(i.kind===2){let u=0;if(a){let f=a.get(i.openingBracket.text);f===void 0&&(f=0),u=f,f++,a.set(i.openingBracket.text,f)}const h=Xs(e,i.openingBracket.length);let g=-1;if(r.includeMinIndentation&&(g=i.computeMinIndentation(e,r.textModel)),l=r.push(new R5t(Y1(e,t),Y1(e,h),i.closingBracket?Y1(Xs(h,((c=i.child)==null?void 0:c.length)||Bl),t):void 0,o,u,i,g)),e=h,l&&i.child){const f=i.child;if(t=Xs(e,f.length),iE(e,s)&&UI(t,n)&&(l=eX(f,e,t,n,s,r,o+1,a),!l))return!1}a==null||a.set(i.openingBracket.text,u)}else{let u=e;for(const h of i.children){const g=u;if(u=Xs(u,h.length),iE(g,s)&&iE(n,u)&&(l=eX(h,g,u,n,s,r,o,a),!l))return!1}}return l}class J5t extends se{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new Zn),this.onDidChangeEmitter=new ie,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){var t;(!e.languageId||(t=this.bracketPairsTree.value)!=null&&t.object.didLanguageChange(e.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;(t=this.bracketPairsTree.value)==null||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;(e=this.bracketPairsTree.value)==null||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;(t=this.bracketPairsTree.value)==null||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const e=new _e;this.bracketPairsTree.value=e3t(e.add(new X5t(this.textModel,t=>this.languageConfigurationService.getLanguageConfiguration(t))),e),e.add(this.bracketPairsTree.value.object.onDidChange(t=>this.onDidChangeEmitter.fire(t))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)==null?void 0:t.object.getBracketPairsInRange(e,!1))||W1.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((t=this.bracketPairsTree.value)==null?void 0:t.object.getBracketPairsInRange(e,!0))||W1.empty}getBracketsInRange(e,t=!1){var n;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((n=this.bracketPairsTree.value)==null?void 0:n.object.getBracketsInRange(e,t))||W1.empty}findMatchingBracketUp(e,t,n){const s=this.textModel.validatePosition(t),r=this.textModel.getLanguageIdAtPosition(s.lineNumber,s.column);if(this.canBuildAST){const o=this.languageConfigurationService.getLanguageConfiguration(r).bracketsNew.getClosingBracketInfo(e);if(!o)return null;const a=this.getBracketPairsInRange(z.fromPositions(t,t)).findLast(l=>o.closes(l.openingBracketInfo));return a?a.openingBracketRange:null}else{const o=e.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(r).brackets;if(!a)return null;const l=a.textIsBracket[o];return l?N3(this._findMatchingBracketUp(l,s,oq(n))):null}}matchBracket(e,t){if(this.canBuildAST){const n=this.getBracketPairsInRange(z.fromPositions(e,e)).filter(s=>s.closingBracketRange!==void 0&&(s.openingBracketRange.containsPosition(e)||s.closingBracketRange.containsPosition(e))).findLastMaxBy(_a(s=>s.openingBracketRange.containsPosition(e)?s.openingBracketRange:s.closingBracketRange,z.compareRangesUsingStarts));return n?[n.openingBracketRange,n.closingBracketRange]:null}else{const n=oq(t);return this._matchBracket(this.textModel.validatePosition(e),n)}}_establishBracketSearchOffsets(e,t,n,s){const r=t.getCount(),o=t.getLanguageId(s);let a=Math.max(0,e.column-1-n.maxBracketLength);for(let c=s-1;c>=0;c--){const u=t.getEndOffset(c);if(u<=a)break;if(Cf(t.getStandardTokenType(c))||t.getLanguageId(c)!==o){a=u;break}}let l=Math.min(t.getLineContent().length,e.column-1+n.maxBracketLength);for(let c=s+1;c=l)break;if(Cf(t.getStandardTokenType(c))||t.getLanguageId(c)!==o){l=u;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e,t){const n=e.lineNumber,s=this.textModel.tokenization.getLineTokens(n),r=this.textModel.getLineContent(n),o=s.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(o)).brackets;if(a&&!Cf(s.getStandardTokenType(o))){let{searchStartOffset:l,searchEndOffset:c}=this._establishBracketSearchOffsets(e,s,a,o),u=null;for(;;){const h=hh.findNextBracketInRange(a.forwardRegex,n,r,l,c);if(!h)break;if(h.startColumn<=e.column&&e.column<=h.endColumn){const g=r.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),f=this._matchFoundBracket(h,a.textIsBracket[g],a.textIsOpenBracket[g],t);if(f){if(f instanceof Km)return null;u=f}}l=h.endColumn-1}if(u)return u}if(o>0&&s.getStartOffset(o)===e.column-1){const l=o-1,c=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(l)).brackets;if(c&&!Cf(s.getStandardTokenType(l))){const{searchStartOffset:u,searchEndOffset:h}=this._establishBracketSearchOffsets(e,s,c,l),g=hh.findPrevBracketInRange(c.reversedRegex,n,r,u,h);if(g&&g.startColumn<=e.column&&e.column<=g.endColumn){const f=r.substring(g.startColumn-1,g.endColumn-1).toLowerCase(),m=this._matchFoundBracket(g,c.textIsBracket[f],c.textIsOpenBracket[f],t);if(m)return m instanceof Km?null:m}}}return null}_matchFoundBracket(e,t,n,s){if(!t)return null;const r=n?this._findMatchingBracketDown(t,e.getEndPosition(),s):this._findMatchingBracketUp(t,e.getStartPosition(),s);return r?r instanceof Km?r:[e,r]:null}_findMatchingBracketUp(e,t,n){const s=e.languageId,r=e.reversedRegex;let o=-1,a=0;const l=(c,u,h,g)=>{for(;;){if(n&&++a%100===0&&!n())return Km.INSTANCE;const f=hh.findPrevBracketInRange(r,c,u,h,g);if(!f)break;const m=u.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(m)?o++:e.isClose(m)&&o--,o===0)return f;g=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){const u=this.textModel.tokenization.getLineTokens(c),h=u.getCount(),g=this.textModel.getLineContent(c);let f=h-1,m=g.length,x=g.length;c===t.lineNumber&&(f=u.findTokenIndexAtOffset(t.column-1),m=t.column-1,x=t.column-1);let v=!0;for(;f>=0;f--){const _=u.getLanguageId(f)===s&&!Cf(u.getStandardTokenType(f));if(_)v?m=u.getStartOffset(f):(m=u.getStartOffset(f),x=u.getEndOffset(f));else if(v&&m!==x){const w=l(c,g,m,x);if(w)return w}v=_}if(v&&m!==x){const _=l(c,g,m,x);if(_)return _}}return null}_findMatchingBracketDown(e,t,n){const s=e.languageId,r=e.forwardRegex;let o=1,a=0;const l=(u,h,g,f)=>{for(;;){if(n&&++a%100===0&&!n())return Km.INSTANCE;const m=hh.findNextBracketInRange(r,u,h,g,f);if(!m)break;const x=h.substring(m.startColumn-1,m.endColumn-1).toLowerCase();if(e.isOpen(x)?o++:e.isClose(x)&&o--,o===0)return m;g=m.endColumn-1}return null},c=this.textModel.getLineCount();for(let u=t.lineNumber;u<=c;u++){const h=this.textModel.tokenization.getLineTokens(u),g=h.getCount(),f=this.textModel.getLineContent(u);let m=0,x=0,v=0;u===t.lineNumber&&(m=h.findTokenIndexAtOffset(t.column-1),x=t.column-1,v=t.column-1);let _=!0;for(;m=1;a--){const l=this.textModel.tokenization.getLineTokens(a),c=l.getCount(),u=this.textModel.getLineContent(a);let h=c-1,g=u.length,f=u.length;if(a===t.lineNumber){h=l.findTokenIndexAtOffset(t.column-1),g=t.column-1,f=t.column-1;const x=l.getLanguageId(h);n!==x&&(n=x,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let m=!0;for(;h>=0;h--){const x=l.getLanguageId(h);if(n!==x){if(s&&r&&m&&g!==f){const _=hh.findPrevBracketInRange(s.reversedRegex,a,u,g,f);if(_)return this._toFoundBracket(r,_);m=!1}n=x,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,r=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const v=!!s&&!Cf(l.getStandardTokenType(h));if(v)m?g=l.getStartOffset(h):(g=l.getStartOffset(h),f=l.getEndOffset(h));else if(r&&s&&m&&g!==f){const _=hh.findPrevBracketInRange(s.reversedRegex,a,u,g,f);if(_)return this._toFoundBracket(r,_)}m=v}if(r&&s&&m&&g!==f){const x=hh.findPrevBracketInRange(s.reversedRegex,a,u,g,f);if(x)return this._toFoundBracket(r,x)}}return null}findNextBracket(e){var a;const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((a=this.bracketPairsTree.value)==null?void 0:a.object.getFirstBracketAfter(t))||null;const n=this.textModel.getLineCount();let s=null,r=null,o=null;for(let l=t.lineNumber;l<=n;l++){const c=this.textModel.tokenization.getLineTokens(l),u=c.getCount(),h=this.textModel.getLineContent(l);let g=0,f=0,m=0;if(l===t.lineNumber){g=c.findTokenIndexAtOffset(t.column-1),f=t.column-1,m=t.column-1;const v=c.getLanguageId(g);s!==v&&(s=v,r=this.languageConfigurationService.getLanguageConfiguration(s).brackets,o=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let x=!0;for(;gx.closingBracketRange!==void 0&&x.range.strictContainsRange(f));return m?[m.openingBracketRange,m.closingBracketRange]:null}const s=oq(t),r=this.textModel.getLineCount(),o=new Map;let a=[];const l=(f,m)=>{if(!o.has(f)){const x=[];for(let v=0,_=m?m.brackets.length:0;v<_;v++)x[v]=0;o.set(f,x)}a=o.get(f)};let c=0;const u=(f,m,x,v,_)=>{for(;;){if(s&&++c%100===0&&!s())return Km.INSTANCE;const w=hh.findNextBracketInRange(f.forwardRegex,m,x,v,_);if(!w)break;const k=x.substring(w.startColumn-1,w.endColumn-1).toLowerCase(),C=f.textIsBracket[k];if(C&&(C.isOpen(k)?a[C.index]++:C.isClose(k)&&a[C.index]--,a[C.index]===-1))return this._matchFoundBracket(w,C,!1,s);v=w.endColumn-1}return null};let h=null,g=null;for(let f=n.lineNumber;f<=r;f++){const m=this.textModel.tokenization.getLineTokens(f),x=m.getCount(),v=this.textModel.getLineContent(f);let _=0,w=0,k=0;if(f===n.lineNumber){_=m.findTokenIndexAtOffset(n.column-1),w=n.column-1,k=n.column-1;const E=m.getLanguageId(_);h!==E&&(h=E,g=this.languageConfigurationService.getLanguageConfiguration(h).brackets,l(h,g))}let C=!0;for(;_e==null?void 0:e.dispose()}}function oq(i){if(typeof i>"u")return()=>!0;{const e=Date.now();return()=>Date.now()-e<=i}}const s9=class s9{constructor(){this._searchCanceledBrand=void 0}};s9.INSTANCE=new s9;let Km=s9;function N3(i){return i instanceof Km?null:i}class t3t extends se{constructor(e){super(),this.textModel=e,this.colorProvider=new J2e,this.onDidChangeEmitter=new ie,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange(t=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,n,s){return s?[]:t===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map(o=>({id:`bracket${o.range.toString()}-${o.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(o,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:o.range})).toArray():[]}getAllDecorations(e,t){return e===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new z(1,1,this.textModel.getLineCount(),1),e,t):[]}}class J2e{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Zu((i,e)=>{const t=[x2e,v2e,_2e,y2e,w2e,C2e],n=new J2e;e.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${i.getColor(dPt)}; }`);const s=t.map(r=>i.getColor(r)).filter(r=>!!r).filter(r=>!r.isTransparent());for(let r=0;r<30;r++){const o=s[r%s.length];e.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(r)} { color: ${o}; }`)}});function E3(i){return i.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class fa{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,n,s){this.oldPosition=e,this.oldText=t,this.newPosition=n,this.newText=s}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${E3(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${E3(this.oldText)}")`:`(replace@${this.oldPosition} "${E3(this.oldText)}" with "${E3(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){const s=t.length;fg(e,s,n),n+=4;for(let r=0;r{const a=t[r];return a!==void 0?a:(r.match(/\$/g)||[]).length<=e&&o!==void 0&&o!==null&&o!==""}).map(([r,o])=>`${r}:${o}`).join("-")}}function sc(i){return new eRe(i,i3t)}const Aa={unknown(i){return sc({source:"unknown",name:i.name})},rename:()=>sc({source:"rename"}),chatApplyEdits(i){var e,t;return sc({source:"Chat.applyEdits",$modelId:Wve(i.modelId),$extensionId:(e=i.extensionId)==null?void 0:e.extensionId,$extensionVersion:(t=i.extensionId)==null?void 0:t.version,$$languageId:i.languageId,$$sessionId:i.sessionId,$$requestId:i.requestId,$$mode:i.mode,$$codeBlockSuggestionId:i.codeBlockSuggestionId})},chatUndoEdits:()=>sc({source:"Chat.undoEdits"}),chatReset:()=>sc({source:"Chat.reset"}),inlineCompletionAccept(i){return sc({source:"inlineCompletionAccept",$nes:i.nes,...L3(i.providerId),$$requestUuid:i.requestUuid,$$languageId:i.languageId})},inlineCompletionPartialAccept(i){return sc({source:"inlineCompletionPartialAccept",type:i.type,$nes:i.nes,...L3(i.providerId),$$requestUuid:i.requestUuid,$$languageId:i.languageId})},inlineChatApplyEdit(i){var e,t;return sc({source:"inlineChat.applyEdits",$modelId:Wve(i.modelId),$extensionId:(e=i.extensionId)==null?void 0:e.extensionId,$extensionVersion:(t=i.extensionId)==null?void 0:t.version,$$sessionId:i.sessionId,$$requestId:i.requestId,$$languageId:i.languageId})},reloadFromDisk:()=>sc({source:"reloadFromDisk"}),cursor(i){return sc({source:"cursor",kind:i.kind,detailedSource:i.detailedSource})},setValue:()=>sc({source:"setValue"}),eolChange:()=>sc({source:"eolChange"}),applyEdits:()=>sc({source:"applyEdits"}),snippet:()=>sc({source:"snippet"}),suggest:i=>sc({source:"suggest",...L3(i.providerId)}),codeAction:i=>sc({source:"codeAction",$kind:i.kind,...L3(i.providerId)})};function L3(i){return i?{$extensionId:i.extensionId,$extensionVersion:i.extensionVersion,$providerId:i.providerId}:{}}function Wve(i){if(i!==void 0)return i.replaceAll("/","|")}class HR{static fromText(e){const t=ro.ofText(e).lineCount,n=e.length;return new HR(t,0,n,0)}static tryCreate(e,t,n,s){if(!(e===void 0||t===void 0||n===void 0||s===void 0))return new HR(e,t,n,s)}constructor(e,t,n,s){this.linesAdded=e,this.linesRemoved=t,this.charsAdded=n,this.charsRemoved=s}}var Vve;(function(i){function e(t){const n=t?t("sgt"):l2e("sgt");return n}i.newId=e})(Vve||(Vve={}));function _k(i){return i.toString()}class Lo{static create(e,t){const n=e.getAlternativeVersionId(),s=tX(e);return new Lo(n,n,s,s,t,t,[])}constructor(e,t,n,s,r,o,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=n,this.afterEOL=s,this.beforeCursorState=r,this.afterCursorState=o,this.changes=a}append(e,t,n,s,r){t.length>0&&(this.changes=n3t(this.changes,t)),this.afterEOL=n,this.afterVersionId=s,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,n){if(fg(e,t?t.length:0,n),n+=4,t)for(const s of t)fg(e,s.selectionStartLineNumber,n),n+=4,fg(e,s.selectionStartColumn,n),n+=4,fg(e,s.positionLineNumber,n),n+=4,fg(e,s.positionColumn,n),n+=4;return n}static _readSelections(e,t,n){const s=gg(e,t);t+=4;for(let r=0;rt.toString()).join(", ")}matchesResource(e){return(kt.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Lo}append(e,t,n,s,r){this._data instanceof Lo&&this._data.append(e,t,n,s,r)}close(){this._data instanceof Lo&&(this._data=this._data.serialize())}open(){this._data instanceof Lo||(this._data=Lo.deserialize(this._data))}undo(){if(kt.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Lo&&(this._data=this._data.serialize());const e=Lo.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(kt.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Lo&&(this._data=this._data.serialize());const e=Lo.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Lo&&(this._data=this._data.serialize()),this._data.byteLength+168}}class s3t{get resources(){return this._editStackElementsArr.map(e=>e.resource)}constructor(e,t,n){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=n.slice(0),this._editStackElementsMap=new Map;for(const s of this._editStackElementsArr){const r=_k(s.resource);this._editStackElementsMap.set(r,s)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=_k(e);return this._editStackElementsMap.has(t)}setModel(e){const t=_k(kt.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=_k(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,n,s,r){const o=_k(e.uri);this._editStackElementsMap.get(o).append(e,t,n,s,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=_k(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${qu(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function tX(i){return i.getEOL()===` +`?0:1}function Gm(i){return i?i instanceof tRe||i instanceof s3t:!1}class iae{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Gm(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Gm(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const n=this._undoRedoService.getLastElement(this._model.uri);if(Gm(n)&&n.canAppend(this._model))return n;const s=new tRe(S(785,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(s,t),s}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],tX(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,n,s,r=Aa.unknown({name:"pushEditOperation"})){const o=this._getOrCreateEditStackElement(e,s),a=this._model.applyEdits(t,!0,r),l=iae._computeCursorState(n,a),c=a.map((u,h)=>({index:h,textChange:u.textChange}));return c.sort((u,h)=>u.textChange.oldPosition===h.textChange.oldPosition?u.index-h.index:u.textChange.oldPosition-h.textChange.oldPosition),o.append(this._model,c.map(u=>u.textChange),tX(this._model),this._model.getAlternativeVersionId(),l),l}static _computeCursorState(e,t){try{return e?e(t):null}catch(n){return zt(n),null}}}class r3t{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function o3t(i,e,t,n,s){s.spacesDiff=0,s.looksLikeAlignment=!1;let r;for(r=0;r0&&a>0||l>0&&c>0)return;const u=Math.abs(a-c),h=Math.abs(o-l);if(u===0){s.spacesDiff=h,h>0&&0<=l-1&&l-10?s++:C>1&&r++,o3t(o,a,v,k,h),h.looksLikeAlignment&&!(t&&e===h.spacesDiff)))continue;const D=h.spacesDiff;D<=c&&u[D]++,o=v,a=k}let g=t;s!==r&&(g=s{const v=u[x];v>m&&(m=v,f=x)}),f===4&&u[4]>0&&u[2]>0&&u[2]>=u[4]/2&&(f=2)}return{insertSpaces:g,tabSize:f}}function rc(i){return(i.metadata&1)>>>0}function hs(i,e){i.metadata=i.metadata&254|e<<0}function ya(i){return(i.metadata&2)>>>1===1}function os(i,e){i.metadata=i.metadata&253|(e?1:0)<<1}function nRe(i){return(i.metadata&4)>>>2===1}function Uve(i,e){i.metadata=i.metadata&251|(e?1:0)<<2}function iRe(i){return(i.metadata&64)>>>6===1}function $ve(i,e){i.metadata=i.metadata&191|(e?1:0)<<6}function sRe(i){return(i.metadata&128)>>>7===1}function qve(i,e){i.metadata=i.metadata&127|(e?1:0)<<7}function a3t(i){return(i.metadata&24)>>>3}function Kve(i,e){i.metadata=i.metadata&231|e<<3}function l3t(i){return(i.metadata&32)>>>5===1}function Gve(i,e){i.metadata=i.metadata&223|(e?1:0)<<5}class rRe{constructor(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,hs(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,Uve(this,!1),$ve(this,!1),Kve(this,1),Gve(this,!1),qve(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,os(this,!1)}reset(e,t,n,s){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=s}setOptions(e){this.options=e;const t=this.options.className;Uve(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),$ve(this,this.options.glyphMarginClassName!==null),Kve(this,this.options.stickiness),Gve(this,this.options.collapseOnReplaceEdit),qve(this,this.options.affectsFont??!1)}setCachedOffsets(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Sn=new rRe(null,0,0);Sn.parent=Sn;Sn.left=Sn;Sn.right=Sn;hs(Sn,0);class aq{constructor(){this.root=Sn,this.requestNormalizeDelta=!1}intervalSearch(e,t,n,s,r,o,a){return this.root===Sn?[]:m3t(this,e,t,n,s,r,o,a)}search(e,t,n,s,r){return this.root===Sn?[]:p3t(this,e,t,n,s,r)}collectNodesFromOwner(e){return g3t(this,e)}collectNodesPostOrder(){return f3t(this)}insert(e){Yve(this,e),this._normalizeDeltaIfNecessary()}delete(e){Qve(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const n=e;let s=0;for(;e!==this.root;)e===e.parent.right&&(s+=e.parent.delta),e=e.parent;const r=n.start+s,o=n.end+s;n.setCachedOffsets(r,o,t)}acceptReplace(e,t,n,s){const r=u3t(this,e,e+t);for(let o=0,a=r.length;ot||n===1?!1:n===2?!0:e}function d3t(i,e,t,n,s){const r=a3t(i),o=r===0||r===2,a=r===1||r===2,l=t-e,c=n,u=Math.min(l,c),h=i.start;let g=!1;const f=i.end;let m=!1;e<=h&&f<=t&&l3t(i)&&(i.start=e,g=!0,i.end=e,m=!0);{const v=s?1:l>0?2:0;!g&&yk(h,o,e,v)&&(g=!0),!m&&yk(f,a,e,v)&&(m=!0)}if(u>0&&!s){const v=l>c?2:0;!g&&yk(h,o,e+u,v)&&(g=!0),!m&&yk(f,a,e+u,v)&&(m=!0)}{const v=s?1:0;!g&&yk(h,o,t,v)&&(i.start=e+c,g=!0),!m&&yk(f,a,t,v)&&(i.end=e+c,m=!0)}const x=c-l;g||(i.start=Math.max(0,h+x)),m||(i.end=Math.max(0,f+x)),i.start>i.end&&(i.end=i.start)}function u3t(i,e,t){let n=i.root,s=0,r=0,o=0,a=0;const l=[];let c=0;for(;n!==Sn;){if(ya(n)){os(n.left,!1),os(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;continue}if(!ya(n.left)){if(r=s+n.maxEnd,rt){os(n,!0);continue}if(a=s+n.end,a>=e&&(n.setCachedOffsets(o,a,0),l[c++]=n),os(n,!0),n.right!==Sn&&!ya(n.right)){s+=n.delta,n=n.right;continue}}return os(i.root,!1),l}function h3t(i,e,t,n){let s=i.root,r=0,o=0,a=0;const l=n-(t-e);for(;s!==Sn;){if(ya(s)){os(s.left,!1),os(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s0(s),s=s.parent;continue}if(!ya(s.left)){if(o=r+s.maxEnd,ot){s.start+=l,s.end+=l,s.delta+=l,(s.delta<-1073741824||s.delta>1073741824)&&(i.requestNormalizeDelta=!0),os(s,!0);continue}if(os(s,!0),s.right!==Sn&&!ya(s.right)){r+=s.delta,s=s.right;continue}}os(i.root,!1)}function g3t(i,e){let t=i.root;const n=[];let s=0;for(;t!==Sn;){if(ya(t)){os(t.left,!1),os(t.right,!1),t=t.parent;continue}if(t.left!==Sn&&!ya(t.left)){t=t.left;continue}if(t.ownerId===e&&(n[s++]=t),os(t,!0),t.right!==Sn&&!ya(t.right)){t=t.right;continue}}return os(i.root,!1),n}function f3t(i){let e=i.root;const t=[];let n=0;for(;e!==Sn;){if(ya(e)){os(e.left,!1),os(e.right,!1),e=e.parent;continue}if(e.left!==Sn&&!ya(e.left)){e=e.left;continue}if(e.right!==Sn&&!ya(e.right)){e=e.right;continue}t[n++]=e,os(e,!0)}return os(i.root,!1),t}function p3t(i,e,t,n,s,r){let o=i.root,a=0,l=0,c=0;const u=[];let h=0;for(;o!==Sn;){if(ya(o)){os(o.left,!1),os(o.right,!1),o===o.parent.right&&(a-=o.parent.delta),o=o.parent;continue}if(o.left!==Sn&&!ya(o.left)){o=o.left;continue}l=a+o.start,c=a+o.end,o.setCachedOffsets(l,c,s);let g=!0;if(e&&o.ownerId&&o.ownerId!==e&&(g=!1),t&&nRe(o)&&(g=!1),n&&sRe(o)&&(g=!1),r&&!iRe(o)&&(g=!1),g&&(u[h++]=o),os(o,!0),o.right!==Sn&&!ya(o.right)){a+=o.delta,o=o.right;continue}}return os(i.root,!1),u}function m3t(i,e,t,n,s,r,o,a){let l=i.root,c=0,u=0,h=0,g=0;const f=[];let m=0;for(;l!==Sn;){if(ya(l)){os(l.left,!1),os(l.right,!1),l===l.parent.right&&(c-=l.parent.delta),l=l.parent;continue}if(!ya(l.left)){if(u=c+l.maxEnd,ut){os(l,!0);continue}if(g=c+l.end,g>=e){l.setCachedOffsets(h,g,o);let x=!0;n&&l.ownerId&&l.ownerId!==n&&(x=!1),s&&nRe(l)&&(x=!1),r&&sRe(l)&&(x=!1),a&&!iRe(l)&&(x=!1),x&&(f[m++]=l)}if(os(l,!0),l.right!==Sn&&!ya(l.right)){c+=l.delta,l=l.right;continue}}return os(i.root,!1),f}function Yve(i,e){if(i.root===Sn)return e.parent=Sn,e.left=Sn,e.right=Sn,hs(e,0),i.root=e,i.root;b3t(i,e),ov(e.parent);let t=e;for(;t!==i.root&&rc(t.parent)===1;)if(t.parent===t.parent.parent.left){const n=t.parent.parent.right;rc(n)===1?(hs(t.parent,0),hs(n,0),hs(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,TA(i,t)),hs(t.parent,0),hs(t.parent.parent,1),IA(i,t.parent.parent))}else{const n=t.parent.parent.left;rc(n)===1?(hs(t.parent,0),hs(n,0),hs(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,IA(i,t)),hs(t.parent,0),hs(t.parent.parent,1),TA(i,t.parent.parent))}return hs(i.root,0),e}function b3t(i,e){let t=0,n=i.root;const s=e.start,r=e.end;for(;;)if(v3t(s,r,n.start+t,n.end+t)<0)if(n.left===Sn){e.start-=t,e.end-=t,e.maxEnd-=t,n.left=e;break}else n=n.left;else if(n.right===Sn){e.start-=t+n.delta,e.end-=t+n.delta,e.maxEnd-=t+n.delta,n.right=e;break}else t+=n.delta,n=n.right;e.parent=n,e.left=Sn,e.right=Sn,hs(e,1)}function Qve(i,e){let t,n;if(e.left===Sn?(t=e.right,n=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===Sn?(t=e.left,n=e):(n=x3t(e.right),t=n.right,t.start+=n.delta,t.end+=n.delta,t.delta+=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),n.start+=e.delta,n.end+=e.delta,n.delta=e.delta,(n.delta<-1073741824||n.delta>1073741824)&&(i.requestNormalizeDelta=!0)),n===i.root){i.root=t,hs(t,0),e.detach(),lq(),s0(t),i.root.parent=Sn;return}const s=rc(n)===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?t.parent=n.parent:(n.parent===e?t.parent=n:t.parent=n.parent,n.left=e.left,n.right=e.right,n.parent=e.parent,hs(n,rc(e)),e===i.root?i.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==Sn&&(n.left.parent=n),n.right!==Sn&&(n.right.parent=n)),e.detach(),s){ov(t.parent),n!==e&&(ov(n),ov(n.parent)),lq();return}ov(t),ov(t.parent),n!==e&&(ov(n),ov(n.parent));let r;for(;t!==i.root&&rc(t)===0;)t===t.parent.left?(r=t.parent.right,rc(r)===1&&(hs(r,0),hs(t.parent,1),TA(i,t.parent),r=t.parent.right),rc(r.left)===0&&rc(r.right)===0?(hs(r,1),t=t.parent):(rc(r.right)===0&&(hs(r.left,0),hs(r,1),IA(i,r),r=t.parent.right),hs(r,rc(t.parent)),hs(t.parent,0),hs(r.right,0),TA(i,t.parent),t=i.root)):(r=t.parent.left,rc(r)===1&&(hs(r,0),hs(t.parent,1),IA(i,t.parent),r=t.parent.left),rc(r.left)===0&&rc(r.right)===0?(hs(r,1),t=t.parent):(rc(r.left)===0&&(hs(r.right,0),hs(r,1),TA(i,r),r=t.parent.left),hs(r,rc(t.parent)),hs(t.parent,0),hs(r.left,0),IA(i,t.parent),t=i.root));hs(t,0),lq()}function x3t(i){for(;i.left!==Sn;)i=i.left;return i}function lq(){Sn.parent=Sn,Sn.delta=0,Sn.start=0,Sn.end=0}function TA(i,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(i.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==Sn&&(t.left.parent=e),t.parent=e.parent,e.parent===Sn?i.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,s0(e),s0(t)}function IA(i,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(i.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==Sn&&(t.right.parent=e),t.parent=e.parent,e.parent===Sn?i.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,s0(e),s0(t)}function oRe(i){let e=i.end;if(i.left!==Sn){const t=i.left.maxEnd;t>e&&(e=t)}if(i.right!==Sn){const t=i.right.maxEnd+i.delta;t>e&&(e=t)}return e}function s0(i){i.maxEnd=oRe(i)}function ov(i){for(;i!==Sn;){const e=oRe(i);if(i.maxEnd===e)return;i.maxEnd=e,i=i.parent}}function v3t(i,e,t,n){return i===t?e-n:i-t}class nX{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==nn)return sae(this.right);let e=this;for(;e.parent!==nn&&e.parent.left!==e;)e=e.parent;return e.parent===nn?nn:e.parent}prev(){if(this.left!==nn)return aRe(this.left);let e=this;for(;e.parent!==nn&&e.parent.right!==e;)e=e.parent;return e.parent===nn?nn:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const nn=new nX(null,0);nn.parent=nn;nn.left=nn;nn.right=nn;nn.color=0;function sae(i){for(;i.left!==nn;)i=i.left;return i}function aRe(i){for(;i.right!==nn;)i=i.right;return i}function rae(i){return i===nn?0:i.size_left+i.piece.length+rae(i.right)}function oae(i){return i===nn?0:i.lf_left+i.piece.lineFeedCnt+oae(i.right)}function cq(){nn.parent=nn}function AA(i,e){const t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==nn&&(t.left.parent=e),t.parent=e.parent,e.parent===nn?i.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function RA(i,e){const t=e.left;e.left=t.right,t.right!==nn&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===nn?i.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function D3(i,e){let t,n;if(e.left===nn?(n=e,t=n.right):e.right===nn?(n=e,t=n.left):(n=sae(e.right),t=n.right),n===i.root){i.root=t,t.color=0,e.detach(),cq(),i.root.parent=nn;return}const s=n.color===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?(t.parent=n.parent,$I(i,t)):(n.parent===e?t.parent=n:t.parent=n.parent,$I(i,t),n.left=e.left,n.right=e.right,n.parent=e.parent,n.color=e.color,e===i.root?i.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==nn&&(n.left.parent=n),n.right!==nn&&(n.right.parent=n),n.size_left=e.size_left,n.lf_left=e.lf_left,$I(i,n)),e.detach(),t.parent.left===t){const o=rae(t),a=oae(t);if(o!==t.parent.size_left||a!==t.parent.lf_left){const l=o-t.parent.size_left,c=a-t.parent.lf_left;t.parent.size_left=o,t.parent.lf_left=a,Tm(i,t.parent,l,c)}}if($I(i,t.parent),s){cq();return}let r;for(;t!==i.root&&t.color===0;)t===t.parent.left?(r=t.parent.right,r.color===1&&(r.color=0,t.parent.color=1,AA(i,t.parent),r=t.parent.right),r.left.color===0&&r.right.color===0?(r.color=1,t=t.parent):(r.right.color===0&&(r.left.color=0,r.color=1,RA(i,r),r=t.parent.right),r.color=t.parent.color,t.parent.color=0,r.right.color=0,AA(i,t.parent),t=i.root)):(r=t.parent.left,r.color===1&&(r.color=0,t.parent.color=1,RA(i,t.parent),r=t.parent.left),r.left.color===0&&r.right.color===0?(r.color=1,t=t.parent):(r.left.color===0&&(r.right.color=0,r.color=1,AA(i,r),r=t.parent.left),r.color=t.parent.color,t.parent.color=0,r.left.color=0,RA(i,t.parent),t=i.root));t.color=0,cq()}function Xve(i,e){for($I(i,e);e!==i.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,AA(i,e)),e.parent.color=0,e.parent.parent.color=1,RA(i,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,RA(i,e)),e.parent.color=0,e.parent.parent.color=1,AA(i,e.parent.parent))}i.root.color=0}function Tm(i,e,t,n){for(;e!==i.root&&e!==nn;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=n),e=e.parent}function $I(i,e){let t=0,n=0;if(e!==i.root){for(;e!==i.root&&e===e.parent.right;)e=e.parent;if(e!==i.root)for(e=e.parent,t=rae(e.left)-e.size_left,n=oae(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=n;e!==i.root&&(t!==0||n!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=n),e=e.parent}}const _3t=999;class Ny{constructor(e,t,n,s){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=s}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=lRe(this.searchString):e=this.searchString.indexOf(` +`)>=0;let t=null;try{t=nIe(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new xTt(t,this.wordSeparators?Ku(this.wordSeparators,[]):null,n?this.searchString:null)}}function lRe(i){if(!i||i.length===0)return!1;for(let e=0,t=i.length;e=t)break;const s=i.charCodeAt(e);if(s===110||s===114||s===87)return!0}}return!1}function Vy(i,e,t){if(!t)return new fR(i,null);const n=[];for(let s=0,r=e.length;s>0);t[r]>=e?s=r-1:t[r+1]>=e?(n=r,s=r):n=r+1}return n+1}}class T3{static findMatches(e,t,n,s,r){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,n,new dN(o.wordSeparators,o.regex),s,r):this._doFindMatchesLineByLine(e,n,o,s,r):[]}static _getMultilineMatchRange(e,t,n,s,r,o){let a,l=0;s?(l=s.findLineFeedCountBeforeOffset(r),a=t+r+l):a=t+r;let c;if(s){const f=s.findLineFeedCountBeforeOffset(r+o.length)-l;c=a+o.length+f}else c=a+o.length;const u=e.getPositionAt(a),h=e.getPositionAt(c);return new z(u.lineNumber,u.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,n,s,r){const o=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r +`?new Zve(a):null,c=[];let u=0,h;for(n.reset(0);h=n.next(a);)if(c[u++]=Vy(this._getMultilineMatchRange(e,o,a,l,h.index,h[0]),h,s),u>=r)return c;return c}static _doFindMatchesLineByLine(e,t,n,s,r){const o=[];let a=0;if(t.startLineNumber===t.endLineNumber){const c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(n,c,t.startLineNumber,t.startColumn-1,a,o,s,r),o}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,a,o,s,r);for(let c=t.startLineNumber+1;c=l))return r;return r}const u=new dN(e.wordSeparators,e.regex);let h;u.reset(0);do if(h=u.next(t),h&&(o[r++]=Vy(new z(n,h.index+1+s,n,h.index+1+h[0].length+s),h,a),r>=l))return r;while(h);return r}static findNextMatch(e,t,n,s){const r=t.parseSearchRequest();if(!r)return null;const o=new dN(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,n,o,s):this._doFindNextMatchLineByLine(e,n,o,s)}static _doFindNextMatchMultiline(e,t,n,s){const r=new te(t.lineNumber,1),o=e.getOffsetAt(r),a=e.getLineCount(),l=e.getValueInRange(new z(r.lineNumber,r.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r +`?new Zve(l):null;n.reset(t.column-1);const u=n.next(l);return u?Vy(this._getMultilineMatchRange(e,o,l,c,u.index,u[0]),u,s):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new te(1,1),n,s):null}static _doFindNextMatchLineByLine(e,t,n,s){const r=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o),l=this._findFirstMatchInLine(n,a,o,t.column,s);if(l)return l;for(let c=1;c<=r;c++){const u=(o+c-1)%r,h=e.getLineContent(u+1),g=this._findFirstMatchInLine(n,h,u+1,1,s);if(g)return g}return null}static _findFirstMatchInLine(e,t,n,s,r){e.reset(s-1);const o=e.next(t);return o?Vy(new z(n,o.index+1,n,o.index+1+o[0].length),o,r):null}static findPreviousMatch(e,t,n,s){const r=t.parseSearchRequest();if(!r)return null;const o=new dN(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,n,o,s):this._doFindPreviousMatchLineByLine(e,n,o,s)}static _doFindPreviousMatchMultiline(e,t,n,s){const r=this._doFindMatchesMultiline(e,new z(1,1,t.lineNumber,t.column),n,s,10*_3t);if(r.length>0)return r[r.length-1];const o=e.getLineCount();return t.lineNumber!==o||t.column!==e.getLineMaxColumn(o)?this._doFindPreviousMatchMultiline(e,new te(o,e.getLineMaxColumn(o)),n,s):null}static _doFindPreviousMatchLineByLine(e,t,n,s){const r=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o).substring(0,t.column-1),l=this._findLastMatchInLine(n,a,o,s);if(l)return l;for(let c=1;c<=r;c++){const u=(r+o-c-1)%r,h=e.getLineContent(u+1),g=this._findLastMatchInLine(n,h,u+1,s);if(g)return g}return null}static _findLastMatchInLine(e,t,n,s){let r=null,o;for(e.reset(0);o=e.next(t);)r=Vy(new z(n,o.index+1,n,o.index+1+o[0].length),o,s);return r}}function y3t(i,e,t,n,s){if(n===0)return!0;const r=e.charCodeAt(n-1);if(i.get(r)!==0||r===13||r===10)return!0;if(s>0){const o=e.charCodeAt(n);if(i.get(o)!==0)return!0}return!1}function w3t(i,e,t,n,s){if(n+s===t)return!0;const r=e.charCodeAt(n+s);if(i.get(r)!==0||r===13||r===10)return!0;if(s>0){const o=e.charCodeAt(n+s-1);if(i.get(o)!==0)return!0}return!1}function aae(i,e,t,n,s){return y3t(i,e,t,n,s)&&w3t(i,e,t,n,s)}class dN{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;const s=n.index,r=n[0].length;if(s===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){yF(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=r,!this._wordSeparators||aae(this._wordSeparators,e,t,s,r))return n}while(n);return null}}const mm=65535;function cRe(i){let e;return i[i.length-1]<65536?e=new Uint16Array(i.length):e=new Uint32Array(i.length),e.set(i,0),e}class C3t{constructor(e,t,n,s,r){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=s,this.isBasicASCII=r}}function Mm(i,e=!0){const t=[0];let n=1;for(let s=0,r=i.length;s126)&&(o=!1)}const a=new C3t(cRe(i),n,s,r,o);return i.length=0,a}class Lc{constructor(e,t,n,s,r){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=s,this.length=r}}class zy{constructor(e,t){this.buffer=e,this.lineStarts=t}}class k3t{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==nn&&e.iterate(e.root,n=>(n!==nn&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class N3t{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const n=this._cache;for(let s=0;s=e){n[s]=null,t=!0;continue}}if(t){const s=[];for(const r of n)r!==null&&s.push(r);this._cache=s}}}class E3t{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new zy("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=nn,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let s=null;for(let r=0,o=e.length;r0){e[r].lineStarts||(e[r].lineStarts=Mm(e[r].buffer));const a=new Lc(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),s=this.rbInsertRight(s,a)}this._searchCache=new N3t(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=mm,n=t-Math.floor(t/3),s=n*2;let r="",o=0;const a=[];if(this.iterate(this.root,l=>{const c=this.getNodeContent(l),u=c.length;if(o<=n||o+u0){const l=r.replace(/\r\n|\r|\n/g,e);a.push(new zy(l,Mm(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new k3t(this,e)}getOffsetAt(e,t){let n=0,s=this.root;for(;s!==nn;)if(s.left!==nn&&s.lf_left+1>=e)s=s.left;else if(s.lf_left+s.piece.lineFeedCnt+1>=e){n+=s.size_left;const r=this.getAccumulatedValue(s,e-s.lf_left-2);return n+=r+t-1}else e-=s.lf_left+s.piece.lineFeedCnt,n+=s.size_left+s.piece.length,s=s.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0;const s=e;for(;t!==nn;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){const r=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+r.index,r.index===0){const o=this.getOffsetAt(n+1,1),a=s-o;return new te(n+1,a+1)}return new te(n+1,r.remainder+1)}else if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===nn){const r=this.getOffsetAt(n+1,1),o=s-e-r;return new te(n+1,o+1)}else t=t.right;return new te(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const n=this.nodeAt2(e.startLineNumber,e.startColumn),s=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(n,s);return t?t!==this._EOL||!this._EOLNormalized?r.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){const a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let n=e.node;const s=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);let o=s.substring(r+e.remainder,r+n.piece.length);for(n=n.next();n!==nn;){const a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){o+=a.substring(l,l+t.remainder);break}else o+=a.substr(l,n.piece.length);n=n.next()}return o}getLinesContent(){const e=[];let t=0,n="",s=!1;return this.iterate(this.root,r=>{if(r===nn)return!0;const o=r.piece;let a=o.length;if(a===0)return!0;const l=this._buffers[o.bufferIndex].buffer,c=this._buffers[o.bufferIndex].lineStarts,u=o.start.line,h=o.end.line;let g=c[u]+o.start.column;if(s&&(l.charCodeAt(g)===10&&(g++,a--),e[t++]=n,n="",s=!1,a===0))return!0;if(u===h)return!this._EOLNormalized&&l.charCodeAt(g+a-1)===13?(s=!0,n+=l.substr(g,a-1)):n+=l.substr(g,a),!0;n+=this._EOLNormalized?l.substring(g,Math.max(g,c[u+1]-this._EOLLength)):l.substring(g,c[u+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let f=u+1;fC+m,t.reset(0)):(w=g.buffer,k=C=>C,t.reset(m));do if(v=t.next(w),v){if(k(v.index)>=x)return u;this.positionInBuffer(e,k(v.index)-f,_);const C=this.getLineFeedCnt(e.piece.bufferIndex,r,_),E=_.line===r.line?_.column-r.column+s:_.column+1,D=E+v[0].length;if(h[u++]=Vy(new z(n+C,E,n+C,D),v,l),k(v.index)+v[0].length>=x||u>=c)return u}while(v);return u}findMatchesLineByLine(e,t,n,s){const r=[];let o=0;const a=new dN(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];const c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let u=this.positionInBuffer(l.node,l.remainder);const h=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,u,h,t,n,s,o,r),r;let g=e.startLineNumber,f=l.node;for(;f!==c.node;){const x=this.getLineFeedCnt(f.piece.bufferIndex,u,f.piece.end);if(x>=1){const _=this._buffers[f.piece.bufferIndex].lineStarts,w=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),k=_[u.line+x],C=g===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(f,a,g,C,u,this.positionInBuffer(f,k-w),t,n,s,o,r),o>=s)return r;g+=x}const v=g===e.startLineNumber?e.startColumn-1:0;if(g===e.endLineNumber){const _=this.getLineContent(g).substring(v,e.endColumn-1);return o=this._findMatchesInLine(t,a,_,e.endLineNumber,v,o,r,n,s),r}if(o=this._findMatchesInLine(t,a,this.getLineContent(g).substr(v),g,v,o,r,n,s),o>=s)return r;g++,l=this.nodeAt2(g,1),f=l.node,u=this.positionInBuffer(l.node,l.remainder)}if(g===e.endLineNumber){const x=g===e.startLineNumber?e.startColumn-1:0,v=this.getLineContent(g).substring(x,e.endColumn-1);return o=this._findMatchesInLine(t,a,v,e.endLineNumber,x,o,r,n,s),r}const m=g===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(c.node,a,g,m,u,h,t,n,s,o,r),r}_findMatchesInLine(e,t,n,s,r,o,a,l,c){const u=e.wordSeparators;if(!l&&e.simpleSearch){const g=e.simpleSearch,f=g.length,m=n.length;let x=-f;for(;(x=n.indexOf(g,x+f))!==-1;)if((!u||aae(u,n,m,x,f))&&(a[o++]=new fR(new z(s,x+1+r,s,x+1+f+r),null),o>=c))return o;return o}let h;t.reset(0);do if(h=t.next(n),h&&(a[o++]=Vy(new z(s,h.index+1+r,s,h.index+1+h[0].length+r),h,l),o>=c))return o;while(h);return o}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==nn){const{node:s,remainder:r,nodeStartOffset:o}=this.nodeAt(e),a=s.piece,l=a.bufferIndex,c=this.positionInBuffer(s,r);if(s.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&o+a.length===e&&t.lengthe){const u=[];let h=new Lc(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(s,r)===10){const x={line:h.start.line+1,column:0};h=new Lc(h.bufferIndex,x,h.end,this.getLineFeedCnt(h.bufferIndex,x,h.end),h.length-1),t+=` +`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(s,r-1)===13){const x=this.positionInBuffer(s,r-1);this.deleteNodeTail(s,x),t="\r"+t,s.piece.length===0&&u.push(s)}else this.deleteNodeTail(s,c);else this.deleteNodeTail(s,c);const g=this.createNewPieces(t);h.length>0&&this.rbInsertRight(s,h);let f=s;for(let m=0;m=0;o--)r=this.rbInsertLeft(r,s[o]);this.validateCRLFWithPrevNode(r),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` +`);const n=this.createNewPieces(e),s=this.rbInsertRight(t,n[0]);let r=s;for(let o=1;o=g)c=h+1;else break;return n?(n.line=h,n.column=l-f,null):{line:h,column:l-f}}getLineFeedCnt(e,t,n){if(n.column===0)return n.line-t.line;const s=this._buffers[e].lineStarts;if(n.line===s.length-1)return n.line-t.line;const r=s[n.line+1],o=s[n.line]+n.column;if(r>o+1)return n.line-t.line;const a=o-1;return this._buffers[e].buffer.charCodeAt(a)===13?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tmm){const u=[];for(;e.length>mm;){const g=e.charCodeAt(mm-1);let f;g===13||g>=55296&&g<=56319?(f=e.substring(0,mm-1),e=e.substring(mm-1)):(f=e.substring(0,mm),e=e.substring(mm));const m=Mm(f);u.push(new Lc(this._buffers.length,{line:0,column:0},{line:m.length-1,column:f.length-m[m.length-1]},m.length-1,f.length)),this._buffers.push(new zy(f,m))}const h=Mm(e);return u.push(new Lc(this._buffers.length,{line:0,column:0},{line:h.length-1,column:e.length-h[h.length-1]},h.length-1,e.length)),this._buffers.push(new zy(e,h)),u}let t=this._buffers[0].buffer.length;const n=Mm(e,!1);let s=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},s=this._lastChangeBufferPos;for(let u=0;u=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){const l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this.getAccumulatedValue(n,e-n.lf_left-1),u=this._buffers[n.piece.bufferIndex].buffer,h=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return o+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:o,nodeStartLineNumber:a-(e-1-n.lf_left)}),u.substring(h+l,h+c-t)}else if(n.lf_left+n.piece.lineFeedCnt===e-1){const l=this.getAccumulatedValue(n,e-n.lf_left-2),c=this._buffers[n.piece.bufferIndex].buffer,u=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);s=c.substring(u+l,u+n.piece.length);break}else e-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==nn;){const o=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return s+=o.substring(l,l+a-t),s}else{const a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);s+=o.substr(a,n.piece.length)}n=n.next()}return s}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==nn;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){const n=e.piece,s=this.positionInBuffer(e,t),r=s.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){const o=this.getLineFeedCnt(e.piece.bufferIndex,n.start,s);if(o!==r)return{index:o,remainder:0}}return{index:r,remainder:s.column}}getAccumulatedValue(e,t){if(t<0)return 0;const n=e.piece,s=this._buffers[n.bufferIndex].lineStarts,r=n.start.line+t+1;return r>n.end.line?s[n.end.line]+n.end.column-s[n.start.line]-n.start.column:s[r]-s[n.start.line]-n.start.column}deleteNodeTail(e,t){const n=e.piece,s=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),o=t,a=this.offsetInBuffer(n.bufferIndex,o),l=this.getLineFeedCnt(n.bufferIndex,n.start,o),c=l-s,u=a-r,h=n.length+u;e.piece=new Lc(n.bufferIndex,n.start,o,l,h),Tm(this,e,u,c)}deleteNodeHead(e,t){const n=e.piece,s=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),o=t,a=this.getLineFeedCnt(n.bufferIndex,o,n.end),l=this.offsetInBuffer(n.bufferIndex,o),c=a-s,u=r-l,h=n.length+u;e.piece=new Lc(n.bufferIndex,o,n.end,a,h),Tm(this,e,u,c)}shrinkNode(e,t,n){const s=e.piece,r=s.start,o=s.end,a=s.length,l=s.lineFeedCnt,c=t,u=this.getLineFeedCnt(s.bufferIndex,s.start,c),h=this.offsetInBuffer(s.bufferIndex,t)-this.offsetInBuffer(s.bufferIndex,r);e.piece=new Lc(s.bufferIndex,s.start,c,u,h),Tm(this,e,h-a,u-l);const g=new Lc(s.bufferIndex,n,o,this.getLineFeedCnt(s.bufferIndex,n,o),this.offsetInBuffer(s.bufferIndex,o)-this.offsetInBuffer(s.bufferIndex,n)),f=this.rbInsertRight(e,g);this.validateCRLFWithPrevNode(f)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` +`);const n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),s=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const r=Mm(t,!1);for(let f=0;fe)t=t.left;else if(t.size_left+t.piece.length>=e){s+=t.size_left;const r={node:t,remainder:e-t.size_left,nodeStartOffset:s};return this._searchCache.set(r),r}else e-=t.size_left+t.piece.length,s+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let n=this.root,s=0;for(;n!==nn;)if(n.left!==nn&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1);return s+=n.size_left,{node:n,remainder:Math.min(r+t-1,o),nodeStartOffset:s}}else if(n.lf_left+n.piece.lineFeedCnt===e-1){const r=this.getAccumulatedValue(n,e-n.lf_left-2);if(r+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:s};t-=n.piece.length-r;break}else e-=n.lf_left+n.piece.lineFeedCnt,s+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==nn;){if(n.piece.lineFeedCnt>0){const r=this.getAccumulatedValue(n,0),o=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:o}}else if(n.piece.length>=t-1){const r=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:r}}else t-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const n=this._buffers[e.piece.bufferIndex],s=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(s)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` +`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===nn||e.piece.lineFeedCnt===0)return!1;const t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,s=t.start.line,r=n[s]+t.start.column;return s===n.length-1||n[s+1]>r+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(r)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===nn||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const n=[],s=this._buffers[e.piece.bufferIndex].lineStarts;let r;e.piece.end.column===0?r={line:e.piece.end.line-1,column:s[e.piece.end.line]-s[e.piece.end.line-1]-1}:r={line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new Lc(e.piece.bufferIndex,e.piece.start,r,a,o),Tm(this,e,-1,-1),e.piece.length===0&&n.push(e);const l={line:t.piece.start.line+1,column:0},c=t.piece.length-1,u=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new Lc(t.piece.bufferIndex,l,t.piece.end,u,c),Tm(this,t,-1,-1),t.piece.length===0&&n.push(t);const h=this.createNewPieces(`\r +`);this.rbInsertRight(e,h[0]);for(let g=0;gv.sortIndex-_.sortIndex)}this._mightContainRTL=s,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=o;const f=this._doApplyEdits(l);let m=null;if(t&&h.length>0){h.sort((x,v)=>v.lineNumber-x.lineNumber),m=[];for(let x=0,v=h.length;x0&&h[x-1].lineNumber===_)continue;const w=h[x].oldContent,k=this.getLineContent(_);k.length===0||k===w||dl(k)!==-1||m.push(_)}}return this._onDidChangeContent.fire(),new vTt(g,f,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const n=e[0].range,s=e[e.length-1].range,r=new z(n.startLineNumber,n.startColumn,s.endLineNumber,s.endColumn);let o=n.startLineNumber,a=n.startColumn;const l=[];for(let f=0,m=e.length;f0&&l.push(x.text),o=v.endLineNumber,a=v.endColumn}const c=l.join(""),[u,h,g]=i0(c);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:c,eolCount:u,firstLineLength:h,lastLineLength:g,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(sE._sortOpsDescending);const t=[];for(let n=0;n0){const g=l.eolCount+1;g===1?h=new z(c,u,c,u+l.firstLineLength):h=new z(c,u,c+g-1,l.lastLineLength+1)}else h=new z(c,u,c,u);n=h.endLineNumber,s=h.endColumn,t.push(h),r=l}return t}static _sortOpsAscending(e,t){const n=z.compareRangesUsingEnds(e.range,t.range);return n===0?e.sortIndex-t.sortIndex:n}static _sortOpsDescending(e,t){const n=z.compareRangesUsingEnds(e.range,t.range);return n===0?t.sortIndex-e.sortIndex:-n}}class L3t{constructor(e,t,n,s,r,o,a,l,c){this._chunks=e,this._bom=t,this._cr=n,this._lf=s,this._crlf=r,this._containsRTL=o,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return t===0?e===1?` +`:`\r +`:n>t/2?`\r +`:` +`}create(e){const t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&(t===`\r +`&&(this._cr>0||this._lf>0)||t===` +`&&(this._cr>0||this._crlf>0)))for(let r=0,o=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=S3t(this._tmpLineStarts,e);this.chunks.push(new zy(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=mL(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=oIe(e)))}finish(e=!0){return this._finish(),new L3t(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Mm(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}function Au(i,e=oo.ofCaller()){return typeof i=="string"?new Jve(i,void 0,e):new Jve(void 0,i,e)}class Jve extends CD{get debugName(){return new Ca(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t,n){super(n),this._debugName=e,this._owner=t}trigger(e,t){if(!e){Vi(n=>{this.trigger(n,t)},()=>`Trigger signal ${this.debugName}`);return}for(const n of this._observers)e.updateObserver(n,this),n.handleChange(this,t)}get(){}}class D3t extends CD{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,n,s){super(s),this._debugNameData=e,this._equalityComparator=n,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){var e,t;if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const n of this._deltas){(e=Oa())==null||e.handleObservableUpdated(this,{change:n,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(const s of this._observers)s.handleChange(this,n)}this._deltas.length=0}else{(t=Oa())==null||t.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0});for(const n of this._observers)n.handleChange(this,void 0)}}_beginUpdate(){if(this._updateCounter++,this._updateCounter===1)for(const e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){this._update();const e=[...this._observers];for(const t of e)t.endUpdate(this)}}addObserver(e){const t=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,n){if(n===void 0&&this._equalityComparator(this._value,e))return;let s;t||(t=s=new kD(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),n!==void 0&&this._deltas.push(n),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(r,o)=>{},handlePossibleChange:r=>{}},this),this._updateCounter>1)for(const r of this._observers)r.handlePossibleChange(this)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function MA(i,e,t=oo.ofCaller()){return i.lazy?new D3t(new Ca(i.owner,i.debugName,void 0),e,i.equalsFn??Kd,t):new lR(new Ca(i.owner,i.debugName,void 0),e,i.equalsFn??Kd,t)}class T3t{constructor(){this._onDidChangeVisibleRanges=new ie,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set,this._viewsChanged=Au(this),this.visibleLineRanges=ma({owner:this,equalsFn:oR(eoe())},e=>(this._viewsChanged.read(e),jt.joinMany([...this._views].map(n=>{var s;return((s=n.state.read(e))==null?void 0:s.visibleLineRanges)??[]}))))}attachView(){const e=new A3t(t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})});return this._views.add(e),this._viewsChanged.trigger(void 0),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0}),this._viewsChanged.trigger(void 0)}}class I3t{constructor(e,t){this.visibleLineRanges=e,this.stabilized=t}equals(e){return this===e?!0:!(!bs(this.visibleLineRanges,e.visibleLineRanges,(t,n)=>t.equals(n))||this.stabilized!==e.stabilized)}}class A3t{get state(){return this._state}constructor(e){this.handleStateChange=e,this._state=MA({owner:this,equalsFn:g1((t,n)=>t.equals(n))},void 0)}setVisibleLines(e,t){const n=e.map(r=>new jt(r.startLineNumber,r.endLineNumber+1)),s=new I3t(n,t);this._state.set(s,void 0,void 0),this.handleStateChange(s)}}class R3t extends se{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new pi(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){bs(this._computedLineRanges,this._lineRanges,(e,t)=>e.equals(t))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class uRe extends se{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t){super(),this._languageIdCodec=e,this._textModel=t,this._onDidChangeTokens=this._register(new ie),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}function M3t(i,e){const t=i.gotoNextSibling(),n=e.gotoNextSibling();if(t!==n)throw new Error("Trees are out of sync");return t&&n}function hRe(i,e){const t=i.gotoParent(),n=e.gotoParent();if(t!==n)throw new Error("Trees are out of sync");return t&&n}function P3t(i,e,t){const n=i.gotoFirstChild(),s=e.gotoFirstChild();if(n!==s)throw new Error("Trees are out of sync");if(t===0)return n&&s;for(let r=1;r<=t;r++){const o=i.gotoNextSibling(),a=e.gotoNextSibling();if(o!==a)throw new Error("Trees are out of sync");if(!o||!a)return!1}return n&&s}function e_e(i,e){do{if(i.currentNode.nextSibling)return M3t(i,e);i.currentNode.parent&&hRe(i,e)}while(i.currentNode.nextSibling||i.currentNode.parent);return!1}function O3t(i,e){const t=e.walk();t.resetTo(i);const n=i.currentNode;do if(t.currentNode.previousSibling&&t.currentNode.endIndex-t.currentNode.startIndex!==0)t.gotoPreviousSibling();else{for(;!t.currentNode.previousSibling&&t.currentNode.parent;)t.gotoParent();t.gotoPreviousSibling()}while(t.currentNode.endIndex>n.startIndex&&(t.currentNode.parent||t.currentNode.previousSibling)&&t.currentNode.id!==n.id);if(t.currentNode.id!==n.id&&t.currentNode.endIndex<=n.startIndex)return t.currentNode}var j3t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},t_e=function(i,e){return function(t,n){e(t,n,i)}};let iX=class extends se{constructor(e,t,n,s,r,o,a){super(),this.languageId=e,this._ranges=t,this._parser=n,this._parserClass=s,this.textModel=r,this._logService=o,this._telemetryService=a,this._tree=Ft(this,void 0),this.tree=this._tree,this._treeLastParsedVersion=Ft(this,-1),this.treeLastParsedVersion=this._treeLastParsedVersion,this._onDidChangeContentQueue=new wEt,this._tree=Ft(this,void 0),this.tree=this._tree,this._register(dt(()=>{var l,c,u;(l=this._tree.get())==null||l.delete(),(c=this._lastFullyParsed)==null||c.delete(),(u=this._lastFullyParsedWithEdits)==null||u.delete(),this._parser.delete()})),this.handleContentChange(void 0,this._ranges)}handleContentChange(e,t){const n=this.textModel.getVersionId();let s=[];t&&(s=this._setRanges(t)),e&&this._applyEdits(e.changes),this._onDidChangeContentQueue.clearPending(),this._onDidChangeContentQueue.schedule(async()=>{if(this._store.isDisposed)return;const r=this._lastFullyParsed;let o;this._lastFullyParsedWithEdits&&this._lastFullyParsed&&(o=this._findChangedNodes(this._lastFullyParsedWithEdits,this._lastFullyParsed));const a=await this._parseAndUpdateTree(n);if(a){let l;o?r&&o&&(l=this._findTreeChanges(a,o,s)):this._ranges&&(l=this._ranges.map(u=>({newRange:new z(u.startPosition.row+1,u.startPosition.column+1,u.endPosition.row+1,u.endPosition.column+1),oldRangeLength:u.endIndex-u.startIndex,newRangeStartOffset:u.startIndex,newRangeEndOffset:u.endIndex}))),l||(l=[{newRange:this.textModel.getFullModelRange(),newRangeStartOffset:0,newRangeEndOffset:this.textModel.getValueLength()}]);const c=this._tree.get();Vi(u=>{this._tree.set(a,u,{ranges:l,versionId:n}),this._treeLastParsedVersion.set(n,u)}),c==null||c.delete()}})}_applyEdits(e){var t,n;for(const s of e){const r=ro.ofRange(z.lift(s.range)),o=ro.ofText(s.text),a=s.text.length===0?o:r.add(o),l={startIndex:s.rangeOffset,oldEndIndex:s.rangeOffset+s.rangeLength,newEndIndex:s.rangeOffset+s.text.length,startPosition:{row:s.range.startLineNumber-1,column:s.range.startColumn-1},oldEndPosition:{row:s.range.endLineNumber-1,column:s.range.endColumn-1},newEndPosition:{row:s.range.startLineNumber+a.lineCount-1,column:a.lineCount?a.columnCount:s.range.endColumn+a.columnCount}};(t=this._tree.get())==null||t.edit(l),(n=this._lastFullyParsedWithEdits)==null||n.edit(l)}}_findChangedNodes(e,t){if(this._ranges&&this._ranges.every(a=>a.startPosition.row!==e.rootNode.startPosition.row)||e.rootNode.startPosition.row!==0)return[];const n=e.walk(),s=t.walk(),r=[];let o=!0;do if(n.currentNode.hasChanges){const a=n.currentNode.children,l=[],c=a.filter((u,h)=>u!=null&&u.hasChanges||s.currentNode.children.length<=h?(l.push(h),!0):!1);if(c.length===0||n.currentNode.hasError!==s.currentNode.hasError){for(;n.currentNode.parent&&o&&!n.currentNode.isNamed;)o=hRe(n,s);const u=n.currentNode,h=O3t(n,e)??u;r.push({startIndex:h.startIndex,endIndex:u.endIndex,startPosition:h.startPosition,endPosition:u.endPosition}),o=e_e(n,s)}else c.length>=1&&(o=P3t(n,s,l[0]))}else o=e_e(n,s);while(o);return n.delete(),s.delete(),r}_findTreeChanges(e,t,n){let s=0;const r=[];for(let o=0;o0&&a.startIndex>=r[r.length-1].newRangeStartOffset&&a.endIndex<=r[r.length-1].newRangeEndOffset)continue;const l=e.walk(),c=()=>l.startIndexa.endIndex;for(;c();){let x=l.gotoFirstChild(),v=!1;for(;x;)if(c()&&l.currentNode.isNamed){v=!0;break}else x=l.gotoNextSibling();if(!v){l.gotoParent();break}if(l.currentNode.childCount===0)break}const u=l.currentNode.startPosition,h=l.currentNode.endPosition,g=l.currentNode.startIndex,f=l.currentNode.endIndex,m={newRange:new z(u.row+1,u.column+1,h.row+1,h.column+1),newRangeStartOffset:g,newRangeEndOffset:f};sm.newRangeEndOffset&&(m.newRange=m.newRange.setEndPosition(n[s].endPosition.row+1,n[s].endPosition.column+1),m.newRangeEndOffset=n[s].endIndex),s++):s0&&r[r.length-1].newRangeEndOffset>=m.newRangeStartOffset?(r[r.length-1].newRange=z.fromPositions(r[r.length-1].newRange.getStartPosition(),m.newRange.getEndPosition()),r[r.length-1].newRangeEndOffset=m.newRangeEndOffset):r.push(m)}return this._constrainRanges(r)}_constrainRanges(e){if(!this._ranges)return e;const t=[];let n=0,s=0;for(;no.endIndex)s++;else{const a=Math.max(r.newRangeStartOffset,o.startIndex),l=Math.min(r.newRangeEndOffset,o.endIndex),c=r.newRange.intersectRanges(new z(o.startPosition.row+1,o.startPosition.column+1,o.endPosition.row+1,o.endPosition.column+1));t.push({newRange:c,newRangeEndOffset:l,newRangeStartOffset:a}),lthis._parseCallback(l),this._tree.get(),{progressCallback:o,includedRanges:this._ranges}),t+=performance.now()-a,n++,await new Promise(l=>MP(l))}while(!this._store.isDisposed&&!r&&s===this.textModel.getVersionId());return this._sendParseTimeTelemetry(e,t,n),r&&s===this.textModel.getVersionId()?r:void 0}_parseCallback(e){try{return this.textModel.getTextBuffer().getNearestChunk(e)}catch(t){this._logService.debug("Error getting chunk for tree-sitter parsing",t)}}_setRanges(e){const t=[];if(this._ranges)for(const n of e){let s=!1;for(let r=0;r50?(i=n,!0):!1}}function B3t(i,e){return i.startPosition.row===e.startPosition.row&&i.startPosition.column===e.startPosition.column&&i.endPosition.row===e.endPosition.row&&i.endPosition.column===e.endPosition.column&&i.startIndex===e.startIndex&&i.endIndex===e.endIndex}function n_e(i,e){return i.startIndex<=e.startIndex&&i.endIndex>=e.startIndex||e.startIndex<=i.startIndex&&e.endIndex>=i.startIndex}const AL=new class{clone(){return this}equals(i){return this===i}};function lae(i,e){return new Uoe([new LR(0,"",i)],e)}function cW(i,e){const t=new Uint32Array(2);return t[0]=0,t[1]=(i<<0|0|0|32768|2<<24)>>>0,new oW(t,e===null?AL:e)}class H3t{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,n){if(e>=this._store.length)return;if(t===0){this.insert(e,n);return}else if(n===0){this.delete(e,t);return}const s=this._store.slice(0,e),r=this._store.slice(e+t),o=W3t(n,this._default);this._store=s.concat(o,r)}delete(e,t){t===0||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(t===0||e>=this._store.length)return;const n=[];for(let s=0;s0){const n=this._tokens[this._tokens.length-1];if(n.endLineNumber+1===e){n.appendLineTokens(t);return}}this._tokens.push(new V3t(e,[t]))}finalize(){return this._tokens}}class z3t{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new rX(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class U3t extends z3t{constructor(e,t,n,s){super(e,t),this._textModel=n,this._languageIdCodec=s}updateTokensUntilLine(e,t){const n=this._textModel.getLanguageId();for(;;){const s=this.getFirstInvalidLine();if(!s||s.lineNumber>t)break;const r=this._textModel.getLineContent(s.lineNumber),o=lI(this._languageIdCodec,n,this.tokenizationSupport,r,!0,s.startState);e.add(s.lineNumber,o.tokens),this.store.setEndState(s.lineNumber,o.endState)}}getTokenTypeIfInsertingCharacter(e,t){const n=this.getStartState(e.lineNumber);if(!n)return 0;const s=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),o=r.substring(0,e.column-1)+t+r.substring(e.column-1),a=lI(this._languageIdCodec,s,this.tokenizationSupport,o,!0,n),l=new hr(a.tokens,o,this._languageIdCodec);if(l.getCount()===0)return 0;const c=l.findTokenIndexAtOffset(e.column-1);return l.getStandardTokenType(c)}tokenizeLinesAt(e,t){const n=this.getStartState(e);if(!n)return null;const s=this._textModel.getLanguageId(),r=[];let o=n;for(const a of t){const l=lI(this._languageIdCodec,s,this.tokenizationSupport,a,!0,o);r.push(new hr(l.tokens,a,this._languageIdCodec)),o=l.endState}return r}hasAccurateTokensForLine(e){const t=this.store.getFirstInvalidEndStateLineNumberOrMax();return e1&&o>=1;o--){const a=i.getLineFirstNonWhitespaceColumn(o);if(a!==0&&a0&&n>0&&(n--,t--),this._lineEndStates.replace(e.startLineNumber,n,t)}}class q3t{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex(n=>n.contains(e));if(t!==-1){const n=this._ranges[t];n.start===e?n.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new ht(e+1,n.endExclusive):n.endExclusive===e+1?this._ranges[t]=new ht(n.start,e):this._ranges.splice(t,1,new ht(n.start,e),new ht(e+1,n.endExclusive))}}addRange(e){ht.addRange(e,this._ranges)}addRangeAndResize(e,t){let n=0;for(;!(n>=this._ranges.length||e.start<=this._ranges[n].endExclusive);)n++;let s=n;for(;!(s>=this._ranges.length||e.endExclusivee.toString()).join(" + ")}}function lI(i,e,t,n,s,r){let o=null;if(t)try{o=t.tokenizeEncoded(n,s,r.clone())}catch(a){zt(a)}return o||(o=cW(i.encodeLanguageId(e),r)),hr.convertToEndOffset(o.tokens,n.length),o}class K3t{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,Wre(e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)}))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),n=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(t)>=e)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(e){var n;const t=(n=this._tokenizerWithStateStore)==null?void 0:n.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new jt(e,t))}}class _C{get children(){return this._children}get length(){return this._length}constructor(e){this.height=e,this._children=[],this._length=0}static create(e,t){const n=new _C(e.height+1);return n.appendChild(e),n.appendChild(t),n}canAppendChild(){return this._children.length<3}appendChild(e){if(!this.canAppendChild())throw new Error("Cannot insert more than 3 children in a ListNode");this._children.push(e),this._length+=e.length,this._updateParentLength(e.length),Dl(e)||(e.parent=this)}_updateParentLength(e){let t=this.parent;for(;t;)t._length+=e,t=t.parent}unappendChild(){const e=this._children.pop();return this._length-=e.length,this._updateParentLength(-e.length),e}prependChild(e){if(this._children.length>=3)throw new Error("Cannot prepend more than 3 children in a ListNode");this._children.unshift(e),this._length+=e.length,this._updateParentLength(e.length),Dl(e)||(e.parent=this)}unprependChild(){const e=this._children.shift();return this._length-=e.length,this._updateParentLength(-e.length),e}lastChild(){return this._children[this._children.length-1]}dispose(){this._children.splice(0,this._children.length)}}var Ad;(function(i){i[i.None=0]="None",i[i.ViewportGuess=1]="ViewportGuess",i[i.EditGuess=2]="EditGuess",i[i.Accurate=3]="Accurate"})(Ad||(Ad={}));function Dl(i){return i.token!==void 0}function fRe(i,e){let t=i;const n=[];let s;for(;;){if(e.height===t.height){s=e;break}if(Dl(t))throw new Error("unexpected");n.push(t),t=t.lastChild()}for(let r=n.length-1;r>=0;r--){const o=n[r];s&&(o.children.length>=3?s=_C.create(o.unappendChild(),s):(o.appendChild(s),s=void 0))}if(s){const r=new _C(s.height+1);return r.appendChild(i),r.appendChild(s),r}else return i}function G3t(i,e){let t=i;const n=[];for(;e.height!==t.height;){if(Dl(t))throw new Error("unexpected");n.push(t),t=t.children[0]}let s=e;for(let r=n.length-1;r>=0;r--){const o=n[r];s&&(o.children.length>=3?s=_C.create(s,o.unprependChild()):(o.prependChild(s),s=void 0))}return s?_C.create(s,i):i}function Y3t(i,e){return i.height===e.height?_C.create(i,e):i.height>e.height?fRe(i,e):G3t(e,i)}class Q3t{constructor(e){this._textModel=e,this._root=this.createEmptyRoot()}createEmptyRoot(){return{length:this._textModel.getValueLength(),token:0,height:0,tokenQuality:Ad.None}}buildStore(e,t){this._root=this.createFromUpdates(e,t)}createFromUpdates(e,t){if(e.length===0)return this.createEmptyRoot();let n={length:e[0].length,token:e[0].token,height:0,tokenQuality:t};for(let s=1;s0;){const h=l.pop(),g=h.offset;if(g=r){Dl(h.node)||(h.node.parent=void 0),a.push(h.node);continue}else if(Dl(h.node)&&g+h.node.length>r){a.push({length:g+h.node.length-r,token:h.node.token,height:0,tokenQuality:h.node.tokenQuality});continue}if(!Dl(h.node)){let f=g+h.node.length;for(let m=h.node.children.length-1;m>=0;m--)f-=h.node.children[m].length,l.push({node:h.node.children[m],offset:f})}}}let c;n.length>0?c=o.concat(this.createFromUpdates(n,s),a):c=o.concat(a);let u=c[0];for(let h=1;h0;){const{node:r,offset:o}=s.pop();if(!(o+r.length<=e||o>=t)){if(n(r,o))return;if(!Dl(r)){let l=o+r.length;for(let c=r.children.length-1;c>=0;c--)l-=r.children[c].length,s.push({node:r.children[c],offset:l})}}}}getTokenAt(e){let t;return this.traverseInOrderInRange(e,this._root.length,(n,s)=>Dl(n)?(t={token:n.token,startOffsetInclusive:s,length:n.length},!0):!1),t}getTokensInRange(e,t){const n=[];return this.traverseInOrderInRange(e,t,(s,r)=>{if(Dl(s)){let o=s.length,a=r;rt?(a=e,o=t-e):rt&&(o-=r+s.length-t),n.push({token:s.token,startOffsetInclusive:a,length:o})}return!1}),n}markForRefresh(e,t){this.traverseInOrderInRange(e,t,n=>(Dl(n)&&(n.tokenQuality=Ad.None),!1))}rangeHasTokens(e,t,n){let s=!0;return this.traverseInOrderInRange(e,t,r=>(Dl(r)&&r.tokenQuality(Dl(s)&&s.tokenQuality!==Ad.Accurate&&(n=!0),!1)),n}getNeedsRefresh(){const e=[];return this.traverseInOrderInRange(0,this._textModel.getValueLength(),(t,n)=>(Dl(t)&&t.tokenQuality!==Ad.Accurate&&(e.length>0&&e[e.length-1].endOffset===n?e[e.length-1].endOffset+=t.length:e.push({startOffset:n,endOffset:n+t.length})),!1)),e}dispose(){const e=[[this._root,!1]];for(;e.length>0;){const[t,n]=e.pop();if(!Dl(t))if(n)t.dispose(),t.parent=void 0;else{e.push([t,!0]);for(let s=t.children.length-1;s>=0;s--)e.push([t.children[s],!1])}}this._root=void 0}}const X3t=ln("treeSitterThemeService");function Z3t(i){return{createChangeSummary:e=>({changes:[]}),handleChange(e,t){for(const n in i)e.didChange(i[n])&&t.changes.push({key:n,change:e.change});return!0},beforeUpdate(e,t){for(const n in i){if(n==="changes")throw new Nt('property name "changes" is reserved for change tracking');t[n]=i[n].read(e)}}}}function J3t(i){let e;return{createChangeSummary:t=>({changes:[]}),handleChange(t,n){e||(e=i());for(const s in e)t.didChange(e[s])&&n.changes.push({key:s,change:t.change});return!0},beforeUpdate(t,n){e||(e=i());for(const s in e){if(s==="changes")throw new Nt('property name "changes" is reserved for change tracking');n[s]=e[s].read(t)}}}}var e4t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},t4t=function(i,e){return function(t,n){e(t,n,i)}};let oX=class extends se{get _textModel(){return this._tree.textModel}constructor(e,t,n,s,r){super(),this._tree=e,this._highlightingQueries=t,this._languageIdCodec=n,this._visibleLineRanges=s,this._treeSitterThemeService=r,this._onDidChangeTokens=this._register(new ie),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidCompleteBackgroundTokenization=this._register(new ie),this.onDidChangeBackgroundTokenization=this._onDidCompleteBackgroundTokenization.event,this._encodedLanguageId=this._languageIdCodec.encodeLanguageId(this._tree.languageId),this._register(Bg(this._treeSitterThemeService.onChange,()=>{this._updateTheme()})),this._tokenStore=this._register(new Q3t(this._textModel)),this._accurateVersion=this._textModel.getVersionId(),this._guessVersion=this._textModel.getVersionId(),this._tokenStore.buildStore(this._createEmptyTokens(),Ad.None),this._register(Pt(o=>{const a=this._visibleLineRanges.read(o);this._parseAndTokenizeViewPort(a)})),this._register(SD({owner:this,changeTracker:Z3t({tree:this._tree.tree})},(o,a)=>{var c;const l=(c=a.changes.at(0))==null?void 0:c.change;if(a.changes.length>1)throw new Nt("The tree changed twice in one transaction. This is currently not supported and should not happen.");if(!l)a.tree&&this._firstTreeUpdate(this._tree.treeLastParsedVersion.read(o));else{if(this.hasTokens())for(const u of l.ranges)this._markForRefresh(u.newRange);this.hasTokens()?this._handleTreeUpdate(l.ranges,l.versionId):this._firstTreeUpdate(l.versionId)}}))}handleContentChanged(e){this._guessVersion=e.versionId;for(const t of e.changes)if(t.text.length>t.rangeLength){const n=t.rangeOffset>0?t.rangeOffset-1:t.rangeOffset,s=this._tokenStore.getTokenAt(n);let r;s?(r={startOffsetInclusive:s.startOffsetInclusive,length:s.length+t.text.length-t.rangeLength,token:s.token},this._tokenStore.markForRefresh(n,t.rangeOffset+(t.text.length>t.rangeLength?t.text.length:t.rangeLength))):r={startOffsetInclusive:n,length:t.text.length,token:0},this._tokenStore.update((s==null?void 0:s.length)??0,[r],Ad.EditGuess)}else if(t.text.length0?s.newTokens[s.newTokens.length-1]:void 0;let o;r&&this._guessVersion>=e?o=r.startOffsetInclusive+r.length-s.newTokens[0].startOffsetInclusive:s.oldRangeLength?o=s.oldRangeLength:o=0,this._tokenStore.update(o,s.newTokens,n)}}_markForRefresh(e){this._tokenStore.markForRefresh(this._textModel.getOffsetAt(e.getStartPosition()),this._textModel.getOffsetAt(e.getEndPosition()))}_getNeedsRefresh(){const e=this._tokenStore.getNeedsRefresh();return e?e.map(t=>({range:z.fromPositions(this._textModel.getPositionAt(t.startOffset),this._textModel.getPositionAt(t.endOffset)),startOffset:t.startOffset,endOffset:t.endOffset})):[]}_parseAndTokenizeViewPort(e){const t=e.map(n=>n.toInclusiveRange()).filter(Ao);for(const n of t){const s=this._textModel.getOffsetAt(n.getStartPosition()),r=this._textModel.getOffsetAt(n.getEndPosition()),o=this._textModel.getVersionId();if(this._rangeHasTokens(n,Ad.ViewportGuess))continue;const a=this._textModel.getValueInRange(n),l=this._forceParseAndTokenizeContent(n,s,r,a,!0);if(!l||this._rangeHasTokens(n,Ad.ViewportGuess)||l.length===0)continue;const c=l[l.length-1],u=c.startOffsetInclusive+c.length-l[0].startOffsetInclusive;this._updateTokensInStore(o,[{newTokens:l,oldRangeLength:u}],Ad.ViewportGuess),this._onDidChangeTokens.fire({changes:{semanticTokensApplied:!1,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]}})}}_guessTokensForLinesContent(e,t){if(t.length===0)return;const n=t.join(this._textModel.getEOL()),s=new z(1,1,e+t.length,t[t.length-1].length+1),r=this._textModel.getOffsetAt({lineNumber:e,column:1}),o=this._forceParseAndTokenizeContent(s,r,r+n.length,n,!1);if(!o)return;const a=new Array(t.length);let l=0,c=0,u=0;for(let h=0;h{const s=n.toInclusiveRange();if(!s)return;const r=this._textModel.getOffsetAt(s.getStartPosition()),o=this._textModel.getOffsetAt(s.getEndPosition());return{newRange:s,newRangeEndOffset:o,newRangeStartOffset:r}}).filter(Ao);return this._handleTreeUpdate(t,e)}_handleTreeUpdate(e,t){const n=[];for(let o=0;o1e3){const l=e[o].newRange.endLineNumber;let c=e[o].newRange.startLineNumber,u=e[o].newRange.startColumn,h=c+1e3;do{const g=new te(c,u),f=h===e[o].newRange.endLineNumber?e[o].newRange.endColumn:this._textModel.getLineMaxColumn(h),m=new te(h,f),x=z.fromPositions(g,m);n.push({range:x,startOffset:this._textModel.getOffsetAt(x.getStartPosition()),endOffset:this._textModel.getOffsetAt(x.getEndPosition())}),c=h+1,u=1,hl?h=l:h=h+1e3}while(h<=l)}else if(o===0||n[o-1].endOffsetthis._getCaptures(o.range));return this._updateTreeForRanges(n,t,r).then(()=>{!this._textModel.isDisposed()&&this._tree.treeLastParsedVersion.get()===this._textModel.getVersionId()&&this._refreshNeedsRefresh(t)})}async _updateTreeForRanges(e,t,n){let s;for(let r=0;rMP(c))}this._onDidCompleteBackgroundTokenization.fire()}_refreshNeedsRefresh(e){const t=this._getNeedsRefresh();if(t.length===0)return;const n=new Array(t.length);for(let s=0;s({name:n.name,text:n.node.text,node:{startIndex:n.node.startIndex,endIndex:n.node.endIndex,startPosition:{lineNumber:n.node.startPosition.row+1,column:n.node.startPosition.column+1},endPosition:{lineNumber:n.node.endPosition.row+1,column:n.node.endPosition.column+1}},encodedLanguageId:this._encodedLanguageId})):[]}captureAtRangeWithInjections(e){const t=this.captureAtRange(e);for(let n=0;ne.startLineNumber&&re.startLineNumber&&oe.endColumn?e.endColumn:l:o>e.endLineNumber?e.endColumn:l,f=new z(c,h,u,g),m=this._getInjectionCaptures(s,f);m&&m.length>0&&(t.splice(n+1,0,...m),n+=m.length)}return t}tokenizeEncoded(e){const t=this._tokenizeEncoded(e);if(!t)return;const n=this._rangeTokensAsUpdates(this._textModel.getOffsetAt({lineNumber:e,column:1}),t.result);t.versionId===this._textModel.getVersionId()&&this._updateTokensInStore(t.versionId,[{newTokens:n,oldRangeLength:this._textModel.getLineLength(e)}],Ad.Accurate)}_getCaptures(e){return this.captureAtRangeWithInjections(e)}_tokenize(e,t,n){const s=this._getCaptures(e),r=this._tokenizeCapturesWithMetadata(s,t,n);if(r)return{...r,versionId:this._tree.treeLastParsedVersion.get()}}_createTokensFromCaptures(e,t,n){const s=this._tree.tree.get(),r=_o.create(),o=n-t,a=this._languageIdCodec.encodeLanguageId(this._tree.languageId),l=n4t[this._tree.languageId]||"source";if(e.length===0)return s?(r.stop(),{endOffsets:[{endOffset:o,scopes:[],encodedLanguageId:a}],captureTime:r.elapsed()}):void 0;const c=Array(e.length);c.fill({endOffset:0,scopes:[l],encodedLanguageId:a});let u=0;const h=()=>{c.push({endOffset:0,scopes:[l],encodedLanguageId:a})},g=(x,v)=>x.name.includes("punctuation")&&x.text?Array.from(x.text.matchAll(i4t)).map(_=>v+_.index):void 0,f=(x,v,_,w)=>{if(w!==void 0){const k=c[w].scopes;let C=c[w].bracket;if((w>0?c[w-1].endOffset:0)!==v){let D;if(C&&C.length>0){D=[];const T=[];for(let I=0;I_&&T.push(R)}D.length===0&&(D=void 0),T.length===0?C=void 0:C=T}c.splice(w,0,{endOffset:v,scopes:[...k],bracket:D,encodedLanguageId:x.encodedLanguageId}),w++,h(),u++}c.splice(w,0,{endOffset:_,scopes:[...k,x.name],bracket:g(x,v),encodedLanguageId:x.encodedLanguageId}),c[u].bracket=C}else c[u]={endOffset:_,scopes:[l,x.name],bracket:g(x,v),encodedLanguageId:x.encodedLanguageId};u++};for(let x=0;x0?C=c[u-1].endOffset:C=w-t-1;const D=k-E;if(C>=0&&C=k){let T=u-1,I=c[T].endOffset,R=T>=2?c[T-1].endOffset:0;do{if(R+E===I){if(R===D){c[T].scopes.push(v.name);const P=c[T].bracket;c[T].bracket=P&&P.length>0?P:g(v,D)}}else if(R<=D){f(v,D,k,T);break}T--,R=T>=1?c[T-1].endOffset:0,I=T>=0?c[T].endOffset:0}while(I>D)}else f(v,D,k)}c[u-1].endOffset0&&(h(),c[u]={endOffset:o,scopes:c[u].scopes,encodedLanguageId:this._encodedLanguageId},u++);for(let x=0;x0,void 0)}const a=s.elapsed();return{endOffsetsAndMetadata:o,captureTime:r.captureTime,metadataTime:a}}_tokenizeEncoded(e){const t=this._textModel.getOffsetAt({lineNumber:e,column:1}),n=this._textModel.getLineCount(),s=e+1<=n?this._textModel.getOffsetAt({lineNumber:e+1,column:1}):this._textModel.getValueLength(),r=s-t,o=this._tokenize(new z(e,1,e,r+1),t,s);if(o)return{result:o.endOffsetsAndMetadata,captureTime:o.captureTime,metadataTime:o.metadataTime,versionId:o.versionId}}_endOffsetTokensToUint32Array(e){const t=new Uint32Array(e.length*2);for(let n=0;n\(\)]/g,cae=ln("treeSitterLibraryService");class s4t{constructor(e){this._value=Ft(this,void 0),this.promiseResult=this._value,this.promise=e.then(t=>(Vi(n=>{this._value.set(new i_e(t,void 0),n)}),t),t=>{throw Vi(n=>{this._value.set(new i_e(void 0,t),n)}),t})}}class i_e{constructor(e,t){this.data=e,this.error=t}getDataOrThrow(){if(this.error)throw this.error;return this.data}}var r4t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},s_e=function(i,e){return function(t,n){e(t,n,i)}};let aX=class extends uRe{constructor(e,t,n,s,r,o){super(t,n),this._languageIdObs=e,this._treeSitterLibraryService=r,this._instantiationService=o,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new ie),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event;const a=new s4t(this._treeSitterLibraryService.getParserClass()),l=we(this,c=>{var h,g;return(g=(h=a.promiseResult)==null?void 0:h.read(c))==null?void 0:g.getDataOrThrow()});this._tree=we(this,c=>{const u=l.read(c);if(!u)return;const h=this._languageIdObs.read(c),g=this._treeSitterLibraryService.getLanguage(h,!1,c);if(!g)return;const f=new u;if(c.store.add(dt(()=>{f.delete()})),f.setLanguage(g),this._treeSitterLibraryService.getInjectionQueries(h,c)!==void 0)return c.store.add(this._instantiationService.createInstance(iX,h,void 0,f,u,this._textModel))}),this._tokenizationImpl=we(this,c=>{const u=this._tree.read(c);if(!u)return;const h=this._treeSitterLibraryService.getHighlightingQueries(u.languageId,c);if(h)return c.store.add(this._instantiationService.createInstance(oX,u,h,this._languageIdCodec,s))}),this._register(Pt(c=>{const u=this._tokenizationImpl.read(c);u&&(c.store.add(u.onDidChangeTokens(h=>{this._onDidChangeTokens.fire(h.changes)})),c.store.add(u.onDidChangeBackgroundTokenization(h=>{this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire()})))}))}getLineTokens(e){const t=this._tokenizationImpl.get();if(!t){const n=this._textModel.getLineContent(e);return hr.createEmpty(n,this._languageIdCodec)}return t.getLineTokens(e)}todo_resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}handleDidChangeAttached(){}handleDidChangeContent(e){if(e.isFlush)this.todo_resetTokenization(!1);else{const n=this._tokenizationImpl.get();n==null||n.handleContentChanged(e)}const t=this._tree.get();t==null||t.handleContentChange(e)}forceTokenization(e){const t=this._tokenizationImpl.get();t&&(t.hasAccurateTokensForLine(e)||t.tokenizeEncoded(e))}hasAccurateTokensForLine(e){const t=this._tokenizationImpl.get();return t?t.hasAccurateTokensForLine(e):!1}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,n){return 0}tokenizeLinesAt(e,t){const n=this._tokenizationImpl.get();return n?n.tokenizeLinesAt(e,t):null}get hasTokens(){const e=this._tokenizationImpl.get();return e?e.hasTokens():!1}};aX=r4t([s_e(4,cae),s_e(5,ft)],aX);class dae{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t,n=void 0){if(this._pieces=e||[],this._isComplete=t,n)for(const s of this._pieces)s.reportIfInvalid(n)}setPartial(e,t){let n=e;if(t.length>0){const r=t[0].getRange(),o=t[t.length-1].getRange();if(!r||!o)return e;n=e.plusRange(r).plusRange(o)}let s=null;for(let r=0,o=this._pieces.length;rn.endLineNumber){s=s||{index:r};break}if(a.removeTokens(n),a.isEmpty()){this._pieces.splice(r,1),r--,o--;continue}if(a.endLineNumbern.endLineNumber){s=s||{index:r};continue}const[l,c]=a.split(n);if(l.isEmpty()){s=s||{index:r};continue}c.isEmpty()||(this._pieces.splice(r,1,l,c),r++,o++,s=s||{index:r})}return s=s||{index:this._pieces.length},t.length>0&&(this._pieces=y7(this._pieces,s.index,t)),n}isComplete(){return this._isComplete}addSparseTokens(e,t){if(t.getTextLength()===0)return t;const n=this._pieces;if(n.length===0)return t;const s=dae._findFirstPieceWithLine(n,e),r=n[s].getLineTokens(e);if(!r)return t;const o=t.getCount(),a=r.getCount();let l=0;const c=[];let u=0,h=0;const g=(f,m)=>{f!==h&&(h=f,c[u++]=f,c[u++]=m)};for(let f=0;f>>0,w=~_>>>0;for(;lt)s=r-1;else{for(;r>n&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber;)r--;return r}}return n}acceptEdit(e,t,n,s,r){for(let o=0;o>>1;if(t===0&&s[s.length-2]===n)return Pm;const o=hr.findIndexInTokensArray(s,t),a=o>0?s[o-1<<1]:0,l=s[o<<1];if(nu&&(s[c++]=m,s[c++]=s[(f<<1)+1],u=m)}if(c===s.length)return e;const g=new Uint32Array(c);return g.set(s.subarray(0,c),0),g.buffer}static append(e,t){if(t===Pm)return e;if(e===Pm)return t;if(e===null)return e;if(t===null)return null;const n=rb(e),s=rb(t),r=s.length>>>1,o=new Uint32Array(n.length+s.length);o.set(n,0);let a=n.length;const l=n[n.length-2];for(let c=0;c>>1;let o=hr.findIndexInTokensArray(s,t);o>0&&s[o-1<<1]===t&&o--;for(let a=o;a0}getTokens(e,t,n){let s=null;if(t1&&(r=Ra.getLanguageId(s[1])!==e),!r)return Pm}if(!s||s.length===0){const r=new Uint32Array(2);return r[0]=t,r[1]=r_e(e),r.buffer}return s[s.length-2]=t,s.byteOffset===0&&s.byteLength===s.buffer.byteLength?s.buffer:s}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;const n=[];for(let s=0;s=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=jf.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=jf.deleteEnding(this._lineTokens[t],e.startColumn-1);const n=e.endLineNumber-1;let s=null;n=this._len)){if(t===0){this._lineTokens[s]=jf.insert(this._lineTokens[s],e.column-1,n);return}this._lineTokens[s]=jf.deleteEnding(this._lineTokens[s],e.column-1),this._lineTokens[s]=jf.insert(this._lineTokens[s],e.column-1,n),this._insertLines(e.lineNumber,t)}}setMultilineTokens(e,t){if(e.length===0)return{changes:[]};const n=[];for(let s=0,r=e.length;s>>0}class o4t extends uRe{constructor(e,t,n,s){super(e,t),this.getLanguageId=n,this._tokenizer=null,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new ie),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new Zn),this._tokens=new WR(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new Zn),this._attachedViewStates=this._register(new x7),this._register(Gs.onDidChange(r=>{const o=this.getLanguageId();r.changedLanguages.indexOf(o)!==-1&&this.todo_resetTokenization()})),this.todo_resetTokenization(),this._register(s.onDidChangeVisibleRanges(({view:r,state:o})=>{if(o){let a=this._attachedViewStates.get(r);a||(a=new R3t(()=>this.refreshRanges(a.lineRanges)),this._attachedViewStates.set(r,a)),a.handleStateChange(o)}else this._attachedViewStates.deleteAndDispose(r)}))}todo_resetTokenization(e=!0){var r;this._tokens.flush(),(r=this._debugBackgroundTokens)==null||r.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new rX(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const t=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const o=Gs.get(this.getLanguageId());if(!o)return[null,null];let a;try{a=o.getInitialState()}catch(l){return zt(l),[null,null]}return[o,a]},[n,s]=t();if(n&&s?this._tokenizer=new U3t(this._textModel.getLineCount(),n,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const o={setTokens:a=>{this.setTokens(a)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const a=2;this._backgroundTokenizationState=a,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(a,l)=>{var u;if(!this._tokenizer)return;const c=this._tokenizer.store.getFirstInvalidEndStateLineNumber();c!==null&&a>=c&&((u=this._tokenizer)==null||u.store.setEndState(a,l))}};n&&n.createBackgroundTokenizer&&!n.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,o)),!this._backgroundTokenizer.value&&!this._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new K3t(this._tokenizer,o),this._defaultBackgroundTokenizer.handleChanges()),n!=null&&n.backgroundTokenizerShouldOnlyVerifyTokens&&n.createBackgroundTokenizer?(this._debugBackgroundTokens=new WR(this._languageIdCodec),this._debugBackgroundStates=new rX(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=n.createBackgroundTokenizer(this._textModel,{setTokens:a=>{var l;(l=this._debugBackgroundTokens)==null||l.setMultilineTokens(a,this._textModel)},backgroundTokenizationFinished(){},setEndState:(a,l)=>{var c;(c=this._debugBackgroundStates)==null||c.setEndState(a,l)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;(e=this._defaultBackgroundTokenizer)==null||e.handleChanges()}handleDidChangeContent(e){var t,n,s;if(e.isFlush)this.todo_resetTokenization(!1);else if(!e.isEolChange){for(const r of e.changes){const[o,a]=i0(r.text);this._tokens.acceptEdit(r.range,o,a),(t=this._debugBackgroundTokens)==null||t.acceptEdit(r.range,o,a)}(n=this._debugBackgroundStates)==null||n.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),(s=this._defaultBackgroundTokenizer)==null||s.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=jt.joinMany([...this._attachedViewStates].map(([t,n])=>n.lineRanges));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var o,a;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const n=new sX,{heuristicTokens:s}=this._tokenizer.tokenizeHeuristically(n,e,t),r=this.setTokens(n.finalize());if(s)for(const l of r.changes)(o=this._backgroundTokenizer.value)==null||o.requestTokens(l.fromLineNumber,l.toLineNumber+1);(a=this._defaultBackgroundTokenizer)==null||a.checkFinished()}forceTokenization(e){var n,s;const t=new sX;(n=this._tokenizer)==null||n.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),(s=this._defaultBackgroundTokenizer)==null||s.checkFinished()}hasAccurateTokensForLine(e){return this._tokenizer?this._tokenizer.hasAccurateTokensForLine(e):!0}isCheapToTokenize(e){return this._tokenizer?this._tokenizer.isCheapToTokenize(e):!0}getLineTokens(e){var s;const t=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const r=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!n.equals(r)&&((s=this._debugBackgroundTokenizer.value)!=null&&s.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,n){if(!this._tokenizer)return 0;const s=this._textModel.validatePosition(new te(e,t));return this.forceTokenization(s.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(s,n)}tokenizeLinesAt(e,t){return this._tokenizer?(this.forceTokenization(e),this._tokenizer.tokenizeLinesAt(e,t)):null}get hasTokens(){return this._tokens.hasTokens}}var a4t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},I3=function(i,e){return function(t,n){e(t,n,i)}},uj;let lX=uj=class extends L2e{constructor(e,t,n,s,r,o,a,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=n,this._attachedViews=s,this._languageService=r,this._languageConfigurationService=o,this._instantiationService=a,this._treeSitterLibraryService=l,this._languageIdObs=Ft(this,this._languageId),this._useTreeSitter=we(this,u=>{const h=this._languageIdObs.read(u);return this._treeSitterLibraryService.supportsLanguage(h,u)}),this.tokens=we(this,u=>{let h;return this._useTreeSitter.read(u)?h=u.store.add(this._instantiationService.createInstance(aX,this._languageIdObs,this._languageService.languageIdCodec,this._textModel,this._attachedViews.visibleLineRanges)):h=u.store.add(new o4t(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),u.store.add(h.onDidChangeTokens(g=>{this._emitModelTokensChangedEvent(g)})),u.store.add(h.onDidChangeBackgroundTokenizationState(g=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})),h});let c=!1;this.tokens.recomputeInitiallyAndOnChange(this._store,u=>{c&&u.todo_resetTokenization(),c=!0}),this._semanticTokens=new dae(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new ie),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new ie),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new ie),this.onDidChangeTokens=this._onDidChangeTokens.event}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[n,s,r]=i0(t.text);this._semanticTokens.acceptEdit(t.range,n,s,r,t.text.length>0?t.text.charCodeAt(0):0)}this.tokens.get().handleDidChangeContent(e)}handleDidChangeAttached(){this.tokens.get().handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.tokens.get().getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new Nt("Illegal value for lineNumber")}get hasTokens(){return this.tokens.get().hasTokens}resetTokenization(){this.tokens.get().todo_resetTokenization()}get backgroundTokenizationState(){return this.tokens.get().backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.tokens.get().forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this.tokens.get().hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.tokens.get().isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.tokens.get().tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,n){return this.tokens.get().getTokenTypeIfInsertingCharacter(e,t,n)}tokenizeLinesAt(e,t){return this.tokens.get().tokenizeLinesAt(e,t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t,this._textModel),this._emitModelTokensChangedEvent({semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const n=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),n=this._textModel.getLineContent(t.lineNumber),s=this.getLineTokens(t.lineNumber),r=s.findTokenIndexAtOffset(t.column-1),[o,a]=uj._findLanguageBoundaries(s,r),l=pR(t.column,this.getLanguageConfiguration(s.getLanguageId(r)).getWordDefinition(),n.substring(o,a),o);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&o===t.column-1){const[c,u]=uj._findLanguageBoundaries(s,r-1),h=pR(t.column,this.getLanguageConfiguration(s.getLanguageId(r-1)).getWordDefinition(),n.substring(c,u),c);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn)return h}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const n=e.getLanguageId(t);let s=0;for(let o=t;o>=0&&e.getLanguageId(o)===n;o--)s=e.getStartOffset(o);let r=e.getLineContent().length;for(let o=t,a=e.getCount();oe.call(t,n,n,this))}[Symbol.iterator](){return this.values()}}o_e=Symbol.toStringTag;var d4t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},A3=function(i,e){return function(t,n){e(t,n,i)}},Ey;function u4t(i){const e=new dRe;return e.acceptChunk(i),e.finish()}function h4t(i){const e=new dRe;let t;for(;typeof(t=i.read())=="string";)e.acceptChunk(t);return e.finish()}function l_e(i,e){let t;return typeof i=="string"?t=u4t(i):bTt(i)?t=h4t(i):t=i,t.create(e)}let R3=0;const g4t=999,f4t=1e4,p4t=300;class m4t{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,n=0;do{const s=this._source.read();if(s===null)return this._eos=!0,t===0?null:e.join("");if(s.length>0&&(e[t++]=s,n+=s.length),n>=64*1024)return e.join("")}while(!0)}}const cI=()=>{throw new Error("Invalid change accessor")};var Sg;let yC=(Sg=class extends se{static resolveOptions(e,t){if(t.detectIndentation){const n=zve(e,t.tabSize,t.insertSpaces);return new sj({tabSize:n.tabSize,indentSize:"tabSize",insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new sj(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}get onDidChangeOptions(){return this._onDidChangeOptions.event}get onDidChangeAttached(){return this._onDidChangeAttached.event}get onDidChangeLineHeight(){return this._onDidChangeLineHeight.event}get onDidChangeFont(){return this._onDidChangeFont.event}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}onDidChangeContentOrInjectedText(e){return Mh(this._eventEmitter.fastEvent(t=>e(t)),this._onDidChangeInjectedText.event(t=>e(t)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,n,s=null,r,o,a,l){super(),this._undoRedoService=r,this._languageService=o,this._languageConfigurationService=a,this.instantiationService=l,this._onWillDispose=this._register(new ie),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new y4t((m,x,v)=>this.handleBeforeFireDecorationsChangedEvent(m,x,v))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new ie),this._onDidChangeAttached=this._register(new ie),this._onDidChangeInjectedText=this._register(new ie),this._onDidChangeLineHeight=this._register(new ie),this._onDidChangeFont=this._register(new ie),this._eventEmitter=this._register(new w4t),this._languageSelectionListener=this._register(new Zn),this._deltaDecorationCallCnt=0,this._attachedViews=new T3t,R3++,this.id="$model"+R3,this.isForSimpleWidget=n.isForSimpleWidget,typeof s>"u"||s===null?this._associatedResource=kt.parse("inmemory://model/"+R3):this._associatedResource=s,this._attachedEditorCount=0;const{textBuffer:c,disposable:u}=l_e(e,n.defaultEOL);this._buffer=c,this._bufferDisposable=u;const h=this._buffer.getLineCount(),g=this._buffer.getValueLengthInRange(new z(1,1,h,this._buffer.getLineLength(h)+1),0);n.largeFileOptimizations?(this._isTooLargeForTokenization=g>Ey.LARGE_FILE_SIZE_THRESHOLD||h>Ey.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=g>Ey.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._options=Ey.resolveOptions(this._buffer,n);const f=typeof t=="string"?t:t.languageId;typeof t!="string"&&(this._languageSelectionListener.value=t.onDidChange(()=>this._setLanguage(t.languageId))),this._bracketPairs=this._register(new J5t(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new jPt(this,this._languageConfigurationService)),this._decorationProvider=this._register(new t3t(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(lX,this,this._bracketPairs,f,this._attachedViews),this._isTooLargeForSyncing=g>Ey._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=aIe(R3),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new c_e,this._commandManager=new iae(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange(m=>{this._bracketPairs.handleLanguageConfigurationServiceChange(m),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(m)}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new sE([],"",` +`,!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=se.None}_assertNotDisposed(){if(this._isDisposed)throw new Nt("Model is disposed!")}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new G1(e,t)))}setValue(e,t=Aa.setValue()){if(this._assertNotDisposed(),e==null)throw ju();const{textBuffer:n,disposable:s}=l_e(e,this._options.defaultEOL);this._setValueFromTextBuffer(n,s,t)}_createContentChanged2(e,t,n,s,r,o,a,l,c,u){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:r}],eol:this._buffer.getEOL(),isEolChange:c,versionId:this.getVersionId(),isUndoing:o,isRedoing:a,isFlush:l,detailedReasons:[u],detailedReasonsChangeLengths:[1]}}_setValueFromTextBuffer(e,t,n){this._assertNotDisposed();const s=this.getFullModelRange(),r=this.getValueLengthInRange(s),o=this.getLineCount(),a=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new c_e,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new tE([new w5t],this._versionId,!1,!1),this._createContentChanged2(new z(1,1,o,a),0,r,new te(o,a),this.getValue(),!1,!1,!0,!1,n))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r +`:` +`;if(this._buffer.getEOL()===t)return;const n=this.getFullModelRange(),s=this.getValueLengthInRange(n),r=this.getLineCount(),o=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new tE([new E5t],this._versionId,!1,!1),this._createContentChanged2(new z(1,1,r,o),0,s,new te(r,o),this.getValue(),!1,!1,!1,!0,Aa.eolChange()))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let n=0,s=t.length;n0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const n=this._buffer.getLineCount();for(let s=1;s<=n;s++){const r=this._buffer.getLineLength(s);r>=f4t?t+=r:e+=r}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=typeof e.tabSize<"u"?e.tabSize:this._options.tabSize,n=typeof e.indentSize<"u"?e.indentSize:this._options.originalIndentSize,s=typeof e.insertSpaces<"u"?e.insertSpaces:this._options.insertSpaces,r=typeof e.trimAutoWhitespace<"u"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=typeof e.bracketColorizationOptions<"u"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new sj({tabSize:t,indentSize:n,insertSpaces:s,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:o});if(this._options.equals(a))return;const l=this._options.createChangeEvent(a);this._options=a,this._bracketPairs.handleDidChangeOptions(l),this._decorationProvider.handleDidChangeOptions(l),this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();const n=zve(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),uoe(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(rIe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(n=>({range:n.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Nt("Operation would exceed heap memory limits");const n=this.getFullModelRange(),s=this.getValueInRange(n,e);return t?this._buffer.getBOM()+s:s}createSnapshot(e=!1){return new m4t(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const n=this.getFullModelRange(),s=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+s:s}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Nt("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Nt("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Nt("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` +`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Nt("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Nt("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Nt("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),n=e.startLineNumber,s=e.startColumn;let r=Math.floor(typeof n=="number"&&!isNaN(n)?n:1),o=Math.floor(typeof s=="number"&&!isNaN(s)?s:1);if(r<1)r=1,o=1;else if(r>t)r=t,o=this.getLineMaxColumn(r);else if(o<=1)o=1;else{const h=this.getLineMaxColumn(r);o>=h&&(o=h)}const a=e.endLineNumber,l=e.endColumn;let c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),u=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,u=1;else if(c>t)c=t,u=this.getLineMaxColumn(c);else if(u<=1)u=1;else{const h=this.getLineMaxColumn(c);u>=h&&(u=h)}return n===r&&s===o&&a===c&&l===u&&e instanceof z&&!(e instanceof st)?e:new z(r,o,c,u)}_isValidPosition(e,t,n){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const s=this._buffer.getLineCount();if(e>s)return!1;if(t===1)return!0;const r=this.getLineMaxColumn(e);if(t>r)return!1;if(n===1){const o=this._buffer.getLineCharCode(e,t-2);if(eo(o))return!1}return!0}_validatePosition(e,t,n){const s=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),r=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),o=this._buffer.getLineCount();if(s<1)return new te(1,1);if(s>o)return new te(o,this.getLineMaxColumn(o));if(r<=1)return new te(s,1);const a=this.getLineMaxColumn(s);if(r>=a)return new te(s,a);if(n===1){const l=this._buffer.getLineCharCode(s,r-2);if(eo(l))return new te(s,r-1)}return new te(s,r)}validatePosition(e){return this._assertNotDisposed(),e instanceof te&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}isValidRange(e){return this._isValidRange(e,1)}_isValidRange(e,t){const n=e.startLineNumber,s=e.startColumn,r=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(n,s,0)||!this._isValidPosition(r,o,0))return!1;if(t===1){const a=s>1?this._buffer.getLineCharCode(n,s-2):0,l=o>1&&o<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,o-2):0,c=eo(a),u=eo(l);return!c&&!u}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof z&&!(e instanceof st)&&this._isValidRange(e,1))return e;const n=this._validatePosition(e.startLineNumber,e.startColumn,0),s=this._validatePosition(e.endLineNumber,e.endColumn,0),r=n.lineNumber,o=n.column,a=s.lineNumber,l=s.column;{const c=o>1?this._buffer.getLineCharCode(r,o-2):0,u=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,h=eo(c),g=eo(u);return!h&&!g?new z(r,o,a,l):r===a&&o===l?new z(r,o-1,a,l-1):h&&g?new z(r,o-1,a,l+1):h?new z(r,o-1,a,l):new z(r,o,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();const n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new z(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,n,s){return this._buffer.findMatchesLineByLine(e,t,n,s)}findMatches(e,t,n,s,r,o,a=g4t){this._assertNotDisposed();let l=null;t!==null&&typeof t!="boolean"&&(Array.isArray(t)||(t=[t]),t.every(h=>z.isIRange(h))&&(l=t.map(h=>this.validateRange(h)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((h,g)=>h.startLineNumber-g.startLineNumber||h.startColumn-g.startColumn);const c=[];c.push(l.reduce((h,g)=>z.areIntersecting(h,g)?h.plusRange(g):(c.push(h),g)));let u;if(!n&&e.indexOf(` +`)<0){const g=new Ny(e,n,s,r).parseSearchRequest();if(!g)return[];u=f=>this.findMatchesLineByLine(f,g,o,a)}else u=h=>T3.findMatches(this,new Ny(e,n,s,r),h,o,a);return c.map(u).reduce((h,g)=>h.concat(g),[])}findNextMatch(e,t,n,s,r,o){this._assertNotDisposed();const a=this.validatePosition(t);if(!n&&e.indexOf(` +`)<0){const c=new Ny(e,n,s,r).parseSearchRequest();if(!c)return null;const u=this.getLineCount();let h=new z(a.lineNumber,a.column,u,this.getLineMaxColumn(u)),g=this.findMatchesLineByLine(h,c,o,1);return T3.findNextMatch(this,new Ny(e,n,s,r),a,o),g.length>0||(h=new z(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),g=this.findMatchesLineByLine(h,c,o,1),g.length>0)?g[0]:null}return T3.findNextMatch(this,new Ny(e,n,s,r),a,o)}findPreviousMatch(e,t,n,s,r,o){this._assertNotDisposed();const a=this.validatePosition(t);return T3.findPreviousMatch(this,new Ny(e,n,s,r),a,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` +`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof P$?e:new P$(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let n=0,s=e.length;n({range:this.validateRange(l.range),text:l.text}));let a=!0;if(e)for(let l=0,c=e.length;lu.endLineNumber,v=u.startLineNumber>m.endLineNumber;if(!x&&!v){h=!0;break}}if(!h){a=!1;break}}if(a)for(let l=0,c=this._trimAutoWhitespaceLines.length;lx.endLineNumber)&&!(u===x.startLineNumber&&x.startColumn===h&&x.isEmpty()&&v&&v.length>0&&v.charAt(0)===` +`)&&!(u===x.startLineNumber&&x.startColumn===1&&x.isEmpty()&&v&&v.length>0&&v.charAt(v.length-1)===` +`)){g=!1;break}}if(g){const f=new z(u,1,u,h);t.push(new P$(null,f,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n,s,r)}_applyUndo(e,t,n,s){const r=e.map(o=>{const a=this.getPositionAt(o.newPosition),l=this.getPositionAt(o.newEnd);return{range:new z(a.lineNumber,a.column,l.lineNumber,l.column),text:o.oldText}});this._applyUndoRedoEdits(r,t,!0,!1,n,s)}_applyRedo(e,t,n,s){const r=e.map(o=>{const a=this.getPositionAt(o.oldPosition),l=this.getPositionAt(o.oldEnd);return{range:new z(a.lineNumber,a.column,l.lineNumber,l.column),text:o.newText}});this._applyUndoRedoEdits(r,t,!1,!0,n,s)}_applyUndoRedoEdits(e,t,n,s,r,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=s,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t,n){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const s=this._validateEditOperations(e);return this._doApplyEdits(s,t??!1,n??Aa.applyEdits())}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t,n){const s=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),a=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,a.length!==0){for(let u=0,h=a.length;u=0;P--){const j=m+P,B=C+P;R.takeFromEndWhile($=>$.lineNumber>B);const H=R.takeFromEndWhile($=>$.lineNumber===B);l.push(new Ove(j,this.getLineContent(B),H))}if(wae.lineNumberae.lineNumber===X)}l.push(new N5t(j+1,m+_,q,$))}c+=k}this._emitContentChangedEvent(new tE(l,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:a,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1,detailedReasons:[n],detailedReasonsChangeLengths:[a.length]})}return r.reverseEdits===null?void 0:r.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e,t,n){if(e&&e.size>0){const r=Array.from(e).map(o=>new Ove(o,this.getLineContent(o),this._getInjectedTextInLine(o)));this._onDidChangeInjectedText.fire(new V2e(r))}if(t&&t.size>0){const r=Array.from(t).map(o=>new C5t(o.ownerId,o.decorationId,o.lineNumber,o.lineHeight));this._onDidChangeLineHeight.fire(new z2e(r))}if(n&&n.size>0){const r=Array.from(n).map(o=>new S5t(o.ownerId,o.lineNumber));this._onDidChangeFont.fire(new U2e(r))}}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const n={addDecoration:(r,o)=>this._deltaDecorationsImpl(e,[],[{range:r,options:o}])[0],changeDecoration:(r,o)=>{this._changeDecorationImpl(e,r,o)},changeDecorationOptions:(r,o)=>{this._changeDecorationOptionsImpl(e,r,u_e(o))},removeDecoration:r=>{this._deltaDecorationsImpl(e,[r],[])},deltaDecorations:(r,o)=>r.length===0&&o.length===0?[]:this._deltaDecorationsImpl(e,r,o)};let s=null;try{s=t(n)}catch(r){zt(r)}return n.addDecoration=cI,n.changeDecoration=cI,n.changeDecorationOptions=cI,n.removeDecoration=cI,n.deltaDecorations=cI,s}deltaDecorations(e,t,n=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),zt(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,n){const s=e?this._decorations[e]:null;if(!s)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:d_e[n]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(s),delete this._decorations[s.id],null;const r=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),a=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(s),s.reset(this.getVersionId(),o,a,r),s.setOptions(d_e[n]),this._decorationsTree.insert(s),s.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let n=0,s=t.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n,s)}getLinesDecorations(e,t,n=0,s=!1,r=!1,o=!1){const a=this.getLineCount(),l=Math.min(a,Math.max(1,e)),c=Math.min(a,Math.max(1,t)),u=this.getLineMaxColumn(c),h=new z(l,1,c,u),g=this._getDecorationsInRange(h,n,s,r,o);return zY(g,this._decorationProvider.getDecorationsInRange(h,n,s)),g}getDecorationsInRange(e,t=0,n=!1,s=!1,r=!1,o=!1){const a=this.validateRange(e),l=this._getDecorationsInRange(a,t,n,s,o);return zY(l,this._decorationProvider.getDecorationsInRange(a,t,n,r)),l}getOverviewRulerDecorations(e=0,t=!1,n=!1){return this._decorationsTree.getAll(this,e,t,n,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}getCustomLineHeightsDecorations(e=0){return this._decorationsTree.getAllCustomLineHeights(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),n=t+this._buffer.getLineLength(e),s=this._decorationsTree.getInjectedTextInInterval(this,t,n,0);return qg.fromDecorations(s).filter(r=>r.lineNumber===e)}getFontDecorationsInRange(e,t=0){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getFontDecorationsInInterval(this,n,s,t)}getAllDecorations(e=0,t=!1,n=!1){let s=this._decorationsTree.getAll(this,e,t,n,!1,!1);return s=s.concat(this._decorationProvider.getAllDecorations(e,t)),s}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!1,!0)}_getDecorationsInRange(e,t,n,s,r){const o=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),a=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,o,a,t,n,s,r)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t,n){const s=this._decorations[t];if(!s)return;if(s.options.after){const l=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.endLineNumber)}if(s.options.before){const l=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByInjectedText(l.startLineNumber)}if(s.options.lineHeight!==null){const l=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,l.startLineNumber,null)}if(s.options.affectsFont){const l=this.getDecorationRange(t);this._onDidChangeDecorations.recordLineAffectedByFontChange(e,s.id,l.startLineNumber)}const r=this._validateRangeRelaxedNoAllocations(n),o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),a=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);this._decorationsTree.delete(s),s.reset(this.getVersionId(),o,a,r),this._decorationsTree.insert(s),this._onDidChangeDecorations.checkAffectedAndFire(s.options),s.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.endLineNumber),s.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(r.startLineNumber),s.options.lineHeight!==null&&this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,r.startLineNumber,s.options.lineHeight),s.options.affectsFont&&this._onDidChangeDecorations.recordLineAffectedByFontChange(e,s.id,r.startLineNumber)}_changeDecorationOptionsImpl(e,t,n){const s=this._decorations[t];if(!s)return;const r=!!(s.options.overviewRuler&&s.options.overviewRuler.color),o=!!(n.overviewRuler&&n.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(s.options),this._onDidChangeDecorations.checkAffectedAndFire(n),s.options.after||n.after){const c=this._decorationsTree.getNodeRange(this,s);this._onDidChangeDecorations.recordLineAffectedByInjectedText(c.endLineNumber)}if(s.options.before||n.before){const c=this._decorationsTree.getNodeRange(this,s);this._onDidChangeDecorations.recordLineAffectedByInjectedText(c.startLineNumber)}if(s.options.lineHeight!==null||n.lineHeight!==null){const c=this._decorationsTree.getNodeRange(this,s);this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(e,t,c.startLineNumber,n.lineHeight)}if(s.options.affectsFont||n.affectsFont){const c=this._decorationsTree.getNodeRange(this,s);this._onDidChangeDecorations.recordLineAffectedByFontChange(e,t,c.startLineNumber)}const a=r!==o,l=b4t(n)!==hj(s);a||l?(this._decorationsTree.delete(s),s.setOptions(n),this._decorationsTree.insert(s)):s.setOptions(n)}_deltaDecorationsImpl(e,t,n,s=!1){const r=this.getVersionId(),o=t.length;let a=0;const l=n.length;let c=0;this._onDidChangeDecorations.beginDeferredEmit();try{const u=new Array(l);for(;athis._setLanguage(e.languageId,t)),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return dX(this.getLineContent(e))+1}toString(){return`TextModel(${this.uri.toString()})`}},Ey=Sg,Sg._MODEL_SYNC_LIMIT=50*1024*1024,Sg.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,Sg.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,Sg.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024,Sg.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:pa.tabSize,indentSize:pa.indentSize,insertSpaces:pa.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:pa.trimAutoWhitespace,largeFileOptimizations:pa.largeFileOptimizations,bracketPairColorizationOptions:pa.bracketPairColorizationOptions},Sg);yC=Ey=d4t([A3(4,uae),A3(5,tr),A3(6,As),A3(7,ft)],yC);function dX(i){let e=0;for(const t of i)if(t===" "||t===" ")e++;else break;return e}function dq(i){return!!(i.options.overviewRuler&&i.options.overviewRuler.color)}function b4t(i){return!!i.after||!!i.before}function hj(i){return!!i.options.after||!!i.options.before}class c_e{constructor(){this._decorationsTree0=new aq,this._decorationsTree1=new aq,this._injectedTextDecorationsTree=new aq}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const n of t)n.range===null&&(n.range=e.getRangeAt(n.cachedAbsoluteStart,n.cachedAbsoluteEnd));return t}getAllInInterval(e,t,n,s,r,o,a){const l=e.getVersionId(),c=this._intervalSearch(t,n,s,r,o,l,a);return this._ensureNodesHaveRanges(e,c)}_intervalSearch(e,t,n,s,r,o,a){const l=this._decorationsTree0.intervalSearch(e,t,n,s,r,o,a),c=this._decorationsTree1.intervalSearch(e,t,n,s,r,o,a),u=this._injectedTextDecorationsTree.intervalSearch(e,t,n,s,r,o,a);return l.concat(c).concat(u)}getInjectedTextInInterval(e,t,n,s){const r=e.getVersionId(),o=this._injectedTextDecorationsTree.intervalSearch(t,n,s,!1,!1,r,!1);return this._ensureNodesHaveRanges(e,o).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getFontDecorationsInInterval(e,t,n,s){const r=e.getVersionId(),o=this._decorationsTree0.intervalSearch(t,n,s,!1,!1,r,!1);return this._ensureNodesHaveRanges(e,o).filter(a=>a.options.affectsFont)}getAllInjectedText(e,t){const n=e.getVersionId(),s=this._injectedTextDecorationsTree.search(t,!1,!1,n,!1);return this._ensureNodesHaveRanges(e,s).filter(r=>r.options.showIfCollapsed||!r.range.isEmpty())}getAllCustomLineHeights(e,t){const n=e.getVersionId(),s=this._search(t,!1,!1,!1,n,!1);return this._ensureNodesHaveRanges(e,s).filter(r=>typeof r.options.lineHeight=="number")}getAll(e,t,n,s,r,o){const a=e.getVersionId(),l=this._search(t,n,s,r,a,o);return this._ensureNodesHaveRanges(e,l)}_search(e,t,n,s,r,o){if(s)return this._decorationsTree1.search(e,t,n,r,o);{const a=this._decorationsTree0.search(e,t,n,r,o),l=this._decorationsTree1.search(e,t,n,r,o),c=this._injectedTextDecorationsTree.search(e,t,n,r,o);return a.concat(l).concat(c)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),n=this._decorationsTree1.collectNodesFromOwner(e),s=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(n).concat(s)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),n=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(n)}insert(e){hj(e)?this._injectedTextDecorationsTree.insert(e):dq(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){hj(e)?this._injectedTextDecorationsTree.delete(e):dq(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const n=e.getVersionId();return t.cachedVersionId!==n&&this._resolveNode(t,n),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){hj(e)?this._injectedTextDecorationsTree.resolveNode(e,t):dq(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,n,s){this._decorationsTree0.acceptReplace(e,t,n,s),this._decorationsTree1.acceptReplace(e,t,n,s),this._injectedTextDecorationsTree.acceptReplace(e,t,n,s)}}function gf(i){return i.replace(/[^a-z0-9\-_]/gi," ")}class bRe{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class x4t extends bRe{constructor(e){super(e),this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:zd.Center}getColor(e){return this._resolvedColor||(Xb(e.type)&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if(typeof e=="string")return e;const n=e?t.getColor(e.id):null;return n?n.toString():""}}class v4t{constructor(e){this.position=(e==null?void 0:e.position)??Ug.Center,this.persistLane=e==null?void 0:e.persistLane}}class _4t extends bRe{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||(Xb(e.type)&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return typeof e=="string"?ye.fromHex(e):t.getColor(e.id)}}class r0{static from(e){return e instanceof r0?e:new r0(e)}constructor(e){this.content=e.content||"",this.tokens=e.tokens??null,this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class qt{static register(e){return new qt(e)}static createDynamic(e){return new qt(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?gf(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?gf(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.lineHeight=e.lineHeight?Math.min(e.lineHeight,p4t):null,this.fontSize=e.fontSize||null,this.affectsFont=!!e.fontSize||!!e.fontFamily||!!e.fontWeight||!!e.fontStyle,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new x4t(e.overviewRuler):null,this.minimap=e.minimap?new _4t(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new v4t(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?gf(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?gf(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?gf(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?DEt(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?gf(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?gf(e.marginClassName):null,this.inlineClassName=e.inlineClassName?gf(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?gf(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?gf(e.afterContentClassName):null,this.after=e.after?r0.from(e.after):null,this.before=e.before?r0.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1,this.textDirection=e.textDirection??null}}qt.EMPTY=qt.register({description:"empty"});const d_e=[qt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),qt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),qt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),qt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function u_e(i){return i instanceof qt?i:qt.createDynamic(i)}class h_e{static toKey(e){return`${e.ownerId};${e.decorationId};${e.lineNumber}`}constructor(e,t,n,s){this.ownerId=e,this.decorationId=t,this.lineNumber=n,this.lineHeight=s}}class g_e{static toKey(e){return`${e.ownerId};${e.decorationId};${e.lineNumber}`}constructor(e,t,n){this.ownerId=e,this.decorationId=t,this.lineNumber=n}}class y4t extends se{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new ie),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._affectedLineHeights=null,this._affectedFontLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e,t,n;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(e=this._affectedInjectedTextLines)==null||e.clear(),this._affectedInjectedTextLines=null,(t=this._affectedLineHeights)==null||t.clear(),this._affectedLineHeights=null,(n=this._affectedFontLines)==null||n.clear(),this._affectedFontLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}recordLineAffectedByLineHeightChange(e,t,n,s){this._affectedLineHeights||(this._affectedLineHeights=new a_e([],h_e.toKey)),this._affectedLineHeights.add(new h_e(e,t,n,s))}recordLineAffectedByFontChange(e,t,n){this._affectedFontLines||(this._affectedFontLines=new a_e([],g_e.toKey)),this._affectedFontLines.add(new g_e(e,t,n))}checkAffectedAndFire(e){var t,n;this._affectsMinimap||(this._affectsMinimap=!!((t=e.minimap)!=null&&t.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!((n=e.overviewRuler)!=null&&n.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!e.lineNumberClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines,this._affectedLineHeights,this._affectedFontLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class w4t extends se{constructor(){super(),this._fastEmitter=this._register(new ie),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new ie),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}const lt=ln("ILanguageFeaturesService");class hae{static create(e){return new hae(e.get(151),e.get(150))}constructor(e,t){this.classifier=new C4t(e,t)}createLineBreaksComputer(e,t,n,s,r,o){const a=[],l=[],c=[];return{addRequest:(u,h,g)=>{a.push(u),l.push(h),c.push(g)},finalize:()=>{const u=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,h=[];for(let g=0,f=a.length;g=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let uX=[],hX=[];function S4t(i,e,t,n,s,r,o,a){if(s===-1)return null;const l=t.length;if(l<=1)return null;const c=a==="keepAll",u=e.breakOffsets,h=e.breakOffsetsVisibleColumn,g=xRe(t,n,s,r,o),f=s-g,m=uX,x=hX;let v=0,_=0,w=0,k=s;const C=u.length;let E=0;if(E>=0){let D=Math.abs(h[E]-k);for(;E+1=D)break;D=T,E++}}for(;ED&&(D=_,T=w);let I=0,R=0,P=0,j=0;if(T<=k){let H=T,$=D===0?0:t.charCodeAt(D-1),q=D===0?0:i.get($),V=!0;for(let X=D;X_&&gX($,q,ne,W,c)&&(I=ae,R=H),H+=Y,H>k){ae>_?(P=ae,j=H-Y):(P=X+1,j=H),H-R>f&&(I=0),V=!1;break}$=ne,q=W}if(V){v>0&&(m[v]=u[u.length-1],x[v]=h[u.length-1],v++);break}}if(I===0){let H=T,$=t.charCodeAt(D),q=i.get($),V=!1;for(let X=D-1;X>=_;X--){const ae=X+1,ne=t.charCodeAt(X);if(ne===9){V=!0;break}let W,Y;if(Q_(ne)?(X--,W=0,Y=2):(W=i.get(ne),Y=$b(ne)?r:1),H<=k){if(P===0&&(P=ae,j=H),H<=k-f)break;if(gX(ne,W,$,q,c)){I=ae,R=H;break}}H-=Y,$=ne,q=W}if(I!==0){const X=f-(j-R);if(X<=n){const ae=t.charCodeAt(P);let ne;eo(ae)?ne=2:ne=PA(ae,j,n,r),X-ne<0&&(I=0)}}if(V){E--;continue}}if(I===0&&(I=P,R=j),I<=_){const H=t.charCodeAt(_);eo(H)?(I=_+2,R=w+2):(I=_+1,R=w+PA(H,w,n,r))}for(_=I,m[v]=I,w=R,x[v]=R,v++,k=R+f;E<0||E=B)break;B=H,E++}}return v===0?null:(m.length=v,x.length=v,uX=e.breakOffsets,hX=e.breakOffsetsVisibleColumn,e.breakOffsets=m,e.breakOffsetsVisibleColumn=x,e.wrappedTextIndentLength=g,e)}function k4t(i,e,t,n,s,r,o,a,l){const c=qg.applyInjectedText(e,t);let u,h;if(t&&t.length>0?(u=t.map(P=>P.options),h=t.map(P=>P.column-1)):(u=null,h=null),s===-1)return u?new DA(h,u,[c.length],[],0):null;const g=c.length;if(g<=1)return u?new DA(h,u,[c.length],[],0):null;const f=a==="keepAll",m=xRe(c,n,s,r,o),x=s-m,v=[],_=[];let w=0,k=0,C=0,E=s,D=c.charCodeAt(0),T=i.get(D),I=PA(D,0,n,r),R=1;eo(D)&&(I+=1,D=c.charCodeAt(1),T=i.get(D),R++);for(let P=R;PE||q)&&((k===0||I-C>x)&&(k=j,C=I-$),v[w]=k,_[w]=C,w++,E=C+x,k=0),D=B,T=H}return w===0&&(!t||t.length===0)?null:(v[w]=g,_[w]=I,new DA(h,u,v,_,m))}function PA(i,e,t,n){return i===9?t-e%t:$b(i)||i<32?n:1}function f_e(i,e){return e-i%e}function N4t(i,e){if(e>=2&&i.charAt(e-1)==="n"){let t=0;for(let n=e-2;n>=0;n--)if(i.charAt(n)==="\\")t++;else return t%2===1}return!1}function gX(i,e,t,n,s){return t!==32&&(e===2&&n!==2||e!==1&&n===1||!s&&e===3&&n!==2||!s&&n===3&&e!==1)}function xRe(i,e,t,n,s){let r=0;if(s!==0){const o=dl(i);if(o!==-1){for(let l=0;lt&&(r=0)}}return r}class y6{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new Uo(new z(1,1,1,1),0,0,new te(1,1),0),new Uo(new z(1,1,1,1),0,0,new te(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Wn(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?st.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):st.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,n){this._setState(e,t,n)}static _validatePositionWithCache(e,t,n,s){return t.equals(n)?s:e.normalizePosition(t,2)}static _validateViewState(e,t){const n=t.position,s=t.selectionStart.getStartPosition(),r=t.selectionStart.getEndPosition(),o=e.normalizePosition(n,2),a=this._validatePositionWithCache(e,s,n,o),l=this._validatePositionWithCache(e,r,s,a);return n.equals(o)&&s.equals(a)&&r.equals(l)?t:new Uo(z.fromPositions(a,l),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+s.column-a.column,o,t.leftoverVisibleColumns+n.column-o.column)}_setState(e,t,n){if(n&&(n=y6._validateViewState(e.viewModel,n)),t){const s=e.model.validateRange(t.selectionStart),r=t.selectionStart.equalsRange(s)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),a=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new Uo(s,t.selectionStartKind,r,o,a)}else{if(!n)return;const s=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),r=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new Uo(s,n.selectionStartKind,n.selectionStartLeftoverVisibleColumns,r,n.leftoverVisibleColumns)}if(n){const s=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),r=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new Uo(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}else{const s=e.coordinatesConverter.convertModelPositionToViewPosition(new te(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),r=e.coordinatesConverter.convertModelPositionToViewPosition(new te(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new z(s.lineNumber,s.column,r.lineNumber,r.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new Uo(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}class p_e{constructor(e){this.context=e,this.cursors=[new y6(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return E2e(this.cursors,_a(e=>e.viewState.position,te.compare)).viewState.position}getBottomMostViewPosition(){return N2e(this.cursors,_a(e=>e.viewState.position,te.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(Wn.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){e!==null&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,n=e.length;if(tn){const s=t-n;for(let r=0;r=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(this.cursors.length===1)return;const e=this.cursors.slice(0),t=[];for(let n=0,s=e.length;nn.selection,z.compareRangesUsingStarts));for(let n=0;nh&&x.index--;e.splice(h,1),t.splice(u,1),this._removeSecondaryCursor(h-1),n--}}}}class m_e{constructor(e,t,n,s){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=n,this.cursorConfig=s}}class E4t{constructor(){this.type=0}}class L4t{constructor(){this.type=1}}class D4t{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class T4t{constructor(e,t,n){this.selections=e,this.modelSelections=t,this.reason=n,this.type=3}}class cy{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class M3{constructor(){this.type=5}}class I4t{constructor(e){this.type=6,this.isFocused=e}}class A4t{constructor(){this.type=7}}class P3{constructor(){this.type=8}}class vRe{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class fX{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class pX{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class OA{constructor(e,t,n,s,r,o,a){this.source=e,this.minimalReveal=t,this.range=n,this.selections=s,this.verticalType=r,this.revealHorizontal=o,this.scrollType=a,this.type=12}}class R4t{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class M4t{constructor(e){this.theme=e,this.type=14}}class P4t{constructor(e){this.type=15,this.ranges=e}}class O4t{constructor(){this.type=16}}let j4t=class{constructor(){this.type=17}};class F4t extends se{constructor(){super(),this._onEvent=this._register(new ie),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const n of t)n.handleEvents(e)}}}class B4t{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class gae{constructor(e,t,n,s){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=n,this.contentHeight=s,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new gae(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class dW{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new dW(this.oldHasFocus,e.hasFocus)}}class H4t{constructor(e,t){this.kind=2,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new dW(this.oldHasFocus,e.hasFocus)}}class fae{constructor(e,t,n,s,r,o,a,l){this.kind=3,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=n,this._oldScrollTop=s,this.scrollWidth=r,this.scrollLeft=o,this.scrollHeight=a,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new fae(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class W4t{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class V4t{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class w6{constructor(e,t,n,s,r,o,a){this.kind=7,this.oldSelections=e,this.selections=t,this.oldModelVersionId=n,this.modelVersionId=s,this.source=r,this.reason=o,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const n=e.length,s=t.length;if(n!==s)return!1;for(let r=0;r0){const e=this._cursors.getSelections();for(let t=0;to&&(s=s.slice(0,o),r=!0);const a=jA.from(this._model,this);return this._cursors.setStates(s),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,n,a,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,n,s,r,o){const a=this._cursors.getViewPositions();let l=null,c=null;a.length>1?c=this._cursors.getViewSelections():l=z.fromPositions(a[0],a[0]),e.emitViewEvent(new OA(t,n,l,c,s,r,o))}revealPrimary(e,t,n,s,r,o){const l=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new OA(t,n,null,l,s,r,o))}saveState(){const e=[],t=this._cursors.getSelections();for(let n=0,s=t.length;n0){const r=Wn.fromModelSelections(n.resultingSelection);this.setStates(e,"modelChange",n.isUndoing?5:n.isRedoing?6:2,r)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const r=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Wn.fromModelSelections(r))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,n)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,n,s){this.setStates(e,t,s,Wn.fromModelSelections(n))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const n=[],s=[];for(let a=0,l=e.length;a0&&this._pushAutoClosedAction(s,r),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,n,s,r){const o=jA.from(this._model,this);if(o.equals(s))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new T4t(l,a,n)),!s||s.cursorState.length!==o.cursorState.length||o.cursorState.some((c,u)=>!c.modelState.equals(s.cursorState[u].modelState))){const c=s?s.cursorState.map(h=>h.modelState.selection):null,u=s?s.modelVersionId:0;e.emitOutgoingEvent(new w6(c,a,u,o.modelVersionId,t||"keyboard",n,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let n=0,s=e.length;n=0)return null;const o=r.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const a=o[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,u=r.text.length-o[2].length-1,h=r.text.lastIndexOf(c,u-1);if(h===-1)return null;t.push([h,u])}return t}executeEdits(e,t,n,s,r){let o=null;t==="snippet"&&(o=this._findAutoClosingPairs(n)),o&&(n[0]._isTracked=!0);const a=[],l=[],c=this._model.pushEditOperations(this.getSelections(),n,u=>{if(o)for(let g=0,f=o.length;g0&&this._pushAutoClosedAction(a,l)}_executeEdit(e,t,n,s=0){if(this.context.cursorConfig.readOnly)return;const r=jA.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){zt(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,s,r,!1)&&this.revealAll(t,n,!1,0,!0,0)}getAutoClosedCharacters(){return b_e.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new FA(this._model,this.getSelections())}endComposition(e,t){const n=Aa.cursor({kind:"compositionEnd",detailedSource:t}),s=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{t==="keyboard"&&this._executeEditOperation(Cv.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,s,this.getSelections(),this.getAutoClosedCharacters()),n)},e,t)}type(e,t,n){const s=Aa.cursor({kind:"type",detailedSource:n});this._executeEdit(()=>{if(n==="keyboard"){const r=t.length;let o=0;for(;o{const u=c.getPosition();return new st(u.lineNumber,u.column+r,u.lineNumber,u.column+r)});this.setSelections(e,o,l,0)}return}this._executeEdit(()=>{this._executeEditOperation(Cv.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,n,s,r),a)},e,o)}paste(e,t,n,s,r){const o=Aa.cursor({kind:"paste",detailedSource:r});this._executeEdit(()=>{this._executeEditOperation(Cv.paste(this.context.cursorConfig,this._model,this.getSelections(),t,n,s||[]),o)},e,r,4)}cut(e,t){const n=Aa.cursor({kind:"cut",detailedSource:t});this._executeEdit(()=>{this._executeEditOperation(pC.cut(this.context.cursorConfig,this._model,this.getSelections()),n)},e,t)}executeCommand(e,t,n){const s=Aa.cursor({kind:"executeCommand",detailedSource:n});this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new Kl(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),s)},e,n)}executeCommands(e,t,n){const s=Aa.cursor({kind:"executeCommands",detailedSource:n});this._executeEdit(()=>{this._executeEditOperation(new Kl(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),s)},e,n)}}class jA{static from(e,t){return new jA(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,n=this.cursorState.length;t=t.length||!t[n].strictContainsRange(e[n]))return!1;return!0}}class J4t{static executeCommands(e,t,n,s=Aa.unknown({name:"executeCommands"})){const r={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(r,n,s);for(let a=0,l=r.trackedRanges.length;a0&&(a[0]._isTracked=!0);let l=e.model.pushEditOperations(e.selectionsBefore,a,u=>{const h=[];for(let m=0;mm.identifier.minor-x.identifier.minor,f=[];for(let m=0;m0?(h[m].sort(g),f[m]=t[m].computeCursorState(e.model,{getInverseEditOperations:()=>h[m],getTrackedSelection:x=>{const v=parseInt(x,10),_=e.model._getTrackedRange(e.trackedRanges[v]);return e.trackedRangesDirection[v]===0?new st(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn):new st(_.endLineNumber,_.endColumn,_.startLineNumber,_.startColumn)}})):f[m]=e.selectionsBefore[m];return f},void 0,n);l||(l=e.selectionsBefore);const c=[];for(const u in o)o.hasOwnProperty(u)&&c.push(parseInt(u,10));c.sort((u,h)=>h-u);for(const u of c)l.splice(u,1);return l}static _arrayIsEmpty(e){for(let t=0,n=e.length;t{z.isEmpty(h)&&g===""||s.push({identifier:{major:t,minor:r++},range:h,text:g,forceMoveMarkers:f,isAutoWhitespaceEdit:n.insertsAutoWhitespace})};let a=!1;const u={addEditOperation:o,addTrackedEditOperation:(h,g,f)=>{a=!0,o(h,g,f)},trackSelection:(h,g)=>{const f=st.liftSelection(h);let m;if(f.isEmpty())if(typeof g=="boolean")g?m=2:m=3;else{const _=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===_?m=2:m=3}else m=1;const x=e.trackedRanges.length,v=e.model._setTrackedRange(null,f,m);return e.trackedRanges[x]=v,e.trackedRangesDirection[x]=f.getDirection(),x.toString()}};try{n.getEditOperations(e.model,u)}catch(h){return zt(h),{operations:[],hadTrackedEditOperation:!1}}return{operations:s,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((n,s)=>-z.compareRangesUsingEnds(n.range,s.range));const t={};for(let n=1;nr.identifier.major?o=s.identifier.major:o=r.identifier.major,t[o.toString()]=!0;for(let a=0;a0&&n--}}return t}}class ejt{constructor(e,t,n,s){this.text=e,this.lineNumber=t,this.startSelectionOffset=n,this.endSelectionOffset=s}}class FA{static _capture(e,t){const n=[];for(const s of t){if(s.startLineNumber!==s.endLineNumber)return null;const r=s.startLineNumber;n.push(new ejt(e.getLineContent(r),r,s.startColumn-1,s.endColumn-1))}return n}constructor(e,t){this._original=FA._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const n=FA._capture(e,t);if(!n||this._original.length!==n.length)return null;const s=[];for(let r=0,o=this._original.length;rAL,tokenizeEncoded:(i,e,t)=>cW(0,t)};async function tjt(i,e,t){if(!t)return v_e(e,i.languageIdCodec,x_e);const n=await Gs.getOrCreate(t);return v_e(e,i.languageIdCodec,n||x_e)}function njt(i,e,t,n,s,r,o){let a="
",l=0,c=0,u=!0;for(let h=0,g=e.getCount();h0;)o&&u?(m+=" ",u=!1):(m+=" ",u=!0),k--;break}case 60:m+="<",u=!1;break;case 62:m+=">",u=!1;break;case 38:m+="&",u=!1;break;case 0:m+="�",u=!1;break;case 65279:case 8232:case 8233:case 133:m+="�",u=!1;break;case 13:m+="​",u=!1;break;case 32:o&&u?(m+=" ",u=!1):(m+=" ",u=!0);break;default:m+=String.fromCharCode(x),u=!1}}if(!(f<=n)&&(a+=`${m}`,f>s||l>=s||n>=s))break}return a+="
",a}function v_e(i,e,t){let n='
';const s=Xc(i);let r=t.getInitialState();for(let o=0,a=s.length;o0&&(n+="
");const c=t.tokenizeEncoded(l,!0,r);hr.convertToEndOffset(c.tokens,l.length);const h=new hr(c.tokens,l,e).inflate();let g=0;for(let f=0,m=h.getCount();f${Ph(l.substring(g,v))}`,g=v}r=c.endState}return n+="
",n}class ijt{constructor(e,t,n,s,r){this.decorationId=e,this.index=t,this.lineNumber=n,this.specialHeight=s,this.prefixSum=r,this.maximumSpecialHeight=s,this.deleted=!1}}class __e{constructor(e,t){if(this._decorationIDToCustomLine=new uq,this._orderedCustomLines=[],this._pendingSpecialLinesToInsert=[],this._invalidIndex=0,this._hasPending=!1,this._defaultLineHeight=e,t.length>0){for(const n of t)this.insertOrChangeCustomLineHeight(n.decorationId,n.startLineNumber,n.endLineNumber,n.lineHeight);this.commit()}}set defaultLineHeight(e){this._defaultLineHeight=e}get defaultLineHeight(){return this._defaultLineHeight}removeCustomLineHeight(e){const t=this._decorationIDToCustomLine.get(e);if(t){this._decorationIDToCustomLine.delete(e);for(const n of t)n.deleted=!0,this._invalidIndex=Math.min(this._invalidIndex,n.index);this._hasPending=!0}}insertOrChangeCustomLineHeight(e,t,n,s){this.removeCustomLineHeight(e);for(let r=t;r<=n;r++){const o=new ijt(e,-1,r,s,0);this._pendingSpecialLinesToInsert.push(o)}this._hasPending=!0}heightForLineNumber(e){const t=this._binarySearchOverOrderedCustomLinesArray(e);return t>=0?this._orderedCustomLines[t].maximumSpecialHeight:this._defaultLineHeight}getAccumulatedLineHeightsIncludingLineNumber(e){const t=this._binarySearchOverOrderedCustomLinesArray(e);if(t>=0)return this._orderedCustomLines[t].prefixSum+this._orderedCustomLines[t].maximumSpecialHeight;if(t===-1)return this._defaultLineHeight*e;const n=-(t+1),s=this._orderedCustomLines[n-1];return s.prefixSum+s.maximumSpecialHeight+this._defaultLineHeight*(e-s.lineNumber)}onLinesDeleted(e,t){const n=t-e+1,s=this._orderedCustomLines.length,r=this._binarySearchOverOrderedCustomLinesArray(e);let o;if(r>=0){o=r;for(let h=r-1;h>=0&&this._orderedCustomLines[h].lineNumber===e;h--)o--}else o=r===-(s+1)&&r!==-1?s-1:-(r+1);const a=this._binarySearchOverOrderedCustomLinesArray(t);let l;if(a>=0){l=a;for(let h=a+1;ho,u=l===o&&this._orderedCustomLines[o]&&this._orderedCustomLines[o].lineNumber>=e&&this._orderedCustomLines[o].lineNumber<=t;if(c||u){let h=0;for(let D=o;D<=l;D++)h=Math.max(h,this._orderedCustomLines[D].maximumSpecialHeight);let g=0;if(o>0){const D=this._orderedCustomLines[o-1];g=D.prefixSum+D.maximumSpecialHeight+this._defaultLineHeight*(e-D.lineNumber-1)}else g=e>0?(e-1)*this._defaultLineHeight:0;const f=this._orderedCustomLines[o],m=this._orderedCustomLines[l],x=this._orderedCustomLines[l+1],v=x&&x.lineNumber===t+1?x.maximumSpecialHeight:this._defaultLineHeight,_=m.prefixSum+m.maximumSpecialHeight-f.prefixSum+this._defaultLineHeight*(t-m.lineNumber)+this._defaultLineHeight*(f.lineNumber-e)+v-h,w=new Set,k=[],C=new uq;let E=0;for(let D=0;D=o&&D<=l){const I=T.decorationId;w.has(I)?E++:(T.index-=E,T.lineNumber=e,T.prefixSum=g,T.maximumSpecialHeight=h,k.push(T),C.add(T.decorationId,T))}else D>l&&(T.index-=E,T.lineNumber-=n,T.prefixSum-=_,k.push(T),C.add(T.decorationId,T));w.add(T.decorationId)}this._orderedCustomLines=k,this._decorationIDToCustomLine=C}else{const h=n*this._defaultLineHeight;for(let g=l;gt&&(f.lineNumber-=n,f.prefixSum-=h)}}}onLinesInserted(e,t){const n=t-e+1,s=this._binarySearchOverOrderedCustomLinesArray(e);let r;if(s>=0){r=s;for(let u=s-1;u>=0&&this._orderedCustomLines[u].lineNumber===e;u--)r--}else r=-(s+1);const o=[],a=new Set;for(let u=r;u=0;u--)this._orderedCustomLines[u].lineNumber===e-1&&l.add(this._orderedCustomLines[u].decorationId);const c=mRe(l,a);for(let u=r;u0){for(const u of c){const h=this._decorationIDToCustomLine.get(u);if(h){const g=h.reduce((x,v)=>Math.min(x,v.lineNumber),e),f=h.reduce((x,v)=>Math.max(x,v.lineNumber),e),m=h.reduce((x,v)=>Math.max(x,v.specialHeight),0);o.push({decorationId:u,startLineNumber:g,endLineNumber:f,lineHeight:m})}}for(const u of o)this.insertOrChangeCustomLineHeight(u.decorationId,u.startLineNumber,u.endLineNumber,u.lineHeight);this.commit()}}commit(){if(!this._hasPending)return;for(const r of this._pendingSpecialLinesToInsert){const o=this._binarySearchOverOrderedCustomLinesArray(r.lineNumber),a=o>=0?o:-(o+1);this._orderedCustomLines.splice(a,0,r),this._invalidIndex=Math.min(this._invalidIndex,a)}this._pendingSpecialLinesToInsert=[];const e=new uq,t=[];for(let r=0;r0?t[this._invalidIndex-1]:void 0;for(let r=this._invalidIndex;r{const n=this._orderedCustomLines[t];return n.lineNumber===e?0:n.lineNumber>>1;t===e[o].afterLineNumber?n{t=!0,this._lineHeightsManager.insertOrChangeCustomLineHeight(s,r,o,a)},removeCustomLineHeight:s=>{t=!0,this._lineHeightsManager.removeCustomLineHeight(s)}})}finally{this._lineHeightsManager.commit()}return t}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(s,r,o,a)=>{t=!0,s=s|0,r=r|0,o=o|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new rjt(l,s,r,o,a)),l},changeOneWhitespace:(s,r,o)=>{t=!0,r=r|0,o=o|0,this._pendingChanges.change({id:s,newAfterLineNumber:r,newHeight:o})},removeWhitespace:s=>{t=!0,this._pendingChanges.remove({id:s})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){for(const l of e)this._insertWhitespace(l);for(const l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of n){const c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}const s=new Set;for(const l of n)s.add(l.id);const r=new Map;for(const l of t)r.set(l.id,l);const o=l=>{const c=[];for(const u of l)if(!s.has(u.id)){if(r.has(u.id)){const h=r.get(u.id);u.afterLineNumber=h.newAfterLineNumber,u.height=h.newHeight}c.push(u)}return c},a=o(this._arr).concat(o(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_insertWhitespace(e){const t=k_.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let n=0,s=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}this._lineHeightsManager.onLinesDeleted(e,t)}onLinesInserted(e,t){e=e|0,t=t|0,this._lineCount+=t-e+1;for(let n=0,s=this._arr.length;n=t.length||t[a+1].afterLineNumber>=e)return a;n=a+1|0}else s=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const n=this._findLastWhitespaceBeforeLineNumber(e)+1;return n1?n=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(e-1):n=0;const s=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0));return n+s+this._paddingTop}getLineHeightForLineNumber(e){return this._lineHeightsManager.heightForLineNumber(e)}getVerticalOffsetAfterLineNumber(e,t=!1){e=e|0;const n=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(e),s=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0));return n+s+this._paddingTop}getWhitespaceMinWidth(){if(this._minWidth===-1){let e=0;for(let t=0,n=this._arr.length;tt}isInTopPadding(e){return this._paddingTop===0?!1:e=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(e=e|0,e<0)return 1;const t=this._lineCount|0;let n=1,s=t;for(;n=a+o)n=r+1;else{if(e>=a)return r;s=r}}return n>t?t:n}getLinesViewportData(e,t){e=e|0,t=t|0;const n=this.getLineNumberAtOrAfterVerticalOffset(e)|0,s=this.getVerticalOffsetForLineNumber(n)|0;let r=this._lineCount|0,o=this.getFirstWhitespaceIndexAfterLineNumber(n)|0;const a=this.getWhitespacesCount()|0;let l,c;o===-1?(o=a,c=r+1,l=0):(c=this.getAfterLineNumberForWhitespaceIndex(o)|0,l=this.getHeightForWhitespaceIndex(o)|0);let u=s,h=u;const g=5e5;let f=0;s>=g&&(f=Math.floor(s/g)*g,f=Math.floor(f/this._lineHeightsManager.defaultLineHeight)*this._lineHeightsManager.defaultLineHeight,h-=f);const m=[],x=e+(t-e)/2;let v=-1;for(let C=n;C<=r;C++){const E=this.getLineHeightForLineNumber(C);if(v===-1){const D=u,T=u+E;(D<=x&&xx)&&(v=C)}for(u+=E,m[C-n]=h,h+=E;c===C;)h+=l,u+=l,o++,o>=a?c=r+1:(c=this.getAfterLineNumberForWhitespaceIndex(o)|0,l=this.getHeightForWhitespaceIndex(o)|0);if(u>=t){r=C;break}}v===-1&&(v=r);const _=this.getVerticalOffsetForLineNumber(r)|0;let w=n,k=r;if(wt&&k--}return{bigNumbersDelta:f,startLineNumber:n,endLineNumber:r,relativeVerticalOffset:m,centeredLineNumber:v,completelyVisibleStartLineNumber:w,completelyVisibleEndLineNumber:k,lineHeight:this._lineHeightsManager.defaultLineHeight}}getVerticalOffsetForWhitespaceIndex(e){e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let n;t>=1?n=this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(t):n=0;let s;return e>0?s=this.getWhitespacesAccumulatedHeight(e-1):s=0,n+s+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){e=e|0;let t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;const s=this.getVerticalOffsetForWhitespaceIndex(n),r=this.getHeightForWhitespaceIndex(n);if(e>=s+r)return-1;for(;t=a+l)t=o+1;else{if(e>=a)return o;n=o}}return t}getWhitespaceAtVerticalOffset(e){e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;const s=this.getHeightForWhitespaceIndex(t),r=this.getIdForWhitespaceIndex(t),o=this.getAfterLineNumberForWhitespaceIndex(t);return{id:r,afterLineNumber:o,verticalOffset:n,height:s}}getWhitespaceViewportData(e,t){e=e|0,t=t|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),s=this.getWhitespacesCount()-1;if(n<0)return[];const r=[];for(let o=n;o<=s;o++){const a=this.getVerticalOffsetForWhitespaceIndex(o),l=this.getHeightForWhitespaceIndex(o);if(a>=t)break;r.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:a,height:l})}return r}getWhitespaces(){return this._arr.slice(0)}getWhitespacesCount(){return this._arr.length}getIdForWhitespaceIndex(e){return e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return e=e|0,this._arr[e].height}},k_.INSTANCE_COUNT=0,k_);const ajt=125;class qI{constructor(e,t,n,s){e=e|0,t=t|0,n=n|0,s=s|0,e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),s<0&&(s=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=n,this.contentHeight=s,this.scrollHeight=Math.max(n,s)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class ljt extends se{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new ie),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new qI(0,0,0,0),this._scrollable=this._register(new OD({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const n=t.contentWidth!==e.contentWidth,s=t.contentHeight!==e.contentHeight;(n||s)&&this._onDidContentSizeChange.fire(new gae(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class cjt extends se{constructor(e,t,n,s){super(),this._configuration=e;const r=this._configuration.options,o=r.get(165),a=r.get(96);this._linesLayout=new ojt(t,r.get(75),a.top,a.bottom,n),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new ljt(0,s)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new qI(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(130)?ajt:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(75)&&this._linesLayout.setDefaultLineHeight(t.get(75)),e.hasChanged(96)){const n=t.get(96);this._linesLayout.setPadding(n.top,n.bottom)}if(e.hasChanged(165)){const n=t.get(165),s=n.contentWidth,r=n.height,o=this._scrollable.getScrollDimensions(),a=o.contentWidth;this._scrollable.setScrollDimensions(new qI(s,o.contentWidth,r,this._getContentHeight(s,r,a)))}else this._updateHeight();e.hasChanged(130)&&this._configureSmoothScrollDuration()}onFlushed(e,t){this._linesLayout.onFlushed(e,t)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const s=this._configuration.options.get(117);return s.horizontal===2||e>=t?0:s.horizontalScrollbarSize}_getContentHeight(e,t,n){const s=this._configuration.options;let r=this._linesLayout.getLinesTotalHeight();return s.get(119)?r+=Math.max(0,t-s.get(75)-s.get(96).bottom):s.get(117).ignoreHorizontalScrollbarInContentHeight||(r+=this._getHorizontalScrollbarHeight(e,n)),r}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,s=e.contentWidth;this._scrollable.setScrollDimensions(new qI(t,e.contentWidth,n,this._getContentHeight(t,n,s)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new _ve(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new _ve(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,n=e.get(166),s=e.get(59),r=e.get(165);if(n.isViewportWrapping){const o=e.get(81);return t>r.contentWidth+s.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?t+r.verticalScrollbarWidth:t}else{const o=e.get(118)*s.typicalHalfwidthCharacterWidth,a=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+o+r.verticalScrollbarWidth,a,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new qI(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),s=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n);return{scrollTop:t,scrollTopWithoutViewZones:t-s,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}changeSpecialLineHeights(e){const t=this._linesLayout.changeLineHeights(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}getLineHeightForLineNumber(e){return this._linesLayout.getLineHeightForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}class Q1{constructor(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}}class djt{constructor(e,t,n,s){this.startOffset=e,this.endOffset=t,this.inlineClassName=n,this.inlineClassNameAffectsLetterSpacing=s}toInlineDecoration(e){return new Q1(new z(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class ujt{constructor(e,t,n,s,r){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=s,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let n=this._decorationsCache[t];if(!n){const s=e.range,r=e.options;let o;if(r.isWholeLine){const a=this._coordinatesConverter.convertModelPositionToViewPosition(new te(s.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new te(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)),1);o=new z(a.lineNumber,a.column,l.lineNumber,l.column)}else o=this._coordinatesConverter.convertModelRangeToViewRange(s,1);n=new I2e(o,r),this._decorationsCache[t]=n}return n}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getDecorationsOnLine(e,t=!1,n=!1){const s=new z(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(s,t,n)}_getDecorationsInRange(e,t,n){const s=this._linesCollection.getDecorationsInRange(e,this.editorId,KF(this.configuration.options),GF(this.configuration.options),t,n),r=e.startLineNumber,o=e.endLineNumber,a=[];let l=0;const c=[];for(let h=r;h<=o;h++)c[h-r]=[];let u=!1;for(let h=0,g=s.length;h0?this._projectionData.breakOffsets[n-1]:0,r=this._projectionData.breakOffsets[n];let o;if(this._projectionData.injectionOffsets!==null){const a=this._projectionData.injectionOffsets.map((c,u)=>new qg(0,0,c+1,this._projectionData.injectionOptions[u],0));o=qg.applyInjectedText(e.getLineContent(t),a).substring(s,r)}else o=e.getValueInRange({startLineNumber:t,startColumn:s+1,endLineNumber:t,endColumn:r+1});return n>0&&(o=y_e(this._projectionData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,n){return this._assertVisible(),this._projectionData.getLineLength(n)}getViewLineMinColumn(e,t,n){return this._assertVisible(),this._projectionData.getMinOutputOffset(n)+1}getViewLineMaxColumn(e,t,n){return this._assertVisible(),this._projectionData.getMaxOutputOffset(n)+1}getViewLineData(e,t,n){const s=new Array;return this.getViewLinesData(e,t,n,1,0,[!0],s),s[0]}getViewLinesData(e,t,n,s,r,o,a){this._assertVisible();const l=this._projectionData,c=l.injectionOffsets,u=l.injectionOptions;let h=null;if(c){h=[];let f=0,m=0;for(let x=0;x0?l.breakOffsets[x-1]:0,w=l.breakOffsets[x];for(;mw)break;if(_0?l.wrappedTextIndentLength:0,I=T+Math.max(C-_,0),R=T+Math.min(E-_,w-_);I!==R&&v.push(new djt(I,R,D.inlineClassName,D.inlineClassNameAffectsLetterSpacing))}}if(E<=w)f+=k,m++;else break}}}let g;if(c){const f=[];for(let m=0;m{f.push({offset:x,text:_.substring(u[m].content),tokenMetadata:w.metadata})}):f.push({offset:x,text:u[m].content,tokenMetadata:hr.defaultTokenMetadata})}g=e.tokenization.getLineTokens(t).withInserted(f)}else g=e.tokenization.getLineTokens(t);for(let f=n;f0?s.wrappedTextIndentLength:0,o=n>0?s.breakOffsets[n-1]:0,a=s.breakOffsets[n],l=e.sliceAndInflate(o,a,r);let c=l.getLineContent();n>0&&(c=y_e(s.wrappedTextIndentLength)+c);const u=this._projectionData.getMinOutputOffset(n)+1,h=c.length+1,g=n+1=gq.length)for(let e=1;e<=i;e++)gq[e]=gjt(e);return gq[i]}function gjt(i){return new Array(i+1).join(" ")}class fjt{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=xk(e);const n=this.values,s=this.prefixSum,r=t.length;return r===0?!1:(this.values=new Uint32Array(n.length+r),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=xk(e),t=xk(t),this.values[e]===t?!1:(this.values[e]=t,e-1=n.length)return!1;const r=n.length-e;return t>=r&&(t=r),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=xk(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,s=0,r=0,o=0;for(;t<=n;)if(s=t+(n-t)/2|0,r=this.prefixSum[s],o=r-this.values[s],e=r)t=s+1;else break;return new _Re(s,e-o)}}class pjt{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),e===0?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],n=t>0?this._prefixSum[t-1]:0;return new _Re(t,e-n)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=y7(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=s+n;for(let r=0;rt)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class bjt{constructor(e,t,n,s,r,o,a,l,c,u,h){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=s,this.fontInfo=r,this.tabSize=o,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this.wordBreak=u,this.wrapOnEscapedLineFeeds=h,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new vjt(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const n=this.model.getLinesContent(),s=this.model.getInjectedTextDecorations(this._editorId),r=n.length,o=this.createLineBreaksComputer(),a=new Kb(qg.fromDecorations(s));for(let x=0;x_.lineNumber===x+1);o.addRequest(n[x],v,t?t[x]:null)}const l=o.finalize(),c=[],u=this.hiddenAreasDecorationIds.map(x=>this.model.getDecorationRange(x)).sort(z.compareRangesUsingStarts);let h=1,g=0,f=-1,m=f+1=h&&v<=g,w=hq(l[x],!_);c[x]=w.getViewLineCount(),this.modelLineProjections[x]=w}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new pjt(c)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){const t=e.map(g=>this.model.validateRange(g)),n=xjt(t),s=this.hiddenAreasDecorationIds.map(g=>this.model.getDecorationRange(g)).sort(z.compareRangesUsingStarts);if(n.length===s.length){let g=!1;for(let f=0;f({range:g,options:qt.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,r);const o=n;let a=1,l=0,c=-1,u=c+1=a&&f<=l?this.modelLineProjections[g].isVisible()&&(this.modelLineProjections[g]=this.modelLineProjections[g].setVisible(!1),m=!0):(h=!0,this.modelLineProjections[g].isVisible()||(this.modelLineProjections[g]=this.modelLineProjections[g].setVisible(!0),m=!0)),m){const x=this.modelLineProjections[g].getViewLineCount();this.projectedModelLineLineCounts.setValue(g,x)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.modelLineProjections.length?!1:this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,n,s,r){const o=this.fontInfo.equals(e),a=this.wrappingStrategy===t,l=this.wrappingColumn===n,c=this.wrappingIndent===s,u=this.wordBreak===r;if(o&&a&&l&&c&&u)return!1;const h=o&&a&&!l&&c&&u;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=s,this.wordBreak=r;let g=null;if(h){g=[];for(let f=0,m=this.modelLineProjections.length;f2&&!this.modelLineProjections[t-2].isVisible(),o=t===1?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let a=0;const l=[],c=[];for(let u=0,h=s.length;ul?(u=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,h=u+l-1,m=h+1,x=m+(r-l)-1,c=!0):rt?t:e|0}getActiveIndentGuide(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);const s=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),a=this.model.guides.getActiveIndentGuide(s.lineNumber,r.lineNumber,o.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),n=t.index,s=t.remainder;return new w_e(n+1,s)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),s=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new te(e.modelLineNumber,s)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],n=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),s=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,n);return new te(e.modelLineNumber,s)}getViewLineInfosGroupedByModelRanges(e,t){const n=this.getViewLineInfo(e),s=this.getViewLineInfo(t),r=new Array;let o=this.getModelStartPositionOfViewLine(n),a=new Array;for(let l=n.modelLineNumber;l<=s.modelLineNumber;l++){const c=this.modelLineProjections[l-1];if(c.isVisible()){const u=l===n.modelLineNumber?n.modelLineWrappedLineIdx:0,h=l===s.modelLineNumber?s.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let g=u;g{if(f.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesAfterColumn).lineNumber>=u.modelLineWrappedLineIdx||f.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.forWrappedLinesBeforeOrAtColumn).lineNumberu.modelLineWrappedLineIdx)return}const x=this.convertModelPositionToViewPosition(u.modelLineNumber,f.horizontalLine.endColumn),v=this.modelLineProjections[u.modelLineNumber-1].getViewPositionOfModelPosition(0,f.horizontalLine.endColumn);return v.lineNumber===u.modelLineWrappedLineIdx?new v1(f.visibleColumn,m,f.className,new kA(f.horizontalLine.top,x.column),-1,-1):v.lineNumber!!f))}}return o}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let r=[];const o=[],a=[],l=n.lineNumber-1,c=s.lineNumber-1;let u=null;for(let m=l;m<=c;m++){const x=this.modelLineProjections[m];if(x.isVisible()){const v=x.getViewLineNumberOfModelPosition(0,m===l?n.column:1),_=x.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(m+1)),w=_-v+1;let k=0;w>1&&x.getViewLineMinColumn(this.model,m+1,_)===1&&(k=v===0?1:2),o.push(w),a.push(k),u===null&&(u=new te(m+1,0))}else u!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,m)),u=null)}u!==null&&(r=r.concat(this.model.guides.getLinesIndentGuides(u.lineNumber,s.lineNumber)),u=null);const h=t-e+1,g=new Array(h);let f=0;for(let m=0,x=r.length;mt&&(m=!0,f=t-r+1),h.getViewLinesData(this.model,c+1,g,f,r-e,n,l),r+=f,m)break}return l}validateViewPosition(e,t,n){e=this._toValidViewLineNumber(e);const s=this.projectedModelLineLineCounts.getIndexOf(e-1),r=s.index,o=s.remainder,a=this.modelLineProjections[r],l=a.getViewLineMinColumn(this.model,r+1,o),c=a.getViewLineMaxColumn(this.model,r+1,o);tc&&(t=c);const u=a.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new te(r+1,u)).equals(n)?new te(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}validateViewRange(e,t){const n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),s=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new z(n.lineNumber,n.column,s.lineNumber,s.column)}convertViewPositionToModelPosition(e,t){const n=this.getViewLineInfo(e),s=this.modelLineProjections[n.modelLineNumber-1].getModelColumnOfViewPosition(n.modelLineWrappedLineIdx,t);return this.model.validatePosition(new te(n.modelLineNumber,s))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new z(t.lineNumber,t.column,n.lineNumber,n.column)}convertModelPositionToViewPosition(e,t,n=2,s=!1,r=!1){const o=this.model.validatePosition(new te(e,t)),a=o.lineNumber,l=o.column;let c=a-1,u=!1;if(r)for(;c0&&!this.modelLineProjections[c].isVisible();)c--,u=!0;if(c===0&&!this.modelLineProjections[c].isVisible())return new te(s?0:1,1);const h=1+this.projectedModelLineLineCounts.getPrefixSum(c);let g;return u?r?g=this.modelLineProjections[c].getViewPositionOfModelPosition(h,1,n):g=this.modelLineProjections[c].getViewPositionOfModelPosition(h,this.model.getLineMaxColumn(c+1),n):g=this.modelLineProjections[a-1].getViewPositionOfModelPosition(h,l,n),g}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return z.fromPositions(n)}else{const n=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),s=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new z(n.lineNumber,n.column,s.lineNumber,s.column)}}getViewLineNumberOfModelPosition(e,t){let n=e-1;if(this.modelLineProjections[n].isVisible()){const r=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(r,t)}for(;n>0&&!this.modelLineProjections[n].isVisible();)n--;if(n===0&&!this.modelLineProjections[n].isVisible())return 1;const s=1+this.projectedModelLineLineCounts.getPrefixSum(n);return this.modelLineProjections[n].getViewLineNumberOfModelPosition(s,this.model.getLineMaxColumn(n+1))}getDecorationsInRange(e,t,n,s,r,o){const a=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),l=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(l.lineNumber-a.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new z(a.lineNumber,1,l.lineNumber,l.column),t,n,s,r,o);let c=[];const u=a.lineNumber-1,h=l.lineNumber-1;let g=null;for(let v=u;v<=h;v++)if(this.modelLineProjections[v].isVisible())g===null&&(g=new te(v+1,v===u?a.column:1));else if(g!==null){const w=this.model.getLineMaxColumn(v);c=c.concat(this.model.getDecorationsInRange(new z(g.lineNumber,g.column,v,w),t,n,s,r)),g=null}g!==null&&(c=c.concat(this.model.getDecorationsInRange(new z(g.lineNumber,g.column,l.lineNumber,l.column),t,n,s,r)),g=null),c.sort((v,_)=>{const w=z.compareRangesUsingStarts(v.range,_.range);return w===0?v.id<_.id?-1:v.id>_.id?1:0:w});const f=[];let m=0,x=null;for(const v of c){const _=v.id;x!==_&&(x=_,f[m++]=v)}return f}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const n=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[n.modelLineNumber-1].normalizePosition(n.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return t.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(t.modelLineNumber):0}}function xjt(i){if(i.length===0)return[];const e=i.slice();e.sort(z.compareRangesUsingStarts);const t=[];let n=e[0].startLineNumber,s=e[0].endLineNumber;for(let r=1,o=e.length;rs+1?(t.push(new z(n,1,s,1)),n=a.startLineNumber,s=a.endLineNumber):a.endLineNumber>s&&(s=a.endLineNumber)}return t.push(new z(n,1,s,1)),t}class w_e{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class C_e{constructor(e,t){this.modelRange=e,this.viewLines=t}}class vjt{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,n,s){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,n,s)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class _jt{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new mjt(this.model)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,n,s){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,n,s)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,n){return new fX(t,n)}onModelLinesInserted(e,t,n,s){return new pX(t,n)}onModelLineChanged(e,t,n){return[!1,new vRe(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,n){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const n=t-e+1,s=new Array(n);for(let r=0;r>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=pae.create(this.model),this.glyphLanes=new yjt(0),this.model.isTooLargeForTokenization())this._lines=new _jt(this.model);else{const h=this._configuration.options,g=h.get(59),f=h.get(156),m=h.get(166),x=h.get(155),v=h.get(146),_=h.get(160);this._lines=new bjt(this._editorId,this.model,s,r,g,this.model.getOptions().tabSize,f,m.wrappingColumn,x,v,_)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Z4t(n,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new cjt(this._configuration,this.getLineCount(),this._getCustomLineHeights(),o)),this._register(this.viewLayout.onDidScroll(h=>{h.scrollTopChanged&&this._handleVisibleLinesChanged(),h.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new R4t(h)),this._eventDispatcher.emitOutgoingEvent(new fae(h.oldScrollWidth,h.oldScrollLeft,h.oldScrollHeight,h.oldScrollTop,h.scrollWidth,h.scrollLeft,h.scrollHeight,h.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(h=>{this._eventDispatcher.emitOutgoingEvent(h)})),this._decorations=new ujt(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(h=>{try{const g=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(g,h)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(h6.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new O4t)})),this._register(this._themeService.onDidColorThemeChange(h=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new M4t(h))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_getCustomLineHeights(){return this._configuration.options.get(5)?this.model.getCustomLineHeightsDecorations(this._editorId).map(n=>{const s=n.range.startLineNumber,r=this.coordinatesConverter.convertModelRangeToViewRange(new z(s,1,s,this.model.getLineMaxColumn(s)));return{decorationId:n.id,startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,lineHeight:n.options.lineHeight||0}}):[]}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new z(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new I4t(e)),this._eventDispatcher.emitOutgoingEvent(new dW(!e,e))}setHasWidgetFocus(e){this._eventDispatcher.emitOutgoingEvent(new H4t(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new E4t)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new L4t)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new te(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new k_e(t,this._viewportStart.startLineDelta)}return new k_e(null,0)}_onConfigurationChanged(e,t){const n=this._captureStableViewport(),s=this._configuration.options,r=s.get(59),o=s.get(156),a=s.get(166),l=s.get(155),c=s.get(146);this._lines.setWrappingSettings(r,o,a.wrappingColumn,l,c)&&(e.emitViewEvent(new M3),e.emitViewEvent(new P3),e.emitViewEvent(new cy(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(104)&&(this._decorations.reset(),e.emitViewEvent(new cy(null))),t.hasChanged(112)&&(this._decorations.reset(),e.emitViewEvent(new cy(null))),e.emitViewEvent(new D4t(t)),this.viewLayout.onConfigurationChanged(t),n.recoverViewportStart(this.coordinatesConverter,this.viewLayout),bk.shouldRecreate(t)&&(this.cursorConfig=new bk(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(n=>{try{const r=this._eventDispatcher.beginEmitViewEvents();let o=!1,a=!1;const l=n instanceof G1?n.rawContentChangedEvent.changes:n.changes,c=n instanceof G1?n.rawContentChangedEvent.versionId:null,u=this._lines.createLineBreaksComputer();for(const f of l)switch(f.changeType){case 4:{for(let m=0;m!_.ownerId||_.ownerId===this._editorId)),u.addRequest(x,v,null)}break}case 2:{let m=null;f.injectedText&&(m=f.injectedText.filter(x=>!x.ownerId||x.ownerId===this._editorId)),u.addRequest(f.detail,m,null);break}}const h=u.finalize(),g=new Kb(h);for(const f of l)switch(f.changeType){case 1:{this._lines.onModelFlushed(),r.emitViewEvent(new M3),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),o=!0;break}case 3:{const m=this._lines.onModelLinesDeleted(c,f.fromLineNumber,f.toLineNumber);m!==null&&(r.emitViewEvent(m),this.viewLayout.onLinesDeleted(m.fromLineNumber,m.toLineNumber)),o=!0;break}case 4:{const m=g.takeCount(f.detail.length),x=this._lines.onModelLinesInserted(c,f.fromLineNumber,f.toLineNumber,m);x!==null&&(r.emitViewEvent(x),this.viewLayout.onLinesInserted(x.fromLineNumber,x.toLineNumber)),o=!0;break}case 2:{const m=g.dequeue(),[x,v,_,w]=this._lines.onModelLineChanged(c,f.lineNumber,m);a=x,v&&r.emitViewEvent(v),_&&(r.emitViewEvent(_),this.viewLayout.onLinesInserted(_.fromLineNumber,_.toLineNumber)),w&&(r.emitViewEvent(w),this.viewLayout.onLinesDeleted(w.fromLineNumber,w.toLineNumber));break}case 5:break}c!==null&&this._lines.acceptVersionId(c),this.viewLayout.onHeightMaybeChanged(),!o&&a&&(r.emitViewEvent(new P3),r.emitViewEvent(new cy(null)),this._cursor.onLineMappingChanged(r),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const s=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&s){const r=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(r){const o=this.coordinatesConverter.convertModelPositionToViewPosition(r.getStartPosition()),a=this.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber);this.viewLayout.setScrollPosition({scrollTop:a+this._viewportStart.startLineDelta},1)}}try{const r=this._eventDispatcher.beginEmitViewEvents();n instanceof G1&&r.emitOutgoingEvent(new K4t(n.contentChangedEvent)),this._cursor.onModelContentChanged(r,n)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._configuration.options.get(5)&&this._register(this.model.onDidChangeLineHeight(n=>{const s=n.changes.filter(r=>r.ownerId===this._editorId||r.ownerId===0);if(this.viewLayout.changeSpecialLineHeights(r=>{for(const o of s){const{decorationId:a,lineNumber:l,lineHeight:c}=o,u=this.coordinatesConverter.convertModelRangeToViewRange(new z(l,1,l,this.model.getLineMaxColumn(l)));c!==null?r.insertOrChangeCustomLineHeight(a,u.startLineNumber,u.endLineNumber,c):r.removeCustomLineHeight(a)}}),s.length>0){const r=new z2e(s);this._eventDispatcher.emitOutgoingEvent(new Q4t(r))}})),this._configuration.options.get(172)&&this._register(this.model.onDidChangeFont(n=>{const s=n.changes.filter(r=>r.ownerId===this._editorId||r.ownerId===0);if(s.length>0){const r=new U2e(s);this._eventDispatcher.emitOutgoingEvent(new X4t(r))}})),this._register(this.model.onDidChangeTokens(n=>{const s=[];for(let r=0,o=n.ranges.length;r{this._eventDispatcher.emitSingleViewEvent(new A4t),this.cursorConfig=new bk(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new q4t(n))})),this._register(this.model.onDidChangeLanguage(n=>{this.cursorConfig=new bk(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new $4t(n))})),this._register(this.model.onDidChangeOptions(n=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const s=this._eventDispatcher.beginEmitViewEvents();s.emitViewEvent(new M3),s.emitViewEvent(new P3),s.emitViewEvent(new cy(null)),this._cursor.onLineMappingChanged(s),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new bk(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new G4t(n))})),this._register(this.model.onDidChangeDecorations(n=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new cy(n)),this._eventDispatcher.emitOutgoingEvent(new U4t(n))}))}getFontSizeAtPosition(e){if(!this._configuration.options.get(172))return null;const n=this.model.getFontDecorationsInRange(z.fromPositions(e),this._editorId);let s=this._configuration.options.get(59).fontSize+"px";for(const r of n)if(r.options.fontSize){s=r.options.fontSize;break}return s}setHiddenAreas(e,t,n){var a;this.hiddenAreasModel.setHiddenAreas(t,e);const s=this.hiddenAreasModel.getMergedRanges();if(s===this.previousHiddenAreas&&!n)return;this.previousHiddenAreas=s;const r=this._captureStableViewport();let o=!1;try{const l=this._eventDispatcher.beginEmitViewEvents();o=this._lines.setHiddenAreas(s),o&&(l.emitViewEvent(new M3),l.emitViewEvent(new P3),l.emitViewEvent(new cy(null)),this._cursor.onLineMappingChanged(l),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),this.viewLayout.onHeightMaybeChanged());const c=(a=r.viewportStartModelPosition)==null?void 0:a.lineNumber;c&&s.some(h=>h.startLineNumber<=c&&c<=h.endLineNumber)||r.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),o&&this._eventDispatcher.emitOutgoingEvent(new V4t)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(165),t=this._configuration.options.get(75),n=Math.max(20,Math.round(e.height/t)),s=this.viewLayout.getLinesViewportData(),r=Math.max(1,s.completelyVisibleStartLineNumber-n),o=Math.min(this.getLineCount(),s.completelyVisibleEndLineNumber+n);return this._toModelVisibleRanges(new z(r,this.getLineMinColumn(r),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),n=this._lines.getHiddenAreas();if(n.length===0)return[t];const s=[];let r=0,o=t.startLineNumber,a=t.startColumn;const l=t.endLineNumber,c=t.endColumn;for(let u=0,h=n.length;ul||(o"u")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),n=this.coordinatesConverter.convertModelPositionToViewPosition(t),s=this.viewLayout.getVerticalOffsetForLineNumber(n.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:s}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,n){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,n){return this._lines.getActiveIndentGuide(e,t,n)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,n,s){return this._lines.getViewLinesBracketGuides(e,t,n,s)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=dl(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Oh(this.getLineContent(e));return t===-1?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}_getTextDirection(e,t){let n=0;for(const s of t){const r=s.range;if(r.startLineNumber>e||r.endLineNumber0?jd.RTL:jd.LTR}getTextDirection(e){const t=this._decorations.getDecorationsOnLine(e);return this._getTextDirection(e,t.decorations)}getViewportViewLineRenderingData(e,t){const n=this._decorations.getDecorationsViewportData(e),s=n.inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,s,n.hasVariableFonts,n.decorations)}getViewLineRenderingData(e){const t=this._decorations.getDecorationsOnLine(e);return this._getViewLineRenderingData(e,t.inlineDecorations[0],t.hasVariableFonts,t.decorations)}_getViewLineRenderingData(e,t,n,s){const r=this.model.mightContainRTL(),o=this.model.mightContainNonBasicASCII(),a=this.getTabSize(),l=this._lines.getViewLineData(e);return l.inlineDecorations&&(t=[...t,...l.inlineDecorations.map(c=>c.toInlineDecoration(e))]),new Gd(l.minColumn,l.maxColumn,l.content,l.continuesWithWrappedLine,r,o,l.tokens,t,a,l.startVisibleColumn,this._getTextDirection(e,s),n)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,n){const s=this._lines.getViewLinesData(e,t,n);return new iOt(this.getTabSize(),s)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,KF(this._configuration.options),GF(this._configuration.options)),n=new Cjt;for(const s of t){const r=s.options,o=r.overviewRuler;if(!o)continue;const a=o.position;if(a===0)continue;const l=o.getColor(e.value),c=this.coordinatesConverter.getViewLineNumberOfModelPosition(s.range.startLineNumber,s.range.startColumn),u=this.coordinatesConverter.getViewLineNumberOfModelPosition(s.range.endLineNumber,s.range.endColumn);n.accept(l,r.zIndex,c,u,a)}return n.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const n=t.options.overviewRuler;n==null||n.invalidateCachedColor();const s=t.options.minimap;s==null||s.invalidateCachedColor()}}getValueInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)}getValueLengthInRange(e,t){const n=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(n,t)}modifyPosition(e,t){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e),s=this.model.modifyPosition(n,t);return this.coordinatesConverter.convertModelPositionToViewPosition(s)}deduceModelPositionRelativeToViewPosition(e,t,n){const s=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=n:t+=n);const o=this.model.getOffsetAt(s)+t;return this.model.getPositionAt(o)}getPlainTextToCopy(e,t,n){const s=n?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(z.compareRangesUsingStarts);let r=!1,o=!1;for(const l of e)l.isEmpty()?r=!0:o=!0;if(!o){if(!t)return"";const l=e.map(u=>u.startLineNumber);let c="";for(let u=0;u0&&l[u-1]===l[u]||(c+=this.model.getLineContent(l[u])+s);return c}if(r&&t){const l=[];let c=0;for(const u of e){const h=u.startLineNumber;u.isEmpty()?h!==c&&l.push(this.model.getLineContent(h)):l.push(this.model.getValueInRange(u,n?2:0)),c=h}return l.length===1?l[0]:l}const a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,n?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const n=this.model.getLanguageId();if(n===Ud||e.length!==1)return null;let s=e[0];if(s.isEmpty()){if(!t)return null;const u=s.startLineNumber;s=new z(u,this.model.getLineMinColumn(u),u,this.model.getLineMaxColumn(u))}const r=this._configuration.options.get(59),o=this._getColorMap(),l=/[:;\\\/<>]/.test(r.fontFamily)||r.fontFamily===pc.fontFamily;let c;return l?c=pc.fontFamily:(c=r.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${pc.fontFamily}`),{mode:n,html:`
`+this._getHTMLToCopy(s,o)+"
"}}_getHTMLToCopy(e,t){const n=e.startLineNumber,s=e.startColumn,r=e.endLineNumber,o=e.endColumn,a=this.getTabSize();let l="";for(let c=n;c<=r;c++){const u=this.model.tokenization.getLineTokens(c),h=u.getLineContent(),g=c===n?s-1:0,f=c===r?o-1:h.length;h===""?l+="
":l+=njt(h,u.inflate(),t,g,f,a,Xo)}return l}_getColorMap(){const e=Gs.getColorMap(),t=["#000000"];if(e)for(let n=1,s=e.length;nthis._cursor.setStates(s,e,t,n))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,n=0){this._withViewEventsCollector(s=>this._cursor.setSelections(s,e,t,n))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new z4t);return}this._withViewEventsCollector(e)}executeEdits(e,t,n,s){this._executeCursorEdit(r=>this._cursor.executeEdits(r,e,t,n,s))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(n=>this._cursor.type(n,e,t))}compositionType(e,t,n,s,r){this._executeCursorEdit(o=>this._cursor.compositionType(o,e,t,n,s,r))}paste(e,t,n,s){this._executeCursorEdit(r=>this._cursor.paste(r,e,t,n,s))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(n=>this._cursor.executeCommand(n,e,t))}executeCommands(e,t){this._executeCursorEdit(n=>this._cursor.executeCommands(n,e,t))}revealAllCursors(e,t,n=!1){this._withViewEventsCollector(s=>this._cursor.revealAll(s,e,n,0,t,0))}revealPrimaryCursor(e,t,n=!1){this._withViewEventsCollector(s=>this._cursor.revealPrimary(s,e,n,0,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),n=new z(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(s=>s.emitViewEvent(new OA(e,!1,n,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),n=new z(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(s=>s.emitViewEvent(new OA(e,!1,n,null,0,!0,0)))}revealRange(e,t,n,s,r){this._withViewEventsCollector(o=>o.emitViewEvent(new OA(e,!1,n,null,s,t,r)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new j4t),this._eventDispatcher.emitOutgoingEvent(new W4t))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>{try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}})}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}};class pae{static create(e){const t=e._setTrackedRange(null,new z(1,1,1,1),1);return new pae(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,n,s,r){this._model=e,this._viewLineNumber=t,this._isValid=n,this._modelTrackedRange=s,this._startLineDelta=r}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const n=e.coordinatesConverter.convertViewPositionToModelPosition(new te(t,e.getLineMinColumn(t))),s=e.model._setTrackedRange(this._modelTrackedRange,new z(n.lineNumber,n.column,n.lineNumber,n.column),1),r=e.viewLayout.getVerticalOffsetForLineNumber(t),o=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=s,this._startLineDelta=o-r}invalidate(){this._isValid=!1}}class Cjt{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,n,s,r){const o=this._asMap[e];if(o){const a=o.data,l=a[a.length-3],c=a[a.length-1];if(l===r&&c+1>=n){s>c&&(a[a.length-1]=s);return}a.push(r,n,s)}else{const a=new RR(e,t,[r,n,s]);this._asMap[e]=a,this.asArray.push(a)}}}class Sjt{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const n=this.hiddenAreas.get(e);n&&S_e(n,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce((t,n)=>kjt(t,n),[]);return S_e(this.ranges,e)?this.ranges:(this.ranges=e,this.ranges)}}function kjt(i,e){const t=[];let n=0,s=0;for(;n=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},bm=function(i,e){return function(t,n){e(t,n,i)}},Ly,rw;let wC=(rw=class extends se{get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}get contextKeyService(){return this._contextKeyService}constructor(e,t,n,s,r,o,a,l,c,u,h,g){super(),this.languageConfigurationService=h,this._deliveryQueue=pEt(),this._contributions=this._register(new I5t),this._onDidDispose=this._register(new ie),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeLineHeight=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeLineHeight=this._onDidChangeLineHeight.event,this._onDidChangeFont=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeFont=this._onDidChangeFont.event,this._onDidChangeModelTokens=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new N_e({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new N_e({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Ka(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onWillTriggerEditorOperationEvent=this._register(new ie),this._onBeginUpdate=this._register(new ie),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new ie),this.onEndUpdate=this._onEndUpdate.event,this._onBeforeExecuteEdit=this._register(new ie),this.onBeforeExecuteEdit=this._onBeforeExecuteEdit.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),this.inComposition=!1,r.willCreateCodeEditor();const f={...t};if(this._domElement=e,this._overflowWidgetsDomNode=f.overflowWidgetsDomNode,delete f.overflowWidgetsDomNode,this._id=++Ejt,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=n.telemetryData,this._configuration=this._register(this._createConfiguration(n.isSimpleWidget||!1,n.contextMenuId??(n.isSimpleWidget?ct.SimpleEditorContext:ct.EditorContext),f,u)),this._register(this._configuration.onDidChange(v=>{this._onDidChangeConfiguration.fire(v);const _=this._configuration.options;if(v.hasChanged(165)){const w=_.get(165);this._onDidLayoutChange.fire(w)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),n.contextKeyValues)for(const[v,_]of Object.entries(n.contextKeyValues))this._contextKeyService.createKey(v,_);this._notificationService=c,this._codeEditorService=r,this._commandService=o,this._themeService=l,this._register(new Djt(this,this._contextKeyService)),this._register(new Tjt(this,this._contextKeyService,g)),this._instantiationService=this._register(s.createChild(new FD([Bt,this._contextKeyService]))),this._modelData=null,this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let m;Array.isArray(n.contributions)?m=n.contributions:m=qN.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(const v of qN.getEditorActions()){if(this._actions.has(v.id)){zt(new Error(`Cannot have two actions with the same id ${v.id}`));continue}const _=new $2e(v.id,v.label,v.alias,v.metadata,v.precondition??void 0,w=>this._instantiationService.invokeFunction(k=>Promise.resolve(v.runEditorCommand(k,this,w))),this._contextKeyService);this._actions.set(_.id,_)}const x=()=>!this._configuration.options.get(104)&&this._configuration.options.get(43).enabled;this._register(new uDt(this._domElement,{onDragOver:v=>{if(!x())return;const _=this.getTargetAtClientPoint(v.clientX,v.clientY);_!=null&&_.position&&this.showDropIndicatorAt(_.position)},onDrop:async v=>{if(!x()||(this.removeDropIndicator(),!v.dataTransfer))return;const _=this.getTargetAtClientPoint(v.clientX,v.clientY);_!=null&&_.position&&this._onDropIntoEditor.fire({position:_.position,event:v})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;(t=this._modelData)==null||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,n,s){return new pQ(e,t,n,this._domElement,s)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return XP.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?ei.getWordAtPosition(this._modelData.model,this._configuration.options.get(148),this._configuration.options.get(147),e):null}getValue(e=null){if(!this._modelData)return"";const t=!!(e&&e.preserveBOM);let n=0;return e&&e.lineEnding&&e.lineEnding===` +`?n=1:e&&e.lineEnding&&e.lineEnding===`\r +`&&(n=2),this._modelData.model.getValue(n,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){var t;try{this._beginUpdate();const n=e;if(this._modelData===null&&n===null||this._modelData&&this._modelData.model===n)return;const s={oldModelUrl:((t=this._modelData)==null?void 0:t.model.uri)||null,newModelUrl:(n==null?void 0:n.uri)||null};this._onWillChangeModel.fire(s);const r=this.hasTextFocus(),o=this._detachModel();this._attachModel(n),this.hasModel()?r&&this.focus():(this._editorTextFocus.setValue(!1),this._editorWidgetFocus.setValue(!1)),this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(o),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,n,s){const r=e.model.validatePosition({lineNumber:t,column:n}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(o.lineNumber,s)}getTopForLineNumber(e,t=!1){return this._modelData?Ly._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Ly._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,n,s=!1){const r=e.model.validatePosition({lineNumber:t,column:n}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(r);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber,s)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return-1;const n=this._modelData.model.getLineMaxColumn(e);return Ly._getVerticalOffsetAfterPosition(this._modelData,e,n,t)}getLineHeightForPosition(e){if(!this._modelData)return-1;const t=this._modelData.viewModel,n=t.coordinatesConverter,s=te.lift(e);if(n.modelPositionIsVisible(s)){const r=n.convertModelPositionToViewPosition(s);return t.viewLayout.getLineHeightForLineNumber(r.lineNumber)}return 0}setHiddenAreas(e,t,n){var s;(s=this._modelData)==null||s.viewModel.setHiddenAreas(e.map(r=>z.lift(r)),t,n)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return js.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!te.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,n,s){if(!this._modelData)return;if(!z.isIRange(e))throw new Error("Invalid arguments");const r=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",n,o,t,s)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,n){if(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new z(e,1,e,1),t,!1,n)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,n,s){if(!te.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new z(e.lineNumber,e.column,e.lineNumber,e.column),t,n,s)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const n=st.isISelection(e),s=z.isIRange(e);if(!n&&!s)throw new Error("Invalid arguments");if(n)this._setSelectionImpl(e,t);else if(s){const r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const n=new st(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[n])}revealLines(e,t,n=0){this._revealLines(e,t,0,n)}revealLinesInCenter(e,t,n=0){this._revealLines(e,t,1,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._revealLines(e,t,2,n)}revealLinesNearTop(e,t,n=0){this._revealLines(e,t,5,n)}_revealLines(e,t,n,s){if(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new z(e,1,t,1),n,!1,s)}revealRange(e,t=0,n=!1,s=!0){this._revealRange(e,n?1:0,s,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,n,s){if(!z.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(z.lift(e),t,n,s)}setSelections(e,t="api",n=0){if(this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let s=0,r=e.length;s0&&this._modelData.viewModel.restoreCursorState(n):this._modelData.viewModel.restoreCursorState([n]),this._contributions.restoreViewState(t.contributionsState||{});const s=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(s)}}handleInitialized(){var e;(e=this._getViewModel())==null||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,n){n=n||{};try{switch(this._onWillTriggerEditorOperationEvent.fire({source:e,handlerId:t,payload:n}),this._beginUpdate(),t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const r=n;this._type(e,r.text||"");return}case"replacePreviousChar":{const r=n;this._compositionType(e,r.text||"",r.replaceCharCnt||0,0,0);return}case"compositionType":{const r=n;this._compositionType(e,r.text||"",r.replacePrevCharCnt||0,r.replaceNextCharCnt||0,r.positionDelta||0);return}case"paste":{const r=n;this._paste(e,r.text||"",r.pasteOnNewLine||!1,r.multicursorText||null,r.mode||null,r.clipboardEvent);return}case"cut":this._cut(e);return}const s=this.getAction(t);if(s){Promise.resolve(s.run(n)).then(void 0,zt);return}if(!this._modelData||this._triggerEditorCommand(e,t,n))return;this._triggerCommand(t,n)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this.inComposition=!0,this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this.inComposition=!1,this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){!this._modelData||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&this._onDidType.fire(t))}_compositionType(e,t,n,s,r){this._modelData&&this._modelData.viewModel.compositionType(t,n,s,r,e)}_paste(e,t,n,s,r,o){if(!this._modelData)return;const a=this._modelData.viewModel,l=a.getSelection().getStartPosition();a.paste(t,n,s,e);const c=a.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({clipboardEvent:o,range:new z(l.lineNumber,l.column,c.lineNumber,c.column),languageId:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,n){const s=qN.getEditorCommand(t);return s?(n=n||{},no(n)&&(n.source=e),this._instantiationService.invokeFunction(r=>{Promise.resolve(s.runEditorCommand(r,this,n)).then(void 0,zt)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(104)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(104)?!1:(this._modelData.model.popStackElement(),!0)}edit(e,t){return this.executeEdits(t,e.replacements.map(n=>({range:n.range,text:n.text})),void 0)}executeEdits(e,t,n){if(!this._modelData||this._configuration.options.get(104))return!1;let s;n?Array.isArray(n)?s=()=>n:s=n:s=()=>null;let r,o;return e instanceof eRe?(o=e,r=e.metadata.source):(o=Aa.unknown({name:r}),r=e),this._onBeforeExecuteEdit.fire({source:r??void 0}),this._modelData.viewModel.executeEdits(r,t,s,o),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new Ijt(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){if(!this._modelData)return null;const t=this._configuration.options;return this._modelData.model.getLineDecorations(e,this._id,KF(t),GF(t))}getDecorationsInRange(e){if(!this._modelData)return null;const t=this._configuration.options;return this._modelData.model.getDecorationsInRange(e,this._id,KF(t),GF(t))}getFontSizeAtPosition(e){return this._modelData?this._modelData.viewModel.getFontSizeAtPosition(e):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){!this._modelData||e.length===0||this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations(n=>n.deltaDecorations(t,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(165)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isWidgetFocused()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(n)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const n=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(n)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(n)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const n=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(n)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const n=this._glyphMarginWidgets[t];n.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(n)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const n=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(n)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),s=this._configuration.options.get(165),r=Ly._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),o=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+s.glyphMarginWidth+s.lineNumbersWidth+s.decorationsWidth-this.getScrollLeft(),a=this.getLineHeightForPosition(t);return{top:r,left:o,height:a}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}render(e=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}setAriaOptions(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Po(e,this._configuration.options.get(59))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const n=e.onBeforeAttached(),s=new wjt(this._id,this._configuration,e,Zoe.create(xt(this._domElement)),hae.create(this._configuration.options),a=>vc(xt(this._domElement),a),this.languageConfigurationService,this._themeService,n,{batchChanges:a=>{try{return this._beginUpdate(),a()}finally{this._endUpdate()}}});t.push(e.onWillDispose(()=>this.setModel(null))),t.push(s.onEvent(a=>{switch(a.kind){case 0:this._onDidContentSizeChange.fire(a);break;case 1:this._editorTextFocus.setValue(a.hasFocus);break;case 2:this._editorWidgetFocus.setValue(a.hasFocus);break;case 3:this._onDidScrollChange.fire(a);break;case 4:this._onDidChangeViewZones.fire();break;case 5:this._onDidChangeHiddenAreas.fire();break;case 6:this._onDidAttemptReadOnlyEdit.fire();break;case 7:{if(a.reachedMaxCursorCount){const h=this.getOption(89),g=S(83,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",h);this._notificationService.prompt(jD.Warning,g,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:S(84,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const l=[];for(let h=0,g=a.selections.length;h{this._paste("keyboard",r,o,a,l)},type:r=>{this._type("keyboard",r)},compositionType:(r,o,a,l)=>{this._compositionType("keyboard",r,o,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(r,o,a,l)=>{const c={text:r,pasteOnNewLine:o,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:r=>{const o={text:r};this._commandService.executeCommand("type",o)},compositionType:(r,o,a,l)=>{if(a||l){const c={text:r,replacePrevCharCnt:o,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{const c={text:r,replaceCharCnt:o};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const n=new iW(e.coordinatesConverter);return n.onKeyDown=r=>this._onKeyDown.fire(r),n.onKeyUp=r=>this._onKeyUp.fire(r),n.onContextMenu=r=>this._onContextMenu.fire(r),n.onMouseMove=r=>this._onMouseMove.fire(r),n.onMouseLeave=r=>this._onMouseLeave.fire(r),n.onMouseDown=r=>this._onMouseDown.fire(r),n.onMouseUp=r=>this._onMouseUp.fire(r),n.onMouseDrag=r=>this._onMouseDrag.fire(r),n.onMouseDrop=r=>this._onMouseDrop.fire(r),n.onMouseDropCanceled=r=>this._onMouseDropCanceled.fire(r),n.onMouseWheel=r=>this._onMouseWheel.fire(r),[new YQ(this._domElement,this.getId(),t,this._configuration,this._themeService.getColorTheme(),e,n,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e==null||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){var n;if((n=this._contributionsDisposable)==null||n.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}showDropIndicatorAt(e){const t=[{range:new z(e.lineNumber,e.column,e.lineNumber,e.column),options:Ly.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,this._updateCounter===0&&this._onEndUpdate.fire()}},Ly=rw,rw.dropIntoEditorDecorationOptions=qt.register({description:"workbench-dnd-target",className:"dnd-target"}),rw);wC=Ly=Njt([bm(3,ft),bm(4,Hn),bm(5,es),bm(6,Bt),bm(7,Ws),bm(8,nr),bm(9,Zo),bm(10,As),bm(11,lt)],wC);let Ejt=0,Ljt=class{constructor(e,t,n,s,r,o){this.model=e,this.viewModel=t,this.view=n,this.hasRealView=s,this.listenersToRemove=r,this.attachedView=o}dispose(){ii(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}};class N_e extends se{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new ie(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new ie(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class Ka extends ie{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class Djt extends se{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=J.editorSimpleInput.bindTo(t),this._editorFocus=J.focus.bindTo(t),this._textInputFocus=J.textInputFocus.bindTo(t),this._editorTextFocus=J.editorTextFocus.bindTo(t),this._tabMovesFocus=J.tabMovesFocus.bindTo(t),this._editorReadonly=J.readOnly.bindTo(t),this._inDiffEditor=J.inDiffEditor.bindTo(t),this._editorColumnSelection=J.columnSelection.bindTo(t),this._hasMultipleSelections=J.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=J.hasNonEmptySelection.bindTo(t),this._canUndo=J.canUndo.bindTo(t),this._canRedo=J.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(yL.onDidChangeTabFocus(n=>this._tabMovesFocus.set(n))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(e.get(164)||yL.getTabFocusMode()),this._editorReadonly.set(e.get(104)),this._inDiffEditor.set(e.get(70)),this._editorColumnSelection.set(e.get(28))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class Tjt extends se{constructor(e,t,n){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=n,this._langId=J.languageId.bindTo(t),this._hasCompletionItemProvider=J.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=J.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=J.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=J.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=J.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=J.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=J.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=J.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=J.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=J.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=J.hasReferenceProvider.bindTo(t),this._hasRenameProvider=J.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=J.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=J.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=J.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=J.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=J.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=J.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=J.isInEmbeddedEditor.bindTo(t);const s=()=>this._update();this._register(e.onDidChangeModel(s)),this._register(e.onDidChangeModelLanguage(s)),this._register(n.completionProvider.onDidChange(s)),this._register(n.codeActionProvider.onDidChange(s)),this._register(n.codeLensProvider.onDidChange(s)),this._register(n.definitionProvider.onDidChange(s)),this._register(n.declarationProvider.onDidChange(s)),this._register(n.implementationProvider.onDidChange(s)),this._register(n.typeDefinitionProvider.onDidChange(s)),this._register(n.hoverProvider.onDidChange(s)),this._register(n.documentHighlightProvider.onDidChange(s)),this._register(n.documentSymbolProvider.onDidChange(s)),this._register(n.referenceProvider.onDidChange(s)),this._register(n.renameProvider.onDidChange(s)),this._register(n.documentFormattingEditProvider.onDidChange(s)),this._register(n.documentRangeFormattingEditProvider.onDidChange(s)),this._register(n.signatureHelpProvider.onDidChange(s)),this._register(n.inlayHintsProvider.onDidChange(s)),s()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){const e=this._editor.getModel();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===Ot.walkThroughSnippet||e.uri.scheme===Ot.vscodeChatCodeBlock)})}}class Ijt{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,n){return this._editor.onDidChangeModelDecorations(s=>{this._isChangingDecorations||e.call(t,s)},n)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const n of this._decorationIds){const s=e.getDecorationRange(n);s&&t.push(s)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(n=>{t=n.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}}const Ajt=encodeURIComponent("");function wk(i){return Ajt+encodeURIComponent(i.toString())+Rjt}const Mjt=encodeURIComponent('');function E_e(i){return Mjt+encodeURIComponent(i.toString())+Pjt}Zu((i,e)=>{const t=i.getColor(Y7);t&&(e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${wk(t)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-error-decoration: url("data:image/svg+xml,${wk(t)}"); }`));const n=i.getColor(Yb);n&&(e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${wk(n)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-warning-decoration: url("data:image/svg+xml,${wk(n)}"); }`));const s=i.getColor(Ep);s&&(e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${wk(s)}") repeat-x bottom left; }`),e.addRule(`:root { --monaco-editor-info-decoration: url("data:image/svg+xml,${wk(s)}"); }`));const r=i.getColor(t2t);r&&(e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${E_e(r)}") no-repeat bottom left; }`),e.addRule(`:root { --monaco-editor-hint-decoration: url("data:image/svg+xml,${E_e(r)}"); }`));const o=i.getColor(sPt);o&&(e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${o.rgba.a}; }`),e.addRule(`:root { --monaco-editor-unnecessary-decoration-opacity: ${o.rgba.a}; }`))});function zi(i){return new Ojt(i)}class Ojt extends SIe{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function Im(i,e){return i}function uW(i){return zi(i)}const hx=ln("accessibilitySignalService"),an=class an{static register(e){return new an(e.fileName)}constructor(e){this.fileName=e}};an.error=an.register({fileName:"error.mp3"}),an.warning=an.register({fileName:"warning.mp3"}),an.success=an.register({fileName:"success.mp3"}),an.foldedArea=an.register({fileName:"foldedAreas.mp3"}),an.break=an.register({fileName:"break.mp3"}),an.quickFixes=an.register({fileName:"quickFixes.mp3"}),an.taskCompleted=an.register({fileName:"taskCompleted.mp3"}),an.taskFailed=an.register({fileName:"taskFailed.mp3"}),an.terminalBell=an.register({fileName:"terminalBell.mp3"}),an.diffLineInserted=an.register({fileName:"diffLineInserted.mp3"}),an.diffLineDeleted=an.register({fileName:"diffLineDeleted.mp3"}),an.diffLineModified=an.register({fileName:"diffLineModified.mp3"}),an.requestSent=an.register({fileName:"requestSent.mp3"}),an.responseReceived1=an.register({fileName:"responseReceived1.mp3"}),an.responseReceived2=an.register({fileName:"responseReceived2.mp3"}),an.responseReceived3=an.register({fileName:"responseReceived3.mp3"}),an.responseReceived4=an.register({fileName:"responseReceived4.mp3"}),an.clear=an.register({fileName:"clear.mp3"}),an.save=an.register({fileName:"save.mp3"}),an.format=an.register({fileName:"format.mp3"}),an.voiceRecordingStarted=an.register({fileName:"voiceRecordingStarted.mp3"}),an.voiceRecordingStopped=an.register({fileName:"voiceRecordingStopped.mp3"}),an.progress=an.register({fileName:"progress.mp3"}),an.chatEditModifiedFile=an.register({fileName:"chatEditModifiedFile.mp3"}),an.editsKept=an.register({fileName:"editsKept.mp3"}),an.editsUndone=an.register({fileName:"editsUndone.mp3"}),an.nextEditSuggestion=an.register({fileName:"nextEditSuggestion.mp3"}),an.terminalCommandSucceeded=an.register({fileName:"terminalCommandSucceeded.mp3"}),an.chatUserActionRequired=an.register({fileName:"chatUserActionRequired.mp3"}),an.codeActionTriggered=an.register({fileName:"codeActionTriggered.mp3"}),an.codeActionApplied=an.register({fileName:"codeActionApplied.mp3"});let Ci=an;class jjt{constructor(e){this.randomOneOf=e}}const Gt=class Gt{constructor(e,t,n,s,r,o,a=!1){this.sound=e,this.name=t,this.legacySoundSettingsKey=n,this.settingsKey=s,this.legacyAnnouncementSettingsKey=r,this.announcementMessage=o,this.managesOwnEnablement=a}static register(e){const t=new jjt("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),n=new Gt(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage,e.managesOwnEnablement);return Gt._signals.add(n),n}};Gt._signals=new Set,Gt.errorAtPosition=Gt.register({name:S(1576,"Error at Position"),sound:Ci.error,announcementMessage:S(1577,"Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"}),Gt.warningAtPosition=Gt.register({name:S(1578,"Warning at Position"),sound:Ci.warning,announcementMessage:S(1579,"Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"}),Gt.errorOnLine=Gt.register({name:S(1580,"Error on Line"),sound:Ci.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:S(1581,"Error on Line"),settingsKey:"accessibility.signals.lineHasError"}),Gt.warningOnLine=Gt.register({name:S(1582,"Warning on Line"),sound:Ci.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:S(1583,"Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"}),Gt.foldedArea=Gt.register({name:S(1584,"Folded Area on Line"),sound:Ci.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:S(1585,"Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"}),Gt.break=Gt.register({name:S(1586,"Breakpoint on Line"),sound:Ci.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:S(1587,"Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"}),Gt.inlineSuggestion=Gt.register({name:S(1588,"Inline Suggestion on Line"),sound:Ci.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"}),Gt.nextEditSuggestion=Gt.register({name:S(1589,"Next Edit Suggestion on Line"),sound:Ci.nextEditSuggestion,legacySoundSettingsKey:"audioCues.nextEditSuggestion",settingsKey:"accessibility.signals.nextEditSuggestion",announcementMessage:S(1590,"Next Edit Suggestion")}),Gt.terminalQuickFix=Gt.register({name:S(1591,"Terminal Quick Fix"),sound:Ci.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:S(1592,"Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"}),Gt.onDebugBreak=Gt.register({name:S(1593,"Debugger Stopped on Breakpoint"),sound:Ci.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:S(1594,"Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"}),Gt.noInlayHints=Gt.register({name:S(1595,"No Inlay Hints on Line"),sound:Ci.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:S(1596,"No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"}),Gt.taskCompleted=Gt.register({name:S(1597,"Task Completed"),sound:Ci.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:S(1598,"Task Completed"),settingsKey:"accessibility.signals.taskCompleted"}),Gt.taskFailed=Gt.register({name:S(1599,"Task Failed"),sound:Ci.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:S(1600,"Task Failed"),settingsKey:"accessibility.signals.taskFailed"}),Gt.terminalCommandFailed=Gt.register({name:S(1601,"Terminal Command Failed"),sound:Ci.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:S(1602,"Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"}),Gt.terminalCommandSucceeded=Gt.register({name:S(1603,"Terminal Command Succeeded"),sound:Ci.terminalCommandSucceeded,announcementMessage:S(1604,"Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"}),Gt.terminalBell=Gt.register({name:S(1605,"Terminal Bell"),sound:Ci.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:S(1606,"Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"}),Gt.notebookCellCompleted=Gt.register({name:S(1607,"Notebook Cell Completed"),sound:Ci.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:S(1608,"Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"}),Gt.notebookCellFailed=Gt.register({name:S(1609,"Notebook Cell Failed"),sound:Ci.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:S(1610,"Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"}),Gt.diffLineInserted=Gt.register({name:S(1611,"Diff Line Inserted"),sound:Ci.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"}),Gt.diffLineDeleted=Gt.register({name:S(1612,"Diff Line Deleted"),sound:Ci.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"}),Gt.diffLineModified=Gt.register({name:S(1613,"Diff Line Modified"),sound:Ci.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"}),Gt.chatEditModifiedFile=Gt.register({name:S(1614,"Chat Edit Modified File"),sound:Ci.chatEditModifiedFile,announcementMessage:S(1615,"File Modified from Chat Edits"),settingsKey:"accessibility.signals.chatEditModifiedFile"}),Gt.chatRequestSent=Gt.register({name:S(1616,"Chat Request Sent"),sound:Ci.requestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:S(1617,"Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"}),Gt.chatResponseReceived=Gt.register({name:S(1618,"Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[Ci.responseReceived1,Ci.responseReceived2,Ci.responseReceived3,Ci.responseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"}),Gt.codeActionTriggered=Gt.register({name:S(1619,"Code Action Request Triggered"),sound:Ci.codeActionTriggered,legacySoundSettingsKey:"audioCues.codeActionRequestTriggered",legacyAnnouncementSettingsKey:"accessibility.alert.codeActionRequestTriggered",announcementMessage:S(1620,"Code Action Request Triggered"),settingsKey:"accessibility.signals.codeActionTriggered"}),Gt.codeActionApplied=Gt.register({name:S(1621,"Code Action Applied"),legacySoundSettingsKey:"audioCues.codeActionApplied",sound:Ci.codeActionApplied,settingsKey:"accessibility.signals.codeActionApplied"}),Gt.progress=Gt.register({name:S(1622,"Progress"),sound:Ci.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:S(1623,"Progress"),settingsKey:"accessibility.signals.progress"}),Gt.clear=Gt.register({name:S(1624,"Clear"),sound:Ci.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:S(1625,"Clear"),settingsKey:"accessibility.signals.clear"}),Gt.save=Gt.register({name:S(1626,"Save"),sound:Ci.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:S(1627,"Save"),settingsKey:"accessibility.signals.save"}),Gt.format=Gt.register({name:S(1628,"Format"),sound:Ci.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:S(1629,"Format"),settingsKey:"accessibility.signals.format"}),Gt.voiceRecordingStarted=Gt.register({name:S(1630,"Voice Recording Started"),sound:Ci.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"}),Gt.voiceRecordingStopped=Gt.register({name:S(1631,"Voice Recording Stopped"),sound:Ci.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"}),Gt.editsKept=Gt.register({name:S(1632,"Edits Kept"),sound:Ci.editsKept,announcementMessage:S(1633,"Edits Kept"),settingsKey:"accessibility.signals.editsKept"}),Gt.editsUndone=Gt.register({name:S(1634,"Undo Edits"),sound:Ci.editsUndone,announcementMessage:S(1635,"Edits Undone"),settingsKey:"accessibility.signals.editsUndone"}),Gt.chatUserActionRequired=Gt.register({name:S(1636,"Chat User Action Required"),sound:Ci.chatUserActionRequired,announcementMessage:S(1637,"Chat User Action Required"),settingsKey:"accessibility.signals.chatUserActionRequired",managesOwnEnablement:!0});let Rl=Gt;function L_e(i,e,t,n=oo.ofCaller()){return NIe({debugName:()=>`Configuration Key "${i}"`},s=>t.onDidChangeConfiguration(r=>{r.affectsConfiguration(i)&&s(r)}),()=>t.getValue(i)??e,n)}function kf(i,e,t,n=oo.ofCaller()){const s=i.bindTo(e),r=new _e;return ma({debugName:()=>`Set Context Key "${i.key}"`},o=>{const a=t(o);return s.set(a),a},n).recomputeInitiallyAndOnChange(r),r}const yRe=ln("progressService"),Ace=class Ace{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}};Ace.None=Object.freeze({report(){}});let Ag=Ace;const Jb=ln("editorProgressService");class Kg{static capture(e){if(e.getScrollTop()===0||e.hasPendingScrollAnimation())return new Kg(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,n=0;const s=e.getVisibleRanges();if(s.length>0){t=s[0].getStartPosition();const r=e.getTopForPosition(t.lineNumber,t.column);n=e.getScrollTop()-r}return new Kg(e.getScrollTop(),e.getContentHeight(),t,n,e.getPosition())}constructor(e,t,n,s,r){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=n,this._visiblePositionScrollDelta=s,this._cursorPosition=r}restore(e){if(!(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n,1)}}const CC={RESOURCES:"ResourceURLs",TEXT:dr.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"},Fjt=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});let hW=Fjt;const Bjt=new ba(()=>hW("mouse",!1)),Hjt=new ba(()=>hW("element",!1));function Wjt(i){hW=i}function $p(i){return i==="element"?Hjt.value:Bjt.value}function wRe(){return hW("element",!0)}function Tb(i,e){if(i!==void 0){const t=i.match(/^\s*var\((.+)\)$/);if(t){const n=t[1].split(",",2);return n.length===2&&(e=Tb(n[1].trim(),e)),`var(${n[0]}, ${e})`}return i}return e}function D_e(i){const e=i.replaceAll(/[^_\-a-z0-9]/gi,"");return e!==i&&console.warn(`CSS ident value ${i} modified to ${e} to be safe for CSS`),e}function Qx(i){return`'${i.replaceAll(/'/g,"\\000027")}'`}function Dp(i){return i?Tc`url('${CSS.escape(mIe.uriToBrowserUri(i).toString(!0))}')`:"url('')"}function O3(i,e=!1){const t=CSS.escape(i);return!e&&t!==i&&console.warn(`CSS class name ${i} modified to ${t} to be safe for CSS`),t}function Tc(i,...e){return i.reduce((t,n,s)=>{const r=e[s]||"";return t+n+r},"")}class fq{constructor(){this._parts=[]}push(...e){this._parts.push(...e)}join(e=` +`){return this._parts.join(e)}}function Vjt(i){const e=zjt(i);if(e&&e.length>0)return new Uint32Array(e)}let Sd=0;const Nv=new Uint32Array(10);function zjt(i){if(Sd=0,ff(i,pq,4352),Sd>0||(ff(i,mq,4449),Sd>0)||(ff(i,bq,4520),Sd>0)||(ff(i,uy,12593),Sd))return Nv.subarray(0,Sd);if(i>=44032&&i<=55203){const e=i-44032,t=e%588,n=Math.floor(e/588),s=Math.floor(t/28),r=t%28-1;if(n=0&&(r0)return Nv.subarray(0,Sd)}}function ff(i,e,t){i>=t&&i>8&&(Nv[Sd++]=i>>8&255),i>>16&&(Nv[Sd++]=i>>16&255))}const pq=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),mq=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),bq=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),uy=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);function mae(...i){return function(e,t){for(let n=0,s=i.length;n0?[{start:0,end:e.length}]:[]:null}function SRe(i,e){const t=e.toLowerCase().indexOf(i.toLowerCase());return t===-1?null:[{start:t,end:t+i.length}]}function kRe(i,e){return mX(i.toLowerCase(),e.toLowerCase(),0,0)}function mX(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]===e[n]){let s=null;return(s=mX(i,e,t+1,n+1))?vae({start:n,end:n+1},s):null}return mX(i,e,t,n+1)}function bae(i){return 97<=i&&i<=122}function gW(i){return 65<=i&&i<=90}function xae(i){return 48<=i&&i<=57}function NRe(i){return i===32||i===9||i===10||i===13}const ERe=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(i=>ERe.add(i.charCodeAt(0)));function k6(i){return NRe(i)||ERe.has(i)}function T_e(i,e){return i===e||k6(i)&&k6(e)}const xq=new Map;function I_e(i){if(xq.has(i))return xq.get(i);let e;const t=Vjt(i);return t&&(e=t),xq.set(i,e),e}function LRe(i){return bae(i)||gW(i)||xae(i)}function vae(i,e){return e.length===0?e=[i]:i.end===e[0].start?e[0].start=i.start:e.unshift(i),e}function DRe(i,e){for(let t=e;t0&&!LRe(i.charCodeAt(t-1)))return t}return i.length}function bX(i,e,t,n){if(t===i.length)return[];if(n===e.length)return null;if(i[t]!==e[n].toLowerCase())return null;{let s=null,r=n+1;for(s=bX(i,e,t+1,n+1);!s&&(r=DRe(e,r)).6}function Kjt(i){const{upperPercent:e,lowerPercent:t,alphaPercent:n,numericPercent:s}=i;return t>.2&&e<.8&&n>.6&&s<.2}function Gjt(i){let e=0,t=0,n=0,s=0;for(let r=0;r60&&(e=e.substring(0,60));const t=$jt(e);if(!Kjt(t)){if(!qjt(t))return null;e=e.toLowerCase()}let n=null,s=0;for(i=i.toLowerCase();s0&&k6(i.charCodeAt(t-1)))return t;return i.length}const Qjt=mae(VR,TRe,SRe),Xjt=mae(VR,TRe,kRe),A_e=new Yh(1e4);function R_e(i,e,t=!1){if(typeof i!="string"||typeof e!="string")return null;let n=A_e.get(i);n||(n=new RegExp(IEt(i),"i"),A_e.set(i,n));const s=n.exec(e);return s?[{start:s.index,end:s.index+s[0].length}]:t?Xjt(i,e):Qjt(i,e)}function Zjt(i,e){const t=SC(i,i.toLowerCase(),0,e,e.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return t?ZP(t):null}function Jjt(i,e,t,n,s,r){const o=Math.min(13,i.length);for(;t"u")return[];const e=[],t=i[1];for(let n=i.length-1;n>1;n--){const s=i[n]+t,r=e[e.length-1];r&&r.end===s?r.end=s+1:e.push({start:s,end:s+1})}return e}const e_=128;function _ae(){const i=[],e=[];for(let t=0;t<=e_;t++)e[t]=0;for(let t=0;t<=e_;t++)i.push(e.slice(0));return i}function ARe(i){const e=[];for(let t=0;t<=i;t++)e[t]=0;return e}const RRe=ARe(2*e_),vX=ARe(2*e_),xm=_ae(),hy=_ae(),j3=_ae();function F3(i,e){if(e<0||e>=i.length)return!1;const t=i.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!Kre(t)}}function M_e(i,e){if(e<0||e>=i.length)return!1;switch(i.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function gj(i,e,t){return e[i]!==t[i]}function eFt(i,e,t,n,s,r,o=!1){for(;ee_?e_:i.length,l=n.length>e_?e_:n.length;if(t>=a||r>=l||a-t>l-r||!eFt(e,t,a,s,r,l,!0))return;tFt(a,l,t,r,e,s);let c=1,u=1,h=t,g=r;const f=[!1];for(c=1,h=t;hw,R=I?hy[c][u-1]+(xm[c][u-1]>0?-5:0):0,P=g>w+1&&xm[c][u-1]>0,j=P?hy[c][u-2]+(xm[c][u-2]>0?-5:0):0;if(P&&(!I||j>=R)&&(!D||j>=T))hy[c][u]=j,j3[c][u]=3,xm[c][u]=0;else if(I&&(!D||R>=T))hy[c][u]=R,j3[c][u]=2,xm[c][u]=0;else if(D)hy[c][u]=T,j3[c][u]=1,xm[c][u]=xm[c-1][u-1]+1;else throw new Error("not possible")}}if(!f[0]&&!o.firstMatchCanBeWeak)return;c--,u--;const m=[hy[c][u],r];let x=0,v=0;for(;c>=1;){let w=u;do{const k=j3[c][w];if(k===3)w=w-2;else if(k===2)w=w-1;else break}while(w>=1);x>1&&e[t+c-1]===s[r+u-1]&&!gj(w+r-1,n,s)&&x+1>xm[c][w]&&(w=u),w===u?x++:x=1,v||(v=w),c--,u=w-1,m.push(u)}l-r===a&&o.boostFullMatch&&(m[0]+=2);const _=v-a;return m[0]-=_,m}function tFt(i,e,t,n,s,r){let o=i-1,a=e-1;for(;o>=t&&a>=n;)s[o]===r[a]&&(vX[o]=a,o--),a--}function nFt(i,e,t,n,s,r,o,a,l,c,u){if(e[t]!==r[o])return Number.MIN_SAFE_INTEGER;let h=1,g=!1;return o===t-n?h=i[t]===s[o]?7:5:gj(o,s,r)&&(o===0||!gj(o-1,s,r))?(h=i[t]===s[o]?7:5,g=!0):F3(r,o)&&(o===0||!F3(r,o-1))?h=5:(F3(r,o-1)||M_e(r,o-1))&&(h=5,g=!0),h>1&&t===n&&(u[0]=!0),g||(g=gj(o,s,r)||F3(r,o-1)||M_e(r,o-1)),t===n?o>l&&(h-=g?3:5):c?h+=g?2:0:h+=g?0:1,o+1===a&&(h-=g?3:5),h}function iFt(i,e,t,n,s,r,o){return sFt(i,e,t,n,s,r,!0,o)}function sFt(i,e,t,n,s,r,o,a){let l=SC(i,e,t,n,s,r,a);if(i.length>=3){const c=Math.min(7,i.length-1);for(let u=t+1;ul[0])&&(l=g))}}}return l}function rFt(i,e){if(e+1>=i.length)return;const t=i[e],n=i[e+1];if(t!==n)return i.slice(0,e)+n+t+i.slice(e+2)}const oFt="$(",yae=new RegExp(`\\$\\(${Tt.iconNameExpression}(?:${Tt.iconModifierExpression})?\\)`,"g"),aFt=new RegExp(`(\\\\)?${yae.source}`,"g");function lFt(i){return i.replace(aFt,(e,t)=>t?e:`\\${e}`)}const cFt=new RegExp(`\\\\${yae.source}`,"g");function dFt(i){return i.replace(cFt,e=>`\\${e}`)}const uFt=new RegExp(`(\\s)?(\\\\)?${yae.source}(\\s)?`,"g");function wae(i){return i.indexOf(oFt)===-1?i:i.replace(uFt,(e,t,n,s)=>n?e:t||s||"")}function MRe(i){return i?i.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}const vq=new RegExp(`\\$\\(${Tt.iconNameCharacter}+\\)`,"g");function _1(i){vq.lastIndex=0;let e="";const t=[];let n=0;for(;;){const s=vq.lastIndex,r=vq.exec(i),o=i.substring(s,r==null?void 0:r.index);if(o.length>0){e+=o;for(let a=0;a" ".repeat(s.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ +`:` + +`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=` +${fFt(t,e)} +`,this}appendLink(e,t,n){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),n&&(this.value+=` "${this._escape(this._escape(n,'"'),")")}"`),this.value+=")",this}_escape(e,t){const n=new RegExp(Qc(t),"g");return e.replace(n,(s,r)=>e.charAt(r-1)!=="\\"?`\\${s}`:s)}}function RL(i){return Ib(i)?!i.value:Array.isArray(i)?i.every(RL):!0}function Ib(i){return i instanceof Ma?!0:i&&typeof i=="object"?typeof i.value=="string"&&(typeof i.isTrusted=="boolean"||typeof i.isTrusted=="object"||i.isTrusted===void 0)&&(typeof i.supportThemeIcons=="boolean"||i.supportThemeIcons===void 0)&&(typeof i.supportAlertSyntax=="boolean"||i.supportAlertSyntax===void 0):!1}function hFt(i,e){return i===e?!0:!i||!e?!1:i.value===e.value&&i.isTrusted===e.isTrusted&&i.supportThemeIcons===e.supportThemeIcons&&i.supportHtml===e.supportHtml&&i.supportAlertSyntax===e.supportAlertSyntax&&(i.baseUri===e.baseUri||!!i.baseUri&&!!e.baseUri&&J_(kt.from(i.baseUri),kt.from(e.baseUri)))}function gFt(i){return i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}function fFt(i,e){var s;const t=((s=i.match(/^`+/gm))==null?void 0:s.reduce((r,o)=>r.length>o.length?r:o).length)??0,n=t>=3?t+1:3;return[`${"`".repeat(n)}${e}`,i,`${"`".repeat(n)}`].join(` +`)}function B3(i){return i.replace(/"/g,""")}function _q(i){return i&&i.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}function pFt(i){const e=[],t=i.split("|").map(s=>s.trim());i=t[0];const n=t[1];if(n){const s=/height=(\d+)/.exec(n),r=/width=(\d+)/.exec(n),o=s?s[1]:"",a=r?r[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(o));l&&e.push(`width="${a}"`),c&&e.push(`height="${o}"`)}return{href:i,dimensions:e}}function PRe(i,...e){return kt.from({scheme:Ot.command,path:i,query:e.length?encodeURIComponent(JSON.stringify(e)):void 0})}class Cae{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const _X=new Cae("id#");function Sae(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let cS=Sae();function ORe(i){cS=i}const jRe=/[&<>"']/,mFt=new RegExp(jRe.source,"g"),FRe=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,bFt=new RegExp(FRe.source,"g"),xFt={"&":"&","<":"<",">":">",'"':""","'":"'"},P_e=i=>xFt[i];function ku(i,e){if(e){if(jRe.test(i))return i.replace(mFt,P_e)}else if(FRe.test(i))return i.replace(bFt,P_e);return i}const vFt=/(^|[^\[])\^/g;function kr(i,e){let t=typeof i=="string"?i:i.source;e=e||"";const n={replace:(s,r)=>{let o=typeof r=="string"?r:r.source;return o=o.replace(vFt,"$1"),t=t.replace(s,o),n},getRegex:()=>new RegExp(t,e)};return n}function O_e(i){try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}const HA={exec:()=>null};function j_e(i,e){const t=i.replace(/\|/g,(r,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{const r=s.match(/^\s+/);if(r===null)return s;const[o]=r;return o.length>=n.length?s.slice(n.length):s}).join(` +`)}class N6{constructor(e){Et(this,"options");Et(this,"rules");Et(this,"lexer");this.options=e||cS}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:dI(n,` +`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=yFt(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const s=dI(n,"#");(this.options.pedantic||!s||/ $/.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:dI(t[0],` +`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=dI(t[0],` +`).split(` +`),s="",r="";const o=[];for(;n.length>0;){let a=!1;const l=[];let c;for(c=0;c/.test(n[c]))l.push(n[c]),a=!0;else if(!a)l.push(n[c]);else break;n=n.slice(c);const u=l.join(` +`),h=u.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`).replace(/^ {0,3}>[ \t]?/gm,"");s=s?`${s} +${u}`:u,r=r?`${r} +${h}`:h;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,o,!0),this.lexer.state.top=g,n.length===0)break;const f=o[o.length-1];if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){const m=f,x=m.raw+` +`+n.join(` +`),v=this.blockquote(x);o[o.length-1]=v,s=s.substring(0,s.length-m.raw.length)+v.raw,r=r.substring(0,r.length-m.text.length)+v.text;break}else if((f==null?void 0:f.type)==="list"){const m=f,x=m.raw+` +`+n.join(` +`),v=this.list(x);o[o.length-1]=v,s=s.substring(0,s.length-f.raw.length)+v.raw,r=r.substring(0,r.length-m.raw.length)+v.raw,n=x.substring(o[o.length-1].raw.length).split(` +`);continue}}return{type:"blockquote",raw:s,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const o=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let a=!1;for(;e;){let l=!1,c="",u="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let h=t[2].split(` +`,1)[0].replace(/^\t+/,_=>" ".repeat(3*_.length)),g=e.split(` +`,1)[0],f=!h.trim(),m=0;if(this.options.pedantic?(m=2,u=h.trimStart()):f?m=t[1].length+1:(m=t[2].search(/[^ ]/),m=m>4?1:m,u=h.slice(m),m+=t[1].length),f&&/^ *$/.test(g)&&(c+=g+` +`,e=e.substring(g.length+1),l=!0),!l){const _=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,m-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:\`\`\`|~~~)`),C=new RegExp(`^ {0,${Math.min(3,m-1)}}#`);for(;e;){const E=e.split(` +`,1)[0];if(g=E,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),k.test(g)||C.test(g)||_.test(g)||w.test(e))break;if(g.search(/[^ ]/)>=m||!g.trim())u+=` +`+g.slice(m);else{if(f||h.search(/[^ ]/)>=4||k.test(h)||C.test(h)||w.test(h))break;u+=` +`+g}!f&&!g.trim()&&(f=!0),c+=E+` +`,e=e.substring(E.length+1),h=g.slice(m)}}r.loose||(a?r.loose=!0:/\n *\n *$/.test(c)&&(a=!0));let x=null,v;this.options.gfm&&(x=/^\[[ xX]\] /.exec(u),x&&(v=x[0]!=="[ ] ",u=u.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:c,task:!!x,checked:v,loose:!1,text:u,tokens:[]}),r.raw+=c}r.items[r.items.length-1].raw=r.items[r.items.length-1].raw.trimEnd(),r.items[r.items.length-1].text=r.items[r.items.length-1].text.trimEnd(),r.raw=r.raw.trimEnd();for(let l=0;lh.type==="space"),u=c.length>0&&c.some(h=>/\n.*\n/.test(h.raw));r.loose=u}if(r.loose)for(let l=0;l$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=j_e(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),r=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` +`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const a of s)/^ *-+: *$/.test(a)?o.align.push("right"):/^ *:-+: *$/.test(a)?o.align.push("center"):/^ *:-+ *$/.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:ku(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const o=dI(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=_Ft(t[2],"()");if(o>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);o&&(s=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),F_e(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const s=(n[2]||n[1]).replace(/\s+/g," "),r=t[s.toLowerCase()];if(!r){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return F_e(n,r,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...s[0]].length-1;let a,l,c=o,u=0;const h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+o);(s=h.exec(t))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(l=[...a].length,s[3]||s[4]){c+=l;continue}else if((s[5]||s[6])&&o%3&&!((o+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);const g=[...s[0]][0].length,f=e.slice(0,o+s.index+g+l);if(Math.min(o,l)%2){const x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}const m=f.slice(2,-2);return{type:"strong",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return s&&r&&(n=n.substring(1,n.length-1)),n=ku(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=ku(t[1]),s="mailto:"+n):(n=ku(t[1]),s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let s,r;if(t[2]==="@")s=ku(t[0]),r="mailto:"+s;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);s=ku(t[0]),t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=ku(t[0]),{type:"text",raw:t[0],text:n}}}}const wFt=/^(?: *(?:\n|$))+/,CFt=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,SFt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,JP=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kFt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,BRe=/(?:[*+-]|\d{1,9}[.)])/,HRe=kr(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,BRe).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),kae=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,NFt=/^[^\n]+/,Nae=/(?!\s*\])(?:\\.|[^\[\]\\])+/,EFt=kr(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Nae).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),LFt=kr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,BRe).getRegex(),fW="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Eae=/|$))/,DFt=kr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Eae).replace("tag",fW).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),WRe=kr(kae).replace("hr",JP).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",fW).getRegex(),TFt=kr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",WRe).getRegex(),Lae={blockquote:TFt,code:CFt,def:EFt,fences:SFt,heading:kFt,hr:JP,html:DFt,lheading:HRe,list:LFt,newline:wFt,paragraph:WRe,table:HA,text:NFt},B_e=kr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",JP).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",fW).getRegex(),IFt={...Lae,table:B_e,paragraph:kr(kae).replace("hr",JP).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",B_e).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",fW).getRegex()},AFt={...Lae,html:kr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Eae).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:HA,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:kr(kae).replace("hr",JP).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",HRe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},VRe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,RFt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,zRe=/^( {2,}|\\)\n(?!\s*$)/,MFt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,jFt=kr(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,eO).getRegex(),FFt=kr("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,eO).getRegex(),BFt=kr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,eO).getRegex(),HFt=kr(/\\([punct])/,"gu").replace(/punct/g,eO).getRegex(),WFt=kr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),VFt=kr(Eae).replace("(?:-->|$)","-->").getRegex(),zFt=kr("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",VFt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),E6=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,UFt=kr(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",E6).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),URe=kr(/^!?\[(label)\]\[(ref)\]/).replace("label",E6).replace("ref",Nae).getRegex(),$Re=kr(/^!?\[(ref)\](?:\[\])?/).replace("ref",Nae).getRegex(),$Ft=kr("reflink|nolink(?!\\()","g").replace("reflink",URe).replace("nolink",$Re).getRegex(),Dae={_backpedal:HA,anyPunctuation:HFt,autolink:WFt,blockSkip:OFt,br:zRe,code:RFt,del:HA,emStrongLDelim:jFt,emStrongRDelimAst:FFt,emStrongRDelimUnd:BFt,escape:VRe,link:UFt,nolink:$Re,punctuation:PFt,reflink:URe,reflinkSearch:$Ft,tag:zFt,text:MFt,url:HA},qFt={...Dae,link:kr(/^!?\[(label)\]\((.*?)\)/).replace("label",E6).getRegex(),reflink:kr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",E6).getRegex()},yX={...Dae,escape:kr(VRe).replace("])","~|])").getRegex(),url:kr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(c.length));let s,r,o;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(s=a.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))){if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length),s.raw.length===1&&t.length>0?t[t.length-1].raw+=` +`:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=` +`+s.raw,r.text+=` +`+s.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=` +`+s.raw,r.text+=` +`+s.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=e.slice(1);let c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){r=t[t.length-1],n&&(r==null?void 0:r.type)==="paragraph"?(r.raw+=` +`+s.raw,r.text+=` +`+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(s),n=o.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length),r=t[t.length-1],r&&r.type==="text"?(r.raw+=` +`+s.raw,r.text+=` +`+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(s);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,r,o=e,a,l,c;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(n=u.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,o,c)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(r=e,this.options.extensions&&this.options.extensions.startInline){let u=1/0;const h=e.slice(1);let g;this.options.extensions.startInline.forEach(f=>{g=f.call({lexer:this},h),typeof g=="number"&&g>=0&&(u=Math.min(u,g))}),u<1/0&&u>=0&&(r=e.substring(0,u+1))}if(n=this.tokenizer.inlineText(r)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(c=n.raw.slice(-1)),l=!0,s=t[t.length-1],s&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(e){const u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return t}}class UR{constructor(e){Et(this,"options");Et(this,"parser");this.options=e||cS}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const s=(o=(t||"").match(/^\S*/))==null?void 0:o[0],r=e.replace(/\n$/,"")+` +`;return s?'
'+(n?r:ku(r,!0))+`
+`:"
"+(n?r:ku(r,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){const t=e.ordered,n=e.start;let s="";for(let a=0;a +`+s+" +`}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t="",n="";for(let r=0;r${s}`),` + +`+t+` +`+s+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=O_e(e);if(r===null)return s;e=r;let o='
    ",o}image({href:e,title:t,text:n}){const s=O_e(e);if(s===null)return n;e=s;let r=`${n}{const c=a[l].flat(1/0);n=n.concat(this.walkTokens(c,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const o=t.renderers[r.name];o?t.renderers[r.name]=function(...a){let l=r.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){const r=this.defaults.renderer||new UR(this.defaults);for(const o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,l=n.renderer[a],c=r[a];r[a]=(...u)=>{let h=l.apply(r,u);return h===!1&&(h=c.apply(r,u)),h||""}}s.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new N6(this.defaults);for(const o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,l=n.tokenizer[a],c=r[a];r[a]=(...u)=>{let h=l.apply(r,u);return h===!1&&(h=c.apply(r,u)),h}}s.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new WA;for(const o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;const a=o,l=n.hooks[a],c=r[a];WA.passThroughHooks.has(o)?r[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(r,u)).then(g=>c.call(r,g));const h=l.call(r,u);return c.call(r,h)}:r[a]=(...u)=>{let h=l.apply(r,u);return h===!1&&(h=c.apply(r,u)),h}}s.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(a){let l=[];return l.push(o.call(this,a)),r&&(l=l.concat(r.call(this,a))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return lp.lex(e,t??this.defaults)}parser(e,t){return cp.parse(e,t??this.defaults)}parseMarkdown(e,t){return(s,r)=>{const o={...r},a={...this.defaults,...o},l=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&o.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof s>"u"||s===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof s!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(s)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(s):s).then(c=>e(c,a)).then(c=>a.hooks?a.hooks.processAllTokens(c):c).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>t(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(l);try{a.hooks&&(s=a.hooks.preprocess(s));let c=e(s,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let u=t(c,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(c){return l(c)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){const s="

    An error occurred:

    "+ku(n.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}}const kC=new qRe;function ur(i,e){return kC.parse(i,e)}ur.options=ur.setOptions=function(i){return kC.setOptions(i),ur.defaults=kC.defaults,ORe(ur.defaults),ur};ur.getDefaults=Sae;ur.defaults=cS;ur.use=function(...i){return kC.use(...i),ur.defaults=kC.defaults,ORe(ur.defaults),ur};ur.walkTokens=function(i,e){return kC.walkTokens(i,e)};ur.parseInline=kC.parseInline;ur.Parser=cp;ur.parser=cp.parse;ur.Renderer=UR;ur.TextRenderer=Tae;ur.Lexer=lp;ur.lexer=lp.lex;ur.Tokenizer=N6;ur.Hooks=WA;ur.parse=ur;ur.options;ur.setOptions;ur.use;ur.walkTokens;ur.parseInline;const GFt=ur;cp.parse;const $R=lp.lex;function YFt(i){return JSON.stringify(i,QFt)}function wX(i){let e=JSON.parse(i);return e=CX(e),e}function QFt(i,e){return e instanceof RegExp?{$mid:2,source:e.source,flags:e.flags}:e}function CX(i,e=0){if(!i||e>200)return i;if(typeof i=="object"){switch(i.$mid){case 1:return kt.revive(i);case 2:return new RegExp(i.source,i.flags);case 17:return new Date(i.source)}if(i instanceof p_||i instanceof Uint8Array)return i;if(Array.isArray(i))for(let t=0;t2?n-2:0),r=2;r1?t-1:0),s=1;s1?t-1:0),s=1;s2&&arguments[2]!==void 0?arguments[2]:fj;H_e&&H_e(i,null);let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const r=t(s);r!==s&&(XFt(e)||(e[n]=r),s=r)}i[s]=!0}return i}function r6t(i){for(let e=0;e/gm),d6t=Vh(/\$\{[\w\W]*/gm),u6t=Vh(/^data-[\-\w.\u00B7-\uFFFF]+$/),h6t=Vh(/^aria-[\-\w]+$/),YRe=Vh(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),g6t=Vh(/^(?:\w+script|data):/i),f6t=Vh(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),QRe=Vh(/^html$/i),p6t=Vh(/^[a-z][.\w]*(-[.\w]+)+$/i);var q_e=Object.freeze({__proto__:null,ARIA_ATTR:h6t,ATTR_WHITESPACE:f6t,CUSTOM_ELEMENT:p6t,DATA_ATTR:u6t,DOCTYPE_NAME:QRe,ERB_EXPR:c6t,IS_ALLOWED_URI:YRe,IS_SCRIPT_OR_DATA:g6t,MUSTACHE_EXPR:l6t,TMPLIT_EXPR:d6t});const mI={element:1,text:3,progressingInstruction:7,comment:8,document:9},m6t=function(){return typeof window>"u"?null:window},b6t=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";t&&t.hasAttribute(s)&&(n=t.getAttribute(s));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},K_e=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function XRe(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m6t();const e=xn=>XRe(xn);if(e.version="3.2.7",e.removed=[],!i||!i.document||i.document.nodeType!==mI.document||!i.Element)return e.isSupported=!1,e;let{document:t}=i;const n=t,s=n.currentScript,{DocumentFragment:r,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:h,DOMParser:g,trustedTypes:f}=i,m=l.prototype,x=pI(m,"cloneNode"),v=pI(m,"remove"),_=pI(m,"nextSibling"),w=pI(m,"childNodes"),k=pI(m,"parentNode");if(typeof o=="function"){const xn=t.createElement("template");xn.content&&xn.content.ownerDocument&&(t=xn.content.ownerDocument)}let C,E="";const{implementation:D,createNodeIterator:T,createDocumentFragment:I,getElementsByTagName:R}=t,{importNode:P}=n;let j=K_e();e.isSupported=typeof KRe=="function"&&typeof k=="function"&&D&&D.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:H,TMPLIT_EXPR:$,DATA_ATTR:q,ARIA_ATTR:V,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:ne}=q_e;let{IS_ALLOWED_URI:W}=q_e,Y=null;const G=Fi({},[...V_e,...Cq,...Sq,...kq,...z_e]);let U=null;const ue=Fi({},[...U_e,...Nq,...$_e,...V3]);let fe=Object.seal(GRe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,tt=null,ge=!0,he=!0,We=!1,Ie=!0,_t=!1,ut=!0,Wt=!1,Re=!1,Me=!1,pt=!1,mt=!1,$t=!1,Tn=!0,Pi=!1;const Ti="user-content-";let cs=!0,ds=!1,zr={},Ye=null;const yt=Fi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let sn=null;const In=Fi({},["audio","video","img","source","image","track"]);let On=null;const ws=Fi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ir="http://www.w3.org/1998/Math/MathML",Nr="http://www.w3.org/2000/svg",$i="http://www.w3.org/1999/xhtml";let Rs=$i,mi=!1,ta=null;const Er=Fi({},[ir,Nr,$i],yq);let fr=Fi({},["mi","mo","mn","ms","mtext"]),vl=Fi({},["annotation-xml"]);const nu=Fi({},["title","style","font","a","script"]);let Cs=null;const Vs=["application/xhtml+xml","text/html"],rn="text/html";let Cn=null,ai=null;const li=t.createElement("form"),sr=function(Ce){return Ce instanceof RegExp||Ce instanceof Function},Ii=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ai&&ai===Ce)){if((!Ce||typeof Ce!="object")&&(Ce={}),Ce=Am(Ce),Cs=Vs.indexOf(Ce.PARSER_MEDIA_TYPE)===-1?rn:Ce.PARSER_MEDIA_TYPE,Cn=Cs==="application/xhtml+xml"?yq:fj,Y=cg(Ce,"ALLOWED_TAGS")?Fi({},Ce.ALLOWED_TAGS,Cn):G,U=cg(Ce,"ALLOWED_ATTR")?Fi({},Ce.ALLOWED_ATTR,Cn):ue,ta=cg(Ce,"ALLOWED_NAMESPACES")?Fi({},Ce.ALLOWED_NAMESPACES,yq):Er,On=cg(Ce,"ADD_URI_SAFE_ATTR")?Fi(Am(ws),Ce.ADD_URI_SAFE_ATTR,Cn):ws,sn=cg(Ce,"ADD_DATA_URI_TAGS")?Fi(Am(In),Ce.ADD_DATA_URI_TAGS,Cn):In,Ye=cg(Ce,"FORBID_CONTENTS")?Fi({},Ce.FORBID_CONTENTS,Cn):yt,Le=cg(Ce,"FORBID_TAGS")?Fi({},Ce.FORBID_TAGS,Cn):Am({}),tt=cg(Ce,"FORBID_ATTR")?Fi({},Ce.FORBID_ATTR,Cn):Am({}),zr=cg(Ce,"USE_PROFILES")?Ce.USE_PROFILES:!1,ge=Ce.ALLOW_ARIA_ATTR!==!1,he=Ce.ALLOW_DATA_ATTR!==!1,We=Ce.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=Ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=Ce.SAFE_FOR_TEMPLATES||!1,ut=Ce.SAFE_FOR_XML!==!1,Wt=Ce.WHOLE_DOCUMENT||!1,pt=Ce.RETURN_DOM||!1,mt=Ce.RETURN_DOM_FRAGMENT||!1,$t=Ce.RETURN_TRUSTED_TYPE||!1,Me=Ce.FORCE_BODY||!1,Tn=Ce.SANITIZE_DOM!==!1,Pi=Ce.SANITIZE_NAMED_PROPS||!1,cs=Ce.KEEP_CONTENT!==!1,ds=Ce.IN_PLACE||!1,W=Ce.ALLOWED_URI_REGEXP||YRe,Rs=Ce.NAMESPACE||$i,fr=Ce.MATHML_TEXT_INTEGRATION_POINTS||fr,vl=Ce.HTML_INTEGRATION_POINTS||vl,fe=Ce.CUSTOM_ELEMENT_HANDLING||{},Ce.CUSTOM_ELEMENT_HANDLING&&sr(Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(fe.tagNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&sr(Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(fe.attributeNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&typeof Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_t&&(he=!1),mt&&(pt=!0),zr&&(Y=Fi({},z_e),U=[],zr.html===!0&&(Fi(Y,V_e),Fi(U,U_e)),zr.svg===!0&&(Fi(Y,Cq),Fi(U,Nq),Fi(U,V3)),zr.svgFilters===!0&&(Fi(Y,Sq),Fi(U,Nq),Fi(U,V3)),zr.mathMl===!0&&(Fi(Y,kq),Fi(U,$_e),Fi(U,V3))),Ce.ADD_TAGS&&(Y===G&&(Y=Am(Y)),Fi(Y,Ce.ADD_TAGS,Cn)),Ce.ADD_ATTR&&(U===ue&&(U=Am(U)),Fi(U,Ce.ADD_ATTR,Cn)),Ce.ADD_URI_SAFE_ATTR&&Fi(On,Ce.ADD_URI_SAFE_ATTR,Cn),Ce.FORBID_CONTENTS&&(Ye===yt&&(Ye=Am(Ye)),Fi(Ye,Ce.FORBID_CONTENTS,Cn)),cs&&(Y["#text"]=!0),Wt&&Fi(Y,["html","head","body"]),Y.table&&(Fi(Y,["tbody"]),delete Le.tbody),Ce.TRUSTED_TYPES_POLICY){if(typeof Ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw fI('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fI('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=Ce.TRUSTED_TYPES_POLICY,E=C.createHTML("")}else C===void 0&&(C=b6t(f,s)),C!==null&&typeof E=="string"&&(E=C.createHTML(""));Zc&&Zc(Ce),ai=Ce}},Ni=Fi({},[...Cq,...Sq,...o6t]),Bo=Fi({},[...kq,...a6t]),zs=function(Ce){let Ct=k(Ce);(!Ct||!Ct.tagName)&&(Ct={namespaceURI:Rs,tagName:"template"});const Jt=fj(Ce.tagName),Ss=fj(Ct.tagName);return ta[Ce.namespaceURI]?Ce.namespaceURI===Nr?Ct.namespaceURI===$i?Jt==="svg":Ct.namespaceURI===ir?Jt==="svg"&&(Ss==="annotation-xml"||fr[Ss]):!!Ni[Jt]:Ce.namespaceURI===ir?Ct.namespaceURI===$i?Jt==="math":Ct.namespaceURI===Nr?Jt==="math"&&vl[Ss]:!!Bo[Jt]:Ce.namespaceURI===$i?Ct.namespaceURI===Nr&&!vl[Ss]||Ct.namespaceURI===ir&&!fr[Ss]?!1:!Bo[Jt]&&(nu[Jt]||!Ni[Jt]):!!(Cs==="application/xhtml+xml"&&ta[Ce.namespaceURI]):!1},Ei=function(Ce){hI(e.removed,{element:Ce});try{k(Ce).removeChild(Ce)}catch{v(Ce)}},lo=function(Ce,Ct){try{hI(e.removed,{attribute:Ct.getAttributeNode(Ce),from:Ct})}catch{hI(e.removed,{attribute:null,from:Ct})}if(Ct.removeAttribute(Ce),Ce==="is")if(pt||mt)try{Ei(Ct)}catch{}else try{Ct.setAttribute(Ce,"")}catch{}},Qr=function(Ce){let Ct=null,Jt=null;if(Me)Ce=""+Ce;else{const qi=wq(Ce,/^[\r\n\t ]+/);Jt=qi&&qi[0]}Cs==="application/xhtml+xml"&&Rs===$i&&(Ce=''+Ce+"");const Ss=C?C.createHTML(Ce):Ce;if(Rs===$i)try{Ct=new g().parseFromString(Ss,Cs)}catch{}if(!Ct||!Ct.documentElement){Ct=D.createDocument(Rs,"template",null);try{Ct.documentElement.innerHTML=mi?E:Ss}catch{}}const Xr=Ct.body||Ct.documentElement;return Ce&&Jt&&Xr.insertBefore(t.createTextNode(Jt),Xr.childNodes[0]||null),Rs===$i?R.call(Ct,Wt?"html":"body")[0]:Wt?Ct.documentElement:Xr},_l=function(Ce){return T.call(Ce.ownerDocument||Ce,Ce,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},$a=function(Ce){return Ce instanceof h&&(typeof Ce.nodeName!="string"||typeof Ce.textContent!="string"||typeof Ce.removeChild!="function"||!(Ce.attributes instanceof u)||typeof Ce.removeAttribute!="function"||typeof Ce.setAttribute!="function"||typeof Ce.namespaceURI!="string"||typeof Ce.insertBefore!="function"||typeof Ce.hasChildNodes!="function")},yl=function(Ce){return typeof a=="function"&&Ce instanceof a};function rr(xn,Ce,Ct){W3(xn,Jt=>{Jt.call(e,Ce,Ct,ai)})}const wi=function(Ce){let Ct=null;if(rr(j.beforeSanitizeElements,Ce,null),$a(Ce))return Ei(Ce),!0;const Jt=Cn(Ce.nodeName);if(rr(j.uponSanitizeElement,Ce,{tagName:Jt,allowedTags:Y}),ut&&Ce.hasChildNodes()&&!yl(Ce.firstElementChild)&&Dc(/<[/\w!]/g,Ce.innerHTML)&&Dc(/<[/\w!]/g,Ce.textContent)||Ce.nodeType===mI.progressingInstruction||ut&&Ce.nodeType===mI.comment&&Dc(/<[/\w]/g,Ce.data))return Ei(Ce),!0;if(!Y[Jt]||Le[Jt]){if(!Le[Jt]&&_x(Jt)&&(fe.tagNameCheck instanceof RegExp&&Dc(fe.tagNameCheck,Jt)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(Jt)))return!1;if(cs&&!Ye[Jt]){const Ss=k(Ce)||Ce.parentNode,Xr=w(Ce)||Ce.childNodes;if(Xr&&Ss){const qi=Xr.length;for(let Ki=qi-1;Ki>=0;--Ki){const na=x(Xr[Ki],!0);na.__removalCount=(Ce.__removalCount||0)+1,Ss.insertBefore(na,_(Ce))}}}return Ei(Ce),!0}return Ce instanceof l&&!zs(Ce)||(Jt==="noscript"||Jt==="noembed"||Jt==="noframes")&&Dc(/<\/no(script|embed|frames)/i,Ce.innerHTML)?(Ei(Ce),!0):(_t&&Ce.nodeType===mI.text&&(Ct=Ce.textContent,W3([B,H,$],Ss=>{Ct=gI(Ct,Ss," ")}),Ce.textContent!==Ct&&(hI(e.removed,{element:Ce.cloneNode()}),Ce.textContent=Ct)),rr(j.afterSanitizeElements,Ce,null),!1)},tc=function(Ce,Ct,Jt){if(Tn&&(Ct==="id"||Ct==="name")&&(Jt in t||Jt in li))return!1;if(!(he&&!tt[Ct]&&Dc(q,Ct))){if(!(ge&&Dc(V,Ct))){if(!U[Ct]||tt[Ct]){if(!(_x(Ce)&&(fe.tagNameCheck instanceof RegExp&&Dc(fe.tagNameCheck,Ce)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(Ce))&&(fe.attributeNameCheck instanceof RegExp&&Dc(fe.attributeNameCheck,Ct)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(Ct,Ce))||Ct==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&Dc(fe.tagNameCheck,Jt)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(Jt))))return!1}else if(!On[Ct]){if(!Dc(W,gI(Jt,ae,""))){if(!((Ct==="src"||Ct==="xlink:href"||Ct==="href")&&Ce!=="script"&&n6t(Jt,"data:")===0&&sn[Ce])){if(!(We&&!Dc(X,gI(Jt,ae,"")))){if(Jt)return!1}}}}}}return!0},_x=function(Ce){return Ce!=="annotation-xml"&&wq(Ce,ne)},R0=function(Ce){rr(j.beforeSanitizeAttributes,Ce,null);const{attributes:Ct}=Ce;if(!Ct||$a(Ce))return;const Jt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U,forceKeepAttr:void 0};let Ss=Ct.length;for(;Ss--;){const Xr=Ct[Ss],{name:qi,namespaceURI:Ki,value:na}=Xr,Jh=Cn(qi),iu=na;let Lr=qi==="value"?iu:i6t(iu);if(Jt.attrName=Jh,Jt.attrValue=Lr,Jt.keepAttr=!0,Jt.forceKeepAttr=void 0,rr(j.uponSanitizeAttribute,Ce,Jt),Lr=Jt.attrValue,Pi&&(Jh==="id"||Jh==="name")&&(lo(qi,Ce),Lr=Ti+Lr),ut&&Dc(/((--!?|])>)|<\/(style|title|textarea)/i,Lr)){lo(qi,Ce);continue}if(Jh==="attributename"&&wq(Lr,"href")){lo(qi,Ce);continue}if(Jt.forceKeepAttr)continue;if(!Jt.keepAttr){lo(qi,Ce);continue}if(!Ie&&Dc(/\/>/i,Lr)){lo(qi,Ce);continue}_t&&W3([B,H,$],sf=>{Lr=gI(Lr,sf," ")});const P0=Cn(Ce.nodeName);if(!tc(P0,Jh,Lr)){lo(qi,Ce);continue}if(C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Ki)switch(f.getAttributeType(P0,Jh)){case"TrustedHTML":{Lr=C.createHTML(Lr);break}case"TrustedScriptURL":{Lr=C.createScriptURL(Lr);break}}if(Lr!==iu)try{Ki?Ce.setAttributeNS(Ki,qi,Lr):Ce.setAttribute(qi,Lr),$a(Ce)?Ei(Ce):W_e(e.removed)}catch{lo(qi,Ce)}}rr(j.afterSanitizeAttributes,Ce,null)},M0=function xn(Ce){let Ct=null;const Jt=_l(Ce);for(rr(j.beforeSanitizeShadowDOM,Ce,null);Ct=Jt.nextNode();)rr(j.uponSanitizeShadowNode,Ct,null),wi(Ct),R0(Ct),Ct.content instanceof r&&xn(Ct.content);rr(j.afterSanitizeShadowDOM,Ce,null)};return e.sanitize=function(xn){let Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ct=null,Jt=null,Ss=null,Xr=null;if(mi=!xn,mi&&(xn=""),typeof xn!="string"&&!yl(xn))if(typeof xn.toString=="function"){if(xn=xn.toString(),typeof xn!="string")throw fI("dirty is not a string, aborting")}else throw fI("toString is not a function");if(!e.isSupported)return xn;if(Re||Ii(Ce),e.removed=[],typeof xn=="string"&&(ds=!1),ds){if(xn.nodeName){const na=Cn(xn.nodeName);if(!Y[na]||Le[na])throw fI("root node is forbidden and cannot be sanitized in-place")}}else if(xn instanceof a)Ct=Qr(""),Jt=Ct.ownerDocument.importNode(xn,!0),Jt.nodeType===mI.element&&Jt.nodeName==="BODY"||Jt.nodeName==="HTML"?Ct=Jt:Ct.appendChild(Jt);else{if(!pt&&!_t&&!Wt&&xn.indexOf("<")===-1)return C&&$t?C.createHTML(xn):xn;if(Ct=Qr(xn),!Ct)return pt?null:$t?E:""}Ct&&Me&&Ei(Ct.firstChild);const qi=_l(ds?xn:Ct);for(;Ss=qi.nextNode();)wi(Ss),R0(Ss),Ss.content instanceof r&&M0(Ss.content);if(ds)return xn;if(pt){if(mt)for(Xr=I.call(Ct.ownerDocument);Ct.firstChild;)Xr.appendChild(Ct.firstChild);else Xr=Ct;return(U.shadowroot||U.shadowrootmode)&&(Xr=P.call(n,Xr,!0)),Xr}let Ki=Wt?Ct.outerHTML:Ct.innerHTML;return Wt&&Y["!doctype"]&&Ct.ownerDocument&&Ct.ownerDocument.doctype&&Ct.ownerDocument.doctype.name&&Dc(QRe,Ct.ownerDocument.doctype.name)&&(Ki=" +`+Ki),_t&&W3([B,H,$],na=>{Ki=gI(Ki,na," ")}),C&&$t?C.createHTML(Ki):Ki},e.setConfig=function(){let xn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ii(xn),Re=!0},e.clearConfig=function(){ai=null,Re=!1},e.isValidAttribute=function(xn,Ce,Ct){ai||Ii({});const Jt=Cn(xn),Ss=Cn(Ce);return tc(Jt,Ss,Ct)},e.addHook=function(xn,Ce){typeof Ce=="function"&&hI(j[xn],Ce)},e.removeHook=function(xn,Ce){if(Ce!==void 0){const Ct=e6t(j[xn],Ce);return Ct===-1?void 0:t6t(j[xn],Ct,1)[0]}return W_e(j[xn])},e.removeHooks=function(xn){j[xn]=[]},e.removeAllHooks=function(){j=K_e()},e}var $k=XRe();const ZRe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","s","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]),JRe=Object.freeze(["href","target","src","alt","title","for","name","role","tabindex","x-dispatch","required","checked","placeholder","type","start","width","height","align"]),Eq="vscode-relative-path";function G_e(i,e){if(e.override==="*")return!0;try{const t=new URL(i,Eq+"://");return!!(e.override.includes(t.protocol.replace(/:$/,""))||e.allowRelativePaths&&t.protocol===Eq+":"&&!i.trim().toLowerCase().startsWith(Eq))}catch{return!1}}function x6t(i,e){$k.addHook("afterSanitizeAttributes",t=>{for(const n of["href","src"])if(t.hasAttribute(n)){const s=t.getAttribute(n);n==="href"?!s.startsWith("#")&&!G_e(s,i)&&t.removeAttribute(n):G_e(s,e)||t.removeAttribute(n)}})}const v6t=Object.freeze({ALLOWED_TAGS:[...ZRe],ALLOWED_ATTR:[...JRe],ALLOW_UNKNOWN_PROTOCOLS:!0});function _6t(i,e){return eMe(i,e,"trusted")}function eMe(i,e,t){var n,s;try{const r={...v6t};e!=null&&e.allowedTags&&(e.allowedTags.override&&(r.ALLOWED_TAGS=[...e.allowedTags.override]),e.allowedTags.augment&&(r.ALLOWED_TAGS=[...r.ALLOWED_TAGS??[],...e.allowedTags.augment]));let o=[...JRe];e!=null&&e.allowedAttributes&&(e.allowedAttributes.override&&(o=[...e.allowedAttributes.override]),e.allowedAttributes.augment&&(o=[...o,...e.allowedAttributes.augment])),o=o.map(c=>typeof c=="string"?c.toLowerCase():{attributeName:c.attributeName.toLowerCase(),shouldKeep:c.shouldKeep});const a=new Set(o.map(c=>typeof c=="string"?c:c.attributeName)),l=new Map;for(const c of o)typeof c=="string"?l.delete(c):l.set(c.attributeName,c);return r.ALLOWED_ATTR=Array.from(a),x6t({override:((n=e==null?void 0:e.allowedLinkProtocols)==null?void 0:n.override)??[Ot.http,Ot.https],allowRelativePaths:(e==null?void 0:e.allowRelativeLinkPaths)??!1},{override:((s=e==null?void 0:e.allowedMediaProtocols)==null?void 0:s.override)??[Ot.http,Ot.https],allowRelativePaths:(e==null?void 0:e.allowRelativeMediaPaths)??!1}),e!=null&&e.replaceWithPlaintext&&$k.addHook("uponSanitizeElement",w6t),l.size&&$k.addHook("uponSanitizeAttribute",(c,u)=>{const h=l.get(u.attrName);if(h){const g=h.shouldKeep(c,u);typeof g=="string"?(u.keepAttr=!0,u.attrValue=g):u.keepAttr=g}else u.keepAttr=a.has(u.attrName)}),t==="dom"?$k.sanitize(i,{...r,RETURN_DOM_FRAGMENT:!0}):$k.sanitize(i,{...r,RETURN_TRUSTED_TYPE:!0})}finally{$k.removeAllHooks()}}const y6t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],w6t=(i,e,t)=>{var n,s;if(!e.allowedTags[e.tagName]&&e.tagName!=="body"){const r=tMe(i);r&&(i.nodeType===Node.COMMENT_NODE?(n=i.parentElement)==null||n.insertBefore(r,i):(s=i.parentElement)==null||s.replaceChild(r,i))}};function tMe(i){if(!i.ownerDocument)return;let e,t;if(i.nodeType===Node.COMMENT_NODE)e=``;else if(i instanceof Element){const o=i.tagName.toLowerCase(),a=y6t.includes(o),l=i.attributes.length?" "+Array.from(i.attributes).map(c=>`${c.name}="${c.value}"`).join(" "):"";e=`<${o}${l}>`,a||(t=``)}else return;const n=document.createDocumentFragment(),s=i.ownerDocument.createTextNode(e);for(n.appendChild(s);i.firstChild;)n.appendChild(i.firstChild);const r=t?i.ownerDocument.createTextNode(t):void 0;return r&&n.appendChild(r),n}function nMe(i,e,t){const n=eMe(e,t,"dom");vo(i,n)}const C6t=new RegExp(`(\\\\)?\\$\\((${Tt.iconNameExpression}(?:${Tt.iconModifierExpression})?)\\)`,"g");function v_(i){const e=new Array;let t,n=0,s=0;for(;(t=C6t.exec(i))!==null;){s=t.index||0,n{let n=[],s=[];return i&&({href:i,dimensions:n}=pFt(i),s.push(`src="${B3(i)}"`)),t&&s.push(`alt="${B3(t)}"`),e&&s.push(`title="${B3(e)}"`),n.length&&(s=s.concat(n)),""},paragraph({tokens:i}){return`

    ${this.parser.parseInline(i)}

    `},link({href:i,title:e,tokens:t}){let n=this.parser.parseInline(t);return typeof i!="string"?"":(i===n&&(n=_q(n)),e=typeof e=="string"?B3(_q(e)):"",i=_q(i),i=i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${n}`)}});function S6t(i){return function(e){const{tokens:t}=e,n=t[0];if((n==null?void 0:n.type)!=="paragraph")return i.call(this,e);const s=n.tokens;if(!s||s.length===0)return i.call(this,e);const r=s[0];if((r==null?void 0:r.type)!=="text")return i.call(this,e);const o=/^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*?\n*/i,a=r.raw.match(o);if(!a)return i.call(this,e);r.raw=r.raw.replace(o,""),r.text=r.text.replace(o,"");const l={note:"info",tip:"light-bulb",important:"comment",warning:"alert",caution:"stop"},c=a[1],u=c.charAt(0).toUpperCase()+c.slice(1).toLowerCase(),h=c.toLowerCase(),g=Gg({id:l[h]}).outerHTML,f=this.parser.parse(t);return`

    ${g}${u}${f.substring(3)}

    +`}}function tO(i,e={},t){var m,x,v;const n=new _e;let s=!1;const r=new qRe(...e.markedExtensions??[]),{renderer:o,codeBlocks:a,syncCodeBlocks:l}=N6t(r,e,i),c=E6t(i);let u;if(e.fillInIncompleteTokens){const _={...r.defaults,...e.markedOptions,renderer:o},w=r.lexer(c,_),k=H6t(w);u=r.parser(k,_)}else u=r.parse(c,{...e==null?void 0:e.markedOptions,renderer:o,async:!1});i.supportThemeIcons&&(u=v_(u).map(w=>typeof w=="string"?w:w.outerHTML).join(""));const h=document.createElement("div"),g=iMe(i,e.sanitizerConfig??{});nMe(h,u,g),k6t(i,e,h);let f;if(t?(f=t,vo(t,...h.children)):f=h,a.length>0)Promise.all(a).then(_=>{var C;if(s)return;const w=new Map(_),k=f.querySelectorAll("div[data-code]");for(const E of k){const D=w.get(E.dataset.code??"");D&&vo(E,D)}(C=e.asyncRenderCallback)==null||C.call(e)});else if(l.length>0){const _=new Map(l),w=f.querySelectorAll("div[data-code]");for(const k of w){const C=_.get(k.dataset.code??"");C&&vo(k,C)}}if(e.asyncRenderCallback)for(const _ of f.getElementsByTagName("img")){const w=n.add(de(_,"load",()=>{w.dispose(),e.asyncRenderCallback()}))}if(e.actionHandler){const _=w=>{const k=new va(xt(f),w);!k.leftButton&&!k.middleButton||Y_e(i,e,k)};n.add(de(f,"click",_)),n.add(de(f,"auxclick",_)),n.add(de(f,"keydown",w=>{const k=new ki(w);!k.equals(10)&&!k.equals(3)||Y_e(i,e,k)}))}for(const _ of[...f.getElementsByTagName("input")])if(((m=_.attributes.getNamedItem("type"))==null?void 0:m.value)==="checkbox")_.setAttribute("disabled","");else if((x=e.sanitizerConfig)!=null&&x.replaceWithPlaintext){const w=tMe(_);w?(v=_.parentElement)==null||v.replaceChild(w,_):_.remove()}else _.remove();return{element:f,dispose:()=>{s=!0,n.dispose()}}}function k6t(i,e,t){var n;for(const s of t.querySelectorAll("img, audio, video, source")){const r=s.getAttribute("src");if(r){let o=r;try{i.baseUri&&(o=NX(kt.from(i.baseUri),o))}catch{}if(s.setAttribute("src",Q_e(i,o,!0)),(n=e.sanitizerConfig)!=null&&n.remoteImageIsAllowed){const a=kt.parse(o);a.scheme!==Ot.file&&a.scheme!==Ot.data&&!e.sanitizerConfig.remoteImageIsAllowed(a)&&s.replaceWith(Oe("",void 0,s.outerHTML))}}}for(const s of t.querySelectorAll("a")){const r=s.getAttribute("href");if(s.setAttribute("href",""),!r||/^data:|javascript:/i.test(r)||/^command:/i.test(r)&&!i.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(r))s.replaceWith(...s.childNodes);else{let o=Q_e(i,r,!1);i.baseUri&&(o=NX(kt.from(i.baseUri),r)),s.dataset.href=o}}}function N6t(i,e,t){const n=new i.Renderer(e.markedOptions);n.image=Lq.image,n.link=Lq.link,n.paragraph=Lq.paragraph,t.supportAlertSyntax&&(n.blockquote=S6t(n.blockquote));const s=[],r=[];return e.codeBlockRendererSync?n.code=({text:o,lang:a,raw:l})=>{const c=_X.nextId(),u=e.codeBlockRendererSync(X_e(a),o,l);return r.push([c,u]),`
    ${Ph(o)}
    `}:e.codeBlockRenderer&&(n.code=({text:o,lang:a})=>{const l=_X.nextId(),c=e.codeBlockRenderer(X_e(a),o);return s.push(c.then(u=>[l,u])),`
    ${Ph(o)}
    `}),t.supportHtml||(n.html=({text:o})=>{var l;return(l=e.sanitizerConfig)!=null&&l.replaceWithPlaintext?Ph(o):(t.isTrusted?o.match(/^(]+>)|(<\/\s*span>)$/):void 0)?o:""}),{renderer:n,codeBlocks:s,syncCodeBlocks:r}}function E6t(i){let e=i.value;return e.length>1e5&&(e=`${e.substr(0,1e5)}…`),i.supportThemeIcons&&(e=dFt(e)),e}function Y_e(i,e,t){var s;const n=t.target.closest("a[data-href]");if(er(n))try{let r=n.dataset.href;r&&(i.baseUri&&(r=NX(kt.from(i.baseUri),r)),(s=e.actionHandler)==null||s.call(e,r,i))}catch(r){zt(r)}finally{t.preventDefault()}}function L6t(i,e){let t;try{t=wX(decodeURIComponent(e))}catch{}return t?(t=rAe(t,n=>{if(i.uris&&i.uris[n])return kt.revive(i.uris[n])}),encodeURIComponent(JSON.stringify(t))):e}function Q_e(i,e,t){const n=i.uris&&i.uris[e];let s=kt.revive(n);return t?e.startsWith(Ot.data+":")?e:(s||(s=kt.parse(e)),mIe.uriToBrowserUri(s).toString(!0)):!s||kt.parse(e).toString()===s.toString()?e:(s.query&&(s=s.with({query:L6t(i,s.query)})),s.toString())}function X_e(i){if(!i)return"";const e=i.split(/[\s+|:|,|\{|\?]/,1);return e.length?e[0]:i}function NX(i,e){return/^\w[\w\d+.-]*:/.test(e)?e:i.path.endsWith("/")?Ixe(i,e).toString():Ixe(P7(i),e).toString()}function D6t(i,e,t={}){const n=iMe(e,t);return _6t(i,n)}const T6t=Object.freeze([...ZRe,"input"]),I6t=Object.freeze(["align","autoplay","alt","colspan","controls","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","target","title","type","width","start","checked","disabled","value","data-code","data-href","data-severity",{attributeName:"style",shouldKeep:(i,e)=>i.tagName==="SPAN"&&e.attrName==="style"?/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(e.attrValue):!1},{attributeName:"class",shouldKeep:(i,e)=>i.tagName==="SPAN"&&e.attrName==="class"?/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(e.attrValue):!1}]);function iMe(i,e){var s,r,o;const t=i.isTrusted??!1,n=[Ot.http,Ot.https,Ot.mailto,Ot.file,Ot.vscodeFileResource,Ot.vscodeRemote,Ot.vscodeRemoteResource,Ot.vscodeNotebookCell];return t&&n.push(Ot.command),(s=e.allowedLinkSchemes)!=null&&s.augment&&n.push(...e.allowedLinkSchemes.augment),{allowedTags:{override:((r=e.allowedTags)==null?void 0:r.override)??T6t},allowedAttributes:{override:((o=e.allowedAttributes)==null?void 0:o.override)??I6t},allowedLinkProtocols:{override:n},allowRelativeLinkPaths:!!i.baseUri,allowedMediaProtocols:{override:[Ot.http,Ot.https,Ot.data,Ot.file,Ot.vscodeFileResource,Ot.vscodeRemote,Ot.vscodeRemoteResource]},allowRelativeMediaPaths:!!i.baseUri,replaceWithPlaintext:e.replaceWithPlaintext}}function A6t(i,e){if(typeof i=="string")return i;let t=i.value??"";t.length>1e5&&(t=`${t.substr(0,1e5)}…`);const n=GFt(t,{async:!1,renderer:M6t.value});return D6t(n,{isTrusted:!1},{}).toString().replace(/&(#\d+|[a-zA-Z]+);/g,s=>R6t.get(s)??s).trim()}const R6t=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function sMe(){const i=new UR;return i.code=({text:e})=>Ph(e),i.blockquote=({text:e})=>e+` +`,i.html=e=>"",i.heading=function({tokens:e}){return this.parser.parseInline(e)+` +`},i.hr=()=>"",i.list=function({items:e}){return e.map(t=>this.listitem(t)).join(` +`)+` +`},i.listitem=({text:e})=>e+` +`,i.paragraph=function({tokens:e}){return this.parser.parseInline(e)+` +`},i.table=function({header:e,rows:t}){return e.map(n=>this.tablecell(n)).join(" ")+` +`+t.map(n=>n.map(s=>this.tablecell(s)).join(" ")).join(` +`)+` +`},i.tablerow=({text:e})=>e,i.tablecell=function({tokens:e}){return this.parser.parseInline(e)},i.strong=({text:e})=>e,i.em=({text:e})=>e,i.codespan=({text:e})=>Ph(e),i.br=e=>` +`,i.del=({text:e})=>e,i.image=e=>"",i.text=({text:e})=>e,i.link=({text:e})=>e,i}const M6t=new ba(sMe);new ba(()=>{const i=sMe();return i.code=({text:e})=>` +\`\`\` +${Ph(e)} +\`\`\` +`,i});function qR(i){let e="";return i.forEach(t=>{e+=t.raw}),e}function rMe(i){var e,t;if(i.tokens)for(let n=i.tokens.length-1;n>=0;n--){const s=i.tokens[n];if(s.type==="text"){const r=s.raw.split(` +`),o=r[r.length-1];if(o.includes("`"))return V6t(i);if(o.includes("**"))return G6t(i);if(o.match(/\*\w/))return z6t(i);if(o.match(/(^|\s)__\w/))return Y6t(i);if(o.match(/(^|\s)_\w/))return U6t(i);if(P6t(o)||O6t(o)&&i.tokens.slice(0,n).some(a=>a.type==="text"&&a.raw.match(/\[[^\]]*$/))){const a=i.tokens.slice(n+1);return((e=a[0])==null?void 0:e.type)==="link"&&((t=a[1])==null?void 0:t.type)==="text"&&a[1].raw.match(/^ *"[^"]*$/)||o.match(/^[^"]* +"[^"]*$/)?q6t(i):$6t(i)}else if(o.match(/(^|\s)\[\w*[^\]]*$/))return K6t(i)}}}function P6t(i){return!!i.match(/(^|\s)\[.*\]\(\w*/)}function O6t(i){return!!i.match(/^[^\[]*\]\([^\)]*$/)}function j6t(i){var c;const e=i.items[i.items.length-1],t=e.tokens?e.tokens[e.tokens.length-1]:void 0,n=u=>{const h=u.items.at(-1),g=h==null?void 0:h.tokens.at(-1);return(g==null?void 0:g.type)==="heading"||(g==null?void 0:g.type)==="list"&&n(g)};let s;if((t==null?void 0:t.type)==="text"&&!("inRawBlock"in e))s=rMe(t);else if(n(i)){const u=$R(i.raw.trim()+"  ")[0];return u.type!=="list"?void 0:u}if(!s||s.type!=="paragraph")return;const r=qR(i.items.slice(0,-1)),o=(c=e.raw.match(/^(\s*(-|\d+\.|\*) +)/))==null?void 0:c[0];if(!o)return;const a=o+qR(e.tokens.slice(0,-1))+s.raw,l=$R(r+a)[0];if(l.type==="list")return l}function F6t(i,e){if(i.raw.match(/-\s*$/))return $R(e+"  ")}const B6t=3;function H6t(i){for(let e=0;e"u"&&o.match(/^\s*\|/)){const a=o.match(/(\|[^\|]+)(?=\||$)/g);a&&(n=a.length)}else if(typeof n=="number")if(o.match(/^\s*\|/)){if(r!==t.length-1)return;s=!0}else return}if(typeof n=="number"&&n>0){const r=s?t.slice(0,-1).join(` +`):e,o=!!r.match(/\|\s*$/),a=r+(o?"":"|")+` +|${" --- |".repeat(n)}`;return $R(a)}}let oMe={showInstantHover:()=>{},showDelayedHover:()=>{},setupDelayedHover:()=>se.None,setupDelayedHoverAtMouse:()=>se.None,hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>({dispose:()=>{},show:()=>{},hide:()=>{},update:()=>{}}),showManagedHover:()=>{}};function X6t(i){oMe=i}function Xh(){return oMe}class Z6t{constructor(e){this.spliceables=e}splice(e,t,n){this.spliceables.forEach(s=>s.splice(e,t,n))}}function Il(i,e,t){return Math.min(Math.max(i,e),t)}class aMe{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class J6t{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n=o.end||o.start>=r.end)return{start:0,end:0};const a=Math.max(r.start,o.start),l=Math.min(r.end,o.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}i.intersect=e;function t(r){return r.end-r.start<=0}i.isEmpty=t;function n(r,o){return!t(e(r,o))}i.intersects=n;function s(r,o){const a=[],l={start:r.start,end:Math.min(o.start,r.end)},c={start:Math.max(o.end,r.start),end:r.end};return t(l)||a.push(l),t(c)||a.push(c),a}i.relativeComplement=s})(Da||(Da={}));function Z_e(i,e){const t=[];for(const n of e){if(i.start>=n.range.end)continue;if(i.ende.concat(t),[]))}class n8t{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,n=[]){const s=n.length-t,r=Z_e({start:0,end:e},this.groups),o=Z_e({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:EX(l.range,s),size:l.size})),a=n.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=t8t(r,a,o),this._size=this._paddingTop+this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const n of e)this.getRenderer(t).disposeTemplate(n.templateData),n.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}function s8t(i,e,t,n=[]){if(!i.dataTransfer)return;const s=Oe(".monaco-drag-image");s.textContent=t,s.classList.add(...n),(a=>{for(;a&&!a.classList.contains("monaco-workbench");)a=a.parentElement;return a||e.ownerDocument.body})(e).appendChild(s),i.dataTransfer.setDragImage(s,-10,-10),setTimeout(()=>s.remove(),0)}var gx=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};const fy={CurrentDragAndDropData:void 0},pf={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(i){return[i]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class nO{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class r8t{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class o8t{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ts,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,n)=>n+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}const a9=class a9{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:I$(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,n,s=pf){var o,a;if(this.virtualDelegate=t,this.domId=`list_id_${++a9.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Uu(50),this.splicing=!1,this.dragOverAnimationStopDisposable=se.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=se.None,this.onDragLeaveTimeout=se.None,this.currentSelectionDisposable=se.None,this.disposables=new _e,this._onDidChangeContentHeight=new ie,this._onDidChangeContentWidth=new ie,this.onDidChangeContentHeight=He.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,s.horizontalScrolling&&s.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(s.paddingTop??0);for(const l of n)this.renderers.set(l.templateId,l);if(this.cache=this.disposables.add(new i8t(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof s.mouseSupport=="boolean"?s.mouseSupport:!0),this._horizontalScrolling=s.horizontalScrolling??pf.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof s.paddingBottom>"u"?0:s.paddingBottom,this.accessibilityProvider=new l8t(s.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(s.transformOptimization??pf.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(Ha.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new OD({forceIntegerValues:!0,smoothScrollDuration:s.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:l=>vc(xt(this.domNode),l)})),this.scrollableElement=this.disposables.add(new nW(this.rowsContainer,{alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel??pf.alwaysConsumeMouseWheel,horizontal:1,vertical:s.verticalScrollMode??pf.verticalScrollMode,useShadows:s.useShadows??pf.useShadows,mouseWheelScrollSensitivity:s.mouseWheelScrollSensitivity,fastScrollSensitivity:s.fastScrollSensitivity,scrollByPage:s.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(de(this.rowsContainer,Zi.Change,l=>this.onTouchChange(l))),this.disposables.add(de(this.scrollableElement.getDomNode(),"scroll",l=>{const c=l.target,u=c.scrollTop;c.scrollTop=0,s.scrollToActiveElement&&this.setScrollTop(this.scrollTop+u)})),this.disposables.add(de(this.domNode,"dragover",l=>this.onDragOver(this.toDragEvent(l)))),this.disposables.add(de(this.domNode,"drop",l=>this.onDrop(this.toDragEvent(l)))),this.disposables.add(de(this.domNode,"dragleave",l=>this.onDragLeave(this.toDragEvent(l)))),this.disposables.add(de(this.domNode,"dragend",l=>this.onDragEnd(l))),s.userSelection){if(s.dnd)throw new Error("DND and user selection cannot be used simultaneously");this.disposables.add(de(this.domNode,"mousedown",l=>this.onPotentialSelectionStart(l)))}this.setRowLineHeight=s.setRowLineHeight??pf.setRowLineHeight,this.setRowHeight=s.setRowHeight??pf.setRowHeight,this.supportDynamicHeights=s.supportDynamicHeights??pf.supportDynamicHeights,this.dnd=s.dnd??this.disposables.add(pf.dnd),this.layout((o=s.initialSize)==null?void 0:o.height,(a=s.initialSize)==null?void 0:a.width),s.scrollToActiveElement&&this._setupFocusObserver(e)}_setupFocusObserver(e){this.disposables.add(de(e,"focus",()=>{const t=so();this.activeElement!==t&&t!==null&&(this.activeElement=t,this._scrollToActiveElement(this.activeElement,e))},!0))}_scrollToActiveElement(e,t){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect().top-n.top;r<0&&this.setScrollTop(this.scrollTop+r)}updateOptions(e){e.paddingBottom!==void 0&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling);let t;if(e.scrollByPage!==void 0&&(t={...t??{},scrollByPage:e.scrollByPage}),e.mouseWheelScrollSensitivity!==void 0&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),e.paddingTop!==void 0&&e.paddingTop!==this.rangeMap.paddingTop){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(n,Math.max(0,this.lastRenderTop+s),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new n8t(e)}splice(e,t,n=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,n=[]){const s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},o=Da.intersect(s,r),a=new Map;for(let E=o.end-1;E>=o.start;E--){const D=this.items[E];if(D.dragStartDisposable.dispose(),D.checkedDisposable.dispose(),D.row){let T=a.get(D.templateId);T||(T=[],a.set(D.templateId,T));const I=this.renderers.get(D.templateId);I&&I.disposeElement&&I.disposeElement(D.element,E,D.row.templateData,{height:D.size}),T.unshift(D.row)}D.row=null,D.stale=!0}const l={start:e+t,end:this.items.length},c=Da.intersect(l,s),u=Da.relativeComplement(l,s),h=n.map(E=>({id:String(this.itemId++),element:E,templateId:this.virtualDelegate.getTemplateId(E),size:this.virtualDelegate.getHeight(E),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(E),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:se.None,checkedDisposable:se.None,stale:!1}));let g;e===0&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,h),g=this.items,this.items=h):(this.rangeMap.splice(e,t,h),g=DF(this.items,e,t,h));const f=n.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),x=EX(c,f),v=Da.intersect(m,x);for(let E=v.start;EEX(E,f)),C=[{start:e,end:e+n.length},...w].map(E=>Da.intersect(m,E)).reverse();for(const E of C)for(let D=E.end-1;D>=E.start;D--){const T=this.items[D],I=a.get(T.templateId),R=I==null?void 0:I.pop();this.insertItemInDOM(D,R)}for(const E of a.values())for(const D of E)this.cache.release(D);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),g.map(E=>E.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=vc(xt(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width<"u"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getVisibleRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const n={height:typeof e=="number"?e:eDt(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,n.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(n),typeof t<"u"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:I$(this.domNode)})}render(e,t,n,s,r,o=!1,a=!1){const l=this.getRenderRange(t,n),c=Da.relativeComplement(l,e).reverse(),u=Da.relativeComplement(e,l);if(o){const h=Da.intersect(e,l);for(let g=h.start;g{for(const h of u)for(let g=h.start;g=h.start;g--)this.insertItemInDOM(g)}),s!==void 0&&(this.rowsContainer.style.left=`-${s}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&r!==void 0&&(this.rowsContainer.style.width=`${Math.max(r,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=n}insertItemInDOM(e,t){var c,u;const n=this.items[e];if(!n.row)if(t)n.row=t,n.stale=!0;else{const h=this.cache.alloc(n.templateId);n.row=h.row,n.stale||(n.stale=h.isReusingConnectedDomNode)}const s=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",s);const r=this.accessibilityProvider.isChecked(n.element),o=h=>h==="mixed"?"mixed":String(!!h);if(typeof r=="boolean"||r==="mixed")n.row.domNode.setAttribute("aria-checked",o(r));else if(r){const h=g=>n.row.domNode.setAttribute("aria-checked",o(g));h(r.value),n.checkedDisposable=r.onDidChange(()=>h(r.value))}if(n.stale||!n.row.domNode.parentElement){const h=((u=(c=this.items.at(e+1))==null?void 0:c.row)==null?void 0:u.domNode)??null;(n.row.domNode.parentElement!==this.rowsContainer||n.row.domNode.nextElementSibling!==h)&&this.rowsContainer.insertBefore(n.row.domNode,h),n.stale=!1}this.updateItemInDOM(n,e);const a=this.renderers.get(n.templateId);if(!a)throw new Error(`No renderer found for template id ${n.templateId}`);a==null||a.renderElement(n.element,e,n.row.templateData,{height:n.size});const l=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!l,l&&(n.dragStartDisposable=de(n.row.domNode,"dragstart",h=>this.onDragStart(n.element,l,h))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=I$(e.row.domNode);const t=xt(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2===0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e,t){const n=this.items[e];if(n.dragStartDisposable.dispose(),n.checkedDisposable.dispose(),n.row){const s=this.renderers.get(n.templateId);s&&s.disposeElement&&s.disposeElement(n.element,e,n.row.templateData,{height:n.size,onScroll:t}),this.cache.release(n.row),n.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return He.map(this.disposables.add(new ri(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return He.map(this.disposables.add(new ri(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return He.filter(He.map(this.disposables.add(new ri(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>e.browserEvent.button===1,this.disposables)}get onMouseDown(){return He.map(this.disposables.add(new ri(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return He.map(this.disposables.add(new ri(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return He.map(this.disposables.add(new ri(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return He.any(He.map(this.disposables.add(new ri(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),He.map(this.disposables.add(new ri(this.domNode,Zi.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return He.map(this.disposables.add(new ri(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return He.map(this.disposables.add(new ri(this.rowsContainer,Zi.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],s=n&&n.element;return{browserEvent:e,index:t,element:s}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],s=n&&n.element;return{browserEvent:e,index:t,element:s}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),n=typeof t>"u"?void 0:this.items[t],s=n&&n.element;return{browserEvent:e,index:t,element:s}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),n=typeof t>"u"?void 0:this.items[t],s=n&&n.element,r=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:s,sector:r}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth,void 0,!0),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,n){var o,a;if(!n.dataTransfer)return;const s=this.dnd.getDragElements(e);n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData(CC.TEXT,t);let r;this.dnd.getDragLabel&&(r=this.dnd.getDragLabel(s,n)),typeof r>"u"&&(r=String(s.length)),s8t(n,this.domNode,r,[this.domId]),this.domNode.classList.add("dragging"),this.currentDragData=new nO(s),fy.CurrentDragAndDropData=new r8t(s),(a=(o=this.dnd).onDragStart)==null||a.call(o,this.currentDragData,n)}onPotentialSelectionStart(e){this.currentSelectionDisposable.dispose();const t=$Lt(this.domNode),n=this.currentSelectionDisposable=new _e,s=n.add(new _e);s.add(de(this.domNode,"selectstart",()=>{s.add(de(t,"mousemove",r=>{var o;((o=t.getSelection())==null?void 0:o.isCollapsed)===!1&&this.setupDragAndDropScrollTopAnimation(r)})),n.add(dt(()=>{const r=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.currentSelectionBounds=void 0,this.render(r,this.lastRenderTop,this.lastRenderHeight,void 0,void 0)})),n.add(de(t,"selectionchange",()=>{const r=t.getSelection();if(!r||r.isCollapsed){s.isDisposed&&n.dispose();return}let o=this.getIndexOfListElement(r.anchorNode),a=this.getIndexOfListElement(r.focusNode);o!==void 0&&a!==void 0&&(a{var r;s.dispose(),this.teardownDragAndDropScrollTopAnimation(),((r=t.getSelection())==null?void 0:r.isCollapsed)!==!1&&n.dispose()}))}getIndexOfListElement(e){var t;if(!(!e||!this.domNode.contains(e)))for(;e&&e!==this.domNode;){if((t=e.dataset)!=null&&t.index)return Number(e.dataset.index);e=e.parentElement}}onDragOver(e){var r,o;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),fy.CurrentDragAndDropData&&fy.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(fy.CurrentDragAndDropData)this.currentDragData=fy.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new o8t}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop=typeof t=="boolean"?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof t!="boolean"&&((r=t.effect)==null?void 0:r.type)===0?"copy":"move";let n;typeof t!="boolean"&&t.feedback?n=t.feedback:typeof e.index>"u"?n=[-1]:n=[e.index],n=qb(n).filter(a=>a>=-1&&aa-l),n=n[0]===-1?[-1]:n;let s=typeof t!="boolean"&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(a8t(this.currentDragFeedback,n)&&this.currentDragFeedbackPosition===s)return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackPosition=s,this.currentDragFeedbackDisposable.dispose(),n[0]===-1)this.domNode.classList.add(s),this.rowsContainer.classList.add(s),this.currentDragFeedbackDisposable=dt(()=>{this.domNode.classList.remove(s),this.rowsContainer.classList.remove(s)});else{if(n.length>1&&s!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");s==="drop-target-after"&&n[0]{var a;for(const l of n){const c=this.items[l];c.dropTarget=!1,(a=c.row)==null||a.domNode.classList.remove(s)}})}return!0}onDragLeave(e){var t,n;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=zb(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((n=(t=this.dnd).onDragLeave)==null||n.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,fy.CurrentDragAndDropData=void 0,!(!t||!e.browserEvent.dataTransfer)&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){var t,n;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,fy.CurrentDragAndDropData=void 0,(n=(t=this.dnd).onDragEnd)==null||n.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=se.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=AIe(this.domNode).top;this.dragOverAnimationDisposable=dDt(xt(this.domNode),this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=zb(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)return;const t=this.dragOverMouseY-e,n=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>n&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(t===void 0)return;const n=e.offsetY/this.items[t].size,s=Math.floor(n/.25);return Il(s,0,3)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let n=e;for(;(er(n)||OIe(n))&&n!==this.rowsContainer&&t.contains(n);){const s=n.getAttribute("data-index");if(s){const r=Number(s);if(!isNaN(r))return r}n=n.parentElement}}getVisibleRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}getRenderRange(e,t){const n=this.getVisibleRange(e,t);if(this.currentSelectionBounds){const s=this.rangeMap.count;n.start=Math.min(n.start,this.currentSelectionBounds.start,s),n.end=Math.min(Math.max(n.end,this.currentSelectionBounds.end+1),s)}return n}_rerender(e,t,n){const s=this.getRenderRange(e,t);let r,o;e===this.elementTop(s.start)?(r=s.start,o=0):s.end-s.start>1&&(r=s.start+1,o=this.elementTop(r)-e);let a=0;for(;;){const l=this.getRenderRange(e,t);let c=!1;for(let u=l.start;u=g.start;f--)this.insertItemInDOM(f);for(let g=l.start;g=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};class c8t{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,n){const s=this.renderedElements.findIndex(r=>r.templateData===n);if(s>=0){const r=this.renderedElements[s];this.trait.unrender(n),r.index=t}else{const r={index:t,templateData:n};this.renderedElements.push(r)}this.trait.renderIndex(t,n)}splice(e,t,n){const s=[];for(const r of this.renderedElements)r.index=e+t&&s.push({index:r.index+n-t,templateData:r.templateData});this.renderedElements=s}renderIndexes(e){for(const{index:t,templateData:n}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,n)}disposeTemplate(e){const t=this.renderedElements.findIndex(n=>n.templateData===e);t<0||this.renderedElements.splice(t,1)}}let L6=class{get onChange(){return this._onChange.event}get name(){return this._trait}get renderer(){return new c8t(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new ie}splice(e,t,n){const s=n.length-t,r=e+t,o=[];let a=0;for(;a=r;)o.push(this.sortedIndexes[a++]+s);this.renderer.splice(e,t,n.length),this._set(o,o)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(e0e),t)}_set(e,t,n){const s=this.indexes,r=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=LX(r,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:n}),s}get(){return this.indexes}contains(e){return LF(this.sortedIndexes,e,e0e)>=0}dispose(){ii(this._onChange)}};L0([gr],L6.prototype,"renderer",null);class d8t extends L6{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class Dq{constructor(e,t,n){this.trait=e,this.view=t,this.identityProvider=n}splice(e,t,n){if(!this.identityProvider)return this.trait.splice(e,t,new Array(n.length).fill(!1));const s=this.trait.get().map(a=>this.identityProvider.getId(this.view.element(a)).toString());if(s.length===0)return this.trait.splice(e,t,new Array(n.length).fill(!1));const r=new Set(s),o=n.map(a=>r.has(this.identityProvider.getId(a).toString()));this.trait.splice(e,t,o)}}function iO(i,e){return i.classList.contains(e)?!0:i.classList.contains("monaco-list")||!i.parentElement?!1:iO(i.parentElement,e)}function KI(i){return iO(i,"monaco-editor")}function u8t(i){return iO(i,"monaco-custom-toggle")}function h8t(i){return iO(i,"action-item")}function VA(i){return iO(i,"monaco-tree-sticky-row")}function KR(i){return i.classList.contains("monaco-tree-sticky-container")}function lMe(i){return i.tagName==="A"&&i.classList.contains("monaco-button")||i.tagName==="DIV"&&i.classList.contains("monaco-button-dropdown")?!0:i.classList.contains("monaco-list")||!i.parentElement?!1:lMe(i.parentElement)}class cMe{get onKeyDown(){return He.chain(this.disposables.add(new ri(this.view.domNode,"keydown")).event,e=>e.filter(t=>!Og(t.target)).map(t=>new ki(t)))}constructor(e,t,n){this.list=e,this.view=t,this.disposables=new _e,this.multipleSelectionDisposables=new _e,this.multipleSelectionSupport=n.multipleSelectionSupport,this.disposables.add(this.onKeyDown(s=>{switch(s.keyCode){case 3:return this.onEnter(s);case 16:return this.onUpArrow(s);case 18:return this.onDownArrow(s);case 11:return this.onPageUpArrow(s);case 12:return this.onPageDownArrow(s);case 9:return this.onEscape(s);case 31:this.multipleSelectionSupport&&(bn?s.metaKey:s.ctrlKey)&&this.onCtrlA(s)}}))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Tl(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}L0([gr],cMe.prototype,"onKeyDown",null);var Xf;(function(i){i[i.Automatic=0]="Automatic",i[i.Trigger=1]="Trigger"})(Xf||(Xf={}));var uN;(function(i){i[i.Idle=0]="Idle",i[i.Typing=1]="Typing"})(uN||(uN={}));const g8t=new class{mightProducePrintableCharacter(i){return i.ctrlKey||i.metaKey||i.altKey?!1:i.keyCode>=31&&i.keyCode<=56||i.keyCode>=21&&i.keyCode<=30||i.keyCode>=98&&i.keyCode<=107||i.keyCode>=85&&i.keyCode<=95}};class f8t{constructor(e,t,n,s,r){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=n,this.keyboardNavigationEventFilter=s,this.delegate=r,this.enabled=!1,this.state=uN.Idle,this.mode=Xf.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new _e,this.disposables=new _e,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=e.typeNavigationMode??Xf.Automatic}enable(){if(this.enabled)return;let e=!1;const t=He.chain(this.enabledDisposables.add(new ri(this.view.domNode,"keydown")).event,r=>r.filter(o=>!Og(o.target)).filter(()=>this.mode===Xf.Automatic||this.triggered).map(o=>new ki(o)).filter(o=>e||this.keyboardNavigationEventFilter(o)).filter(o=>this.delegate.mightProducePrintableCharacter(o)).forEach(o=>Vn.stop(o,!0)).map(o=>o.browserEvent.key)),n=He.debounce(t,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);He.reduce(He.any(t,n),(r,o)=>o===null?null:(r||"")+o,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),t(()=>e=!0,void 0,this.enabledDisposables),n(()=>e=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var t;const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const n=(t=this.list.options.accessibilityProvider)==null?void 0:t.getAriaLabel(this.list.element(e[0]));typeof n=="string"?$l(n):n&&$l(n.get())}this.previouslyFocused=-1}onInput(e){if(!e){this.state=uN.Idle,this.triggered=!1;return}const t=this.list.getFocus(),n=t.length>0?t[0]:0,s=this.state===uN.Idle?1:0;this.state=uN.Typing;for(let r=0;r1&&c.length===1){this.previouslyFocused=n,this.list.setFocus([o]),this.list.reveal(o);return}}}else if(typeof l>"u"||VR(e,l)){this.previouslyFocused=n,this.list.setFocus([o]),this.list.reveal(o);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class p8t{constructor(e,t){this.list=e,this.view=t,this.disposables=new _e;const n=He.chain(this.disposables.add(new ri(t.domNode,"keydown")).event,r=>r.filter(o=>!Og(o.target)).map(o=>new ki(o)));He.chain(n,r=>r.filter(o=>o.keyCode===2&&!o.ctrlKey&&!o.metaKey&&!o.shiftKey&&!o.altKey))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const n=this.view.domElement(t[0]);if(!n)return;const s=n.querySelector("[tabIndex]");if(!s||!er(s)||s.tabIndex===-1)return;const r=xt(s).getComputedStyle(s);r.visibility==="hidden"||r.display==="none"||(e.preventDefault(),e.stopPropagation(),s.focus())}dispose(){this.disposables.dispose()}}function dMe(i){return bn?i.browserEvent.metaKey:i.browserEvent.ctrlKey}function uMe(i){return i.browserEvent.shiftKey}function m8t(i){return aoe(i)&&i.button===2}const J_e={isSelectionSingleChangeEvent:dMe,isSelectionRangeChangeEvent:uMe};class hMe{get onPointer(){return this._onPointer.event}constructor(e){this.list=e,this.disposables=new _e,this._onPointer=this.disposables.add(new ie),e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||J_e),this.mouseSupport=typeof e.options.mouseSupport>"u"||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(Ha.addTarget(e.getHTMLElement()))),He.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||J_e))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){KI(e.browserEvent.target)||so()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(Og(e.browserEvent.target)||KI(e.browserEvent.target))return;const t=typeof e.index>"u"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||Og(e.browserEvent.target)||KI(e.browserEvent.target)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;if(typeof t>"u"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),m8t(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(Og(e.browserEvent.target)||KI(e.browserEvent.target)||this.isSelectionChangeEvent(e)||e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let n=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){typeof n>"u"&&(n=this.list.getFocus()[0]??t,this.list.setAnchor(n));const s=Math.min(n,t),r=Math.max(n,t),o=Tl(s,r+1),a=this.list.getSelection(),l=_8t(LX(a,[n]),n);if(l.length===0)return;const c=LX(o,y8t(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const s=this.list.getSelection(),r=s.filter(o=>o!==t);this.list.setFocus([t]),this.list.setAnchor(t),s.length===r.length?this.list.setSelection([...r,t],e.browserEvent):this.list.setSelection(r,e.browserEvent)}}dispose(){this.disposables.dispose()}}class b8t{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,n=[];e.listBackground&&n.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(n.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),n.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&n.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&n.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } + `),e.listFocusAndSelectionForeground&&n.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } + `),e.listInactiveFocusForeground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&n.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(n.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(n.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),n.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&n.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&n.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&n.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const s=Tb(e.listFocusAndSelectionOutline,Tb(e.listSelectionOutline,e.listFocusOutline??""));s&&n.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),e.listFocusOutline&&n.push(` + .monaco-drag-image${t}, + .monaco-list${t}:focus .monaco-list-row.focused, + .context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } + `);const r=Tb(e.listSelectionOutline,e.listInactiveFocusOutline??"");r&&n.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${r}; outline-offset: -1px; }`),e.listSelectionOutline&&n.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&n.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&n.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&n.push(` + .monaco-list${t}.drop-target, + .monaco-list${t} .monaco-list-rows.drop-target, + .monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; } + `),e.listDropBetweenBackground&&(n.push(` + .monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before, + .monaco-list${t} .monaco-list-row.drop-target-before::before { + content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${e.listDropBetweenBackground}; + }`),n.push(` + .monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after, + .monaco-list${t} .monaco-list-row.drop-target-after::after { + content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px; + background-color: ${e.listDropBetweenBackground}; + }`)),e.tableColumnsBorder&&n.push(` + .monaco-table > .monaco-split-view2, + .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, + .monaco-enable-motion .monaco-table:hover > .monaco-split-view2, + .monaco-enable-motion .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: ${e.tableColumnsBorder}; + } + + .monaco-enable-motion .monaco-table > .monaco-split-view2, + .monaco-enable-motion .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: transparent; + } + `),e.tableOddRowsBackgroundColor&&n.push(` + .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, + .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { + background-color: ${e.tableOddRowsBackgroundColor}; + } + `),this.styleElement.textContent=n.join(` +`)}}const x8t={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:ye.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:ye.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:ye.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},v8t={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function _8t(i,e){const t=i.indexOf(e);if(t===-1)return[];const n=[];let s=t-1;for(;s>=0&&i[s]===e-(t-s);)n.push(i[s--]);for(n.reverse(),s=t;s=i.length)t.push(e[s++]);else if(s>=e.length)t.push(i[n++]);else if(i[n]===e[s]){t.push(i[n]),n++,s++;continue}else i[n]=i.length)t.push(e[s++]);else if(s>=e.length)t.push(i[n++]);else if(i[n]===e[s]){n++,s++;continue}else i[n]i-e;class w8t{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,n,s){let r=0;for(const o of this.renderers)o.renderElement(e,t,n[r++],s)}disposeElement(e,t,n,s){var o;let r=0;for(const a of this.renderers)(o=a.disposeElement)==null||o.call(a,e,t,n[r],s),r+=1}disposeTemplate(e){let t=0;for(const n of this.renderers)n.disposeTemplate(e[t++])}}class C8t{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new _e}}renderElement(e,t,n){const s=this.accessibilityProvider.getAriaLabel(e),r=s&&typeof s!="string"?s:zi(s);n.disposables.add(Pt(a=>{this.setAriaLabel(a.readObservable(r),n.container)}));const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);typeof o=="number"?n.container.setAttribute("aria-level",`${o}`):n.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,n){n.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class S8t{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var n,s;(s=(n=this.dnd).onDragStart)==null||s.call(n,e,t)}onDragOver(e,t,n,s,r){return this.dnd.onDragOver(e,t,n,s,r)}onDragLeave(e,t,n,s){var r,o;(o=(r=this.dnd).onDragLeave)==null||o.call(r,e,t,n,s)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)==null||n.call(t,e)}drop(e,t,n,s,r){this.dnd.drop(e,t,n,s,r)}dispose(){this.dnd.dispose()}}class Jd{get onDidChangeFocus(){return He.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return He.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=He.chain(this.disposables.add(new ri(this.view.domNode,"keydown")).event,r=>r.map(o=>new ki(o)).filter(o=>e=o.keyCode===58||o.shiftKey&&o.keyCode===68).map(o=>Vn.stop(o,!0)).filter(()=>!1)),n=He.chain(this.disposables.add(new ri(this.view.domNode,"keyup")).event,r=>r.forEach(()=>e=!1).map(o=>new ki(o)).filter(o=>o.keyCode===58||o.shiftKey&&o.keyCode===68).map(o=>Vn.stop(o,!0)).map(({browserEvent:o})=>{const a=this.getFocus(),l=a.length?a[0]:void 0,c=typeof l<"u"?this.view.element(l):void 0,u=typeof l<"u"?this.view.domElement(l):this.view.domNode;return{index:l,element:c,anchor:u,browserEvent:o}})),s=He.chain(this.view.onContextMenu,r=>r.filter(o=>!e).map(({element:o,index:a,browserEvent:l})=>({element:o,index:a,anchor:new va(xt(this.view.domNode),l),browserEvent:l})));return He.any(t,n,s)}get onKeyDown(){return this.disposables.add(new ri(this.view.domNode,"keydown")).event}get onDidFocus(){return He.signal(this.disposables.add(new ri(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return He.signal(this.disposables.add(new ri(this.view.domNode,"blur",!0)).event)}constructor(e,t,n,s,r=v8t){var c,u,h;this.user=e,this._options=r,this.focus=new L6("focused"),this.anchor=new L6("anchor"),this.eventBufferer=new OP,this._ariaLabel="",this.disposables=new _e,this._onDidDispose=new ie,this.onDidDispose=this._onDidDispose.event;const o=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(c=this._options.accessibilityProvider)==null?void 0:c.getWidgetRole():"list";this.selection=new d8t(o!=="listbox");const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(a.push(new C8t(this.accessibilityProvider)),(h=(u=this.accessibilityProvider).onDidChangeActiveDescendant)==null||h.call(u,this.onDidChangeActiveDescendant,this,this.disposables)),s=s.map(g=>new w8t(g.templateId,[...a,g]));const l={...r,dnd:r.dnd&&new S8t(this,r.dnd)};if(this.view=this.createListView(t,n,s,l),this.view.domNode.setAttribute("role",o),r.styleController)this.styleController=r.styleController(this.view.domId);else{const g=Yu(this.view.domNode);this.styleController=new b8t(g,this.view.domId)}if(this.spliceable=new Z6t([new Dq(this.focus,this.view,r.identityProvider),new Dq(this.selection,this.view,r.identityProvider),new Dq(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new p8t(this,this.view)),(typeof r.keyboardSupport!="boolean"||r.keyboardSupport)&&(this.keyboardController=new cMe(this,this.view,r),this.disposables.add(this.keyboardController)),r.keyboardNavigationLabelProvider){const g=r.keyboardNavigationDelegate||g8t;this.typeNavigationController=new f8t(this,this.view,r.keyboardNavigationLabelProvider,r.keyboardNavigationEventFilter??(()=>!0),g),this.disposables.add(this.typeNavigationController)}if(this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider){const g=this.accessibilityProvider.getWidgetAriaLabel(),f=g&&typeof g!="string"?g:zi(g);this.disposables.add(Pt(m=>{this.ariaLabel=m.readObservable(f)}))}this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,n,s){return new zh(e,t,n,s)}createMouseController(e){return new hMe(this)}updateOptions(e={}){var t,n;this._options={...this._options,...e},(t=this.typeNavigationController)==null||t.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(n=this.keyboardController)==null||n.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,n=[]){if(e<0||e>this.view.length)throw new gy(this.user,`Invalid start index: ${e}`);if(t<0)throw new gy(this.user,`Invalid delete count: ${t}`);t===0&&n.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,n))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const n of e)if(n<0||n>=this.length)throw new gy(this.user,`Invalid index ${n}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(typeof e>"u"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new gy(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return this.anchor.get().at(0)}getAnchorElement(){const e=this.getAnchor();return typeof e>"u"?void 0:this.element(e)}setFocus(e,t){for(const n of e)if(n<0||n>=this.length)throw new gy(this.user,`Invalid index ${n}`);this.focus.set(e,t)}focusNext(e=1,t=!1,n,s){if(this.length===0)return;const r=this.focus.get(),o=this.findNextIndex(r.length>0?r[0]+e:0,t,s);o>-1&&this.setFocus([o],n)}focusPrevious(e=1,t=!1,n,s){if(this.length===0)return;const r=this.focus.get(),o=this.findPreviousIndex(r.length>0?r[0]-e:0,t,s);o>-1&&this.setFocus([o],n)}async focusNextPage(e,t){let n=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);n=n===0?0:n-1;const s=this.getFocus()[0];if(s!==n&&(s===void 0||n>s)){const r=this.findPreviousIndex(n,!1,t);r>-1&&s!==r?this.setFocus([r],e):this.setFocus([n],e)}else{const r=this.view.getScrollTop();let o=r+this.view.renderHeight;n>s&&(o-=this.view.elementHeight(n)),this.view.setScrollTop(o),this.view.getScrollTop()!==r&&(this.setFocus([]),await kp(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,n=()=>0){let s;const r=n(),o=this.view.getScrollTop()+r;o===0?s=this.view.indexAt(o):s=this.view.indexAfter(o-1);const a=this.getFocus()[0];if(a!==s&&(a===void 0||a>=s)){const l=this.findNextIndex(s,!1,t);l>-1&&a!==l?this.setFocus([l],e):this.setFocus([s],e)}else{const l=o;this.view.setScrollTop(o-this.view.renderHeight-r),this.view.getScrollTop()+n()!==l&&(this.setFocus([]),await kp(0),await this.focusPreviousPage(e,t,n))}}focusLast(e,t){if(this.length===0)return;const n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,n){if(this.length===0)return;const s=this.findNextIndex(e,!1,n);s>-1&&this.setFocus([s],t)}findNextIndex(e,t=!1,n){for(let s=0;s=this.length&&!t)return-1;if(e=e%this.length,!n||n(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,n){for(let s=0;sthis.view.element(e))}reveal(e,t,n=0){if(e<0||e>=this.length)throw new gy(this.user,`Invalid index ${e}`);const s=this.view.getScrollTop(),r=this.view.elementTop(e),o=this.view.elementHeight(e);if(Wb(t)){const a=o-this.view.renderHeight+n;this.view.setScrollTop(a*Il(t,0,1)+r-n)}else{const a=r+o,l=s+this.view.renderHeight;r=l||(r=l&&o>=this.view.renderHeight?this.view.setScrollTop(r-n):a>=l&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new gy(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),s=this.view.elementTop(e),r=this.view.elementHeight(e);if(sn+this.view.renderHeight)return null;const o=r-this.view.renderHeight+t;return Math.abs((n+t-s)/o)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(n=>this.view.element(n)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var t;const e=this.focus.get();if(e.length>0){let n;(t=this.accessibilityProvider)!=null&&t.getActiveDescendantId&&(n=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",n||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}L0([gr],Jd.prototype,"onDidChangeFocus",null);L0([gr],Jd.prototype,"onDidChangeSelection",null);L0([gr],Jd.prototype,"onContextMenu",null);L0([gr],Jd.prototype,"onKeyDown",null);L0([gr],Jd.prototype,"onDidFocus",null);L0([gr],Jd.prototype,"onDidBlur",null);const y1=Oe,gMe="selectOption.entry.template";class k8t{get templateId(){return gMe}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=De(e,y1(".option-text")),t.detail=De(e,y1(".option-detail")),t.decoratorRight=De(e,y1(".option-decorator-right")),t}renderElement(e,t,n){const s=n,r=e.text,o=e.detail,a=e.decoratorRight,l=e.isDisabled;s.text.textContent=r,s.detail.textContent=o||"",s.decoratorRight.textContent=a||"",l?s.root.classList.add("option-disabled"):s.root.classList.remove("option-disabled")}disposeTemplate(e){}}const Rf=class Rf extends se{constructor(e,t,n,s,r){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._selectionDetailsDisposables=this._register(new _e),this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=s,this.selectBoxOptions=r||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=Rf.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new ie,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(n),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register(Xh().setupManagedHover($p("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return gMe}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=Oe(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=De(this.selectDropDownContainer,y1(".select-box-details-pane"));const t=De(this.selectDropDownContainer,y1(".select-box-dropdown-container-width-control")),n=De(t,y1(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",De(n,this.widthControlElement),this._dropDownPosition=0,this.styleElement=Yu(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(de(this.selectDropDownContainer,Fe.DRAG_START,s=>{Vn.stop(s,!0)}))}registerListeners(){this._register(yr(this.selectElement,"change",t=>{this.selected=t.target.selectedIndex,this._onDidSelect.fire({index:t.target.selectedIndex,selected:t.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(de(this.selectElement,Fe.CLICK,t=>{Vn.stop(t),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(de(this.selectElement,Fe.MOUSE_DOWN,t=>{Vn.stop(t)}));let e;this._register(de(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(de(this.selectElement,"touchend",t=>{Vn.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(de(this.selectElement,Fe.KEY_DOWN,t=>{const n=new ki(t);let s=!1;bn?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(s=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(s=!0),s&&(this.showSelectDropDown(),Vn.stop(t,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){bs(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((n,s)=>{this.selectElement.add(this.createOption(n.text,s,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),t!==void 0&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;(e=this.selectList)==null||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join(` +`)}styleSelectElement(){const e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",n=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=n}styleList(){const e=this.styles.selectBackground??"",t=Tb(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;const n=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=n,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,n){const s=document.createElement("option");return s.value=e,s.text=e,s.disabled=!!n,s}showSelectDropDown(){this.selectionDetailsPane.textContent="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=xt(this.selectElement),n=Zs(this.selectElement),s=xt(this.selectElement).getComputedStyle(this.selectElement),r=parseFloat(s.getPropertyValue("--dropdown-padding-top"))+parseFloat(s.getPropertyValue("--dropdown-padding-bottom")),o=t.innerHeight-n.top-n.height-(this.selectBoxOptions.minBottomMargin||0),a=n.top-Rf.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),u=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=u,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const g=this._hasDetails?this._cachedMaxDetailsHeight:0,f=h+r+g,m=Math.floor((o-r-g)/this.getHeight()),x=Math.floor((a-r-g)/this.getHeight());if(e)return n.top+n.height>t.innerHeight-22||n.topm&&this.options.length>m?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(n.top+n.height>t.innerHeight-22||n.topo&&(h=m*this.getHeight())}else f>a&&(h=x*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=h+r+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=h+r+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=u,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(e){let t=0;if(e){let n=0,s=0;this.options.forEach((r,o)=>{const a=r.detail?r.detail.length:0,l=r.decoratorRight?r.decoratorRight.length:0,c=r.text.length+a+l;c>s&&(n=o,s=c)}),e.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),t=Oc(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=De(e,y1(".select-box-dropdown-list-container")),this.listRenderer=new k8t,this.selectList=this._register(new Jd("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:s=>{let r=s.text;return s.detail&&(r+=`. ${s.detail}`),s.decoratorRight&&(r+=`. ${s.decoratorRight}`),s.description&&(r+=`. ${s.description}`),r},getWidgetAriaLabel:()=>S(16,"Select Box"),getRole:()=>bn?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new ri(this.selectDropDownListContainer,"keydown")),n=He.chain(t.event,s=>s.filter(()=>this.selectList.length>0).map(r=>new ki(r)));this._register(He.chain(n,s=>s.filter(r=>r.keyCode===3))(this.onEnter,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode===2))(this.onEnter,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode===9))(this.onEscape,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode===16))(this.onUpArrow,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode===18))(this.onDownArrow,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode===12))(this.onPageDown,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode===11))(this.onPageUp,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode===14))(this.onHome,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode===13))(this.onEnd,this)),this._register(He.chain(n,s=>s.filter(r=>r.keyCode>=21&&r.keyCode<=56||r.keyCode>=85&&r.keyCode<=113))(this.onCharacter,this)),this._register(de(this.selectList.getHTMLElement(),Fe.POINTER_UP,s=>this.onPointerUp(s))),this._register(this.selectList.onMouseOver(s=>typeof s.index<"u"&&this.selectList.setFocus([s.index]))),this._register(this.selectList.onDidChangeFocus(s=>this.onListFocus(s))),this._register(de(this.selectDropDownContainer,Fe.FOCUS_OUT,s=>{!this._isVisible||xo(s.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;Vn.stop(e);const t=e.target;if(!t||t.classList.contains("slider"))return;const n=t.closest(".monaco-list-row");if(!n)return;const s=Number(n.getAttribute("data-index")),r=n.classList.contains("option-disabled");s>=0&&s{for(let o=0;othis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(Vn.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){Vn.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){Vn.stop(e),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){Vn.stop(e),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=nb.toString(e.keyCode);let n=-1;for(let s=0;s{this._register(de(this.selectElement,e,t=>{this.selectElement.focus()}))}),this._register(yr(this.selectElement,"click",e=>{Vn.stop(e,!0)})),this._register(yr(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(yr(this.selectElement,"keydown",e=>{let t=!1;bn?(e.keyCode===18||e.keyCode===16||e.keyCode===10)&&(t=!0):(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){(!this.options||!bs(this.options,e))&&(this.options=e,this.selectElement.options.length=0,this.options.forEach((n,s)=>{this.selectElement.add(this.createOption(n.text,s,n.isDisabled))})),t!==void 0&&this.select(t)}select(e){this.options.length===0?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(s)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new fC)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(Ha.addTarget(e));const n=this.options&&this.options.draggable;n&&(e.draggable=!0,bc&&this._register(de(e,Fe.DRAG_START,s=>{var r;return(r=s.dataTransfer)==null?void 0:r.setData(CC.TEXT,this._action.label)}))),this._register(de(t,Zi.Tap,s=>this.onClick(s,!0))),this._register(de(t,Fe.MOUSE_DOWN,s=>{n||Vn.stop(s,!0),this._action.enabled&&s.button===0&&t.classList.add("active")})),bn&&this._register(de(t,Fe.CONTEXT_MENU,s=>{s.button===0&&s.ctrlKey===!0&&this.onClick(s)})),this._register(de(t,Fe.CLICK,s=>{Vn.stop(s,!0),this.options&&this.options.isMenu||this.onClick(s)})),this._register(de(t,Fe.DBLCLICK,s=>{Vn.stop(s,!0)})),[Fe.MOUSE_UP,Fe.MOUSE_OUT].forEach(s=>{this._register(de(t,s,r=>{Vn.stop(r),t.classList.remove("active")}))})}onClick(e,t=!1){var s;Vn.stop(e,!0);const n=Eu(this._context)?(s=this.options)!=null&&s.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}getHoverContents(){return this.getTooltip()}updateTooltip(){if(!this.element)return;const e=this.getHoverContents()??"";if(this.updateAriaLabel(),!this.customHover&&e!==""){const t=this.options.hoverDelegate??$p("element");this.customHover=this._store.add(Xh().setupManagedHover(t,this.element,e))}else this.customHover&&this.customHover.update(e)}updateAriaLabel(){if(this.element){const e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class ML extends Cg{constructor(e,t,n){n={...n,icon:n.icon!==void 0?n.icon:!1,label:n.label!==void 0?n.label:!0},super(e,t,n),this.options=n,this.cssClass=""}render(e){super.render(e),Bn(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding&&!this.options.keybindingNotRenderedWithLabel){const n=document.createElement("span");n.classList.add("keybinding"),n.textContent=this.options.keybinding,this.element.appendChild(n)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===Gr.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label,this.options.keybinding&&(e=S(0,"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(e=this.label)==null||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(e=this.element)==null||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(t=this.element)==null||t.classList.add("disabled"))}updateAriaLabel(){if(this.label){const e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class L8t extends Cg{constructor(e,t,n,s,r,o,a){super(e,t),this.selectBox=new E8t(n,s,r,o,a),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;(e=this.selectBox)==null||e.focus()}blur(){var e;(e=this.selectBox)==null||e.blur()}render(e){this.selectBox.render(e)}}class mc extends se{get onDidBlur(){return this._onDidBlur.event}get onDidCancel(){return this._onDidCancel.event}get onDidRun(){return this._onDidRun.event}get onWillRun(){return this._onWillRun.event}constructor(e,t={}){var r,o;super(),this._actionRunnerDisposables=this._register(new _e),this.viewItemDisposables=this._register(new x7),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new ie),this._onDidCancel=this._register(new ie({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.cancelHasListener=!1,this._onDidRun=this._register(new ie),this._onWillRun=this._register(new ie),this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:((r=this.options.triggerKeys)==null?void 0:r.keyDown)??!1,keys:((o=this.options.triggerKeys)==null?void 0:o.keys)??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register(wRe()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new fC,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(a=>this._onDidRun.fire(a))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(a=>this._onWillRun.fire(a))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar";let n,s;switch(this._orientation){case 0:n=[15],s=[17];break;case 1:n=[16],s=[18],this.domNode.className+=" vertical";break}this._register(de(this.domNode,Fe.KEY_DOWN,a=>{const l=new ki(a);let c=!0;const u=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;n&&(l.equals(n[0])||l.equals(n[1]))?c=this.focusPrevious():s&&(l.equals(s[0])||l.equals(s[1]))?c=this.focusNext():l.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():l.equals(14)?c=this.focusFirst():l.equals(13)?c=this.focusLast():l.equals(2)&&u instanceof Cg&&u.trapsArrowNavigation?c=this.focusNext(void 0,!0):this.isTriggerKeyEvent(l)?this._triggerKeys.keyDown?this.doTrigger(l):this.triggerKeyDown=!0:c=!1,c&&(l.preventDefault(),l.stopPropagation())})),this._register(de(this.domNode,Fe.KEY_UP,a=>{const l=new ki(a);this.isTriggerKeyEvent(l)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(l)),l.preventDefault(),l.stopPropagation()):(l.equals(2)||l.equals(1026)||l.equals(16)||l.equals(18)||l.equals(15)||l.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register($u(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(so()===this.domNode||!xo(so(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const t=this.viewItems.find(n=>n instanceof Cg&&n.isEnabled());t instanceof Cg&&t.setFocusable(!0)}else this.viewItems.forEach(t=>{t instanceof Cg&&t.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(n=>{t=t||e.equals(n)}),t}updateFocusedItem(){var e,t;for(let n=0;nt.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(t=>this._onDidRun.fire(t))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(t=>this._onWillRun.fire(t))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){var t;if(typeof e=="number")return(t=this.viewItems[e])==null?void 0:t.action;if(er(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let n=0;n{const o=document.createElement("li");o.className="action-item",o.setAttribute("role","presentation");let a;const l={hoverDelegate:this._hoverDelegate,...t,isTabList:this.options.ariaRole==="tablist"};this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(r,l)),a||(a=new ML(this.context,r,l)),this.options.allowContextMenu||this.viewItemDisposables.set(a,de(o,Fe.CONTEXT_MENU,c=>{Vn.stop(c,!0)})),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(o),s===null||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(o),this.viewItems.push(a)):(this.actionsList.insertBefore(o,this.actionsList.children[s]),this.viewItems.splice(s,0,a),s++)}),this.focusable){let r=!1;for(const o of this.viewItems){if(!(o instanceof Cg))continue;let a;r||o.action.id===Gr.ID||!o.isEnabled()&&this.options.focusOnlyEnabledItems?a=!1:a=!0,a?(o.setFocusable(!0),r=!0):o.setFocusable(!1)}}typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}getWidth(e){if(e>=0&&e=0&&e"u"){const s=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=s===-1?void 0:s,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const n=this.focusedItem;let s;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=n,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,s=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!s.isEnabled()||s.action.id===Gr.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===Gr.ID));return this.updateFocus(!0),!0}updateFocus(e,t,n=!1){var r,o;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((r=this.viewItems[this.previouslyFocusedItem])==null||r.blur());const s=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(s){let a=!0;cC(s.focus)||(a=!1),this.options.focusOnlyEnabledItems&&cC(s.isEnabled)&&!s.isEnabled()&&(a=!1),s.action.id===Gr.ID&&(a=!1),a?(n||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),a&&((o=s.showHover)==null||o.call(s))}}doTrigger(e){if(typeof this.focusedItem>"u")return;const t=this.viewItems[this.focusedItem];if(t instanceof Cg){const n=t._context===null||t._context===void 0?e:t._context;this.run(t._action,n)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=ii(this.viewItems),this.getContainer().remove(),super.dispose()}}function D8t(i,e,t,n){if(i.length===0)return e;if(e.length===0)return i;const s=[];let r=0,o=0;for(;ru?(s.push(l),o++):(s.push(n(a,l)),r++,o++)}for(;r`Apply decorations from ${e.debugName}`},s=>{const r=e.read(s);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}function hN(i,e){return i.appendChild(e),dt(()=>{e.remove()})}function T8t(i,e){return i.prepend(e),dt(()=>{e.remove()})}class fMe extends se{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new CAe(e,t)),this._width=Ft(this,this.elementSizeObserver.getWidth()),this._height=Ft(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(n=>Vi(s=>{this._width.set(this.elementSizeObserver.getWidth(),s),this._height.set(this.elementSizeObserver.getHeight(),s)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function t0e(i,e,t){let n=e.get(),s=n,r=n;const o=Ft("animatedValue",n);let a=-1;const l=300;let c;t.add(SD({changeTracker:{createChangeSummary:()=>({animate:!1}),handleChange:(h,g)=>(h.didChange(e)&&(g.animate=g.animate||h.change),!0)}},(h,g)=>{c!==void 0&&(i.cancelAnimationFrame(c),c=void 0),s=r,n=e.read(h),a=Date.now()-(g.animate?0:l),u()}));function u(){const h=Date.now()-a;r=Math.floor(I8t(h,s,n-s,l)),h{this._actualTop.set(n,void 0)},this.onComputedHeight=n=>{this._actualHeight.set(n,void 0)}}}const l9=class l9{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${l9._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};l9._counter=0;let TX=l9;function o0(i,e){return Pt(t=>{for(let[n,s]of Object.entries(e))s&&typeof s=="object"&&"read"in s&&(s=s.read(t)),typeof s=="number"&&(s=`${s}px`),n=n.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()),i.style[n]=s})}function T6(i,e,t,n){const s=new _e,r=[];return s.add(Fa((o,a)=>{const l=e.read(o),c=new Map,u=new Map;t&&t(!0),i.changeViewZones(h=>{for(const g of r)h.removeZone(g),n==null||n.delete(g);r.length=0;for(const g of l){const f=h.addZone(g);g.setZoneId&&g.setZoneId(f),r.push(f),n==null||n.add(f),c.set(g,f)}}),t&&t(!1),a.add(SD({changeTracker:{createChangeSummary(){return{zoneIds:[]}},handleChange(h,g){const f=u.get(h.changedObservable);return f!==void 0&&g.zoneIds.push(f),!0}}},(h,g)=>{for(const f of l)f.onChange&&(u.set(f.onChange,c.get(f)),f.onChange.read(h));t&&t(!0),i.changeViewZones(f=>{for(const m of g.zoneIds)f.layoutZone(m)}),t&&t(!1)}))})),s.add({dispose(){t&&t(!0),i.changeViewZones(o=>{for(const a of r)o.removeZone(a)}),n==null||n.clear(),t&&t(!1)}}),s}class A8t extends vs{dispose(){super.dispose(!0)}}function n0e(i,e){const t=NR(e,s=>s.original.startLineNumber<=i.lineNumber);if(!t)return z.fromPositions(i);if(t.original.endLineNumberExclusive<=i.lineNumber){const s=i.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return z.fromPositions(new te(s,i.column))}if(!t.innerChanges)return z.fromPositions(new te(t.modified.startLineNumber,1));const n=NR(t.innerChanges,s=>s.originalRange.getStartPosition().isBeforeOrEqual(i));if(!n){const s=i.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return z.fromPositions(new te(s,i.column))}if(n.originalRange.containsPosition(i))return n.modifiedRange;{const s=R8t(n.originalRange.getEndPosition(),i);return z.fromPositions(s.addToPosition(n.modifiedRange.getEndPosition()))}}function R8t(i,e){return i.lineNumber===e.lineNumber?new ro(0,e.column-i.column):new ro(e.lineNumber-i.lineNumber,e.column-1)}function M8t(i,e){let t;return i.filter(n=>{const s=e(n,t);return t=n,s})}class I6{static create(e,t=void 0){return new i0e(e,e,t)}static createWithDisposable(e,t,n=void 0){const s=new _e;return s.add(t),s.add(e),new i0e(e,s,n)}}class i0e extends I6{constructor(e,t,n){super(),this.object=e,this._disposable=t,this._debugOwner=n,this._refCount=1,this._isDisposed=!1,this._owners=[],n&&this._addOwner(n)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new P8t(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,this._refCount===0&&this._disposable.dispose(),e){const t=this._owners.indexOf(e);t!==-1&&this._owners.splice(t,1)}}}class P8t extends I6{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}class al{static inverse(e,t,n){const s=[];let r=1,o=1;for(const l of e){const c=new al(new jt(r,l.original.startLineNumber),new jt(o,l.modified.startLineNumber));c.modified.isEmpty||s.push(c),r=l.original.endLineNumberExclusive,o=l.modified.endLineNumberExclusive}const a=new al(new jt(r,t+1),new jt(o,n+1));return a.modified.isEmpty||s.push(a),s}static clip(e,t,n){const s=[];for(const r of e){const o=r.original.intersect(t),a=r.modified.intersect(n);o&&!o.isEmpty&&a&&!a.isEmpty&&s.push(new al(o,a))}return s}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new al(this.modified,this.original)}join(e){return new al(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new Ml(e,t);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new Nt("not a valid diff");return new Ml(new z(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new z(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ml(new z(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new z(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(s0e(this.original.endLineNumberExclusive,e)&&s0e(this.modified.endLineNumberExclusive,t))return new Ml(new z(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new z(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ml(z.fromPositions(new te(this.original.startLineNumber,1),Ck(new te(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),z.fromPositions(new te(this.modified.startLineNumber,1),Ck(new te(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ml(z.fromPositions(Ck(new te(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Ck(new te(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),z.fromPositions(Ck(new te(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),Ck(new te(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new Nt}}function Ck(i,e){if(i.lineNumber<1)return new te(1,1);if(i.lineNumber>e.length)return new te(e.length,e[e.length-1].length+1);const t=e[i.lineNumber-1];return i.column>t.length+1?new te(i.lineNumber,t.length+1):i}function s0e(i,e){return i>=1&&i<=e.length}class $d extends al{static fromRangeMappings(e){const t=jt.join(e.map(s=>jt.fromRangeInclusive(s.originalRange))),n=jt.join(e.map(s=>jt.fromRangeInclusive(s.modifiedRange)));return new $d(t,n,e)}constructor(e,t,n){super(e,t),this.innerChanges=n}flip(){var e;return new $d(this.modified,this.original,(e=this.innerChanges)==null?void 0:e.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new $d(this.original,this.modified,[this.toRangeMapping()])}}class Ml{static fromEdit(e){const t=e.getNewRanges();return e.replacements.map((s,r)=>new Ml(s.range,t[r]))}static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new Ml(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new Ar(this.originalRange,t)}}function A6(i,e,t,n=!1){const s=[];for(const r of Xre(i.map(o=>O8t(o,e,t)),(o,a)=>o.original.intersectsOrTouches(a.original)||o.modified.intersectsOrTouches(a.modified))){const o=r[0],a=r[r.length-1];s.push(new $d(o.original.join(a.original),o.modified.join(a.modified),r.map(l=>l.innerChanges[0])))}return Y_(()=>!n&&s.length>0&&(s[0].modified.startLineNumber!==s[0].original.startLineNumber||t.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!==e.length.lineCount-s[s.length-1].original.endLineNumberExclusive)?!1:RP(s,(r,o)=>o.original.startLineNumber-r.original.endLineNumberExclusive===o.modified.startLineNumber-r.modified.endLineNumberExclusive&&r.original.endLineNumberExclusive=t.getLineLength(i.modifiedRange.startLineNumber)&&i.originalRange.startColumn-1>=e.getLineLength(i.originalRange.startLineNumber)&&i.originalRange.startLineNumber<=i.originalRange.endLineNumber+s&&i.modifiedRange.startLineNumber<=i.modifiedRange.endLineNumber+s&&(n=1);const r=new jt(i.originalRange.startLineNumber+n,i.originalRange.endLineNumber+1+s),o=new jt(i.modifiedRange.startLineNumber+n,i.modifiedRange.endLineNumber+1+s);return new $d(r,o,[i])}const j8t={IconContribution:"base.contributions.icons"};var r0e;(function(i){function e(t,n){let s=t.defaults;for(;Tt.isThemeIcon(s);){const r=dS.getIcon(s.id);if(!r)return;s=r.defaults}return s}i.getDefinition=e})(r0e||(r0e={}));var o0e;(function(i){function e(n){return{weight:n.weight,style:n.style,src:n.src.map(s=>({format:s.format,location:s.location.toString()}))}}i.toJSONObject=e;function t(n){const s=r=>bo(r)?r:void 0;if(n&&Array.isArray(n.src)&&n.src.every(r=>bo(r.format)&&bo(r.location)))return{weight:s(n.weight),style:s(n.style),src:n.src.map(r=>({format:r.format,location:kt.parse(r.location)}))}}i.fromJSONObject=t})(o0e||(o0e={}));const F8t=/^([\w_-]+)$/,B8t=S(2024,"The font ID must only contain letters, numbers, underscores and dashes.");class H8t extends se{constructor(){super(),this._onDidChange=this._register(new ie),this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:S(2025,"The id of the font to use. If not set, the font that is defined first is used."),pattern:F8t.source,patternErrorMessage:B8t},fontCharacter:{type:"string",description:S(2026,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Tt.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,n,s){const r=this.iconsById[e];if(r){if(n&&!r.description){r.description=n,this.iconSchema.properties[e].markdownDescription=`${n} $(${e})`;const l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=n),this._onDidChange.fire()}return r}const o={id:e,description:n,defaults:t,deprecationMessage:s};this.iconsById[e]=o;const a={$ref:"#/definitions/icons"};return s&&(a.deprecationMessage=s),n&&(a.markdownDescription=`${n}: $(${e})`),this.iconSchema.properties[e]=a,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(n||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(r,o)=>r.id.localeCompare(o.id),t=r=>{for(;Tt.isThemeIcon(r.defaults);)r=this.iconsById[r.defaults.id];return`codicon codicon-${r?r.id:""}`},n=[];n.push("| preview | identifier | default codicon ID | description"),n.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const s=Object.keys(this.iconsById).map(r=>this.iconsById[r]);for(const r of s.filter(o=>!!o.description).sort(e))n.push(`||${r.id}|${Tt.isThemeIcon(r.defaults)?r.defaults.id:r.id}|${r.description||""}|`);n.push("| preview | identifier "),n.push("| ----------- | --------------------------------- |");for(const r of s.filter(o=>!Tt.isThemeIcon(o.defaults)).sort(e))n.push(`||${r.id}|`);return n.join(` +`)}}const dS=new H8t;Hs.add(j8t.IconContribution,dS);function ls(i,e,t,n){return dS.registerIcon(i,e,t,n)}function pMe(){return dS}function W8t(){const i=VIe();for(const e in i){const t="\\"+i[e].toString(16);dS.registerIcon(e,{fontCharacter:t})}}W8t();const mMe="vscode://schemas/icons",bMe=Hs.as(V7.JSONContribution);bMe.registerSchema(mMe,dS.getIconSchema());const a0e=new pi(()=>bMe.notifySchemaChanged(mMe),200);dS.onDidChange(()=>{a0e.isScheduled()||a0e.schedule()});const xMe=ls("widget-close",Ee.close,S(2027,"Icon for the close action in widgets."));ls("goto-previous-location",Ee.arrowUp,S(2028,"Icon for goto previous editor location."));ls("goto-next-location",Ee.arrowDown,S(2029,"Icon for goto next editor location."));Tt.modify(Ee.sync,"spin");Tt.modify(Ee.loading,"spin");var Aae=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Rae=function(i,e){return function(t,n){e(t,n,i)}};const V8t=ls("diff-review-insert",Ee.add,S(97,"Icon for 'Insert' in accessible diff viewer.")),z8t=ls("diff-review-remove",Ee.remove,S(98,"Icon for 'Remove' in accessible diff viewer.")),U8t=ls("diff-review-close",Ee.close,S(99,"Icon for 'Close' in accessible diff viewer."));var VE;let w1=(VE=class extends se{constructor(e,t,n,s,r,o,a,l,c){super(),this._parentNode=e,this._visible=t,this._setVisible=n,this._canClose=s,this._width=r,this._height=o,this._diffs=a,this._models=l,this._instantiationService=c,this._state=we(this,u=>{const h=this._visible.read(u);if(this._parentNode.style.visibility=h?"visible":"hidden",!h)return null;const g=u.store.add(this._instantiationService.createInstance(IX,this._diffs,this._models,this._setVisible,this._canClose)),f=u.store.add(this._instantiationService.createInstance(AX,this._parentNode,g,this._width,this._height,this._models));return{model:g,view:f}}).recomputeInitiallyAndOnChange(this._store)}next(){Vi(e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){Vi(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){Vi(e=>{this._setVisible(!1,e)})}},VE._ttPolicy=Up("diffReview",{createHTML:e=>e}),VE);w1=Aae([Rae(8,ft)],w1);let IX=class extends se{constructor(e,t,n,s,r){super(),this._diffs=e,this._models=t,this._setVisible=n,this.canClose=s,this._accessibilitySignalService=r,this._groups=Ft(this,[]),this._currentGroupIdx=Ft(this,0),this._currentElementIdx=Ft(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((o,a)=>this._groups.read(a)[o]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((o,a)=>{var l;return(l=this.currentGroup.read(a))==null?void 0:l.lines[o]}),this._register(Pt(o=>{const a=this._diffs.read(o);if(!a){this._groups.set([],void 0);return}const l=$8t(a,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());Vi(c=>{const u=this._models.getModifiedPosition();if(u){const h=l.findIndex(g=>(u==null?void 0:u.lineNumber){const a=this.currentElement.read(o);(a==null?void 0:a.type)===Pl.Deleted?this._accessibilitySignalService.playSignal(Rl.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(a==null?void 0:a.type)===Pl.Added&&this._accessibilitySignalService.playSignal(Rl.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register(Pt(o=>{const a=this.currentElement.read(o);if(a&&a.type!==Pl.Header){const l=a.modifiedLineNumber??a.diff.modified.startLineNumber;this._models.modifiedSetSelection(z.fromPositions(new te(l,1)))}}))}_goToGroupDelta(e,t){const n=this.groups.get();!n||n.length<=1||bL(t,s=>{this._currentGroupIdx.set(ht.ofLength(n.length).clipCyclic(this._currentGroupIdx.get()+e),s),this._currentElementIdx.set(0,s)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||Vi(n=>{this._currentElementIdx.set(ht.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),n)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const n=t.lines.indexOf(e);n!==-1&&Vi(s=>{this._currentElementIdx.set(n,s)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===Pl.Deleted?this._models.originalReveal(z.fromPositions(new te(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==Pl.Header?z.fromPositions(new te(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};IX=Aae([Rae(4,hx)],IX);const bI=3;function $8t(i,e,t){const n=[];for(const s of Xre(i,(r,o)=>o.modified.startLineNumber-r.modified.endLineNumberExclusive<2*bI)){const r=[];r.push(new K8t);const o=new jt(Math.max(1,s[0].original.startLineNumber-bI),Math.min(s[s.length-1].original.endLineNumberExclusive+bI,e+1)),a=new jt(Math.max(1,s[0].modified.startLineNumber-bI),Math.min(s[s.length-1].modified.endLineNumberExclusive+bI,t+1));bIe(s,(u,h)=>{const g=new jt(u?u.original.endLineNumberExclusive:o.startLineNumber,h?h.original.startLineNumber:o.endLineNumberExclusive),f=new jt(u?u.modified.endLineNumberExclusive:a.startLineNumber,h?h.modified.startLineNumber:a.endLineNumberExclusive);g.forEach(m=>{r.push(new Q8t(m,f.startLineNumber+(m-g.startLineNumber)))}),h&&(h.original.forEach(m=>{r.push(new G8t(h,m))}),h.modified.forEach(m=>{r.push(new Y8t(h,m))}))});const l=s[0].modified.join(s[s.length-1].modified),c=s[0].original.join(s[s.length-1].original);n.push(new q8t(new al(l,c),r))}return n}var Pl;(function(i){i[i.Header=0]="Header",i[i.Unchanged=1]="Unchanged",i[i.Deleted=2]="Deleted",i[i.Added=3]="Added"})(Pl||(Pl={}));class q8t{constructor(e,t){this.range=e,this.lines=t}}class K8t{constructor(){this.type=Pl.Header}}class G8t{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=Pl.Deleted,this.modifiedLineNumber=void 0}}class Y8t{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=Pl.Added,this.originalLineNumber=void 0}}class Q8t{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=Pl.Unchanged}}let AX=class extends se{constructor(e,t,n,s,r,o){super(),this._element=e,this._model=t,this._width=n,this._height=s,this._models=r,this._languageService=o,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const a=document.createElement("div");a.className="diff-review-actions",this._actionBar=this._register(new mc(a)),this._register(Pt(l=>{this._actionBar.clear(),this._model.canClose.read(l)&&this._actionBar.push(V1({id:"diffreview.close",label:S(100,"Close"),class:"close-diff-review "+Tt.asClassName(U8t),enabled:!0,run:async()=>t.close()}),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new GP(this._content,{})),vo(this.domNode,this._scrollbar.getDomNode(),a),this._register(Pt(l=>{this._height.read(l),this._width.read(l),this._scrollbar.scanDomNode()})),this._register(dt(()=>{vo(this.domNode)})),this._register(o0(this.domNode,{width:this._width,height:this._height})),this._register(o0(this._content,{width:this._width,height:this._height})),this._register(Fa((l,c)=>{this._model.currentGroup.read(l),this._render(c)})),this._register(yr(this.domNode,"keydown",l=>{(l.equals(18)||l.equals(2066)||l.equals(530))&&(l.preventDefault(),this._model.goToNextLine()),(l.equals(16)||l.equals(2064)||l.equals(528))&&(l.preventDefault(),this._model.goToPreviousLine()),(l.equals(9)||l.equals(2057)||l.equals(521)||l.equals(1033))&&(l.preventDefault(),this._model.close()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){const t=this._models.getOriginalOptions(),n=this._models.getModifiedOptions(),s=document.createElement("div");s.className="diff-review-table",s.setAttribute("role","list"),s.setAttribute("aria-label",S(101,"Accessible Diff Viewer. Use arrow up and down to navigate.")),Po(s,n.get(59)),vo(this._content,s);const r=this._models.getOriginalModel(),o=this._models.getModifiedModel();if(!r||!o)return;const a=r.getOptions(),l=o.getOptions(),c=n.get(75),u=this._model.currentGroup.get();for(const h of(u==null?void 0:u.lines)||[]){if(!u)break;let g;if(h.type===Pl.Header){const m=document.createElement("div");m.className="diff-review-row",m.setAttribute("role","listitem");const x=u.range,v=this._model.currentGroupIndex.get(),_=this._model.groups.get().length,w=D=>D===0?S(102,"no lines changed"):D===1?S(103,"1 line changed"):S(104,"{0} lines changed",D),k=w(x.original.length),C=w(x.modified.length);m.setAttribute("aria-label",S(105,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",v+1,_,x.original.startLineNumber,k,x.modified.startLineNumber,C));const E=document.createElement("div");E.className="diff-review-cell diff-review-summary",E.appendChild(document.createTextNode(`${v+1}/${_}: @@ -${x.original.startLineNumber},${x.original.length} +${x.modified.startLineNumber},${x.modified.length} @@`)),m.appendChild(E),g=m}else g=this._createRow(h,c,this._width.get(),t,r,a,n,o,l);s.appendChild(g);const f=we(m=>this._model.currentElement.read(m)===h);e.add(Pt(m=>{const x=f.read(m);g.tabIndex=x?0:-1,x&&g.focus()})),e.add(de(g,"focus",()=>{this._model.goToLine(h)}))}this._scrollbar.scanDomNode()}_createRow(e,t,n,s,r,o,a,l,c){const u=s.get(165),h=u.glyphMarginWidth+u.lineNumbersWidth,g=a.get(165),f=10+g.glyphMarginWidth+g.lineNumbersWidth;let m="diff-review-row",x="";const v="diff-review-spacer";let _=null;switch(e.type){case Pl.Added:m="diff-review-row line-insert",x=" char-insert",_=V8t;break;case Pl.Deleted:m="diff-review-row line-delete",x=" char-delete",_=z8t;break}const w=document.createElement("div");w.style.minWidth=n+"px",w.className=m,w.setAttribute("role","listitem"),w.ariaLevel="";const k=document.createElement("div");k.className="diff-review-cell",k.style.height=`${t}px`,w.appendChild(k);const C=document.createElement("span");C.style.width=h+"px",C.style.minWidth=h+"px",C.className="diff-review-line-number"+x,e.originalLineNumber!==void 0?C.appendChild(document.createTextNode(String(e.originalLineNumber))):C.innerText=" ",k.appendChild(C);const E=document.createElement("span");E.style.width=f+"px",E.style.minWidth=f+"px",E.style.paddingRight="10px",E.className="diff-review-line-number"+x,e.modifiedLineNumber!==void 0?E.appendChild(document.createTextNode(String(e.modifiedLineNumber))):E.innerText=" ",k.appendChild(E);const D=document.createElement("span");if(D.className=v,_){const R=document.createElement("span");R.className=Tt.asClassName(_),R.innerText="  ",D.appendChild(R)}else D.innerText="  ";k.appendChild(D);let T;if(e.modifiedLineNumber!==void 0){let R=this._getLineHtml(l,a,c.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);w1._ttPolicy&&(R=w1._ttPolicy.createHTML(R)),k.insertAdjacentHTML("beforeend",R),T=l.getLineContent(e.modifiedLineNumber)}else{let R=this._getLineHtml(r,s,o.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);w1._ttPolicy&&(R=w1._ttPolicy.createHTML(R)),k.insertAdjacentHTML("beforeend",R),T=r.getLineContent(e.originalLineNumber)}T.length===0&&(T=S(106,"blank"));let I="";switch(e.type){case Pl.Unchanged:e.originalLineNumber===e.modifiedLineNumber?I=S(107,"{0} unchanged line {1}",T,e.originalLineNumber):I=S(108,"{0} original line {1} modified line {2}",T,e.originalLineNumber,e.modifiedLineNumber);break;case Pl.Added:I=S(109,"+ {0} modified line {1}",T,e.modifiedLineNumber);break;case Pl.Deleted:I=S(110,"- {0} original line {1}",T,e.originalLineNumber);break}return w.setAttribute("aria-label",I),w}_getLineHtml(e,t,n,s,r){const o=e.getLineContent(s),a=t.get(59),l=t.get(117).verticalScrollbarSize,c=hr.createEmpty(o,r),u=Gd.isBasicASCII(o,e.mightContainNonBasicASCII()),h=Gd.containsRTL(o,u,e.mightContainRTL());return tW(new ux(a.isMonospace&&!t.get(40),a.canUseHalfwidthRightwardsArrow,o,!1,u,h,0,c,[],n,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,t.get(133),t.get(113),t.get(108),t.get(60)!==Gb.OFF,null,null,l)).html}};AX=Aae([Rae(5,tr)],AX);class X8t{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}Z("diffEditor.move.border","#8b8b8b9c",S(137,"The border color for text that got moved in the diff editor."));Z("diffEditor.moveActive.border","#FFA500",S(138,"The active border color for text that got moved in the diff editor."));Z("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},S(139,"The color of the shadow around unchanged region widgets."));const Z8t=ls("diff-insert",Ee.add,S(140,"Line decoration for inserts in the diff editor.")),vMe=ls("diff-remove",Ee.remove,S(141,"Line decoration for removals in the diff editor.")),l0e=qt.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+Tt.asClassName(Z8t),marginClassName:"gutter-insert"}),c0e=qt.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+Tt.asClassName(vMe),marginClassName:"gutter-delete"}),d0e=qt.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),u0e=qt.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),h0e=qt.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),J8t=qt.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),eBt=qt.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),RX=qt.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),tBt=qt.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),nBt=qt.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"}),Nc=ln("editorWorkerService");var _Me=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},MX=function(i,e){return function(t,n){e(t,n,i)}},Dy;const yMe=ln("diffProviderFactoryService");let PX=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(OX,e)}};PX=_Me([MX(0,ft)],PX);wn(yMe,PX,1);var ow;let OX=(ow=class{constructor(e,t,n){this.editorWorkerService=t,this.telemetryService=n,this.onDidChangeEventEmitter=new ie,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;(e=this.diffAlgorithmOnDidChangeSubscription)==null||e.dispose()}async computeDiff(e,t,n,s){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(e,t,n,s);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(e.getLineCount()===1&&e.getLineMaxColumn(1)===1)return t.getLineCount()===1&&t.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new $d(new jt(1,2),new jt(1,t.getLineCount()+1),[new Ml(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const r=JSON.stringify([e.uri.toString(),t.uri.toString()]),o=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(n)]),a=Dy.diffCache.get(r);if(a&&a.context===o)return a.result;const l=_o.create(),c=await this.editorWorkerService.computeDiff(e.uri,t.uri,n,this.diffAlgorithm),u=l.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:u,timedOut:(c==null?void 0:c.quitEarly)??!0,detectedMoves:n.computeMoves?(c==null?void 0:c.moves.length)??0:-1}),s.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!c)throw new Error("no diff result available");return Dy.diffCache.size>10&&Dy.diffCache.delete(Dy.diffCache.keys().next().value),Dy.diffCache.set(r,{result:c,context:o}),c}setOptions(e){var n;let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&((n=this.diffAlgorithmOnDidChangeSubscription)==null||n.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,typeof e.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}},Dy=ow,ow.diffCache=new Map,ow);OX=Dy=_Me([MX(1,Nc),MX(2,Ua)],OX);class Ab{static trivial(e,t){return new Ab([new uo(ht.ofLength(e.length),ht.ofLength(t.length))],!1)}static trivialTimedOut(e,t){return new Ab([new uo(ht.ofLength(e.length),ht.ofLength(t.length))],!0)}constructor(e,t){this.diffs=e,this.hitTimeout=t}}class uo{static invert(e,t){const n=[];return bIe(e,(s,r)=>{n.push(uo.fromOffsetPairs(s?s.getEndExclusives():fb.zero,r?r.getStarts():new fb(t,(s?s.seq2Range.endExclusive-s.seq1Range.endExclusive:0)+t)))}),n}static fromOffsetPairs(e,t){return new uo(new ht(e.offset1,t.offset1),new ht(e.offset2,t.offset2))}static assertSorted(e){let t;for(const n of e){if(t&&!(t.seq1Range.endExclusive<=n.seq1Range.start&&t.seq2Range.endExclusive<=n.seq2Range.start))throw new Nt("Sequence diffs must be sorted");t=n}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new uo(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new uo(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new uo(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new uo(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new uo(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),n=this.seq2Range.intersect(e.seq2Range);if(!(!t||!n))return new uo(t,n)}getStarts(){return new fb(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new fb(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}const s1=class s1{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new s1(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};s1.zero=new s1(0,0),s1.max=new s1(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);let fb=s1;const c9=class c9{isValid(){return!0}};c9.instance=new c9;let GR=c9;class iBt{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Nt("timeout must be positive")}isValid(){return!(Date.now()-this.startTimes!=null),new Promise((s,r)=>{let o=!0,a=!1;const l=i.map(u=>({isFinished:e(u),error:t?t(u):!1,state:u})),c=Pt(u=>{const{isFinished:h,error:g,state:f}=l.read(u);(h||g)&&(o?a=!0:c.dispose(),g?r(g===!0?f:g):s(f))});if(n){const u=n.onCancellationRequested(()=>{c.dispose(),u.dispose(),r(new Vu)});if(n.isCancellationRequested){c.dispose(),u.dispose(),r(new Vu);return}}o=!1,a&&c.dispose()})}function Wc(i,e,t=oo.ofCaller()){return new sBt(typeof i=="string"?i:new Ca(i,void 0,void 0),e,t)}class sBt extends CD{constructor(e,t,n){super(n),this.event=t,this.handleEvent=()=>{Vi(s=>{for(const r of this._observers)s.updateObserver(r,this),r.handleChange(this,void 0)},()=>this.debugName)},this.debugName=typeof e=="string"?e:e.getDebugName(this)??"Observable Signal From Event"}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}var rBt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},oBt=function(i,e){return function(t,n){e(t,n,i)}};let FX=class extends se{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,n){super(),this.model=e,this._options=t,this._diffProviderFactoryService=n,this._isDiffUpToDate=Ft(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=Ft(this,void 0),this.diff=this._diff,this._unchangedRegions=Ft(this,void 0),this.unchangedRegions=we(this,a=>{var l;return this._options.hideUnchangedRegions.read(a)?((l=this._unchangedRegions.read(a))==null?void 0:l.regions)??[]:(Vi(c=>{var u;for(const h of((u=this._unchangedRegions.read(void 0))==null?void 0:u.regions)||[])h.collapseAll(c)}),[])}),this.movedTextToCompare=Ft(this,void 0),this._activeMovedText=Ft(this,void 0),this._hoveredMovedText=Ft(this,void 0),this.activeMovedText=we(this,a=>this.movedTextToCompare.read(a)??this._hoveredMovedText.read(a)??this._activeMovedText.read(a)),this._cancellationTokenSource=new vs,this._diffProvider=we(this,a=>{const l=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(a)}),c=Wc("onDidChange",l.onDidChange);return{diffProvider:l,onChangeSignal:c}}),this._register(dt(()=>this._cancellationTokenSource.cancel()));const s=Au("contentChangedSignal"),r=this._register(new pi(()=>s.trigger(void 0),200));this._register(Pt(a=>{const l=this._unchangedRegions.read(a);if(!l||l.regions.some(m=>m.isDragged.read(a)))return;const c=l.originalDecorationIds.map(m=>e.original.getDecorationRange(m)).map(m=>m?jt.fromRangeInclusive(m):void 0),u=l.modifiedDecorationIds.map(m=>e.modified.getDecorationRange(m)).map(m=>m?jt.fromRangeInclusive(m):void 0),h=l.regions.map((m,x)=>!c[x]||!u[x]?void 0:new t_(c[x].startLineNumber,u[x].startLineNumber,c[x].length,m.visibleLineCountTop.read(a),m.visibleLineCountBottom.read(a))).filter(Ao),g=[];let f=!1;for(const m of Xre(h,(x,v)=>x.getHiddenModifiedRange(a).endLineNumberExclusive===v.getHiddenModifiedRange(a).startLineNumber))if(m.length>1){f=!0;const x=m.reduce((_,w)=>_+w.lineCount,0),v=new t_(m[0].originalLineNumber,m[0].modifiedLineNumber,x,m[0].visibleLineCountTop.read(void 0),m[m.length-1].visibleLineCountBottom.read(void 0));g.push(v)}else g.push(m[0]);if(f){const m=e.original.deltaDecorations(l.originalDecorationIds,g.map(v=>({range:v.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),x=e.modified.deltaDecorations(l.modifiedDecorationIds,g.map(v=>({range:v.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));Vi(v=>{this._unchangedRegions.set({regions:g,originalDecorationIds:m,modifiedDecorationIds:x},v)})}}));const o=(a,l,c)=>{const u=t_.fromDiffs(a.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(c),this._options.hideUnchangedRegionsContextLineCount.read(c));let h;const g=this._unchangedRegions.get();if(g){const v=g.originalDecorationIds.map(C=>e.original.getDecorationRange(C)).map(C=>C?jt.fromRangeInclusive(C):void 0),_=g.modifiedDecorationIds.map(C=>e.modified.getDecorationRange(C)).map(C=>C?jt.fromRangeInclusive(C):void 0);let k=M8t(g.regions.map((C,E)=>{if(!v[E]||!_[E])return;const D=v[E].length;return new t_(v[E].startLineNumber,_[E].startLineNumber,D,Math.min(C.visibleLineCountTop.get(),D),Math.min(C.visibleLineCountBottom.get(),D-C.visibleLineCountTop.get()))}).filter(Ao),(C,E)=>!E||C.modifiedLineNumber>=E.modifiedLineNumber+E.lineCount&&C.originalLineNumber>=E.originalLineNumber+E.lineCount).map(C=>new al(C.getHiddenOriginalRange(c),C.getHiddenModifiedRange(c)));k=al.clip(k,jt.ofLength(1,e.original.getLineCount()),jt.ofLength(1,e.modified.getLineCount())),h=al.inverse(k,e.original.getLineCount(),e.modified.getLineCount())}const f=[];if(h)for(const v of u){const _=h.filter(w=>w.original.intersectsStrict(v.originalUnchangedRange)&&w.modified.intersectsStrict(v.modifiedUnchangedRange));f.push(...v.setVisibleRanges(_,l))}else f.push(...u);const m=e.original.deltaDecorations((g==null?void 0:g.originalDecorationIds)||[],f.map(v=>({range:v.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),x=e.modified.deltaDecorations((g==null?void 0:g.modifiedDecorationIds)||[],f.map(v=>({range:v.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:f,originalDecorationIds:m,modifiedDecorationIds:x},l)};this._register(e.modified.onDidChangeContent(a=>{if(this._diff.get()){const c=gb.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),r.schedule()})),this._register(e.original.onDidChangeContent(a=>{if(this._diff.get()){const c=gb.fromModelContentChanges(a.changes);this._lastDiff,e.original,e.modified}this._isDiffUpToDate.set(!1,void 0),r.schedule()})),this._register(Fa(async(a,l)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(a),this._options.hideUnchangedRegionsContextLineCount.read(a),r.cancel(),s.read(a);const c=this._diffProvider.read(a);c.onChangeSignal.read(a),this._isDiffUpToDate.set(!1,void 0);let u=[];l.add(e.original.onDidChangeContent(f=>{const m=gb.fromModelContentChanges(f.changes);u=_6(u,m)}));let h=[];l.add(e.modified.onDidChangeContent(f=>{const m=gb.fromModelContentChanges(f.changes);h=_6(h,m)}));let g=await c.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(a),maxComputationTimeMs:this._options.maxComputationTimeMs.read(a),computeMoves:this._options.showMoves.read(a)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(g=aBt(g,e.original,e.modified),g=(e.original,e.modified,void 0)??g,g=(e.original,e.modified,void 0)??g,Vi(f=>{o(g,f),this._lastDiff=g;const m=Mae.fromDiffResult(g);this._diff.set(m,f),this._isDiffUpToDate.set(!0,f);const x=this.movedTextToCompare.read(void 0);this.movedTextToCompare.set(x?this._lastDiff.moves.find(v=>v.lineRangeMapping.modified.intersect(x.lineRangeMapping.modified)):void 0,f)}))}))}ensureModifiedLineIsVisible(e,t,n){var r,o;if(((r=this.diff.get())==null?void 0:r.mappings.length)===0)return;const s=((o=this._unchangedRegions.get())==null?void 0:o.regions)||[];for(const a of s)if(a.getHiddenModifiedRange(void 0).contains(e)){a.showModifiedLine(e,t,n);return}}ensureOriginalLineIsVisible(e,t,n){var r,o;if(((r=this.diff.get())==null?void 0:r.mappings.length)===0)return;const s=((o=this._unchangedRegions.get())==null?void 0:o.regions)||[];for(const a of s)if(a.getHiddenOriginalRange(void 0).contains(e)){a.showOriginalLine(e,t,n);return}}async waitForDiff(){await wMe(this.isDiffUpToDate,e=>e)}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:e==null?void 0:e.regions.map(t=>({range:t.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){var s;const t=(s=e.collapsedRegions)==null?void 0:s.map(r=>jt.deserialize(r.range)),n=this._unchangedRegions.get();!n||!t||Vi(r=>{for(const o of n.regions)for(const a of t)if(o.modifiedUnchangedRange.intersect(a)){o.setHiddenModifiedRange(a,r);break}})}};FX=rBt([oBt(2,yMe)],FX);function aBt(i,e,t){return{changes:i.changes.map(n=>new $d(n.original,n.modified,n.innerChanges?n.innerChanges.map(s=>lBt(s,e,t)):void 0)),moves:i.moves,identical:i.identical,quitEarly:i.quitEarly}}function lBt(i,e,t){let n=i.originalRange,s=i.modifiedRange;return n.startColumn===1&&s.startColumn===1&&(n.endColumn!==1||s.endColumn!==1)&&n.endColumn===e.getLineMaxColumn(n.endLineNumber)&&s.endColumn===t.getLineMaxColumn(s.endLineNumber)&&n.endLineNumbernew CMe(t)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,n,s){this.mappings=e,this.movedTexts=t,this.identical=n,this.quitEarly=s}}class CMe{constructor(e){this.lineRangeMapping=e}}class t_{static fromDiffs(e,t,n,s,r){const o=$d.inverse(e,t,n),a=[];for(const l of o){let c=l.original.startLineNumber,u=l.modified.startLineNumber,h=l.original.length;const g=c===1&&u===1,f=c+h===t+1&&u+h===n+1;(g||f)&&h>=r+s?(g&&!f&&(h-=r),f&&!g&&(c+=r,u+=r,h-=r),a.push(new t_(c,u,h,0,0))):h>=r*2+s&&(c+=r,u+=r,h-=r*2,a.push(new t_(c,u,h,0,0)))}return a}get originalUnchangedRange(){return jt.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return jt.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,n,s,r){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=n,this._visibleLineCountTop=Ft(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=Ft(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=we(this,l=>this.visibleLineCountTop.read(l)+this.visibleLineCountBottom.read(l)===this.lineCount&&!this.isDragged.read(l)),this.isDragged=Ft(this,void 0);const o=Math.max(Math.min(s,this.lineCount),0),a=Math.max(Math.min(r,this.lineCount-s),0);$be(s===o),$be(r===a),this._visibleLineCountTop.set(o,void 0),this._visibleLineCountBottom.set(a,void 0)}setVisibleRanges(e,t){const n=[],s=new Iu(e.map(l=>l.modified)).subtractFrom(this.modifiedUnchangedRange);let r=this.originalLineNumber,o=this.modifiedLineNumber;const a=this.modifiedLineNumber+this.lineCount;if(s.ranges.length===0)this.showAll(t),n.push(this);else{let l=0;for(const c of s.ranges){const u=l===s.ranges.length-1;l++;const h=(u?a:c.endLineNumberExclusive)-o,g=new t_(r,o,h,0,0);g.setHiddenModifiedRange(c,t),n.push(g),r=g.originalUnchangedRange.endLineNumberExclusive,o=g.modifiedUnchangedRange.endLineNumberExclusive}}return n}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return jt.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return jt.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const n=e.startLineNumber-this.modifiedLineNumber,s=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(n,s,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const n=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,n),t)}showMoreBelow(e=10,t){const n=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,n),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,n){const s=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),r=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;t===0&&s{a.preventDefault();const l=e.ownerDocument.getSelection();if(!l||l.rangeCount===0)return;const c=l.getRangeAt(0);if(!c||c.collapsed)return;const u=c.startContainer.nodeType===Node.TEXT_NODE?c.startContainer.parentElement:c.startContainer,h=c.endContainer.nodeType===Node.TEXT_NODE?c.endContainer.parentElement:c.endContainer;if(!u||!h)return;const g=t.getModelPositionAt(u,c.startOffset),f=t.getModelPositionAt(h,c.endOffset);if(!g||!f)return;const m=g.delta(n.original.startLineNumber-1),x=f.delta(n.original.startLineNumber-1),v=x.isBefore(m)?z.fromPositions(x,m):z.fromPositions(m,x),_=s.getValueInRange(v);r.writeText(_)})),o}class dBt extends se{get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}constructor(e,t,n,s,r,o,a,l,c,u){super(),this._getViewZoneId=e,this._marginDomNode=t,this._deletedCodeDomNode=n,this._modifiedEditor=s,this._diff=r,this._editor=o,this._renderLinesResult=a,this._originalTextModel=l,this._contextMenuService=c,this._clipboardService=u,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=Tt.asClassName(Ee.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const h=this._modifiedEditor.getOption(75);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${h}px`,this._diffActions.style.lineHeight=`${h}px`,this._marginDomNode.appendChild(this._diffActions);let g=0;const f=s.getOption(144)&&!zu,m=(x,v,_)=>{this._contextMenuService.showContextMenu({domForShadowRoot:f?s.getDomNode()??void 0:void 0,getAnchor:()=>x,onHide:_,getActions:()=>{const w=[],k=r.modified.isEmpty;return w.push(new Wd("diff.clipboard.copyDeletedContent",k?r.original.length>1?S(112,"Copy deleted lines"):S(113,"Copy deleted line"):r.original.length>1?S(114,"Copy changed lines"):S(115,"Copy changed line"),void 0,!0,async()=>{const E=this._originalTextModel.getValueInRange(r.original.toExclusiveRange());await this._clipboardService.writeText(E)})),r.original.length>1&&w.push(new Wd("diff.clipboard.copyDeletedLineContent",k?S(116,"Copy deleted line ({0})",r.original.startLineNumber+g):S(117,"Copy changed line ({0})",r.original.startLineNumber+g),void 0,!0,async()=>{let E=this._originalTextModel.getLineContent(r.original.startLineNumber+g);E===""&&(E=this._originalTextModel.getEndOfLineSequence()===0?` +`:`\r +`),await this._clipboardService.writeText(E)})),s.getOption(104)||w.push(new Wd("diff.inline.revertChange",S(118,"Revert this change"),void 0,!0,async()=>{this._editor.revert(this._diff)})),w},autoSelectFirstItem:!0})};this._register(yr(this._diffActions,"mousedown",x=>{if(!x.leftButton)return;const{top:v,height:_}=Zs(this._diffActions),w=Math.floor(h/3);x.preventDefault(),m({x:x.posx,y:v+_+w})})),this._register(s.onMouseMove(x=>{(x.target.type===8||x.target.type===5)&&x.target.detail.viewZoneId===this._getViewZoneId()?(g=this._updateLightBulbPosition(this._marginDomNode,x.event.browserEvent.y,h),this.visibility=!0):this.visibility=!1})),this._register(cBt({domNode:this._deletedCodeDomNode,diffEntry:r,originalModel:this._originalTextModel,renderLinesResult:this._renderLinesResult,clipboardService:u}))}_updateLightBulbPosition(e,t,n){const{top:s}=Zs(e),r=t-s,o=Math.floor(r/n),a=o*n;if(this._diffActions.style.top=`${a}px`,this._renderLinesResult.viewLineCounts){let l=0;for(let c=0;ci});function sO(i,e,t,n,s=!1){Po(n,e.fontInfo);const r=t.length>0,o=new S0(1e4);let a=0,l=0;const c=[],u=[];for(let m=0;mnull),n=!0,s=!0){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=n,this.mightContainRTL=s}}class Rb{static fromEditor(e){var r;const t=e.getOptions(),n=t.get(59),s=t.get(165);return new Rb(((r=e.getModel())==null?void 0:r.getOptions().tabSize)||0,n,t.get(40),n.typicalHalfwidthCharacterWidth,t.get(118),t.get(75),s.decorationsWidth,t.get(133),t.get(113),t.get(108),t.get(60),t.get(117).verticalScrollbarSize)}constructor(e,t,n,s,r,o,a,l,c,u,h,g,f=!0){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=n,this.typicalHalfwidthCharacterWidth=s,this.scrollBeyondLastColumn=r,this.lineHeight=o,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=c,this.renderControlCharacters=u,this.fontLigatures=h,this.verticalScrollbarSize=g,this.setWidth=f}withSetWidth(e){return new Rb(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,this.scrollBeyondLastColumn,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,e)}withScrollBeyondLastColumn(e){return new Rb(this.tabSize,this.fontInfo,this.disableMonospaceOptimizations,this.typicalHalfwidthCharacterWidth,e,this.lineHeight,this.lineDecorationsWidth,this.stopRenderingLineAfter,this.renderWhitespace,this.renderControlCharacters,this.fontLigatures,this.verticalScrollbarSize,this.setWidth)}}class uBt{constructor(e,t,n,s,r){this.heightInLines=e,this.minWidthInPx=t,this.viewLineCounts=n,this._renderOutputs=s,this._source=r}getModelPositionAt(e,t){let n=e;for(;n&&!n.classList.contains("view-line");)n=n.parentElement;if(!n)return;const s=n.parentElement;if(!s)return;const r=s.querySelectorAll(".view-line");let o=-1;for(let h=0;h=this._renderOutputs.length)return;let a=1,l=o;for(let h=0;hthis._source.lineTokens.length)return;const c=this._renderOutputs[o];if(!c)return;const u=SL(c.characterMapping,e,t)+c.offset;return new te(a,u)}}class f0e extends n6{constructor(e,t,n){super(e,t),this.offset=n}}function p0e(i,e,t,n,s,r,o,a,l){a.appendString('
    '):a.appendString('px;">');const c=e.getLineContent(),u=Gd.isBasicASCII(c,s),h=Gd.containsRTL(c,u,r),g=PD(new ux(o.fontInfo.isMonospace&&!o.disableMonospaceOptimizations,o.fontInfo.canUseHalfwidthRightwardsArrow,c,!1,u,h,0,e,t,o.tabSize,0,o.fontInfo.spaceWidth,o.fontInfo.middotWidth,o.fontInfo.wsmiddotWidth,o.stopRenderingLineAfter,o.renderWhitespace,o.renderControlCharacters,o.fontLigatures!==Gb.OFF,null,null,o.verticalScrollbarSize),a);a.appendString("
    ");const f=g.characterMapping.getHorizontalOffset(g.characterMapping.length);return{output:g,maxCharWidth:f}}const ed=ln("clipboardService"),fx=ln("contextViewService"),eu=ln("contextMenuService");var hBt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},m0e=function(i,e){return function(t,n){e(t,n,i)}};let BX=class extends se{constructor(e,t,n,s,r,o,a,l,c,u){super(),this._targetWindow=e,this._editors=t,this._diffModel=n,this._options=s,this._diffEditorWidget=r,this._canIgnoreViewZoneUpdateEvent=o,this._origViewZonesToIgnore=a,this._modViewZonesToIgnore=l,this._clipboardService=c,this._contextMenuService=u,this._originalTopPadding=Ft(this,0),this._originalScrollOffset=Ft(this,0),this._originalScrollOffsetAnimated=t0e(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=Ft(this,0),this._modifiedScrollOffset=Ft(this,0),this._modifiedScrollOffsetAnimated=t0e(this._targetWindow,this._modifiedScrollOffset,this._store);const h=Ft("invalidateAlignmentsState",0),g=this._register(new pi(()=>{h.set(h.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(k=>{this._canIgnoreViewZoneUpdateEvent()||g.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(k=>{this._canIgnoreViewZoneUpdateEvent()||g.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(k=>{(k.hasChanged(166)||k.hasChanged(75))&&g.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(k=>{(k.hasChanged(166)||k.hasChanged(75))&&g.schedule()}));const f=this._diffModel.map(k=>k?Gn(this,k.model.original.onDidChangeTokens,()=>k.model.original.tokenization.backgroundTokenizationState===2):void 0).map((k,C)=>k==null?void 0:k.read(C)),m=we(k=>{const C=this._diffModel.read(k),E=C==null?void 0:C.diff.read(k);if(!C||!E)return null;h.read(k);const T=this._options.renderSideBySide.read(k);return b0e(this._editors.original,this._editors.modified,E.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,T)}),x=we(k=>{var D;const C=(D=this._diffModel.read(k))==null?void 0:D.movedTextToCompare.read(k);if(!C)return null;h.read(k);const E=C.changes.map(T=>new CMe(T));return b0e(this._editors.original,this._editors.modified,E,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function v(){const k=document.createElement("div");return k.className="diagonal-fill",k}const _=this._register(new _e);this.viewZones=we(this,k=>{var ae,ne,W,Y;_.clear();const C=m.read(k)||[],E=[],D=[],T=this._modifiedTopPadding.read(k);T>0&&D.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:T,showInHiddenAreas:!0,suppressMouseDown:!0});const I=this._originalTopPadding.read(k);I>0&&E.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:I,showInHiddenAreas:!0,suppressMouseDown:!0});const R=this._options.renderSideBySide.read(k),P=R||(ae=this._editors.modified._getViewModel())==null?void 0:ae.createLineBreaksComputer();if(P){const G=this._editors.original.getModel();for(const U of C)if(U.diff)for(let ue=U.originalRange.startLineNumber;ueG.getLineCount())return{orig:E,mod:D};P==null||P.addRequest(G.getLineContent(ue),null,null)}}const j=(P==null?void 0:P.finalize())??[];let B=0;const H=this._editors.modified.getOption(75),$=(ne=this._diffModel.read(k))==null?void 0:ne.movedTextToCompare.read(k),q=((W=this._editors.original.getModel())==null?void 0:W.mightContainNonBasicASCII())??!1,V=((Y=this._editors.original.getModel())==null?void 0:Y.mightContainRTL())??!1,X=Rb.fromEditor(this._editors.modified);for(const G of C)if(G.diff&&!R&&(!this._options.useTrueInlineDiffRendering.read(k)||!Pae(G.diff))){if(!G.originalRange.isEmpty){f.read(k);const ue=document.createElement("div");ue.classList.add("view-lines","line-delete","line-delete-selectable","monaco-mouse-cursor-text");const fe=this._editors.original.getModel();if(G.originalRange.endLineNumberExclusive-1>fe.getLineCount())return{orig:E,mod:D};const Le=new rO(G.originalRange.mapToLineArray(Ie=>fe.tokenization.getLineTokens(Ie)),G.originalRange.mapToLineArray(Ie=>j[B++]),q,V),tt=[];for(const Ie of G.diff.innerChanges||[])tt.push(new Q1(Ie.originalRange.delta(-(G.diff.original.startLineNumber-1)),RX.className,0));const ge=sO(Le,X,tt,ue),he=document.createElement("div");if(he.className="inline-deleted-margin-view-zone",Po(he,X.fontInfo),this._options.renderIndicators.read(k))for(let Ie=0;IeUv(We),he,ue,this._editors.modified,G.diff,this._diffEditorWidget,ge,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Ie=0;Ie1&&E.push({afterLineNumber:G.originalRange.startLineNumber+Ie,domNode:v(),heightInPx:(_t-1)*H,showInHiddenAreas:!0,suppressMouseDown:!0})}D.push({afterLineNumber:G.modifiedRange.startLineNumber-1,domNode:ue,heightInPx:ge.heightInLines*H,minWidthInPx:ge.minWidthInPx,marginDomNode:he,setZoneId(Ie){We=Ie},showInHiddenAreas:!0,suppressMouseDown:!1})}const U=document.createElement("div");U.className="gutter-delete",E.push({afterLineNumber:G.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:G.modifiedHeightInPx,marginDomNode:U,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const U=G.modifiedHeightInPx-G.originalHeightInPx;if(U>0){if($!=null&&$.lineRangeMapping.original.delta(-1).deltaLength(2).contains(G.originalRange.endLineNumberExclusive-1))continue;E.push({afterLineNumber:G.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:U,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let ue=function(){const Le=document.createElement("div");return Le.className="arrow-revert-change "+Tt.asClassName(Ee.arrowRight),k.store.add(de(Le,"mousedown",tt=>tt.stopPropagation())),k.store.add(de(Le,"click",tt=>{tt.stopPropagation(),r.revert(G.diff)})),Oe("div",{},Le)};if($!=null&&$.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(G.modifiedRange.endLineNumberExclusive-1))continue;let fe;G.diff&&G.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(k)&&(fe=ue()),D.push({afterLineNumber:G.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-U,marginDomNode:fe,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const G of x.read(k)??[]){if(!($!=null&&$.lineRangeMapping.original.intersect(G.originalRange))||!($!=null&&$.lineRangeMapping.modified.intersect(G.modifiedRange)))continue;const U=G.modifiedHeightInPx-G.originalHeightInPx;U>0?E.push({afterLineNumber:G.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:U,showInHiddenAreas:!0,suppressMouseDown:!0}):D.push({afterLineNumber:G.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-U,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:E,mod:D}});let w=!1;this._register(this._editors.original.onDidScrollChange(k=>{k.scrollLeftChanged&&!w&&(w=!0,this._editors.modified.setScrollLeft(k.scrollLeft),w=!1)})),this._register(this._editors.modified.onDidScrollChange(k=>{k.scrollLeftChanged&&!w&&(w=!0,this._editors.original.setScrollLeft(k.scrollLeft),w=!1)})),this._originalScrollTop=Gn(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Gn(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Pt(k=>{const C=this._originalScrollTop.read(k)-(this._originalScrollOffsetAnimated.read(void 0)-this._modifiedScrollOffsetAnimated.read(k))-(this._originalTopPadding.read(void 0)-this._modifiedTopPadding.read(k));C!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(C,1)})),this._register(Pt(k=>{const C=this._modifiedScrollTop.read(k)-(this._modifiedScrollOffsetAnimated.read(void 0)-this._originalScrollOffsetAnimated.read(k))-(this._modifiedTopPadding.read(void 0)-this._originalTopPadding.read(k));C!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(C,1)})),this._register(Pt(k=>{var D;const C=(D=this._diffModel.read(k))==null?void 0:D.movedTextToCompare.read(k);let E=0;if(C){const T=this._editors.original.getTopForLineNumber(C.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.read(void 0);E=this._editors.modified.getTopForLineNumber(C.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.read(void 0)-T}E>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(E,void 0)):E<0?(this._modifiedTopPadding.set(-E,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.read(void 0)-E,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.read(void 0)+E,void 0,!0)}))}};BX=hBt([m0e(8,ed),m0e(9,eu)],BX);function b0e(i,e,t,n,s,r){const o=new Kb(x0e(i,n)),a=new Kb(x0e(e,s)),l=i.getOption(75),c=e.getOption(75),u=[];let h=0,g=0;function f(m,x){for(;;){let v=o.peek(),_=a.peek();if(v&&v.lineNumber>=m&&(v=void 0),_&&_.lineNumber>=x&&(_=void 0),!v&&!_)break;const w=v?v.lineNumber-h:Number.MAX_VALUE,k=_?_.lineNumber-g:Number.MAX_VALUE;wk?(a.dequeue(),v={lineNumber:_.lineNumber-g+h,heightInPx:0}):(o.dequeue(),a.dequeue()),u.push({originalRange:jt.ofLength(v.lineNumber,1),modifiedRange:jt.ofLength(_.lineNumber,1),originalHeightInPx:l+v.heightInPx,modifiedHeightInPx:c+_.heightInPx,diff:void 0})}}for(const m of t){let k=function(C,E,D=!1){var j,B;if(CH.lineNumberH+$.heightInPx,0))??0,P=((B=a.takeWhile(H=>H.lineNumberH+$.heightInPx,0))??0;u.push({originalRange:T,modifiedRange:I,originalHeightInPx:T.length*l+R,modifiedHeightInPx:I.length*c+P,diff:m.lineRangeMapping}),w=C,_=E};const x=m.lineRangeMapping;f(x.original.startLineNumber,x.modified.startLineNumber);let v=!0,_=x.modified.startLineNumber,w=x.original.startLineNumber;if(r)for(const C of x.innerChanges||[]){C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&k(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber);const E=i.getModel(),D=C.originalRange.endLineNumber<=E.getLineCount()?E.getLineMaxColumn(C.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;C.originalRange.endColumn1&&n.push({lineNumber:l,heightInPx:o*(c-1)})}for(const l of i.getWhitespaces()){if(e.has(l.id))continue;const c=l.afterLineNumber===0?0:r.convertViewPositionToModelPosition(new te(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:c,heightInPx:l.height})}return D8t(t,n,l=>l.lineNumber,(l,c)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+c.heightInPx}))}function Pae(i){return i.innerChanges?i.innerChanges.every(e=>M6(e.modifiedRange)&&M6(e.originalRange)||e.originalRange.equalsRange(new z(1,1,1,1))):!1}function M6(i){return i.startLineNumber===i.endLineNumber}const _2=class _2 extends se{constructor(e,t,n,s,r){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=n,this._modifiedEditorLayoutInfo=s,this._editors=r,this._originalScrollTop=Gn(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=Gn(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=Wc("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=Ft(this,0),this._modifiedViewZonesChangedSignal=Wc("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=Wc("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=we(this,u=>{var D;this._element.replaceChildren();const h=this._diffModel.read(u),g=(D=h==null?void 0:h.diff.read(u))==null?void 0:D.movedTexts;if(!g||g.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(u);const f=this._originalEditorLayoutInfo.read(u),m=this._modifiedEditorLayoutInfo.read(u);if(!f||!m){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(u),this._originalViewZonesChangedSignal.read(u);const x=g.map(T=>{function I(X,ae){const ne=ae.getTopForLineNumber(X.startLineNumber,!0),W=ae.getTopForLineNumber(X.endLineNumberExclusive,!0);return(ne+W)/2}const R=I(T.lineRangeMapping.original,this._editors.original),P=this._originalScrollTop.read(u),j=I(T.lineRangeMapping.modified,this._editors.modified),B=this._modifiedScrollTop.read(u),H=R-P,$=j-B,q=Math.min(R,j),V=Math.max(R,j);return{range:new ht(q,V),from:H,to:$,fromWithoutScroll:R,toWithoutScroll:j,move:T}});x.sort(CLt(_a(T=>T.fromWithoutScroll>T.toWithoutScroll,_Ie),_a(T=>T.fromWithoutScroll>T.toWithoutScroll?T.fromWithoutScroll:-T.toWithoutScroll,$c)));const v=Oae.compute(x.map(T=>T.range)),_=10,w=f.verticalScrollbarWidth,k=(v.getTrackCount()-1)*10+_*2,C=w+k+(m.contentLeft-_2.movedCodeBlockPadding);let E=0;for(const T of x){const I=v.getTrack(E),R=w+_+I*10,P=15,j=15,B=C,H=m.glyphMarginWidth+m.lineNumbersWidth,$=18,q=document.createElementNS("http://www.w3.org/2000/svg","rect");q.classList.add("arrow-rectangle"),q.setAttribute("x",`${B-H}`),q.setAttribute("y",`${T.to-$/2}`),q.setAttribute("width",`${H}`),q.setAttribute("height",`${$}`),this._element.appendChild(q);const V=document.createElementNS("http://www.w3.org/2000/svg","g"),X=document.createElementNS("http://www.w3.org/2000/svg","path");X.setAttribute("d",`M 0 ${T.from} L ${R} ${T.from} L ${R} ${T.to} L ${B-j} ${T.to}`),X.setAttribute("fill","none"),V.appendChild(X);const ae=document.createElementNS("http://www.w3.org/2000/svg","polygon");ae.classList.add("arrow"),u.store.add(Pt(ne=>{X.classList.toggle("currentMove",T.move===h.activeMovedText.read(ne)),ae.classList.toggle("currentMove",T.move===h.activeMovedText.read(ne))})),ae.setAttribute("points",`${B-j},${T.to-P/2} ${B},${T.to} ${B-j},${T.to+P/2}`),V.appendChild(ae),this._element.appendChild(V),E++}this.width.set(k,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(dt(()=>this._element.remove())),this._register(Pt(u=>{const h=this._originalEditorLayoutInfo.read(u),g=this._modifiedEditorLayoutInfo.read(u);!h||!g||(this._element.style.left=`${h.width-h.verticalScrollbarWidth}px`,this._element.style.height=`${h.height}px`,this._element.style.width=`${h.verticalScrollbarWidth+h.contentLeft-_2.movedCodeBlockPadding+this.width.read(u)}px`)})),this._register(xL(this._state));const o=we(u=>{const h=this._diffModel.read(u),g=h==null?void 0:h.diff.read(u);return g?g.movedTexts.map(f=>({move:f,original:new gN(zi(f.lineRangeMapping.original.startLineNumber-1),18),modified:new gN(zi(f.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register(T6(this._editors.original,o.map(u=>u.map(h=>h.original)))),this._register(T6(this._editors.modified,o.map(u=>u.map(h=>h.modified)))),this._register(Fa((u,h)=>{const g=o.read(u);for(const f of g)h.add(new v0e(this._editors.original,f.original,f.move,"original",this._diffModel.get())),h.add(new v0e(this._editors.modified,f.modified,f.move,"modified",this._diffModel.get()))}));const a=Wc("original.onDidFocusEditorWidget",u=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>u(void 0),0))),l=Wc("modified.onDidFocusEditorWidget",u=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>u(void 0),0)));let c="modified";this._register(SD({changeTracker:{createChangeSummary:()=>{},handleChange:(u,h)=>(u.didChange(a)&&(c="original"),u.didChange(l)&&(c="modified"),!0)}},u=>{a.read(u),l.read(u);const h=this._diffModel.read(u);if(!h)return;const g=h.diff.read(u);let f;if(g&&c==="original"){const m=this._editors.originalCursor.read(u);m&&(f=g.movedTexts.find(x=>x.lineRangeMapping.original.contains(m.lineNumber)))}if(g&&c==="modified"){const m=this._editors.modifiedCursor.read(u);m&&(f=g.movedTexts.find(x=>x.lineRangeMapping.modified.contains(m.lineNumber)))}f!==h.movedTextToCompare.read(void 0)&&h.movedTextToCompare.set(void 0,void 0),h.setActiveMovedText(f)}))}};_2.movedCodeBlockPadding=4;let rE=_2;class Oae{static compute(e){const t=[],n=[];for(const s of e){let r=t.findIndex(o=>!o.intersectsStrict(s));r===-1&&(t.length>=6?r=PPt(t,_a(a=>a.intersectWithRangeLength(s),$c)):(r=t.length,t.push(new moe))),t[r].addRange(s),n.push(r)}return new Oae(t.length,n)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class v0e extends Iae{constructor(e,t,n,s,r){const o=Fn("div.diff-hidden-lines-widget");super(e,t,o.root),this._editor=e,this._move=n,this._kind=s,this._diffModel=r,this._nodes=Fn("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Fn("div.text-content@textContent"),Fn("div.action-bar@actionBar")]),o.root.appendChild(this._nodes.root);const a=Gn(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register(o0(this._nodes.root,{paddingRight:a.map(g=>g.verticalScrollbarWidth)}));let l;n.changes.length>0?l=this._kind==="original"?S(131,"Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):S(132,"Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):l=this._kind==="original"?S(133,"Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):S(134,"Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const c=this._register(new mc(this._nodes.actionBar,{highlightToggledItems:!0})),u=new Wd("",l,"",!1);c.push(u,{icon:!1,label:!0});const h=new Wd("","Compare",Tt.asClassName(Ee.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===n?void 0:this._move,void 0)});this._register(Pt(g=>{const f=this._diffModel.movedTextToCompare.read(g)===n;h.checked=f})),c.push(h,{icon:!1,label:!0})}}class gBt extends se{constructor(e,t,n,s){super(),this._editors=e,this._diffModel=t,this._options=n,this._decorations=we(this,r=>{const o=this._diffModel.read(r),a=o==null?void 0:o.diff.read(r);if(!a)return null;const l=this._diffModel.read(r).movedTextToCompare.read(r),c=this._options.renderIndicators.read(r),u=this._options.showEmptyDecorations.read(r),h=[],g=[];if(!l)for(const m of a.mappings)if(m.lineRangeMapping.original.isEmpty||h.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:c?c0e:u0e}),m.lineRangeMapping.modified.isEmpty||g.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:c?l0e:d0e}),m.lineRangeMapping.modified.isEmpty||m.lineRangeMapping.original.isEmpty)m.lineRangeMapping.original.isEmpty||h.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:tBt}),m.lineRangeMapping.modified.isEmpty||g.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:J8t});else{const x=this._options.useTrueInlineDiffRendering.read(r)&&Pae(m.lineRangeMapping);for(const v of m.lineRangeMapping.innerChanges||[])if(m.lineRangeMapping.original.contains(v.originalRange.startLineNumber)&&h.push({range:v.originalRange,options:v.originalRange.isEmpty()&&u?nBt:RX}),m.lineRangeMapping.modified.contains(v.modifiedRange.startLineNumber)&&g.push({range:v.modifiedRange,options:v.modifiedRange.isEmpty()&&u&&!x?eBt:h0e}),x){const _=o.model.original.getValueInRange(v.originalRange);g.push({range:v.modifiedRange,options:{description:"deleted-text",before:{content:_,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(l)for(const m of l.changes){const x=m.original.toInclusiveRange();x&&h.push({range:x,options:c?c0e:u0e});const v=m.modified.toInclusiveRange();v&&g.push({range:v,options:c?l0e:d0e});for(const _ of m.innerChanges||[])h.push({range:_.originalRange,options:RX}),g.push({range:_.modifiedRange,options:h0e})}const f=this._diffModel.read(r).activeMovedText.read(r);for(const m of a.movedTexts)h.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(m===f?" currentMove":""),blockPadding:[rE.movedCodeBlockPadding,0,rE.movedCodeBlockPadding,rE.movedCodeBlockPadding]}}),g.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(m===f?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:h,modifiedDecorations:g}}),this._register(D6(this._editors.original,this._decorations.map(r=>(r==null?void 0:r.originalDecorations)||[]))),this._register(D6(this._editors.modified,this._decorations.map(r=>(r==null?void 0:r.modifiedDecorations)||[])))}}class fo{static equals(e,t){return e.x===t.x&&e.y===t.y}constructor(e,t){this.x=e,this.y=t}add(e){return new fo(this.x+e.x,this.y+e.y)}deltaX(e){return new fo(this.x+e,this.y)}deltaY(e){return new fo(this.x,this.y+e)}toString(){return`(${this.x},${this.y})`}subtract(e){return new fo(this.x-e.x,this.y-e.y)}scale(e){return new fo(this.x*e,this.y*e)}mapComponents(e){return new fo(e(this.x),e(this.y))}isZero(){return this.x===0&&this.y===0}withThreshold(e){return this.mapComponents(t=>t>e?t-e:t<-e?t+e:0)}}function Ts(i){return HX.get(i)}const pv=class pv extends se{static get(e){let t=pv._map.get(e);if(!t){t=new pv(e),pv._map.set(e,t);const n=e.onDidDispose(()=>{const s=pv._map.get(e);s&&(pv._map.delete(e),s.dispose(),n.dispose())})}return t}_beginUpdate(){this._updateCounter++,this._updateCounter===1&&(this._currentTransaction=new kD(()=>{}))}_endUpdate(){if(this._updateCounter--,this._updateCounter===0){const e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){var t;super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=Ft(this,this.editor.getModel()),this.model=this._model,this.isReadonly=Gn(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(104)),this._versionId=MA({owner:this,lazy:!0},((t=this.editor.getModel())==null?void 0:t.getVersionId())??null),this.versionId=this._versionId,this._selections=MA({owner:this,equalsFn:g1(oR(st.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.positions=ma({owner:this,equalsFn:g1(oR(te.equals))},n=>{var s;return((s=this.selections.read(n))==null?void 0:s.map(r=>r.getStartPosition()))??null}),this.isFocused=Gn(this,n=>{const s=this.editor.onDidFocusEditorWidget(n),r=this.editor.onDidBlurEditorWidget(n);return{dispose(){s.dispose(),r.dispose()}}},()=>this.editor.hasWidgetFocus()),this.isTextFocused=Gn(this,n=>{const s=this.editor.onDidFocusEditorText(n),r=this.editor.onDidBlurEditorText(n);return{dispose(){s.dispose(),r.dispose()}}},()=>this.editor.hasTextFocus()),this.inComposition=Gn(this,n=>{const s=this.editor.onDidCompositionStart(()=>{n(void 0)}),r=this.editor.onDidCompositionEnd(()=>{n(void 0)});return{dispose(){s.dispose(),r.dispose()}}},()=>this.editor.inComposition),this.value=noe(this,n=>{var s;return this.versionId.read(n),((s=this.model.read(n))==null?void 0:s.getValue())??""},(n,s)=>{const r=this.model.get();r!==null&&n!==r.getValue()&&r.setValue(n)}),this.valueIsEmpty=we(this,n=>{var s;return this.versionId.read(n),((s=this.editor.getModel())==null?void 0:s.getValueLength())===0}),this.cursorSelection=ma({owner:this,equalsFn:g1(st.selectionsEqual)},n=>{var s;return((s=this.selections.read(n))==null?void 0:s[0])??null}),this.cursorPosition=ma({owner:this,equalsFn:te.equals},n=>{var s,r;return((r=(s=this.selections.read(n))==null?void 0:s[0])==null?void 0:r.getPosition())??null}),this.cursorLineNumber=we(this,n=>{var s;return((s=this.cursorPosition.read(n))==null?void 0:s.lineNumber)??null}),this.onDidType=Au(this),this.onDidPaste=Au(this),this.scrollTop=Gn(this.editor.onDidScrollChange,()=>this.editor.getScrollTop()),this.scrollLeft=Gn(this.editor.onDidScrollChange,()=>this.editor.getScrollLeft()),this.layoutInfo=Gn(this.editor.onDidLayoutChange,()=>this.editor.getLayoutInfo()),this.layoutInfoContentLeft=this.layoutInfo.map(n=>n.contentLeft),this.layoutInfoDecorationsLeft=this.layoutInfo.map(n=>n.decorationsLeft),this.layoutInfoWidth=this.layoutInfo.map(n=>n.width),this.layoutInfoHeight=this.layoutInfo.map(n=>n.height),this.layoutInfoMinimap=this.layoutInfo.map(n=>n.minimap),this.layoutInfoVerticalScrollbarWidth=this.layoutInfo.map(n=>n.verticalScrollbarWidth),this.contentWidth=Gn(this.editor.onDidContentSizeChange,()=>this.editor.getContentWidth()),this.contentHeight=Gn(this.editor.onDidContentSizeChange,()=>this.editor.getContentHeight()),this._widgetCounter=0,this.openedPeekWidgets=Ft(this,0),this._register(this.editor.onBeginUpdate(()=>this._beginUpdate())),this._register(this.editor.onEndUpdate(()=>this._endUpdate())),this._register(this.editor.onDidChangeModel(()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidType(n=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,n)}finally{this._endUpdate()}})),this._register(this.editor.onDidPaste(n=>{this._beginUpdate();try{this._forceUpdate(),this.onDidPaste.trigger(this._currentTransaction,n)}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeModelContent(n=>{var s;this._beginUpdate();try{this._versionId.set(((s=this.editor.getModel())==null?void 0:s.getVersionId())??null,this._currentTransaction,n),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeCursorSelection(n=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,n),this._forceUpdate()}finally{this._endUpdate()}})),this.domNode=we(n=>(this.model.read(n),this.editor.getDomNode()))}forceUpdate(e){this._beginUpdate();try{return this._forceUpdate(),e?e(this._currentTransaction):void 0}finally{this._endUpdate()}}_forceUpdate(){var e;this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(((e=this.editor.getModel())==null?void 0:e.getVersionId())??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e,t=oo.ofCaller()){return Gn(this,n=>this.editor.onDidChangeConfiguration(s=>{s.hasChanged(e)&&n(void 0)}),()=>this.editor.getOption(e),t)}setDecorations(e){const t=new _e,n=this.editor.createDecorationsCollection();return t.add(w7({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},s=>{const r=e.read(s);n.set(r)})),t.add({dispose:()=>{n.clear()}}),t}createOverlayWidget(e){const t="observableOverlayWidget"+this._widgetCounter++,n={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(n);const s=Pt(r=>{e.position.read(r),e.minContentWidthInPx.read(r),this.editor.layoutOverlayWidget(n)});return dt(()=>{s.dispose(),this.editor.removeOverlayWidget(n)})}createContentWidget(e){const t="observableContentWidget"+this._widgetCounter++,n={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow};this.editor.addContentWidget(n);const s=Pt(r=>{e.position.read(r),this.editor.layoutContentWidget(n)});return dt(()=>{s.dispose(),this.editor.removeContentWidget(n)})}observeLineOffsetRange(e,t){const n=this.observePosition(e.map(r=>new te(r.startLineNumber,1)),t),s=this.observePosition(e.map(r=>new te(r.endLineNumberExclusive+1,1)),t);return we(r=>{var u;n.read(r),s.read(r);const o=e.read(r),a=(u=this.model.read(r))==null?void 0:u.getLineCount(),l=(typeof a<"u"&&o.startLineNumber>a?this.editor.getBottomForLineNumber(a):this.editor.getTopForLineNumber(o.startLineNumber))-this.scrollTop.read(r),c=o.isEmpty?l:this.editor.getBottomForLineNumber(o.endLineNumberExclusive-1)-this.scrollTop.read(r);return new ht(l,c)})}observePosition(e,t){let n=e.get();const s=MA({owner:this,debugName:()=>`topLeftOfPosition${n==null?void 0:n.toString()}`,equalsFn:g1(fo.equals)},new fo(0,0)),r="observablePositionWidget"+this._widgetCounter++,o=document.createElement("div"),a={getDomNode:()=>o,getPosition:()=>n?{preference:[0],position:e.get()}:null,getId:()=>r,allowEditorOverflow:!1,afterRender:(l,c)=>{const u=this._model.get();u&&n&&n.lineNumber>u.getLineCount()?s.set(new fo(0,this.editor.getBottomForLineNumber(u.getLineCount())-this.scrollTop.get()),void 0):s.set(c?new fo(c.left,c.top):null,void 0)}};return this.editor.addContentWidget(a),t.add(Pt(l=>{n=e.read(l),this.editor.layoutContentWidget(a)})),t.add(dt(()=>{this.editor.removeContentWidget(a)})),s}isTargetHovered(e,t){const n=Ft("isInjectedTextHovered",!1);return t.add(this.editor.onMouseMove(s=>{const r=e(s);n.set(r,void 0)})),t.add(this.editor.onMouseLeave(s=>{n.set(!1,void 0)})),n}observeLineHeightForPosition(e){return we(t=>{const n=e instanceof te?e:e.read(t);return n===null?null:(this.getOption(75).read(t),this.editor.getLineHeightForPosition(n))})}observeLineHeightForLine(e){return typeof e=="number"?this.observeLineHeightForPosition(new te(e,1)):we(t=>{const n=e.read(t);return n===null?null:this.observeLineHeightForPosition(new te(n,1)).read(t)})}observeLineHeightsForLineRange(e){return we(t=>{const n=e instanceof jt?e:e.read(t),s=[];for(let r=n.startLineNumber;r=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},pBt=function(i,e){return function(t,n){e(t,n,i)}},ag,vb;let YR=(vb=class extends se{constructor(e,t,n,s,r,o,a){super(),this._editors=e,this._rootElement=t,this._diffModel=n,this._rootWidth=s,this._rootHeight=r,this._modifiedEditorLayoutInfo=o,this._themeService=a,this.width=ag.ENTIRE_DIFF_OVERVIEW_WIDTH;const l=Gn(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=we(g=>{const f=l.read(g),m=f.getColor(h2t)||(f.getColor(b1)||bQ).transparent(2),x=f.getColor(g2t)||(f.getColor(Yv)||xQ).transparent(2);return{insertColor:m,removeColor:x}}),u=Yn(document.createElement("div"));u.setClassName("diffViewport"),u.setPosition("absolute");const h=Fn("div.diffOverview",{style:{position:"absolute",top:"0px",width:ag.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(hN(h,u.domNode)),this._register(yr(h,Fe.POINTER_DOWN,g=>{this._editors.modified.delegateVerticalScrollbarPointerDown(g)})),this._register(de(h,Fe.MOUSE_WHEEL,g=>{this._editors.modified.delegateScrollFromMouseWheelEvent(g)},{passive:!1})),this._register(hN(this._rootElement,h)),this._register(Fa((g,f)=>{const m=this._diffModel.read(g),x=this._editors.original.createOverviewRuler("original diffOverviewRuler");x&&(f.add(x),f.add(hN(h,x.getDomNode())));const v=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(v&&(f.add(v),f.add(hN(h,v.getDomNode()))),!x||!v)return;const _=Wc("viewZoneChanged",this._editors.original.onDidChangeViewZones),w=Wc("viewZoneChanged",this._editors.modified.onDidChangeViewZones),k=Wc("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),C=Wc("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);f.add(Pt(E=>{var j;_.read(E),w.read(E),k.read(E),C.read(E);const D=c.read(E),T=(j=m==null?void 0:m.diff.read(E))==null?void 0:j.mappings;function I(B,H,$){const q=$._getViewModel();return q?B.filter(V=>V.length>0).map(V=>{const X=q.coordinatesConverter.convertModelPositionToViewPosition(new te(V.startLineNumber,1)),ae=q.coordinatesConverter.convertModelPositionToViewPosition(new te(V.endLineNumberExclusive,1)),ne=ae.lineNumber-X.lineNumber;return new R2e(X.lineNumber,ae.lineNumber,ne,H.toString())}):[]}const R=I((T||[]).map(B=>B.lineRangeMapping.original),D.removeColor,this._editors.original),P=I((T||[]).map(B=>B.lineRangeMapping.modified),D.insertColor,this._editors.modified);x==null||x.setZones(R),v==null||v.setZones(P)})),f.add(Pt(E=>{const D=this._rootHeight.read(E),T=this._rootWidth.read(E),I=this._modifiedEditorLayoutInfo.read(E);if(I){const R=ag.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ag.ONE_OVERVIEW_WIDTH;x.setLayout({top:0,height:D,right:R+ag.ONE_OVERVIEW_WIDTH,width:ag.ONE_OVERVIEW_WIDTH}),v.setLayout({top:0,height:D,right:0,width:ag.ONE_OVERVIEW_WIDTH});const P=this._editors.modifiedScrollTop.read(E),j=this._editors.modifiedScrollHeight.read(E),B=this._editors.modified.getOption(117),H=new EL(B.verticalHasArrows?B.arrowSize:0,B.verticalScrollbarSize,0,I.height,j,P);u.setTop(H.getSliderPosition()),u.setHeight(H.getSliderSize())}else u.setTop(0),u.setHeight(0);h.style.height=D+"px",h.style.left=T-ag.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",u.setWidth(ag.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}},ag=vb,vb.ONE_OVERVIEW_WIDTH=15,vb.ENTIRE_DIFF_OVERVIEW_WIDTH=vb.ONE_OVERVIEW_WIDTH*2,vb);YR=ag=fBt([pBt(6,Ws)],YR);var mBt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Iq=function(i,e){return function(t,n){e(t,n,i)}};let WX=class extends se{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,n,s,r,o,a,l){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=n,this._argCodeEditorWidgetOptions=s,this._createInnerEditor=r,this._contextKeyService=o,this._instantiationService=a,this._keybindingService=l,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new ie),this.modifiedScrollTop=Gn(this,this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=Gn(this,this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedObs=Ts(this.modified),this.originalObs=Ts(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=Gn(this,this.modified.onDidChangeCursorSelection,()=>this.modified.getSelections()??[]),this.modifiedCursor=ma({owner:this,equalsFn:te.equals},c=>{var u;return((u=this.modifiedSelections.read(c)[0])==null?void 0:u.getPosition())??new te(1,1)}),this.originalCursor=Gn(this,this.original.onDidChangeCursorPosition,()=>this.original.getPosition()??new te(1,1)),this.isOriginalFocused=Ts(this.original).isFocused,this.isModifiedFocused=Ts(this.modified).isFocused,this.isFocused=we(this,c=>this.isOriginalFocused.read(c)||this.isModifiedFocused.read(c)),this._argCodeEditorWidgetOptions=null,this._register(SD({changeTracker:{createChangeSummary:()=>({}),handleChange:(c,u)=>(c.didChange(n.editorOptions)&&Object.assign(u,c.change.changedOptions),!0)}},(c,u)=>{n.editorOptions.read(c),this._options.renderSideBySide.read(c),this.modified.updateOptions(this._adjustOptionsForRightHandSide(c,u)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(c,u))}))}_createLeftHandSideEditor(e,t){const n=this._adjustOptionsForLeftHandSide(void 0,e),s=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,n,t),r=this._contextKeyService.createKey("isInDiffLeftEditor",s.hasWidgetFocus());return this._register(s.onDidFocusEditorWidget(()=>r.set(!0))),this._register(s.onDidBlurEditorWidget(()=>r.set(!1))),s}_createRightHandSideEditor(e,t){const n=this._adjustOptionsForRightHandSide(void 0,e),s=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,n,t),r=this._contextKeyService.createKey("isInDiffRightEditor",s.hasWidgetFocus());return this._register(s.onDidFocusEditorWidget(()=>r.set(!0))),this._register(s.onDidBlurEditorWidget(()=>r.set(!1))),s}_constructInnerEditor(e,t,n,s){const r=this._createInnerEditor(e,t,n,s);return this._register(r.onDidContentSizeChange(o=>{const a=this.original.getContentWidth()+this.modified.getContentWidth()+YR.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:o.contentHeightChanged,contentWidthChanged:o.contentWidthChanged})})),r}_adjustOptionsForLeftHandSide(e,t){const n=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(n.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},n.wordWrapOverride1=this._options.diffWordWrap.get()):(n.wordWrapOverride1="off",n.wordWrapOverride2="off",n.stickyScroll={enabled:!1},n.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),n.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(n.ariaLabel=t.originalAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.readOnly=!this._options.originalEditable.get(),n.dropIntoEditor={enabled:!n.readOnly},n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(e,t){const n=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(n.ariaLabel=t.modifiedAriaLabel),n.ariaLabel=this._updateAriaLabel(n.ariaLabel),n.wordWrapOverride1=this._options.diffWordWrap.get(),n.revealHorizontalRightPadding=sl.revealHorizontalRightPadding.defaultValue+YR.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.allowVariableLineHeights=!1,t.allowVariableFonts=!1,t.allowVariableFontsInAccessibilityMode=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var n;e||(e="");const t=S(111," use {0} to open the accessibility help.",(n=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))==null?void 0:n.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};WX=mBt([Iq(5,Bt),Iq(6,ft),Iq(7,zn)],WX);var BD=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};const bBt=!1;var P6;(function(i){i.North="north",i.South="south",i.East="east",i.West="west"})(P6||(P6={}));let xBt=4;const vBt=new ie;let _Bt=300;const yBt=new ie;class jae{constructor(e){this.el=e,this.disposables=new _e}get onPointerMove(){return this.disposables.add(new ri(xt(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new ri(xt(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}BD([gr],jae.prototype,"onPointerMove",null);BD([gr],jae.prototype,"onPointerUp",null);class Fae{get onPointerMove(){return this.disposables.add(new ri(this.el,Zi.Change)).event}get onPointerUp(){return this.disposables.add(new ri(this.el,Zi.End)).event}constructor(e){this.el=e,this.disposables=new _e}dispose(){this.disposables.dispose()}}BD([gr],Fae.prototype,"onPointerMove",null);BD([gr],Fae.prototype,"onPointerUp",null);class O6{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}BD([gr],O6.prototype,"onPointerMove",null);BD([gr],O6.prototype,"onPointerUp",null);const _0e="pointer-events-disabled";class Ta extends se{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this.onDidEnablementChange.fire(e))}get onDidStart(){return this._onDidStart.event}get onDidChange(){return this._onDidChange.event}get onDidReset(){return this._onDidReset.event}get onDidEnd(){return this._onDidEnd.event}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=n=>{this.orthogonalStartDragHandleDisposables.clear(),n!==0&&(this._orthogonalStartDragHandle=De(this.el,Oe(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(dt(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(de(this._orthogonalStartDragHandle,"mouseenter",()=>Ta.onMouseEnter(e))),this.orthogonalStartDragHandleDisposables.add(de(this._orthogonalStartDragHandle,"mouseleave",()=>Ta.onMouseLeave(e))))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=n=>{this.orthogonalEndDragHandleDisposables.clear(),n!==0&&(this._orthogonalEndDragHandle=De(this.el,Oe(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(dt(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(de(this._orthogonalEndDragHandle,"mouseenter",()=>Ta.onMouseEnter(e))),this.orthogonalEndDragHandleDisposables.add(de(this._orthogonalEndDragHandle,"mouseleave",()=>Ta.onMouseLeave(e))))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,n){super(),this.hoverDelay=_Bt,this.hoverDelayer=this._register(new Uu(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new ie),this._onDidStart=this._register(new ie),this._onDidChange=this._register(new ie),this._onDidReset=this._register(new ie),this._onDidEnd=this._register(new ie),this.orthogonalStartSashDisposables=this._register(new _e),this.orthogonalStartDragHandleDisposables=this._register(new _e),this.orthogonalEndSashDisposables=this._register(new _e),this.orthogonalEndDragHandleDisposables=this._register(new _e),this.linkedSash=void 0,this.el=De(e,Oe(".monaco-sash")),n.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${n.orthogonalEdge}`),bn&&this.el.classList.add("mac"),this._register(de(this.el,"mousedown",r=>this.onPointerStart(r,new jae(e)))),this._register(de(this.el,"dblclick",r=>this.onPointerDoublePress(r))),this._register(de(this.el,"mouseenter",()=>Ta.onMouseEnter(this))),this._register(de(this.el,"mouseleave",()=>Ta.onMouseLeave(this))),this._register(Ha.addTarget(this.el)),this._register(de(this.el,Zi.Start,r=>this.onPointerStart(r,new Fae(this.el))));let s;this._register(de(this.el,Zi.Tap,r=>{if(s){clearTimeout(s),s=void 0,this.onPointerDoublePress(r);return}clearTimeout(s),s=setTimeout(()=>s=void 0,250)})),typeof n.size=="number"?(this.size=n.size,n.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=xBt,this._register(vBt.event(r=>{this.size=r,this.layout()}))),this._register(yBt.event(r=>this.hoverDelay=r)),this.layoutProvider=t,this.orthogonalStartSash=n.orthogonalStartSash,this.orthogonalEndSash=n.orthogonalEndSash,this.orientation=n.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",bBt),this.layout()}onPointerStart(e,t){Vn.stop(e);let n=!1;if(!e.__orthogonalSashEvent){const m=this.getOrthogonalSash(e);m&&(n=!0,e.__orthogonalSashEvent=!0,m.onPointerStart(e,new O6(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new O6(t))),!this.state)return;const s=this.el.ownerDocument.getElementsByTagName("iframe");for(const m of s)m.classList.add(_0e);const r=e.pageX,o=e.pageY,a=e.altKey,l={startX:r,currentX:r,startY:o,currentY:o,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=Yu(this.el),u=()=>{let m="";n?m="all-scroll":this.orientation===1?this.state===1?m="s-resize":this.state===2?m="n-resize":m=bn?"row-resize":"ns-resize":this.state===1?m="e-resize":this.state===2?m="w-resize":m=bn?"col-resize":"ew-resize",c.textContent=`* { cursor: ${m} !important; }`},h=new _e;u(),n||this.onDidEnablementChange.event(u,null,h);const g=m=>{Vn.stop(m,!1);const x={startX:r,currentX:m.pageX,startY:o,currentY:m.pageY,altKey:a};this._onDidChange.fire(x)},f=m=>{Vn.stop(m,!1),c.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),h.dispose();for(const x of s)x.classList.remove(_0e)};t.onPointerMove(g,null,h),t.onPointerUp(f,null,h),h.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&Ta.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&Ta.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){Ta.onMouseLeave(this)}layout(){if(this.orientation===0){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){const t=e.initialTarget??e.target;if(!(!t||!er(t))&&t.classList.contains("orthogonal-drag-handle"))return t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}class wBt{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=noe(this,n=>{const s=this._sashRatio.read(n)??this._options.splitViewDefaultRatio.read(n);return this._computeSashLeft(s,n)},(n,s)=>{const r=this.dimensions.width.get();this._sashRatio.set(n/r,s)}),this._sashRatio=Ft(this,void 0)}_computeSashLeft(e,t){const n=this.dimensions.width.read(t),s=Math.floor(this._options.splitViewDefaultRatio.read(t)*n),r=this._options.enableSplitViewResizing.read(t)?Math.floor(e*n):s,o=100;return n<=o*2?s:rn-o?n-o:r}}class SMe extends se{constructor(e,t,n,s,r,o){super(),this._domNode=e,this._dimensions=t,this._enabled=n,this._boundarySashes=s,this.sashLeft=r,this._resetSash=o,this._sash=this._register(new Ta(this._domNode,{getVerticalSashTop:a=>0,getVerticalSashLeft:a=>this.sashLeft.get(),getVerticalSashHeight:a=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(a=>{this.sashLeft.set(this._startSashPosition+(a.currentX-a.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register(Pt(a=>{const l=this._boundarySashes.read(a);l&&(this._sash.orthogonalEndSash=l.bottom)})),this._register(Pt(a=>{const l=this._enabled.read(a);this._sash.state=l?3:0,this.sashLeft.read(a),this._dimensions.height.read(a),this._sash.layout()}))}}const d9=class d9 extends se{constructor(){super(...arguments),this._id=++d9.idCounter,this._onDidDispose=this._register(new ie),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,n=0){this._targetEditor.revealLines(e,t,n)}revealLinesInCenter(e,t,n=0){this._targetEditor.revealLinesInCenter(e,t,n)}revealLinesInCenterIfOutsideViewport(e,t,n=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}revealLinesNearTop(e,t,n=0){this._targetEditor.revealLinesNearTop(e,t,n)}revealRange(e,t=0,n=!1,s=!0){this._targetEditor.revealRange(e,t,n,s)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,n){this._targetEditor.trigger(e,t,n)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}};d9.idCounter=0;let VX=d9;const aa={enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1};function CBt(i,e){return dx(i,(t,n)=>n??e(t))}var SBt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},kBt=function(i,e){return function(t,n){e(t,n,i)}};let zX=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=Ft(this,0),this._screenReaderMode=Gn(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=we(this,s=>this._options.read(s).renderSideBySide&&this._diffEditorWidth.read(s)<=this._options.read(s).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=we(this,s=>this._options.read(s).renderOverviewRuler),this.renderSideBySide=we(this,s=>this.compactMode.read(s)&&this.shouldRenderInlineViewInSmartMode.read(s)?!1:this._options.read(s).renderSideBySide&&!(this._options.read(s).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(s)&&!this._screenReaderMode.read(s))),this.readOnly=we(this,s=>this._options.read(s).readOnly),this.shouldRenderOldRevertArrows=we(this,s=>!(!this._options.read(s).renderMarginRevertIcon||!this.renderSideBySide.read(s)||this.readOnly.read(s)||this.shouldRenderGutterMenu.read(s))),this.shouldRenderGutterMenu=we(this,s=>this._options.read(s).renderGutterMenu),this.renderIndicators=we(this,s=>this._options.read(s).renderIndicators),this.enableSplitViewResizing=we(this,s=>this._options.read(s).enableSplitViewResizing),this.splitViewDefaultRatio=we(this,s=>this._options.read(s).splitViewDefaultRatio),this.ignoreTrimWhitespace=we(this,s=>this._options.read(s).ignoreTrimWhitespace),this.maxComputationTimeMs=we(this,s=>this._options.read(s).maxComputationTime),this.showMoves=we(this,s=>this._options.read(s).experimental.showMoves&&this.renderSideBySide.read(s)),this.isInEmbeddedEditor=we(this,s=>this._options.read(s).isInEmbeddedEditor),this.diffWordWrap=we(this,s=>this._options.read(s).diffWordWrap),this.originalEditable=we(this,s=>this._options.read(s).originalEditable),this.diffCodeLens=we(this,s=>this._options.read(s).diffCodeLens),this.accessibilityVerbose=we(this,s=>this._options.read(s).accessibilityVerbose),this.diffAlgorithm=we(this,s=>this._options.read(s).diffAlgorithm),this.showEmptyDecorations=we(this,s=>this._options.read(s).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=we(this,s=>this._options.read(s).onlyShowAccessibleDiffViewer),this.compactMode=we(this,s=>this._options.read(s).compactMode),this.trueInlineDiffRenderingEnabled=we(this,s=>this._options.read(s).experimental.useTrueInlineView),this.useTrueInlineDiffRendering=we(this,s=>!this.renderSideBySide.read(s)&&this.trueInlineDiffRenderingEnabled.read(s)),this.hideUnchangedRegions=we(this,s=>this._options.read(s).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=we(this,s=>this._options.read(s).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=we(this,s=>this._options.read(s).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=we(this,s=>this._options.read(s).hideUnchangedRegions.minimumLineCount),this._model=Ft(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,s=>CBt(this,r=>{const o=s==null?void 0:s.diff.read(r);return o?NBt(o,this.trueInlineDiffRenderingEnabled.read(r)):void 0})).flatten().map(this,s=>!!s),this.inlineViewHideOriginalLineNumbers=this.compactMode;const n={...e,...y0e(e,aa)};this._options=Ft(this,n)}updateOptions(e){const t=y0e(e,this._options.get()),n={...this._options.get(),...e,...t};this._options.set(n,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};zX=SBt([kBt(1,Zo)],zX);function NBt(i,e){return i.mappings.every(t=>EBt(t.lineRangeMapping)||LBt(t.lineRangeMapping)||e&&Pae(t.lineRangeMapping))}function EBt(i){return i.original.length===0}function LBt(i){return i.modified.length===0}function y0e(i,e){var t,n,s,r,o,a,l,c;return{enableSplitViewResizing:vt(i.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:FIt(i.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:vt(i.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:vt(i.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:qm(i.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:qm(i.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:vt(i.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:vt(i.renderIndicators,e.renderIndicators),originalEditable:vt(i.originalEditable,e.originalEditable),diffCodeLens:vt(i.diffCodeLens,e.diffCodeLens),renderOverviewRuler:vt(i.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:rs(i.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:rs(i.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:vt(i.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:vt((t=i.experimental)==null?void 0:t.showMoves,e.experimental.showMoves),showEmptyDecorations:vt((n=i.experimental)==null?void 0:n.showEmptyDecorations,e.experimental.showEmptyDecorations),useTrueInlineView:vt((s=i.experimental)==null?void 0:s.useTrueInlineView,e.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:vt(((r=i.hideUnchangedRegions)==null?void 0:r.enabled)??((o=i.experimental)==null?void 0:o.collapseUnchangedRegions),e.hideUnchangedRegions.enabled),contextLineCount:qm((a=i.hideUnchangedRegions)==null?void 0:a.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:qm((l=i.hideUnchangedRegions)==null?void 0:l.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:qm((c=i.hideUnchangedRegions)==null?void 0:c.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:vt(i.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:vt(i.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:qm(i.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:vt(i.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited),renderGutterMenu:vt(i.renderGutterMenu,e.renderGutterMenu),compactMode:vt(i.compactMode,e.compactMode)}}class DBt extends fC{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new ie),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=De(e,Oe(".monaco-dropdown")),this._label=De(this._element,Oe(".dropdown-label"));let n=t.labelRenderer;n||(n=r=>(r.textContent=t.label||"",null));for(const r of[Fe.CLICK,Fe.MOUSE_DOWN,Zi.Tap])this._register(de(this.element,r,o=>Vn.stop(o,!0)));for(const r of[Fe.MOUSE_DOWN,Zi.Tap])this._register(de(this._label,r,o=>{aoe(o)&&o.button!==0||(this.visible?this.hide():this.show())}));this._register(de(this._label,Fe.KEY_DOWN,r=>{const o=new ki(r);(o.equals(3)||o.equals(10))&&(Vn.stop(r,!0),this.visible?this.hide():this.show())}));const s=n(this._label);s&&this._register(s),this._register(Ha.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class TBt extends DBt{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class j6 extends Cg{get onDidChangeVisibility(){return this._onDidChangeVisibility.event}constructor(e,t,n,s=Object.create(null)){super(null,e,s),this.actionItem=null,this._onDidChangeVisibility=this._register(new ie),this.menuActionsOrProvider=t,this.contextMenuProvider=n,this.options=s,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=r=>(this.element=De(r,Oe("a.action-label")),this.renderLabel(this.element)),n=Array.isArray(this.menuActionsOrProvider),s={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new TBt(e,s)),this._register(this.dropdownMenu.onDidChangeVisibility(r=>{var o;(o=this.element)==null||o.setAttribute("aria-expanded",`${r}`),this._onDidChangeVisibility.fire(r)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const r=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return r.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}renderLabel(e){let t=[];return typeof this.options.classNames=="string"?t=this.options.classNames.split(/\s+/g).filter(n=>!!n):this.options.classNames&&(t=this.options.classNames),t.find(n=>n==="icon")||t.push("codicon"),e.classList.add(...t),this._action.label&&this._register(Xh().setupManagedHover(this.options.hoverDelegate??$p("mouse"),e,this._action.label)),null}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;(e=this.dropdownMenu)==null||e.show()}updateEnabled(){var t,n;const e=!this.action.enabled;(t=this.actionItem)==null||t.classList.toggle("disabled",e),(n=this.element)==null||n.classList.toggle("disabled",e)}}const w0e=24;class IBt extends se{get onDidChangeDropdownVisibility(){return this._onDidChangeDropdownVisibility.event}constructor(e,t,n={orientation:0}){if(super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new bEt),this.originalPrimaryActions=[],this.originalSecondaryActions=[],this.hiddenActions=[],this.disposables=this._register(new _e),n.hoverDelegate=n.hoverDelegate??this._register(wRe()),this.options=n,this.toggleMenuAction=this._register(new QR(()=>{var s;return(s=this.toggleMenuActionViewItem)==null?void 0:s.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new mc(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,hoverDelegate:n.hoverDelegate,actionViewItemProvider:(s,r)=>{if(s.id===QR.ID)return this.toggleMenuActionViewItem=new j6(s,{getActions:()=>this.toggleMenuAction.menuActions},t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Tt.asClassNameArray(n.moreIcon??Ee.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const o=n.actionViewItemProvider(s,r);if(o)return o}if(s instanceof vL){const o=new j6(s,s.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:s.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return o.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(o),this.disposables.add(this._onDidChangeDropdownVisibility.add(o.onDidChangeVisibility)),o}}})),this.options.responsive){this.element.classList.add("responsive");const s=new ResizeObserver(()=>{this.setToolbarMaxWidth(this.element.getBoundingClientRect().width)});s.observe(this.element),this._store.add(dt(()=>s.disconnect()))}}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}set context(e){var t;this.actionBar.context=e,(t=this.toggleMenuActionViewItem)==null||t.setActionContext(e);for(const n of this.submenuActionViewItems)n.setActionContext(e)}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}getItemWidth(e){return this.actionBar.getWidth(e)}setActions(e,t){this.clear(),this.originalPrimaryActions=e?e.slice(0):[],this.originalSecondaryActions=t?t.slice(0):[];const n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.length>0&&this.options.trailingSeparator&&n.push(new Gr),n.forEach(s=>{this.actionBar.push(s,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(s)})}),this.options.responsive&&(this.hiddenActions.length=0,this.setToolbarMaxWidth(this.element.getBoundingClientRect().width))}getKeybindingLabel(e){var n,s;const t=(s=(n=this.options).getKeyBinding)==null?void 0:s.call(n,e);return(t==null?void 0:t.getLabel())??void 0}getItemsWidthResponsive(){return this.actionBar.length()*w0e}setToolbarMaxWidth(e){if(this.actionBar.isEmpty()||this.getItemsWidthResponsive()<=e&&this.hiddenActions.length===0)return;if(this.getItemsWidthResponsive()>e)for(;this.getItemsWidthResponsive()>e&&this.actionBar.length()>0;){const n=this.originalPrimaryActions.length-this.hiddenActions.length-1;if(n<0)break;const s=Math.min(w0e,this.getItemWidth(n)),r=this.originalPrimaryActions[n];this.hiddenActions.unshift({action:r,size:s}),this.actionBar.pull(n),this.originalSecondaryActions.length===0&&this.hiddenActions.length===1&&this.actionBar.push(this.toggleMenuAction,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(this.toggleMenuAction)})}else for(;this.hiddenActions.length>0;){const n=this.hiddenActions.shift();if(this.getItemsWidthResponsive()+n.size>e){this.hiddenActions.unshift(n);break}this.actionBar.push(n.action,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(n.action),index:this.originalPrimaryActions.length-this.hiddenActions.length-1}),this.originalSecondaryActions.length===0&&this.hiddenActions.length===1&&(this.toggleMenuAction.menuActions=[],this.actionBar.pull(this.actionBar.length()-1))}const t=this.hiddenActions.map(n=>n.action);if(this.originalSecondaryActions.length>0||t.length>0){const n=this.originalSecondaryActions.slice(0);this.toggleMenuAction.menuActions=Gr.join(t,n)}}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}const u9=class u9 extends Wd{constructor(e,t){t=t||S(17,"More Actions..."),super(u9.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}};u9.ID="toolbar.toggle.more";let QR=u9;class pW{constructor(e,t,n=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}toLabel(e,t,n){if(t.length===0)return null;const s=[];for(let r=0,o=t.length;rthis.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,n;this._onDidChangeStorage.pause();try{(t=e.changed)==null||t.forEach((s,r)=>this.acceptExternal(r,s)),(n=e.deleted)==null||n.forEach(s=>this.acceptExternal(s,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===$y.Closed)return;let n=!1;Eu(t)?n=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),n=!0),n&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const n=this.cache.get(e);return Eu(n)?t:n}getBoolean(e,t){const n=this.get(e);return Eu(n)?t:n==="true"}getNumber(e,t){const n=this.get(e);return Eu(n)?t:parseInt(n,10)}async set(e,t,n=!1){if(this.state===$y.Closed)return;if(Eu(t))return this.delete(e,n);const s=no(t)||Array.isArray(t)?YFt(t):String(t);if(this.cache.get(e)!==s)return this.cache.set(e,s),this.pendingInserts.set(e,s),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:n}),this.doFlush()}async delete(e,t=!1){if(!(this.state===$y.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())==null||t()})}async flush(e){if(!(this.state===$y.Closed||this.pendingClose))return this.doFlush(e)}async doFlush(e){return this.options.hint===oE.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),e)}async whenFlushed(){if(this.hasPending)return new Promise(e=>this.whenFlushedCallbacks.push(e))}};h9.DEFAULT_FLUSH_DELAY=100;let zA=h9;class Aq{constructor(){this.onDidChangeItemsExternal=He.None,this.items=new Map}async updateItems(e){var t,n;(t=e.insert)==null||t.forEach((s,r)=>this.items.set(r,s)),(n=e.delete)==null||n.forEach(s=>this.items.delete(s))}}const pj="__$__targetStorageMarker",xl=ln("storageService");var __;(function(i){i[i.NONE=0]="NONE",i[i.SHUTDOWN=1]="SHUTDOWN"})(__||(__={}));function FBt(i){const e=i.get(pj);if(e)try{return JSON.parse(e)}catch{}return Object.create(null)}const g9=class g9 extends se{constructor(e={flushInterval:g9.DEFAULT_FLUSH_INTERVAL}){super(),this._onDidChangeValue=this._register(new hC),this._onDidChangeTarget=this._register(new hC),this._onWillSaveState=this._register(new ie),this.onWillSaveState=this._onWillSaveState.event,this.runFlushWhenIdle=this._register(new Zn),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0,this.flushWhenIdleScheduler=this._register(new pi(()=>this.doFlushWhenIdle(),e.flushInterval))}onDidChangeValue(e,t,n){return He.filter(this._onDidChangeValue.event,s=>s.scope===e&&(t===void 0||s.key===t),n)}doFlushWhenIdle(){this.runFlushWhenIdle.value=Wre(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}emitDidChangeValue(e,t){const{key:n,external:s}=t;if(n===pj){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:n,target:this.getKeyTargets(e)[n],external:s})}get(e,t,n){var s;return(s=this.getStorage(t))==null?void 0:s.get(e,n)}getBoolean(e,t,n){var s;return(s=this.getStorage(t))==null?void 0:s.getBoolean(e,n)}getNumber(e,t,n){var s;return(s=this.getStorage(t))==null?void 0:s.getNumber(e,n)}store(e,t,n,s,r=!1){if(Eu(t)){this.remove(e,n,r);return}this.withPausedEmitters(()=>{var o;this.updateKeyTarget(e,n,s),(o=this.getStorage(n))==null||o.set(e,t,r)})}remove(e,t,n=!1){this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,t,void 0),(s=this.getStorage(t))==null||s.delete(e,n)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,n,s=!1){var o,a;const r=this.getKeyTargets(t);typeof n=="number"?r[e]!==n&&(r[e]=n,(o=this.getStorage(t))==null||o.set(pj,JSON.stringify(r),s)):typeof r[e]=="number"&&(delete r[e],(a=this.getStorage(t))==null||a.set(pj,JSON.stringify(r),s))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?FBt(t):Object.create(null)}async flush(e=__.NONE){this._onWillSaveState.fire({reason:e});const t=this.getStorage(-1),n=this.getStorage(0),s=this.getStorage(1);switch(e){case __.NONE:await iR.settled([(t==null?void 0:t.whenFlushed())??Promise.resolve(),(n==null?void 0:n.whenFlushed())??Promise.resolve(),(s==null?void 0:s.whenFlushed())??Promise.resolve()]);break;case __.SHUTDOWN:await iR.settled([(t==null?void 0:t.flush(0))??Promise.resolve(),(n==null?void 0:n.flush(0))??Promise.resolve(),(s==null?void 0:s.flush(0))??Promise.resolve()]);break}}};g9.DEFAULT_FLUSH_INTERVAL=60*1e3;let UX=g9;class BBt extends UX{constructor(){super(),this.applicationStorage=this._register(new zA(new Aq,{hint:oE.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new zA(new Aq,{hint:oE.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new zA(new Aq,{hint:oE.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.profileStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e))),this._register(this.applicationStorage.onDidChangeStorage(e=>this.emitDidChangeValue(-1,e)))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}shouldFlushWhenIdle(){return!1}}function HBt(i,e){const t={...e};for(const n in i){const s=i[n];t[n]=s!==void 0?Pe(s):void 0}return t}const kMe={keybindingLabelBackground:Pe(Y2t),keybindingLabelForeground:Pe(Q2t),keybindingLabelBorder:Pe(X2t),keybindingLabelBottomBorder:Pe(Z2t),keybindingLabelShadow:Pe(RD)},WBt={buttonForeground:Pe(Z7),buttonSeparator:Pe(O2t),buttonBackground:Pe(x1),buttonHoverBackground:Pe(j2t),buttonSecondaryForeground:Pe(zAe),buttonSecondaryBackground:Pe(JF),buttonSecondaryHoverBackground:Pe(B2t),buttonBorder:Pe(F2t)},VBt={progressBarBackground:Pe(ZAt)},F6={inputActiveOptionBorder:Pe(UP),inputActiveOptionForeground:Pe($P),inputActiveOptionBackground:Pe(MD)};Pe(zI),Pe(H2t),Pe(W2t),Pe(V2t),Pe(z2t),Pe(U2t),Pe($2t);const Hae={checkboxBackground:Pe(Ooe),checkboxBorder:Pe(q2t),checkboxForeground:Pe(joe),checkboxDisabledBackground:Pe(K2t),checkboxDisabledForeground:Pe(G2t)};Pe(Fd),Pe(G7),Pe(RD),Pe(Aoe),Pe(b2t),Pe(x2t),Pe(v2t),Pe(QAt);const B6={inputBackground:Pe(CQ),inputForeground:Pe(WAe),inputBorder:Pe(VAe),inputValidationInfoBorder:Pe(L2t),inputValidationInfoBackground:Pe(N2t),inputValidationInfoForeground:Pe(E2t),inputValidationWarningBorder:Pe(I2t),inputValidationWarningBackground:Pe(D2t),inputValidationWarningForeground:Pe(T2t),inputValidationErrorBorder:Pe(M2t),inputValidationErrorBackground:Pe(A2t),inputValidationErrorForeground:Pe(R2t)},zBt={listFilterWidgetBackground:Pe(uRt),listFilterWidgetOutline:Pe(hRt),listFilterWidgetNoMatchesOutline:Pe(gRt),listFilterWidgetShadow:Pe(fRt),inputBoxStyles:B6,toggleStyles:F6},NMe={badgeBackground:Pe(lj),badgeForeground:Pe(XAt),badgeBorder:Pe(Dn)};Pe(p2t),Pe(f2t),Pe(nve),Pe(nve),Pe(m2t);const HD={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:Pe(J2t),listFocusForeground:Pe(eRt),listFocusOutline:Pe(tRt),listActiveSelectionBackground:Pe(bC),listActiveSelectionForeground:Pe(wR),listActiveSelectionIconForeground:Pe(UAe),listFocusAndSelectionOutline:Pe(nRt),listFocusAndSelectionBackground:Pe(bC),listFocusAndSelectionForeground:Pe(wR),listInactiveSelectionBackground:Pe(iRt),listInactiveSelectionIconForeground:Pe(rRt),listInactiveSelectionForeground:Pe(sRt),listInactiveFocusBackground:Pe(oRt),listInactiveFocusOutline:Pe(aRt),listHoverBackground:Pe($Ae),listHoverForeground:Pe(qAe),listDropOverBackground:Pe(lRt),listDropBetweenBackground:Pe(cRt),listSelectionOutline:Pe(ys),listHoverOutline:Pe(ys),treeIndentGuidesStroke:Pe(KAe),treeInactiveIndentGuidesStroke:Pe(pRt),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:Pe(K7),tableColumnsBorder:Pe(mRt),tableOddRowsBackgroundColor:Pe(bRt)};function uS(i){return HBt(i,HD)}const UBt={selectBackground:Pe(X7),selectListBackground:Pe(P2t),selectForeground:Pe(Moe),decoratorRightForeground:Pe(GAe),selectBorder:Pe(Poe),focusBorder:Pe(Np),listFocusBackground:Pe(SR),listInactiveSelectionIconForeground:Pe(Foe),listFocusForeground:Pe(CR),listFocusOutline:TAe(ys,ye.transparent.toString()),listHoverBackground:Pe($Ae),listHoverForeground:Pe(qAe),listHoverOutline:Pe(ys),selectListBorder:Pe(Eoe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},$Bt={shadowColor:Pe(RD),borderColor:Pe(vRt),foregroundColor:Pe(_Rt),backgroundColor:Pe(yRt),selectionForegroundColor:Pe(wRt),selectionBackgroundColor:Pe(CRt),selectionBorderColor:Pe(SRt),separatorColor:Pe(kRt),scrollbarShadow:Pe(K7),scrollbarSliderBackground:Pe(PAe),scrollbarSliderHoverBackground:Pe(OAe),scrollbarSliderActiveBackground:Pe(jAe)};function qBt(i,e){if(Vp)return!1;const t=KBt(i,e),n=i.getValue("window");return(n==null?void 0:n.menuStyle)==="native"?!(!bn&&!t):(n==null?void 0:n.menuStyle)==="custom"?!1:t}function KBt(i,e){return e||(e=EMe(i)),e==="native"}function EMe(i){if(Vp)return"custom";const e=i.getValue("window");if(e){if(bn&&e.nativeTabs===!0||bn&&e.nativeFullScreen===!1)return"native";const s=e.titleBarStyle;if(s==="native"||s==="custom")return s}return"custom"}function GBt(i){if(Vp||bn||EMe(i)==="native")return"native";const e=i.getValue("window"),t=e==null?void 0:e.controlsStyle;return t==="custom"||t==="hidden"?t:"native"}var mW=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Ol=function(i,e){return function(t,n){e(t,n,i)}};function YBt(i,e){const t=[];return QBt(i,t),t}function QBt(i,e,t){const n=db.getInstance(),s=n.keyStatus.altKey||(Xo||xc)&&n.keyStatus.shiftKey;TMe(i,e,s,r=>r==="navigation")}function LMe(i,e,t,n){const s={primary:[],secondary:[]};return DMe(i,s,e,t,n),s}function XBt(i,e,t,n){const s=[];return DMe(i,s,e,t,n),s}function DMe(i,e,t,n,s){TMe(i,e,!1,typeof t=="string"?o=>o===t:t,n,s)}function TMe(i,e,t,n=o=>o==="navigation",s=()=>!1,r=!1){let o,a;Array.isArray(e)?(o=e,a=e):(o=e.primary,a=e.secondary);const l=new Set;for(const[c,u]of i){let h;n(c)?(h=o,h.length>0&&r&&h.push(new Gr)):(h=a,h.length>0&&h.push(new Gr));for(let g of u){t&&(g=g instanceof Vd&&g.alt?g.alt:g);const f=h.push(g);g instanceof vL&&l.add({group:c,action:g,index:f-1})}}for(const{group:c,action:u,index:h}of l){const g=n(c)?o:a,f=u.actions;s(u,c,g.length)&&g.splice(h,1,...f)}}let a0=class extends ML{constructor(e,t,n,s,r,o,a,l){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable,keybinding:t==null?void 0:t.keybinding,hoverDelegate:t==null?void 0:t.hoverDelegate,keybindingNotRenderedWithLabel:t==null?void 0:t.keybindingNotRenderedWithLabel}),this._options=t,this._keybindingService=n,this._notificationService=s,this._contextKeyService=r,this._themeService=o,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Zn),this._altKey=db.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(t){this._notificationService.error(t)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const n=()=>{var r;const s=!!((r=this._menuItemAction.alt)!=null&&r.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);s!==this._wantsAltCommand&&(this._wantsAltCommand=s,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(n)),this._register(de(e,"mouseleave",s=>{t=!1,n()})),this._register(de(e,"mouseenter",s=>{t=!0,n()})),n()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var r;const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let s=t?S(1644,"{0} ({1})",n,t):n;if(!this._wantsAltCommand&&((r=this._menuItemAction.alt)!=null&&r.enabled)){const o=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,a=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),l=a&&a.getLabel(),c=l?S(1645,"{0} ({1})",o,l):o;s=S(1646,`{0} +[{1}] {2}`,s,Bae.modifierLabels[Vc].altKey,c)}return s}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:n}=this;if(!t||!n)return;const s=this._commandAction.checked&&jBt(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(s)if(Tt.isThemeIcon(s)){const r=Tt.asClassNameArray(s);n.classList.add(...r),this._itemClassDispose.value=dt(()=>{n.classList.remove(...r)})}else n.style.backgroundImage=Xb(this._themeService.getColorTheme().type)?Dp(s.dark):Dp(s.light),n.classList.add("icon"),this._itemClassDispose.value=Mh(dt(()=>{n.style.backgroundImage="",n.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};a0=mW([Ol(2,zn),Ol(3,nr),Ol(4,Bt),Ol(5,Ws),Ol(6,eu),Ol(7,Zo)],a0);class Wae extends a0{render(e){var t;this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",((t=this._options)==null?void 0:t.useComma)??!1)}updateLabel(){var t;const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const n=Wae._symbolPrintEnter(e);(t=this._options)!=null&&t.conversational?this.label.textContent=S(1647,"{1} to {0}",this._action.label,n):this.label.textContent=S(1648,"{0} ({1})",this._action.label,n)}}static _symbolPrintEnter(e){var t;return(t=e.getLabel())==null?void 0:t.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let $X=class extends j6{constructor(e,t,n,s,r){const o={...t,menuAsChild:(t==null?void 0:t.menuAsChild)??!1,classNames:(t==null?void 0:t.classNames)??(Tt.isThemeIcon(e.item.icon)?Tt.asClassName(e.item.icon):void 0),keybindingProvider:(t==null?void 0:t.keybindingProvider)??(a=>n.lookupKeybinding(a.id))};super(e,{getActions:()=>e.actions},s,o),this._keybindingService=n,this._contextMenuService=s,this._themeService=r}render(e){super.render(e),Bn(this.element),e.classList.add("menu-entry");const t=this._action,{icon:n}=t.item;if(n&&!Tt.isThemeIcon(n)){this.element.classList.add("icon");const s=()=>{this.element&&(this.element.style.backgroundImage=Xb(this._themeService.getColorTheme().type)?Dp(n.dark):Dp(n.light))};s(),this._register(this._themeService.onDidColorThemeChange(()=>{s()}))}}};$X=mW([Ol(2,zn),Ol(3,eu),Ol(4,Ws)],$X);let qX=class extends Cg{constructor(e,t,n,s,r,o,a,l){super(null,e),this._keybindingService=n,this._notificationService=s,this._contextMenuService=r,this._menuService=o,this._instaService=a,this._storageService=l,this._defaultActionDisposables=this._register(new _e),this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;let c;const u=t!=null&&t.togglePrimaryAction?l.get(this._storageKey,1):void 0;u&&(c=e.actions.find(g=>u===g.id)),c||(c=e.actions[0]),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(a0,c,{keybinding:this._getDefaultActionKeybindingLabel(c)}));const h={keybindingProvider:g=>this._keybindingService.lookupKeybinding(g.id),...t,menuAsChild:(t==null?void 0:t.menuAsChild)??!0,classNames:(t==null?void 0:t.classNames)??["codicon","codicon-chevron-down"],actionRunner:(t==null?void 0:t.actionRunner)??this._register(new fC)};this._dropdown=this._register(new j6(e,e.actions,this._contextMenuService,h)),t!=null&&t.togglePrimaryAction&&this._register(this._dropdown.actionRunner.onDidRun(g=>{g.action instanceof Vd&&this.update(g.action)}))}update(e){var t;(t=this._options)!=null&&t.togglePrimaryAction&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultActionDisposables.clear(),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(a0,e,{keybinding:this._getDefaultActionKeybindingLabel(e)})),this._defaultAction.actionRunner=this._defaultActionDisposables.add(new class extends fC{async runAction(n,s){await n.run(void 0)}}),this._container&&this._defaultAction.render(k7(this._container,Oe(".action-container")))}_getDefaultActionKeybindingLabel(e){var n;let t;if((n=this._options)!=null&&n.renderKeybindingWithDefaultActionLabel){const s=this._keybindingService.lookupKeybinding(e.id);s&&(t=`(${s.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}set actionRunner(e){super.actionRunner=e,this._defaultAction.actionRunner=e,this._dropdown.actionRunner=e}get actionRunner(){return super.actionRunner}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=Oe(".action-container");this._defaultAction.render(De(this._container,t)),this._register(de(t,Fe.KEY_DOWN,s=>{const r=new ki(s);r.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),r.stopPropagation())}));const n=Oe(".dropdown-action-container");this._dropdown.render(De(this._container,n)),this._register(de(n,Fe.KEY_DOWN,s=>{var o;const r=new ki(s);r.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(o=this._defaultAction.element)==null||o.focus(),r.stopPropagation())}))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}};qX=mW([Ol(2,zn),Ol(3,nr),Ol(4,eu),Ol(5,Qu),Ol(6,ft),Ol(7,xl)],qX);let KX=class extends L8t{constructor(e,t,n){super(null,e,e.actions.map(s=>({text:s.id===Gr.ID?"─────────":s.label,isDisabled:!s.enabled})),0,t,UBt,{ariaLabel:e.tooltip,optionsAsChildren:!0,useCustomDrawn:!qBt(n)}),this.select(Math.max(0,e.actions.findIndex(s=>s.checked)))}render(e){super.render(e),e.style.borderColor=Pe(Poe)}runAction(e,t){const n=this.action.actions[t];n&&this.actionRunner.run(n)}};KX=mW([Ol(1,fx),Ol(2,Zt)],KX);function Vae(i,e,t){return e instanceof Vd?i.createInstance(a0,e,t):e instanceof z1?e.item.isSelection?i.createInstance(KX,e):e.item.isSplitButton?i.createInstance(qX,e,{...t,togglePrimaryAction:typeof e.item.isSplitButton!="boolean"?e.item.isSplitButton.togglePrimaryAction:!1}):i.createInstance($X,e,t):void 0}var bW=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},mp=function(i,e){return function(t,n){e(t,n,i)}},qk,GI;let GX=class{constructor(e,t,n){this._commandService=e,this._keybindingService=t,this._hiddenStates=new YX(n)}createMenu(e,t,n){return new H6(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,t)}getMenuActions(e,t,n){const s=new H6(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,this._keybindingService,t),r=s.getActions(n);return s.dispose(),r}resetHiddenStates(e){this._hiddenStates.reset(e)}};GX=bW([mp(0,es),mp(1,zn),mp(2,xl)],GX);var aw;let YX=(aw=class{constructor(e){this._storageService=e,this._disposables=new _e,this._onDidChange=new ie,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(qk._key,0,"{}");this._data=JSON.parse(t)}catch{this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,qk._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const t=e.get(qk._key,0,"{}");this._data=JSON.parse(t)}catch(t){console.log("FAILED to read storage after UPDATE",t)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,n){this._hiddenByDefaultCache.set(`${e.id}/${t}`,n)}isHidden(e,t){var r;const n=this._isHiddenByDefault(e,t),s=((r=this._data[e.id])==null?void 0:r.includes(t))??!1;return n?!s:s}updateHidden(e,t,n){this._isHiddenByDefault(e,t)&&(n=!n);const r=this._data[e.id];if(n)r?r.indexOf(t)<0&&r.push(t):this._data[e.id]=[t];else if(r){const o=r.indexOf(t);o>=0&&vLt(r,o),r.length===0&&delete this._data[e.id]}this._persist()}reset(e){if(e===void 0)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(qk._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}},qk=aw,aw._key="menu.hiddenCommands",aw);YX=qk=bW([mp(0,xl)],YX);class UA{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=this._sort(Ro.getMenuItems(this._id));let t;for(const n of e){const s=n.group||"";(!t||t[0]!==s)&&(t=[s,[]],this._menuGroups.push(t)),t[1].push(n),this._collectContextKeysAndSubmenuIds(n)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(UA._fillInKbExprKeys(e.when,this._structureContextKeys),$N(e)){if(e.command.precondition&&UA._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;UA._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(Ro.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(const n of e.keys())t.add(n)}}let QX=GI=class extends UA{constructor(e,t,n,s,r,o){super(e,n),this._hiddenStates=t,this._commandService=s,this._keybindingService=r,this._contextKeyService=o,this.refresh()}createActionGroups(e){const t=[];for(const n of this._menuGroups){const[s,r]=n;let o;for(const a of r)if(this._contextKeyService.contextMatchesRules(a.when)){const l=$N(a);l&&this._hiddenStates.setDefaultState(this._id,a.command.id,!!a.isHiddenByDefault);const c=ZBt(this._id,l?a.command:a,this._hiddenStates);if(l){const u=IMe(this._commandService,this._keybindingService,a.command.id,a.when);(o??(o=[])).push(new Vd(a.command,a.alt,e,c,u,this._contextKeyService,this._commandService))}else{const u=new GI(a.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),h=Gr.join(...u.map(g=>g[1]));h.length>0&&(o??(o=[])).push(new z1(a,c,h))}}o&&o.length>0&&t.push([s,o])}return t}_sort(e){return e.sort(GI._compareMenuItems)}static _compareMenuItems(e,t){const n=e.group,s=t.group;if(n!==s){if(n){if(!s)return-1}else return 1;if(n==="navigation")return-1;if(s==="navigation")return 1;const a=n.localeCompare(s);if(a!==0)return a}const r=e.order||0,o=t.order||0;return ro?1:GI._compareTitles($N(e)?e.command.title:e.title,$N(t)?t.command.title:t.title)}static _compareTitles(e,t){const n=typeof e=="string"?e:e.original,s=typeof t=="string"?t:t.original;return n.localeCompare(s)}};QX=GI=bW([mp(3,es),mp(4,zn),mp(5,Bt)],QX);let H6=class{constructor(e,t,n,s,r,o){this._disposables=new _e,this._menuInfo=new QX(e,t,n.emitEventsForSubmenuChanges,s,r,o);const a=new pi(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(a),this._disposables.add(Ro.onDidChangeMenu(h=>{for(const g of this._menuInfo.allMenuIds)if(h.has(g)){a.schedule();break}}));const l=this._disposables.add(new _e),c=h=>{let g=!1,f=!1,m=!1;for(const x of h)if(g=g||x.isStructuralChange,f=f||x.isEnablementChange,m=m||x.isToggleChange,g&&f&&m)break;return{menu:this,isStructuralChange:g,isEnablementChange:f,isToggleChange:m}},u=()=>{l.add(o.onDidChangeContext(h=>{const g=h.affectsSome(this._menuInfo.structureContextKeys),f=h.affectsSome(this._menuInfo.preconditionContextKeys),m=h.affectsSome(this._menuInfo.toggledContextKeys);(g||f||m)&&this._onDidChange.fire({menu:this,isStructuralChange:g,isEnablementChange:f,isToggleChange:m})})),l.add(t.onDidChange(h=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new GTe({onWillAddFirstListener:u,onDidRemoveLastListener:l.clear.bind(l),delay:n.eventDebounceDelay,merge:c}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};H6=bW([mp(3,es),mp(4,zn),mp(5,Bt)],H6);function ZBt(i,e,t){const n=ODt(e)?e.submenu.id:e.id,s=typeof e.title=="string"?e.title:e.title.value,r=V1({id:`hide/${i.id}/${n}`,label:S(1651,"Hide '{0}'",s),run(){t.updateHidden(i,n,!0)}}),o=V1({id:`toggle/${i.id}/${n}`,label:s,get checked(){return!t.isHidden(i,n)},run(){t.updateHidden(i,n,!!this.checked)}});return{hide:r,toggle:o,get isHidden(){return!o.checked}}}function IMe(i,e,t,n=void 0,s=!0){return V1({id:`configureKeybinding/${t}`,label:S(1652,"Configure Keybinding"),enabled:s,run(){const o=!!!e.lookupKeybinding(t)&&n?n.serialize():void 0;i.executeCommand("workbench.action.openGlobalKeybindings",`@command:${t}`+(o?` +when:${o}`:""))}})}const AMe=ln("IActionViewItemService");class JBt{constructor(){this._providers=new Map,this._onDidChange=new ie,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}lookUp(e,t){return this._providers.get(this._makeKey(e,t))}_makeKey(e,t){return`${e.id}/${t instanceof ct?t.id:t}`}}wn(AMe,JBt,1);var RMe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Dd=function(i,e){return function(t,n){e(t,n,i)}};let W6=class extends IBt{constructor(e,t,n,s,r,o,a,l){super(e,r,{getKeyBinding:u=>o.lookupKeybinding(u.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"}),this._options=t,this._menuService=n,this._contextKeyService=s,this._contextMenuService=r,this._keybindingService=o,this._commandService=a,this._sessionDisposables=this._store.add(new _e);const c=t==null?void 0:t.telemetrySource;c&&this._store.add(this.actionBar.onDidRun(u=>l.publicLog2("workbenchActionExecuted",{id:u.action.id,from:c})))}setActions(e,t=[],n){var u,h,g;this._sessionDisposables.clear();const s=e.slice(),r=t.slice(),o=[];let a=0;const l=[];let c=!1;if(((u=this._options)==null?void 0:u.hiddenItemStrategy)!==-1)for(let f=0;fv==null?void 0:v.id)),m=this._options.overflowBehavior.maxItems-f.size;let x=0;for(let v=0;v=m&&(s[v]=void 0,l[v]=_))}}rxe(s),rxe(l),super.setActions(s,Gr.join(l,r)),(o.length>0||s.length>0)&&this._sessionDisposables.add(de(this.getElement(),"contextmenu",f=>{var w,k,C,E,D;const m=new va(xt(this.getElement()),f),x=this.getItemAction(m.target);if(!x)return;m.preventDefault(),m.stopPropagation();const v=[];if(x instanceof Vd&&x.menuKeybinding)v.push(x.menuKeybinding);else if(!(x instanceof z1||x instanceof QR)){const T=!!this._keybindingService.lookupKeybinding(x.id);v.push(IMe(this._commandService,this._keybindingService,x.id,void 0,T))}if(o.length>0){let T=!1;if(a===1&&((w=this._options)==null?void 0:w.hiddenItemStrategy)===0){T=!0;for(let I=0;Ithis._menuService.resetHiddenStates(n)}))),_.length!==0&&this._contextMenuService.showContextMenu({getAnchor:()=>m,getActions:()=>_,menuId:(C=this._options)==null?void 0:C.contextMenu,menuActionOptions:{renderShortTitle:!0,...(E=this._options)==null?void 0:E.menuOptions},skipTelemetry:typeof((D=this._options)==null?void 0:D.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};W6=RMe([Dd(2,Qu),Dd(3,Bt),Dd(4,eu),Dd(5,zn),Dd(6,es),Dd(7,Ua)],W6);let XR=class extends W6{get onDidChangeMenuItems(){return this._onDidChangeMenuItems.event}constructor(e,t,n,s,r,o,a,l,c,u,h){super(e,{resetMenu:t,...n,actionViewItemProvider:(m,x)=>{let v=u.lookUp(t,m instanceof z1?m.item.submenu.id:m.id);v||(v=n==null?void 0:n.actionViewItemProvider);const _=v==null?void 0:v(m,x,h,xt(e).vscodeWindowId);return _||Vae(h,m,x)}},s,r,o,a,l,c),this._onDidChangeMenuItems=this._store.add(new ie);const g=this._store.add(s.createMenu(t,r,{emitEventsForSubmenuChanges:!0,eventDebounceDelay:n==null?void 0:n.eventDebounceDelay})),f=()=>{var v,_,w;const{primary:m,secondary:x}=LMe(g.getActions(n==null?void 0:n.menuOptions),(v=n==null?void 0:n.toolbarOptions)==null?void 0:v.primaryGroup,(_=n==null?void 0:n.toolbarOptions)==null?void 0:_.shouldInlineSubmenu,(w=n==null?void 0:n.toolbarOptions)==null?void 0:w.useSeparatorsInPrimaryActions);e.classList.toggle("has-no-actions",m.length===0&&x.length===0),super.setActions(m,x)};this._store.add(g.onDidChange(()=>{f(),this._onDidChangeMenuItems.fire(this)})),this._store.add(u.onDidChange(m=>{m===t&&f()})),f()}setActions(){throw new Nt("This toolbar is populated from a menu.")}};XR=RMe([Dd(3,Qu),Dd(4,Bt),Dd(5,eu),Dd(6,zn),Dd(7,es),Dd(8,Ua),Dd(9,AMe),Dd(10,ft)],XR);var e9t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},C0e=function(i,e){return function(t,n){e(t,n,i)}};const Zl=ln("hoverService");let PL=class extends se{get delay(){var e;return this.isInstantlyHovering()?0:(e=this.hoverOptions)!=null&&e.dynamicDelay?t=>{var n,s;return((s=(n=this.hoverOptions)==null?void 0:n.dynamicDelay)==null?void 0:s.call(n,t))??this._delay}:this._delay}constructor(e,t,n={},s,r){super(),this.placement=e,this.hoverOptions=t,this.overrideOptions=n,this.configurationService=s,this.hoverService=r,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new _e),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(e,t){const n=typeof this.overrideOptions=="function"?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();const s=er(e.target)?[e.target]:e.target.targetElements;for(const o of s)this.hoverDisposables.add(yr(o,"keydown",a=>{a.equals(9)&&this.hoverService.hideHover()}));const r=er(e.content)?void 0:typeof e.content=="string"?e.content.toString():e.content.value;return this.hoverService.showInstantHover({...e,...n,persistence:{hideOnKeyDown:!0,...n.persistence},id:r,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...n.appearance}},t)}isInstantlyHovering(){var e;return!!((e=this.hoverOptions)!=null&&e.instantHover)&&Date.now()-this.lastHoverHideTimethis._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(o=>o===0),this.modelAttached=Gn(this,this._editor.onDidChangeModel,o=>this._editor.hasModel()),this.editorOnDidChangeViewZones=Wc("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=Wc("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=Au("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const s=this._domNode.appendChild(Fn("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),r=new ResizeObserver(()=>{Vi(o=>{this.domNodeSizeChanged.trigger(o)})});r.observe(this._domNode),this._register(dt(()=>r.disconnect())),this._register(Pt(o=>{s.className=this.isScrollTopZero.read(o)?"":"scroll-decoration"})),this._register(Pt(o=>this.render(o)))}dispose(){super.dispose(),vo(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const t=this.scrollTop.read(e),n=this._editor.getVisibleRanges(),s=new Set(this.views.keys()),r=ht.ofStartAndLength(0,this._domNode.clientHeight);if(!r.isEmpty)for(const o of n){const a=new jt(o.startLineNumber,o.endLineNumber+1),l=this.itemProvider.getIntersectingGutterItems(a,e);Vi(c=>{for(const u of l){if(!u.range.intersect(a))continue;s.delete(u.id);let h=this.views.get(u.id);if(h)h.item.set(u,c);else{const x=document.createElement("div");this._domNode.appendChild(x);const v=Ft("item",u),_=this.itemProvider.createView(v,x);h=new i9t(v,_,x),this.views.set(u.id,h)}const g=u.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(u.range.startLineNumber,!0)-t:u.range.startLineNumber>1?this._editor.getBottomForLineNumber(u.range.startLineNumber-1,!1)-t:0,m=(u.range.endLineNumberExclusive===1?Math.max(g,this._editor.getTopForLineNumber(u.range.startLineNumber,!1)-t):Math.max(g,this._editor.getBottomForLineNumber(u.range.endLineNumberExclusive-1,!0)-t))-g;h.domNode.style.top=`${g}px`,h.domNode.style.height=`${m}px`,h.gutterItemView.layout(ht.ofStartAndLength(g,m),r)}})}for(const o of s){const a=this.views.get(o);a.gutterItemView.dispose(),a.domNode.remove(),this.views.delete(o)}}}class i9t{constructor(e,t,n){this.item=e,this.gutterItemView=t,this.domNode=n}}var PMe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},mj=function(i,e){return function(t,n){e(t,n,i)}};const Rq=[],z3=35;let XX=class extends se{constructor(e,t,n,s,r,o,a,l,c){super(),this._diffModel=t,this._editors=n,this._options=s,this._sashLayout=r,this._boundarySashes=o,this._instantiationService=a,this._contextKeyService=l,this._menuService=c,this._menu=this._register(this._menuService.createMenu(ct.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=Gn(this,this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(h=>h.length>0),this._showSash=we(this,h=>this._options.renderSideBySide.read(h)&&this._hasActions.read(h)),this.width=we(this,h=>this._hasActions.read(h)?z3:0),this.elements=Fn("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:z3+"px"}},[]),this._currentDiff=we(this,h=>{var x;const g=this._diffModel.read(h);if(!g)return;const f=(x=g.diff.read(h))==null?void 0:x.mappings,m=this._editors.modifiedCursor.read(h);if(m)return f==null?void 0:f.find(v=>v.lineRangeMapping.modified.contains(m.lineNumber))}),this._selectedDiffs=we(this,h=>{const g=this._diffModel.read(h),f=g==null?void 0:g.diff.read(h);if(!f)return Rq;const m=this._editors.modifiedSelections.read(h);if(m.every(w=>w.isEmpty()))return Rq;const x=new Iu(m.map(w=>jt.fromRangeInclusive(w))),_=f.mappings.filter(w=>w.lineRangeMapping.innerChanges&&x.intersects(w.lineRangeMapping.modified)).map(w=>({mapping:w,rangeMappings:w.lineRangeMapping.innerChanges.filter(k=>m.some(C=>z.areIntersecting(k.modifiedRange,C)))}));return _.length===0||_.every(w=>w.rangeMappings.length===0)?Rq:_}),this._register(T8t(e,this.elements.root)),this._register(de(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register(o0(this.elements.root,{display:this._hasActions.map(h=>h?"block":"none")})),wu(this,h=>this._showSash.read(h)?new SMe(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,noe(this,f=>this._sashLayout.sashLeft.read(f)-z3,(f,m)=>this._sashLayout.sashLeft.set(f+z3,m)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store);const u=we(this,h=>{const g=this._diffModel.read(h);if(!g)return[];const f=g.diff.read(h);if(!f)return[];const m=this._selectedDiffs.read(h);if(m.length>0){const v=$d.fromRangeMappings(m.flatMap(_=>_.rangeMappings));return[new S0e(v,!0,ct.DiffEditorSelectionToolbar,void 0,g.model.original.uri,g.model.modified.uri)]}const x=this._currentDiff.read(h);return f.mappings.map(v=>new S0e(v.lineRangeMapping.withInnerChangesFromLineRanges(),v.lineRangeMapping===(x==null?void 0:x.lineRangeMapping),ct.DiffEditorHunkToolbar,void 0,g.model.original.uri,g.model.modified.uri))});this._register(new n9t(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(h,g)=>u.read(g),createView:(h,g)=>this._instantiationService.createInstance(ZX,h,g,this)})),this._register(de(this.elements.gutter,Fe.MOUSE_WHEEL,h=>{this._editors.modified.getOption(117).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(h)},{passive:!1}))}computeStagedValue(e){const t=e.innerChanges??[],n=new NC(this._editors.modifiedModel.get()),s=new NC(this._editors.original.getModel());return new Uc(t.map(a=>a.toTextEdit(n))).apply(s)}layout(e){this.elements.gutter.style.left=e+"px"}};XX=PMe([mj(6,ft),mj(7,Bt),mj(8,Qu)],XX);class S0e{constructor(e,t,n,s,r,o){this.mapping=e,this.showAlways=t,this.menuId=n,this.rangeOverride=s,this.originalUri=r,this.modifiedUri=o}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let ZX=class extends se{constructor(e,t,n,s){super(),this._item=e,this._elements=Fn("div.gutterItem",{style:{height:"20px",width:"34px"}},[Fn("div.background@background",{},[]),Fn("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,o=>o.showAlways),this._menuId=this._item.map(this,o=>o.menuId),this._isSmall=Ft(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const r=this._register(s.createInstance(PL,"element",{instantHover:!0},{position:{hoverPosition:1}}));this._register(hN(t,this._elements.root)),this._register(Pt(o=>{const a=this._showAlways.read(o);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",a),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register(Fa((o,a)=>{this._elements.buttons.replaceChildren();const l=a.add(s.createInstance(XR,this._elements.buttons,this._menuId.read(o),{orientation:1,hoverDelegate:r,toolbarOptions:{primaryGroup:c=>c.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(o)?1:3},hiddenItemStrategy:0,actionRunner:a.add(new MMe(()=>{const c=this._item.read(void 0),u=c.mapping;return{mapping:u,originalWithModifiedChanges:n.computeStagedValue(u),originalUri:c.originalUri,modifiedUri:c.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));a.add(l.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let n=this._elements.buttons.clientHeight;this._isSmall.set(this._item.get().mapping.original.startLineNumber===1&&e.length<30,void 0),n=this._elements.buttons.clientHeight;const s=e.length/2-n/2,r=n;let o=e.start+s;const a=ht.tryCreate(r,t.endExclusive-r-n),l=ht.tryCreate(e.start+r,e.endExclusive-n-r);l&&a&&l.start=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},r9t=function(i,e){return function(t,n){e(t,n,i)}},JX,N_;let V6=(N_=class extends se{static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,n,s){super(),this._editors=e,this._diffModel=t,this._options=n,this._instantiationService=s,this._modifiedOutlineSource=wu(this,l=>{const c=this._editors.modifiedModel.read(l),u=JX._breadcrumbsSourceFactory.read(l);return!c||!u?void 0:u(c,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(l=>{if(l.reason===1)return;const c=this._diffModel.get();Vi(u=>{for(const h of this._editors.original.getSelections()||[])c==null||c.ensureOriginalLineIsVisible(h.getStartPosition().lineNumber,0,u),c==null||c.ensureOriginalLineIsVisible(h.getEndPosition().lineNumber,0,u)})})),this._register(this._editors.modified.onDidChangeCursorPosition(l=>{if(l.reason===1)return;const c=this._diffModel.get();Vi(u=>{for(const h of this._editors.modified.getSelections()||[])c==null||c.ensureModifiedLineIsVisible(h.getStartPosition().lineNumber,0,u),c==null||c.ensureModifiedLineIsVisible(h.getEndPosition().lineNumber,0,u)})}));const r=this._diffModel.map((l,c)=>{var h;const u=(l==null?void 0:l.unchangedRegions.read(c))??[];return u.length===1&&u[0].modifiedLineNumber===1&&u[0].lineCount===((h=this._editors.modifiedModel.read(c))==null?void 0:h.getLineCount())?[]:u});this.viewZones=we(this,l=>{const c=this._modifiedOutlineSource.read(l);if(!c)return{origViewZones:[],modViewZones:[]};const u=[],h=[],g=this._options.renderSideBySide.read(l),f=this._options.compactMode.read(l),m=r.read(l);for(let x=0;xv.getHiddenOriginalRange(k).startLineNumber-1),w=new gN(_,12);u.push(w),l.store.add(new k0e(this._editors.original,w,v,!g))}{const _=we(this,k=>v.getHiddenModifiedRange(k).startLineNumber-1),w=new gN(_,12);h.push(w),l.store.add(new k0e(this._editors.modified,w,v))}}else{{const _=we(this,k=>v.getHiddenOriginalRange(k).startLineNumber-1),w=new gN(_,24);u.push(w),l.store.add(new N0e(this._editors.original,w,v,v.originalUnchangedRange,!g,c,k=>this._diffModel.get().ensureModifiedLineIsVisible(k,2,void 0),this._options))}{const _=we(this,k=>v.getHiddenModifiedRange(k).startLineNumber-1),w=new gN(_,24);h.push(w),l.store.add(new N0e(this._editors.modified,w,v,v.modifiedUnchangedRange,!1,c,k=>this._diffModel.get().ensureModifiedLineIsVisible(k,2,void 0),this._options))}}}return{origViewZones:u,modViewZones:h}});const o={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},a={description:"Fold Unchanged",glyphMarginHoverMessage:new Ma(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(S(124,"Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+Tt.asClassName(Ee.fold),zIndex:10001};this._register(D6(this._editors.original,we(this,l=>{const c=r.read(l),u=c.map(h=>({range:h.originalUnchangedRange.toInclusiveRange(),options:o}));for(const h of c)h.shouldHideControls(l)&&u.push({range:z.fromPositions(new te(h.originalLineNumber,1)),options:a});return u}))),this._register(D6(this._editors.modified,we(this,l=>{const c=r.read(l),u=c.map(h=>({range:h.modifiedUnchangedRange.toInclusiveRange(),options:o}));for(const h of c)h.shouldHideControls(l)&&u.push({range:jt.ofLength(h.modifiedLineNumber,1).toInclusiveRange(),options:a});return u}))),this._register(Pt(l=>{const c=r.read(l);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(c.map(u=>u.getHiddenOriginalRange(l).toInclusiveRange()).filter(Ao)),this._editors.modified.setHiddenAreas(c.map(u=>u.getHiddenModifiedRange(l).toInclusiveRange()).filter(Ao))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&((c=l.target.element)!=null&&c.className.includes("fold-unchanged"))){const u=l.target.position.lineNumber,h=this._diffModel.get();if(!h)return;const g=h.unchangedRegions.get().find(f=>f.modifiedUnchangedRange.contains(u));if(!g)return;g.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(l=>{var c;if(!l.event.rightButton&&l.target.position&&((c=l.target.element)!=null&&c.className.includes("fold-unchanged"))){const u=l.target.position.lineNumber,h=this._diffModel.get();if(!h)return;const g=h.unchangedRegions.get().find(f=>f.originalUnchangedRange.contains(u));if(!g)return;g.collapseAll(void 0),l.event.stopPropagation(),l.event.preventDefault()}}))}},JX=N_,N_._breadcrumbsSourceFactory=Ft(N_,()=>({dispose(){},getBreadcrumbItems(e,t){return[]}})),N_);V6=JX=s9t([r9t(3,ft)],V6);class k0e extends Iae{constructor(e,t,n,s=!1){const r=Fn("div.diff-hidden-lines-widget");super(e,t,r.root),this._unchangedRegion=n,this._hide=s,this._nodes=Fn("div.diff-hidden-lines-compact",[Fn("div.line-left",[]),Fn("div.text@text",[]),Fn("div.line-right",[])]),r.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register(Pt(o=>{if(!this._hide){const a=this._unchangedRegion.getHiddenModifiedRange(o).length,l=S(125,"{0} hidden lines",a);this._nodes.text.innerText=l}}))}}class N0e extends Iae{constructor(e,t,n,s,r,o,a,l){const c=Fn("div.diff-hidden-lines-widget");super(e,t,c.root),this._editor=e,this._unchangedRegion=n,this._unchangedRegionRange=s,this._hide=r,this._modifiedOutlineSource=o,this._revealModifiedHiddenLine=a,this._options=l,this._nodes=Fn("div.diff-hidden-lines",[Fn("div.top@top",{title:S(126,"Click or drag to show more above")}),Fn("div.center@content",{style:{display:"flex"}},[Fn("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[Oe("a",{title:S(127,"Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...v_("$(unfold)"))]),Fn("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Fn("div.bottom@bottom",{title:S(128,"Click or drag to show more below"),role:"button"})]),c.root.appendChild(this._nodes.root),this._hide?vo(this._nodes.first):this._register(o0(this._nodes.first,{width:Ts(this._editor).layoutInfoContentLeft})),this._register(Pt(h=>{const g=this._unchangedRegion.visibleLineCountTop.read(h)+this._unchangedRegion.visibleLineCountBottom.read(h)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!g),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),this._nodes.top.classList.toggle("canMoveBottom",!g);const f=this._unchangedRegion.isDragged.read(h),m=this._editor.getDomNode();m&&(m.classList.toggle("draggingUnchangedRegion",!!f),f==="top"?(m.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(h)>0),m.classList.toggle("canMoveBottom",!g)):f==="bottom"?(m.classList.toggle("canMoveTop",!g),m.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(h)>0)):(m.classList.toggle("canMoveTop",!1),m.classList.toggle("canMoveBottom",!1)))}));const u=this._editor;this._register(de(this._nodes.top,"mousedown",h=>{if(h.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const g=h.clientY;let f=!1;const m=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const x=xt(this._nodes.top),v=de(x,"mousemove",w=>{const C=w.clientY-g;f=f||Math.abs(C)>2;const E=Math.round(C/u.getOption(75)),D=Math.max(0,Math.min(m+E,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(D,void 0)}),_=de(x,"mouseup",w=>{f||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),v.dispose(),_.dispose()})})),this._register(de(this._nodes.bottom,"mousedown",h=>{if(h.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),h.preventDefault();const g=h.clientY;let f=!1;const m=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const x=xt(this._nodes.bottom),v=de(x,"mousemove",w=>{const C=w.clientY-g;f=f||Math.abs(C)>2;const E=Math.round(C/u.getOption(75)),D=Math.max(0,Math.min(m-E,this._unchangedRegion.getMaxVisibleLineCountBottom())),T=this._unchangedRegionRange.endLineNumberExclusive>u.getModel().getLineCount()?u.getContentHeight():u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(D,void 0);const I=this._unchangedRegionRange.endLineNumberExclusive>u.getModel().getLineCount()?u.getContentHeight():u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(I-T))}),_=de(x,"mouseup",w=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!f){const k=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const C=u.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);u.setScrollTop(u.getScrollTop()+(C-k))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),v.dispose(),_.dispose()})})),this._register(Pt(h=>{const g=[];if(!this._hide){const f=n.getHiddenModifiedRange(h).length,m=S(129,"{0} hidden lines",f),x=Oe("span",{title:S(130,"Double click to unfold")},m);x.addEventListener("dblclick",w=>{w.button===0&&(w.preventDefault(),this._unchangedRegion.showAll(void 0))}),g.push(x);const v=this._unchangedRegion.getHiddenModifiedRange(h),_=this._modifiedOutlineSource.getBreadcrumbItems(v,h);if(_.length>0){g.push(Oe("span",void 0,"  |  "));for(let w=0;w<_.length;w++){const k=_[w],C=d6.toIcon(k.kind),E=Fn("div.breadcrumb-item",{style:{display:"flex",alignItems:"center"}},[Gg(C)," ",k.name,...w===_.length-1?[]:[Gg(Ee.chevronRight)]]).root;g.push(E),E.onclick=()=>{this._revealModifiedHiddenLine(k.startLineNumber)}}}}vo(this._nodes.others,...g)}))}}const Mq=[];class o9t extends se{constructor(e,t,n,s){super(),this._editors=e,this._diffModel=t,this._options=n,this._widget=s,this._selectedDiffs=we(this,r=>{const o=this._diffModel.read(r),a=o==null?void 0:o.diff.read(r);if(!a)return Mq;const l=this._editors.modifiedSelections.read(r);if(l.every(g=>g.isEmpty()))return Mq;const c=new Iu(l.map(g=>jt.fromRangeInclusive(g))),h=a.mappings.filter(g=>g.lineRangeMapping.innerChanges&&c.intersects(g.lineRangeMapping.modified)).map(g=>({mapping:g,rangeMappings:g.lineRangeMapping.innerChanges.filter(f=>l.some(m=>z.areIntersecting(f.modifiedRange,m)))}));return h.length===0||h.every(g=>g.rangeMappings.length===0)?Mq:h}),this._register(Fa((r,o)=>{if(!this._options.shouldRenderOldRevertArrows.read(r))return;const a=this._diffModel.read(r),l=a==null?void 0:a.diff.read(r);if(!a||!l||a.movedTextToCompare.read(r))return;const c=[],u=this._selectedDiffs.read(r),h=new Set(u.map(g=>g.mapping));if(u.length>0){const g=this._editors.modifiedSelections.read(r),f=o.add(new z6(g[g.length-1].positionLineNumber,this._widget,u.flatMap(m=>m.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}for(const g of l.mappings)if(!h.has(g)&&!g.lineRangeMapping.modified.isEmpty&&g.lineRangeMapping.innerChanges){const f=o.add(new z6(g.lineRangeMapping.modified.startLineNumber,this._widget,g.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(f),c.push(f)}o.add(dt(()=>{for(const g of c)this._editors.modified.removeGlyphMarginWidget(g)}))}))}}const f9=class f9 extends se{getId(){return this._id}constructor(e,t,n,s){super(),this._lineNumber=e,this._widget=t,this._diffs=n,this._revertSelection=s,this._id=`revertButton${f9.counter++}`,this._domNode=Fn("div.revertButton",{title:this._revertSelection?S(135,"Revert Selected Changes"):S(136,"Revert Change")},[Gg(Ee.arrowRight)]).root,this._register(de(this._domNode,Fe.MOUSE_DOWN,r=>{r.button!==2&&(r.stopPropagation(),r.preventDefault())})),this._register(de(this._domNode,Fe.MOUSE_UP,r=>{r.stopPropagation(),r.preventDefault()})),this._register(de(this._domNode,Fe.CLICK,r=>{this._diffs instanceof al?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),r.stopPropagation(),r.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:Ug.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}};f9.counter=0;let z6=f9;var a9t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},xI=function(i,e){return function(t,n){e(t,n,i)}};let Tp=class extends VX{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,n,s,r,o,a,l){super(),this._domElement=e,this._parentContextKeyService=s,this._parentInstantiationService=r,this._codeEditorService=o,this._accessibilitySignalService=a,this._editorProgressService=l,this.elements=Fn("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Fn("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Fn("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Fn("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register(roe(this,void 0)),this._diffModel=we(this,C=>{var E;return(E=this._diffModelSrc.read(C))==null?void 0:E.object}),this.onDidChangeModel=He.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new FD([Bt,this._contextKeyService]))),this._boundarySashes=Ft(this,void 0),this._accessibleDiffViewerShouldBeVisible=Ft(this,!1),this._accessibleDiffViewerVisible=we(this,C=>this._options.onlyShowAccessibleDiffViewer.read(C)?!0:this._accessibleDiffViewerShouldBeVisible.read(C)),this._movedBlocksLinesPart=Ft(this,void 0),this._layoutInfo=we(this,C=>{var X,ae;const E=this._rootSizeObserver.width.read(C),D=this._rootSizeObserver.height.read(C);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=D+"px";const T=this._sash.read(C),I=this._gutter.read(C),R=(I==null?void 0:I.width.read(C))??0,P=((X=this._overviewRulerPart.read(C))==null?void 0:X.width)??0;let j,B,H,$,q;if(!!T){const ne=T.sashLeft.read(C),W=((ae=this._movedBlocksLinesPart.read(C))==null?void 0:ae.width.read(C))??0;j=0,B=ne-R-W,q=ne-R,H=ne,$=E-H-P}else{q=0;const ne=this._options.inlineViewHideOriginalLineNumbers.read(C);j=R,ne?B=0:B=Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(C)),H=R+B,$=E-H-P}return this.elements.original.style.left=j+"px",this.elements.original.style.width=B+"px",this._editors.original.layout({width:B,height:D},!0),I==null||I.layout(q),this.elements.modified.style.left=H+"px",this.elements.modified.style.width=$+"px",this._editors.modified.layout({width:$,height:D},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((C,E)=>C==null?void 0:C.diff.read(E)),this.onDidUpdateDiff=He.fromObservableLight(this._diffValue),this._codeEditorService.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(dt(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new fMe(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(zX,t),this._register(Pt(C=>{this._options.setWidth(this._rootSizeObserver.width.read(C))})),this._contextKeyService.createKey(J.isEmbeddedDiffEditor.key,!1),this._register(kf(J.isEmbeddedDiffEditor,this._contextKeyService,C=>this._options.isInEmbeddedEditor.read(C))),this._register(kf(J.comparingMovedCode,this._contextKeyService,C=>{var E;return!!((E=this._diffModel.read(C))!=null&&E.movedTextToCompare.read(C))})),this._register(kf(J.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,C=>this._options.couldShowInlineViewBecauseOfSize.read(C))),this._register(kf(J.diffEditorInlineMode,this._contextKeyService,C=>!this._options.renderSideBySide.read(C))),this._register(kf(J.hasChanges,this._contextKeyService,C=>{var E,D;return(((D=(E=this._diffModel.read(C))==null?void 0:E.diff.read(C))==null?void 0:D.mappings.length)??0)>0})),this._editors=this._register(this._instantiationService.createInstance(WX,this.elements.original,this.elements.modified,this._options,n,(C,E,D,T)=>this._createInnerEditor(C,E,D,T))),this._register(kf(J.diffEditorOriginalWritable,this._contextKeyService,C=>this._options.originalEditable.read(C))),this._register(kf(J.diffEditorModifiedWritable,this._contextKeyService,C=>!this._options.readOnly.read(C))),this._register(kf(J.diffEditorOriginalUri,this._contextKeyService,C=>{var E;return((E=this._diffModel.read(C))==null?void 0:E.model.original.uri.toString())??""})),this._register(kf(J.diffEditorModifiedUri,this._contextKeyService,C=>{var E;return((E=this._diffModel.read(C))==null?void 0:E.model.modified.uri.toString())??""})),this._overviewRulerPart=wu(this,C=>this._options.renderOverviewRuler.read(C)?this._instantiationService.createInstance(Im(YR),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(E=>E.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);const c={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((C,E)=>{var D;return C-(((D=this._overviewRulerPart.read(E))==null?void 0:D.width)??0)})};this._sashLayout=new wBt(this._options,c),this._sash=wu(this,C=>{const E=this._options.renderSideBySide.read(C);return this.elements.root.classList.toggle("side-by-side",E),E?new SMe(this.elements.root,c,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);const u=wu(this,C=>this._instantiationService.createInstance(Im(V6),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);wu(this,C=>this._instantiationService.createInstance(Im(gBt),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const h=new Set,g=new Set;let f=!1;const m=wu(this,C=>this._instantiationService.createInstance(Im(BX),xt(this._domElement),this._editors,this._diffModel,this._options,this,()=>f||u.read(void 0).isUpdatingHiddenAreas,h,g)).recomputeInitiallyAndOnChange(this._store),x=we(this,C=>{const E=m.read(C).viewZones.read(C).orig,D=u.read(C).viewZones.read(C).origViewZones;return E.concat(D)}),v=we(this,C=>{const E=m.read(C).viewZones.read(C).mod,D=u.read(C).viewZones.read(C).modViewZones;return E.concat(D)});this._register(T6(this._editors.original,x,C=>{f=C},h));let _;this._register(T6(this._editors.modified,v,C=>{f=C,f?_=Kg.capture(this._editors.modified):(_==null||_.restore(this._editors.modified),_=void 0)},g)),this._accessibleDiffViewer=wu(this,C=>this._instantiationService.createInstance(Im(w1),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(E,D)=>this._accessibleDiffViewerShouldBeVisible.set(E,D),this._options.onlyShowAccessibleDiffViewer.map(E=>!E),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((E,D)=>{var T;return(T=E==null?void 0:E.diff.read(D))==null?void 0:T.mappings.map(I=>I.lineRangeMapping)}),new X8t(this._editors))).recomputeInitiallyAndOnChange(this._store);const w=this._accessibleDiffViewerVisible.map(C=>C?"hidden":"visible");this._register(o0(this.elements.modified,{visibility:w})),this._register(o0(this.elements.original,{visibility:w})),this._createDiffEditorContributions(),this._codeEditorService.addDiffEditor(this),this._register(dt(()=>{this._codeEditorService.removeDiffEditor(this)})),this._gutter=wu(this,C=>this._options.shouldRenderGutterMenu.read(C)?this._instantiationService.createInstance(Im(XX),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register(xL(this._layoutInfo)),wu(this,C=>new(Im(rE))(this.elements.root,this._diffModel,this._layoutInfo.map(E=>E.originalEditor),this._layoutInfo.map(E=>E.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,C=>{this._movedBlocksLinesPart.set(C,void 0)}),this._register(He.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,C=>this._handleCursorPositionChange(C,!0))),this._register(He.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,C=>this._handleCursorPositionChange(C,!1)));const k=this._diffModel.map(this,(C,E)=>{if(C)return C.diff.read(E)===void 0&&!C.isDiffUpToDate.read(E)});this._register(Fa((C,E)=>{if(k.read(C)===!0){const D=this._editorProgressService.show(!0,1e3);E.add(dt(()=>D.done()))}})),this._register(Fa((C,E)=>{E.add(new(Im(o9t))(this._editors,this._diffModel,this._options,this))})),this._register(Fa((C,E)=>{const D=this._diffModel.read(C);if(D)for(const T of[D.model.original,D.model.modified])E.add(T.onWillDispose(I=>{zt(new Nt("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register(Pt(C=>{this._options.setModel(this._diffModel.read(C))}))}_createInnerEditor(e,t,n,s){return e.createInstance(wC,t,n,s)}_createDiffEditorContributions(){const e=qN.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(n){zt(n)}}get _targetEditor(){return this._editors.modified}getEditorType(){return XP.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var n;const e=this._editors.original.saveViewState(),t=this._editors.modified.saveViewState();return{original:e,modified:t,modelState:(n=this._diffModel.get())==null?void 0:n.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const n=e;this._editors.original.restoreViewState(n.original),this._editors.modified.restoreViewState(n.modified),n.modelState&&((t=this._diffModel.get())==null||t.restoreSerializedState(n.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(FX,e,this._options)}getModel(){var e;return((e=this._diffModel.get())==null?void 0:e.model)??null}setModel(e){const t=e?"model"in e?I6.create(e).createNewRef(this):I6.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){const n=this._diffModel.get();!e&&n&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==(e==null?void 0:e.object)&&bL(t,s=>{var a;const r=e==null?void 0:e.object;Gn.batchEventsGlobally(s,()=>{this._editors.original.setModel(r?r.model.original:null),this._editors.modified.setModel(r?r.model.modified:null)});const o=(a=this._diffModelSrc.get())==null?void 0:a.createNewRef(this);this._diffModelSrc.set(e==null?void 0:e.createNewRef(this),s),setTimeout(()=>{o==null||o.dispose()},0)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var t;const e=(t=this._diffModel.get())==null?void 0:t.diff.get();return e?l9t(e):null}getDiffComputationResult(){var t;const e=(t=this._diffModel.get())==null?void 0:t.diff.get();return e?{changes:this.getLineChanges(),changes2:e.mappings.map(n=>n.lineRangeMapping),identical:e.identical,quitEarly:e.quitEarly}:null}revert(e){const t=this._diffModel.get();!t||!t.isDiffUpToDate.get()||(this._editors.modified.pushUndoStop(),this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}]),this._editors.modified.pushUndoStop())}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const n=e.map(s=>({range:s.modifiedRange,text:t.model.original.getValueInRange(s.originalRange)}));this._editors.modified.pushUndoStop(),this._editors.modified.executeEdits("diffEditor",n),this._editors.modified.pushUndoStop()}revertFocusedRangeMappings(){var l,c;const e=this._diffModel.get();if(!e||!e.isDiffUpToDate.get())return;const t=(c=(l=this._diffModel.get())==null?void 0:l.diff.get())==null?void 0:c.mappings;if(!t||t.length===0)return;const n=this._editors.modified;if(!n.hasTextFocus())return;const s=n.getPosition().lineNumber,r=n.getSelection(),o=jt.fromRange(r||new z(s,0,s,0)),a=t.filter(u=>u.lineRangeMapping.modified.intersect(o));n.pushUndoStop(),n.executeEdits("diffEditor",a.map(u=>({range:u.lineRangeMapping.modified.toExclusiveRange(),text:e.model.original.getValueInRange(u.lineRangeMapping.original.toExclusiveRange())}))),n.pushUndoStop()}_goTo(e){this._editors.modified.setPosition(new te(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var r,o;const t=(o=(r=this._diffModel.get())==null?void 0:r.diff.get())==null?void 0:o.mappings;if(!t||t.length===0)return;const n=this._editors.modified.getPosition().lineNumber;let s;e==="next"?this._editors.modified.getModel().getLineCount()===n?s=t[0]:s=t.find(l=>l.lineRangeMapping.modified.startLineNumber>n)??t[0]:s=NR(t,a=>a.lineRangeMapping.modified.startLineNumber{var n;const t=(n=e.diff.get())==null?void 0:n.mappings;!t||t.length===0||this._goTo(t[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var o,a;const e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,n=e?this._editors.original:this._editors.modified;let s;const r=t.getSelection();if(r){const l=(a=(o=this._diffModel.get())==null?void 0:o.diff.get())==null?void 0:a.mappings.map(c=>e?c.lineRangeMapping.flip():c.lineRangeMapping);if(l){const c=n0e(r.getStartPosition(),l),u=n0e(r.getEndPosition(),l);s=z.plusRange(c,u)}}return{destination:n,destinationSelection:s}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var t;const e=(t=this._diffModel.get())==null?void 0:t.unchangedRegions.get();e&&Vi(n=>{for(const s of e)s.collapseAll(n)})}showAllUnchangedRegions(){var t;const e=(t=this._diffModel.get())==null?void 0:t.unchangedRegions.get();e&&Vi(n=>{for(const s of e)s.showAll(n)})}_handleCursorPositionChange(e,t){var n,s;if((e==null?void 0:e.reason)===3){const r=(s=(n=this._diffModel.get())==null?void 0:n.diff.get())==null?void 0:s.mappings.find(o=>t?o.lineRangeMapping.modified.contains(e.position.lineNumber):o.lineRangeMapping.original.contains(e.position.lineNumber));r!=null&&r.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(Rl.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):r!=null&&r.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(Rl.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):r&&this._accessibilitySignalService.playSignal(Rl.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};Tp=a9t([xI(3,Bt),xI(4,ft),xI(5,Hn),xI(6,hx),xI(7,Jb)],Tp);function l9t(i){return i.mappings.map(e=>{const t=e.lineRangeMapping;let n,s,r,o,a=t.innerChanges;return t.original.isEmpty?(n=t.original.startLineNumber-1,s=0,a=void 0):(n=t.original.startLineNumber,s=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(r=t.modified.startLineNumber-1,o=0,a=void 0):(r=t.modified.startLineNumber,o=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:n,originalEndLineNumber:s,modifiedStartLineNumber:r,modifiedEndLineNumber:o,charChanges:a==null?void 0:a.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}class c9t extends Fo{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:be(85,"Toggle Collapse Unchanged Regions"),icon:Ee.map,toggled:Ne.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Ne.has("isInDiffEditor"),menu:{when:Ne.has("isInDiffEditor"),id:ct.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const n=e.get(Zt),s=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",s)}}class OMe extends Fo{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:be(86,"Toggle Show Moved Code Blocks"),precondition:Ne.has("isInDiffEditor")})}run(e,...t){const n=e.get(Zt),s=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",s)}}class jMe extends Fo{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:be(87,"Toggle Use Inline View When Space Is Limited"),precondition:Ne.has("isInDiffEditor")})}run(e,...t){const n=e.get(Zt),s=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",s)}}const oO=be(88,"Diff Editor");class d9t extends Qh{constructor(){super({id:"diffEditor.switchSide",title:be(89,"Switch Side"),icon:Ee.arrowSwap,precondition:Ne.has("isInDiffEditor"),f1:!0,category:oO})}runEditorCommand(e,t,n){const s=hS(e);if(s instanceof Tp){if(n&&n.dryRun)return{destinationSelection:s.mapToOtherSide().destinationSelection};s.switchSide()}}}class u9t extends Qh{constructor(){super({id:"diffEditor.exitCompareMove",title:be(90,"Exit Compare Move"),icon:Ee.close,precondition:J.comparingMovedCode,f1:!1,category:oO,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){const s=hS(e);s instanceof Tp&&s.exitCompareMove()}}class h9t extends Qh{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:be(91,"Collapse All Unchanged Regions"),icon:Ee.fold,precondition:Ne.has("isInDiffEditor"),f1:!0,category:oO})}runEditorCommand(e,t,...n){const s=hS(e);s instanceof Tp&&s.collapseAllUnchangedRegions()}}class g9t extends Qh{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:be(92,"Show All Unchanged Regions"),icon:Ee.unfold,precondition:Ne.has("isInDiffEditor"),f1:!0,category:oO})}runEditorCommand(e,t,...n){const s=hS(e);s instanceof Tp&&s.showAllUnchangedRegions()}}class eZ extends Fo{constructor(){super({id:"diffEditor.revert",title:be(93,"Revert"),f1:!0,category:oO,precondition:Ne.has("isInDiffEditor")})}run(e,t){return t?this.runViaToolbarContext(e,t):this.runViaCursorOrSelection(e)}runViaCursorOrSelection(e){const t=hS(e);t instanceof Tp&&t.revertFocusedRangeMappings()}runViaToolbarContext(e,t){const n=f9t(e,t.originalUri,t.modifiedUri);n instanceof Tp&&n.revertRangeMappings(t.mapping.innerChanges??[])}}const FMe=be(94,"Accessible Diff Viewer"),p9=class p9 extends Fo{constructor(){super({id:p9.id,title:be(95,"Go to Next Difference"),category:FMe,precondition:Ne.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=hS(e);t==null||t.accessibleDiffViewerNext()}};p9.id="editor.action.accessibleDiffViewer.next";let ZR=p9;const m9=class m9 extends Fo{constructor(){super({id:m9.id,title:be(96,"Go to Previous Difference"),category:FMe,precondition:Ne.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=hS(e);t==null||t.accessibleDiffViewerPrev()}};m9.id="editor.action.accessibleDiffViewer.prev";let U6=m9;function f9t(i,e,t){return i.get(Hn).listDiffEditors().find(r=>{var l,c;const o=r.getModifiedEditor(),a=r.getOriginalEditor();return o&&((l=o.getModel())==null?void 0:l.uri.toString())===t.toString()&&a&&((c=a.getModel())==null?void 0:c.uri.toString())===e.toString()})||null}function hS(i){const t=i.get(Hn).listDiffEditors(),n=so();if(n){for(const s of t)if(s.getContainerDomNode().contains(n))return s}return null}ci(c9t);ci(OMe);ci(jMe);Ro.appendMenuItem(ct.EditorTitle,{command:{id:new jMe().desc.id,title:S(119,"Use Inline View When Space Is Limited"),toggled:Ne.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Ne.has("isInDiffEditor")},order:11,group:"1_diff",when:Ne.and(J.diffEditorRenderSideBySideInlineBreakpointReached,Ne.has("isInDiffEditor"))});Ro.appendMenuItem(ct.EditorTitle,{command:{id:new OMe().desc.id,title:S(120,"Show Moved Code Blocks"),icon:Ee.move,toggled:ND.create("config.diffEditor.experimental.showMoves",!0),precondition:Ne.has("isInDiffEditor")},order:10,group:"1_diff",when:Ne.has("isInDiffEditor")});ci(eZ);for(const i of[{icon:Ee.arrowRight,key:J.diffEditorInlineMode.toNegated()},{icon:Ee.discard,key:J.diffEditorInlineMode}])Ro.appendMenuItem(ct.DiffEditorHunkToolbar,{command:{id:new eZ().desc.id,title:S(121,"Revert Block"),icon:i.icon},when:Ne.and(J.diffEditorModifiedWritable,i.key),order:5,group:"primary"}),Ro.appendMenuItem(ct.DiffEditorSelectionToolbar,{command:{id:new eZ().desc.id,title:S(122,"Revert Selection"),icon:i.icon},when:Ne.and(J.diffEditorModifiedWritable,i.key),order:5,group:"primary"});ci(d9t);ci(u9t);ci(h9t);ci(g9t);Ro.appendMenuItem(ct.EditorTitle,{command:{id:ZR.id,title:S(123,"Open Accessible Diff Viewer"),precondition:Ne.has("isInDiffEditor")},order:10,group:"2_diff",when:Ne.and(J.accessibleDiffViewerVisible.negate(),Ne.has("isInDiffEditor"))});Rn.registerCommandAlias("editor.action.diffReview.next",ZR.id);ci(ZR);Rn.registerCommandAlias("editor.action.diffReview.prev",U6.id);ci(U6);var p9t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},m9t=function(i,e){return function(t,n){e(t,n,i)}},tZ;const xW=new Ze("selectionAnchorSet",!1);var lw;let l0=(lw=class{static get(e){return e.getContribution(tZ.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=xW.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(st.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Ma().appendText(S(798,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),$l(S(799,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(st.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},tZ=lw,lw.ID="editor.contrib.selectionAnchorController",lw);l0=tZ=p9t([m9t(1,Bt)],l0);class b9t extends rt{constructor(){super({id:"editor.action.setSelectionAnchor",label:be(800,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2080),weight:100}})}async run(e,t){var n;(n=l0.get(t))==null||n.setSelectionAnchor()}}class x9t extends rt{constructor(){super({id:"editor.action.goToSelectionAnchor",label:be(801,"Go to Selection Anchor"),precondition:xW})}async run(e,t){var n;(n=l0.get(t))==null||n.goToSelectionAnchor()}}class v9t extends rt{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:be(802,"Select from Anchor to Cursor"),precondition:xW,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2089),weight:100}})}async run(e,t){var n;(n=l0.get(t))==null||n.selectFromAnchorToCursor()}}class _9t extends rt{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:be(803,"Cancel Selection Anchor"),precondition:xW,kbOpts:{kbExpr:J.editorTextFocus,primary:9,weight:100}})}async run(e,t){var n;(n=l0.get(t))==null||n.cancelSelectionAnchor()}}Pn(l0.ID,l0,4);Ke(b9t);Ke(x9t);Ke(v9t);Ke(_9t);const y9t=Z("editorOverviewRuler.bracketMatchForeground","#A0A0A0",S(804,"Overview ruler marker color for matching brackets."));class w9t extends rt{constructor(){super({id:"editor.action.jumpToBracket",label:be(806,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=EC.get(t))==null||n.jumpToBracket()}}class C9t extends rt{constructor(){super({id:"editor.action.selectToBracket",label:be(807,"Select to Bracket"),precondition:void 0,metadata:{description:be(808,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var r;let s=!0;n&&n.selectBrackets===!1&&(s=!1),(r=EC.get(t))==null||r.selectToBracket(s)}}class S9t extends rt{constructor(){super({id:"editor.action.removeBrackets",label:be(809,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){var n;(n=EC.get(t))==null||n.removeBrackets(this.id)}}class k9t{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}const mv=class mv extends se{static get(e){return e.getContribution(mv.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new pi(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{const s=n.getStartPosition(),r=e.bracketPairs.matchBracket(s);let o=null;if(r)r[0].containsPosition(s)&&!r[1].containsPosition(s)?o=r[1].getStartPosition():r[1].containsPosition(s)&&(o=r[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(s);if(a)o=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(s);l&&l.range&&(o=l.range.getStartPosition())}}return o?new st(o.lineNumber,o.column,o.lineNumber,o.column):new st(s.lineNumber,s.column,s.lineNumber,s.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(s=>{const r=s.getStartPosition();let o=t.bracketPairs.matchBracket(r);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(r),!o)){const c=t.bracketPairs.findNextBracket(r);c&&c.range&&(o=t.bracketPairs.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(o){o.sort(z.compareRangesUsingStarts);const[c,u]=o;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?u.getEndPosition():u.getStartPosition(),u.containsPosition(r)){const h=a;a=l,l=h}}a&&l&&n.push(new st(a.lineNumber,a.column,l.lineNumber,l.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const s=n.getPosition();let r=t.bracketPairs.matchBracket(s);r||(r=t.bracketPairs.findEnclosingBrackets(s)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const s=n.brackets;s&&(e[t++]={range:s[0],options:n.options},e[t++]={range:s[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),n=t.getVersionId();let s=[];this._lastVersionId===n&&(s=this._lastBracketsData);const r=[];let o=0;for(let h=0,g=e.length;h1&&r.sort(te.compare);const a=[];let l=0,c=0;const u=s.length;for(let h=0,g=r.length;h0&&(t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop())}}Ke(D9t);const T9t=ln("productService");function zae(i,e){return{id:e,asString:async()=>i,asFile:()=>{},value:typeof i=="string"?i:void 0}}function I9t(i,e,t,n){const s={id:aS(),name:i,uri:e,data:t};return{id:n,asString:async()=>"",asFile:()=>s,value:void 0}}class HMe{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return En.some(this,([n,s])=>s.asFile())&&t.push("files"),WMe($6(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))==null?void 0:t[0]}append(e,t){const n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const n of t)yield[e,n]}toKey(e){return $6(e)}}function $6(i){return i.toLowerCase()}function E0e(i,e){return WMe($6(i),e.map($6))}function WMe(i,e){if(i==="*/*")return e.length>0;if(e.includes(i))return!0;const t=i.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[n,s,r]=t;return r==="*"?e.some(o=>o.startsWith(s+"/")):!1}const vW=Object.freeze({create:i=>qb(i.map(e=>e.toString())).join(`\r +`),split:i=>i.split(`\r +`),parse:i=>vW.split(i).filter(e=>!e.startsWith("#"))}),Mf=class Mf{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+Mf.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new Mf((this.value?[this.value,...e]:e).join(Mf.sep))}};Mf.sep=".",Mf.None=new Mf("@@none@@"),Mf.Empty=new Mf("");let Bs=Mf;const A9t={ctrlCmd:!1,alt:!1};var JR;(function(i){i[i.Blur=1]="Blur",i[i.Gesture=2]="Gesture",i[i.Other=3]="Other"})(JR||(JR={}));var xg;(function(i){i[i.NONE=0]="NONE",i[i.FIRST=1]="FIRST",i[i.SECOND=2]="SECOND",i[i.LAST=3]="LAST"})(xg||(xg={}));var ss;(function(i){i[i.First=1]="First",i[i.Second=2]="Second",i[i.Last=3]="Last",i[i.Next=4]="Next",i[i.Previous=5]="Previous",i[i.NextPage=6]="NextPage",i[i.PreviousPage=7]="PreviousPage",i[i.NextSeparator=8]="NextSeparator",i[i.PreviousSeparator=9]="PreviousSeparator"})(ss||(ss={}));var q6;(function(i){i[i.Title=1]="Title",i[i.Inline=2]="Inline",i[i.Input=3]="Input"})(q6||(q6={}));const Wa=ln("quickInputService"),L0e={EDITORS:"CodeEditors",FILES:"CodeFiles"};class R9t{}const M9t={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Hs.add(M9t.DragAndDropContribution,new R9t);const y2=class y2{constructor(){}static getInstance(){return y2.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};y2.INSTANCE=new y2;let nZ=y2;function VMe(i){var e,t,n,s;if(Vg&&typeof((t=(e=globalThis.vscode)==null?void 0:e.webUtils)==null?void 0:t.getPathForFile)=="function")return(s=(n=globalThis.vscode)==null?void 0:n.webUtils)==null?void 0:s.getPathForFile(i)}function zMe(i){const e=new HMe;for(const t of i.items){const n=t.type;if(t.kind==="string"){const s=new Promise(r=>t.getAsString(r));e.append(n,zae(s))}else if(t.kind==="file"){const s=t.getAsFile();s&&e.append(n,P9t(s))}}return e}function P9t(i){const e=VMe(i),t=e?kt.parse(e):void 0;return I9t(i.name,t,async()=>new Uint8Array(await i.arrayBuffer()))}const O9t=Object.freeze([L0e.EDITORS,L0e.FILES,CC.RESOURCES,CC.INTERNAL_URI_LIST]);function UMe(i,e=!1){const t=zMe(i),n=t.get(CC.INTERNAL_URI_LIST);if(n)t.replace(dr.uriList,n);else if(e||!t.has(dr.uriList)){const s=[];for(const r of i.items){const o=r.getAsFile();if(o){const a=VMe(o);try{a?s.push(kt.file(a).toString()):s.push(kt.parse(o.name,!0).toString())}catch{}}}s.length&&t.replace(dr.uriList,zae(vW.create(s)))}for(const s of O9t)t.delete(s);return t}const aO=ln("IWorkspaceEditService");class Uae{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(y_.is(t))return y_.lift(t);if(aE.is(t))return aE.lift(t);throw new Error("Unsupported edit")})}}class y_ extends Uae{static is(e){return e instanceof y_?!0:no(e)&&kt.isUri(e.resource)&&no(e.textEdit)}static lift(e){return e instanceof y_?e:new y_(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,n=void 0,s){super(s),this.resource=e,this.textEdit=t,this.versionId=n}}class aE extends Uae{static is(e){return e instanceof aE?!0:no(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof aE?e:new aE(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,n={},s){super(s),this.oldResource=e,this.newResource=t,this.options=n}}const $ae=ln("IEditorCancelService"),$Me=new Ze("cancellableOperation",!1,S(939,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));wn($ae,class{constructor(){this._tokens=new WeakMap}add(i,e){let t=this._tokens.get(i);t||(t=i.invokeWithinContext(s=>{const r=$Me.bindTo(s.get(Bt)),o=new ll;return{key:r,tokens:o}}),this._tokens.set(i,t));let n;return t.key.set(!0),n=t.tokens.push(e),()=>{n&&(n(),t.key.set(!t.tokens.isEmpty()),n=void 0)}}cancel(i){const e=this._tokens.get(i);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class j9t extends vs{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(n=>n.get($ae).add(e,this))}dispose(){this._unregister(),super.dispose()}}Xe(new class extends ao{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:$Me})}runEditorCommand(i,e){i.get($ae).cancel(e)}});let qMe=class iZ{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){const n=e.getModel();this.modelVersionId=n?gC("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof iZ))return!1;const t=e;return!(this.modelVersionId!==t.modelVersionId||this.scrollLeft!==t.scrollLeft||this.scrollTop!==t.scrollTop||!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position)||!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new iZ(e,this.flags))}};class ex extends j9t{constructor(e,t,n,s){super(e,s),this._listener=new _e,t&4&&this._listener.add(e.onDidChangeCursorPosition(r=>{(!n||!z.containsPosition(n,r.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(r=>{(!n||!z.containsRange(n,r.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(r=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(r=>this.cancel())),this._listener.add(e.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class qae extends vs{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}var F9t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},B9t=function(i,e){return function(t,n){e(t,n,i)}};const H9t=qt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:lIe,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),b9=class b9 extends se{constructor(e,t,n,s,r){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(s),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Oe(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=Oe("span.icon");this.domNode.append(t),t.classList.add(...Tt.asClassNameArray(Ee.loading),"codicon-modifier-spin");const n=()=>{const s=this.editor.getOption(75);this.domNode.style.height=`${s}px`,this.domNode.style.width=`${Math.ceil(.8*s)}px`};n(),this._register(this.editor.onDidChangeConfiguration(s=>{(s.hasChanged(61)||s.hasChanged(75))&&n()})),this._register(de(this.domNode,Fe.CLICK,s=>{this.delegate.cancel()}))}getId(){return b9.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};b9.baseId="editor.widget.inlineProgressWidget";let sZ=b9,K6=class extends se{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Zn),this._currentWidget=this._register(new Zn),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,n,s,r){const o=this._operationIdPool++;this._currentOperation=o,this.clear(),this._showPromise.value=zb(()=>{const a=z.fromPositions(e);this._currentDecorations.set([{range:a,options:H9t}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(sZ,this.id,this._editor,a,t,s))},r??this._showDelay);try{return await n}finally{this._currentOperation===o&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};K6=F9t([B9t(2,ft)],K6);const px=ln("openerService");function W9t(i,e){return i.with({fragment:`${e.startLineNumber},${e.startColumn}${e.endLineNumber?`-${e.endLineNumber}${e.endColumn?`,${e.endColumn}`:""}`:""}`})}function V9t(i){let e;const t=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(i.fragment);return t&&(e={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1,endLineNumber:t[4]?parseInt(t[4]):void 0,endColumn:t[4]?t[5]?parseInt(t[5]):1:void 0},i=i.with({fragment:""})),{selection:e,uri:i}}var z9t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},U9t=function(i,e){return function(t,n){e(t,n,i)}};const Zh=ln("markdownRendererService");let rZ=class{constructor(e){this._openerService=e}render(e,t,n){const s={...t};s.actionHandler||(s.actionHandler=(o,a)=>KMe(this._openerService,o,a.isTrusted)),s.codeBlockRenderer||(s.codeBlockRenderer=(o,a)=>{var l;return((l=this._defaultCodeBlockRenderer)==null?void 0:l.renderCodeBlock(o,a,s??{}))??Promise.resolve(document.createElement("span"))});const r=tO(e,s,n);return r.element.classList.add("rendered-markdown"),r}setDefaultCodeBlockRenderer(e){this._defaultCodeBlockRenderer=e}};rZ=z9t([U9t(0,px)],rZ);async function KMe(i,e,t,n){try{return await i.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:$9t(t),skipValidation:n})}catch(s){return zt(s),!1}}function $9t(i){return i===!0?!0:i&&Array.isArray(i.enabledCommands)?i.enabledCommands:!1}wn(Zh,rZ,1);var q9t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},D0e=function(i,e){return function(t,n){e(t,n,i)}},bj,E_;let Kc=(E_=class{static get(e){return e.getContribution(bj.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Zn,this._messageListeners=new _e,this._mouseOverMessage=!1,this._editor=e,this._visible=bj.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if($l(Ib(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),Ib(e)){const s=this._messageListeners.add(tO(e,{actionHandler:(r,o)=>{this.closeMessage(),KMe(this._openerService,r,o.isTrusted)}}));this._messageWidget.value=new Pq(this._editor,t,s.element)}else this._messageWidget.value=new Pq(this._editor,t,e);this._messageListeners.add(He.debounce(this._editor.onDidBlurEditorText,(s,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&xo(so(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(de(this._messageWidget.value.getDomNode(),Fe.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(de(this._messageWidget.value.getDomNode(),Fe.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(s=>{s.target.position&&(n?n.containsPosition(s.target.position)||this.closeMessage():n=new z(t.lineNumber-3,1,s.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Pq.fadeOut(this._messageWidget.value))}},bj=E_,E_.ID="editor.contrib.messageController",E_.MESSAGE_VISIBLE=new Ze("messageVisible",!1,S(1287,"Whether the editor is currently showing an inline message")),E_);Kc=bj=q9t([D0e(1,Bt),D0e(2,px)],Kc);const K9t=ao.bindToContribution(Kc.get);Xe(new K9t({id:"leaveEditorMessage",precondition:Kc.MESSAGE_VISIBLE,handler:i=>i.closeMessage(),kbOpts:{weight:130,primary:9}}));let Pq=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},s){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);const o=document.createElement("div");typeof s=="string"?(o.classList.add("message"),o.textContent=s):(s.classList.add("message"),o.appendChild(s)),this._domNode.appendChild(o);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Pn(Kc.ID,Kc,4);class G9t{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const n=this._value.charCodeAt(t);if(!(n===47||this._splitOnBackslash&&n===92))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new lE(new X9t(e,t))}static forStrings(){return new lE(new G9t)}static forConfigKeys(){return new lE(new Y9t)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const n=this._iter.reset(e);let s;this._root||(this._root=new U3,this._root.segment=n.value());const r=[];for(s=this._root;;){const a=n.cmp(s.segment);if(a>0)s.left||(s.left=new U3,s.left.segment=n.value()),r.push([-1,s]),s=s.left;else if(a<0)s.right||(s.right=new U3,s.right.segment=n.value()),r.push([1,s]),s=s.right;else if(n.hasNext())n.next(),s.mid||(s.mid=new U3,s.mid.segment=n.value()),r.push([0,s]),s=s.mid;else break}const o=Om.unwrap(s.value);s.value=Om.wrap(t),s.key=e;for(let a=r.length-1;a>=0;a--){const l=r[a][1];l.updateHeight();const c=l.balanceFactor();if(c<-1||c>1){const u=r[a][0],h=r[a+1][0];if(u===1&&h===1)r[a][1]=l.rotateLeft();else if(u===-1&&h===-1)r[a][1]=l.rotateRight();else if(u===1&&h===-1)l.right=r[a+1][1]=r[a+1][1].rotateRight(),r[a][1]=l.rotateLeft();else if(u===-1&&h===1)l.left=r[a+1][1]=r[a+1][1].rotateLeft(),r[a][1]=l.rotateRight();else throw new Error;if(a>0)switch(r[a-1][0]){case-1:r[a-1][1].left=r[a][1];break;case 1:r[a-1][1].right=r[a][1];break;case 0:r[a-1][1].mid=r[a][1];break}else this._root=r[0][1]}}return o}get(e){var t;return Om.unwrap((t=this._getNode(e))==null?void 0:t.value)}_getNode(e){const t=this._iter.reset(e);let n=this._root;for(;n;){const s=t.cmp(n.segment);if(s>0)n=n.left;else if(s<0)n=n.right;else if(t.hasNext())t.next(),n=n.mid;else break}return n}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const n=this._iter.reset(e),s=[];let r=this._root;for(;r;){const o=n.cmp(r.segment);if(o>0)s.push([-1,r]),r=r.left;else if(o<0)s.push([1,r]),r=r.right;else if(n.hasNext())n.next(),s.push([0,r]),r=r.mid;else break}if(r){if(t?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const o=[[1,r]],a=this._min(r.right,o);if(a.key){r.key=a.key,r.value=a.value,r.segment=a.segment;const l=a.right;if(o.length>1){const[u,h]=o[o.length-1];switch(u){case-1:h.left=l;break;case 0:eR(!1);case 1:eR(!1)}}else r.right=l;const c=this._balanceByStack(o);if(s.length>0){const[u,h]=s[s.length-1];switch(u){case-1:h.left=c;break;case 0:h.mid=c;break;case 1:h.right=c;break}}else this._root=c}}else{const o=r.left??r.right;if(s.length>0){const[a,l]=s[s.length-1];switch(a){case-1:l.left=o;break;case 0:l.mid=o;break;case 1:l.right=o;break}}else this._root=o}this._root=this._balanceByStack(s)??this._root}}_min(e,t){for(;e.left;)t.push([-1,e]),e=e.left;return e}_balanceByStack(e){for(let t=e.length-1;t>=0;t--){const n=e[t][1];n.updateHeight();const s=n.balanceFactor();if(s>1?(n.right.balanceFactor()>=0||(n.right=n.right.rotateRight()),e[t][1]=n.rotateLeft()):s<-1&&(n.left.balanceFactor()<=0||(n.left=n.left.rotateLeft()),e[t][1]=n.rotateRight()),t>0)switch(e[t-1][0]){case-1:e[t-1][1].left=e[t][1];break;case 1:e[t-1][1].right=e[t][1];break;case 0:e[t-1][1].mid=e[t][1];break}else return e[0][1]}}findSubstr(e){const t=this._iter.reset(e);let n=this._root,s;for(;n;){const r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else if(t.hasNext())t.next(),s=Om.unwrap(n.value)||s,n=n.mid;else break}return n&&Om.unwrap(n.value)||s}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const n=this._iter.reset(e);let s=this._root;for(;s;){const r=n.cmp(s.segment);if(r>0)s=s.left;else if(r<0)s=s.right;else if(n.hasNext())n.next(),s=s.mid;else return s.mid?this._entries(s.mid):t?Om.unwrap(s.value):void 0}}forEach(e){for(const[t,n]of this)e(n,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value!==void 0&&t.push([e.key,Om.unwrap(e.value)]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}const tx=ln("contextService");function oZ(i){const e=i;return typeof(e==null?void 0:e.id)=="string"&&kt.isUri(e.uri)}function Z9t(i){const e=i;return typeof(e==null?void 0:e.id)=="string"&&!oZ(i)&&!tHt(i)}const J9t={id:"empty-window"};function eHt(i,e){if(typeof i=="string"||typeof i>"u")return typeof i=="string"?{id:Eb(i)}:J9t;const t=i;return t.configuration?{id:t.id,configPath:t.configuration}:t.folders.length===1?{id:t.id,uri:t.folders[0].uri}:{id:t.id}}function tHt(i){const e=i;return typeof(e==null?void 0:e.id)=="string"&&kt.isUri(e.configPath)}class nHt{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const aZ="code-workspace";S(2050,"Code Workspace");const GMe="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function iHt(i){return i.id===GMe}var Kae=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},eM=function(i,e){return function(t,n){e(t,n,i)}};class Gae{constructor(e){this.copyMimeTypes=[],this.kind=e,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(e,t,n,s,r){const o=await this.getEdit(n,r);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,n,s){const r=await this.getEdit(n,s);if(r)return{edits:[{insertText:r.insertText,title:r.title,kind:r.kind,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}],dispose(){}}}}const x9=class x9 extends Gae{constructor(){super(Bs.Empty.append("text","plain")),this.id=x9.id,this.dropMimeTypes=[dr.text],this.pasteMimeTypes=[dr.text]}async getEdit(e,t){const n=e.get(dr.text);if(!n||e.has(dr.uriList))return;const s=await n.asString();return{handledMimeType:dr.text,title:S(926,"Insert Plain Text"),insertText:s,kind:this.kind}}};x9.id="text";let LC=x9;class YMe extends Gae{constructor(){super(Bs.Empty.append("uri","path","absolute")),this.dropMimeTypes=[dr.uriList],this.pasteMimeTypes=[dr.uriList]}async getEdit(e,t){const n=await QMe(e);if(!n.length||t.isCancellationRequested)return;let s=0;const r=n.map(({uri:a,originalText:l})=>a.scheme===Ot.file?a.fsPath:(s++,l)).join(" ");let o;return s>0?o=n.length>1?S(927,"Insert Uris"):S(928,"Insert Uri"):o=n.length>1?S(929,"Insert Paths"):S(930,"Insert Path"),{handledMimeType:dr.uriList,insertText:r,title:o,kind:this.kind}}}let G6=class extends Gae{constructor(e){super(Bs.Empty.append("uri","path","relative")),this._workspaceContextService=e,this.dropMimeTypes=[dr.uriList],this.pasteMimeTypes=[dr.uriList]}async getEdit(e,t){const n=await QMe(e);if(!n.length||t.isCancellationRequested)return;const s=ef(n.map(({uri:r})=>{const o=this._workspaceContextService.getWorkspaceFolder(r);return o?YDt(o.uri,r):void 0}));if(s.length)return{handledMimeType:dr.uriList,insertText:s.join(" "),title:n.length>1?S(931,"Insert Relative Paths"):S(932,"Insert Relative Path"),kind:this.kind}}};G6=Kae([eM(0,tx)],G6);class sHt{constructor(){this.kind=new Bs("html"),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:dr.text}]}async provideDocumentPasteEdits(e,t,n,s,r){var l;if(s.triggerKind!==DR.PasteAs&&!((l=s.only)!=null&&l.contains(this.kind)))return;const o=n.get("text/html"),a=await(o==null?void 0:o.asString());if(!(!a||r.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:S(933,"Insert HTML"),kind:this.kind}]}}}async function QMe(i){const e=i.get(dr.uriList);if(!e)return[];const t=await e.asString(),n=[];for(const s of vW.parse(t))try{n.push({uri:kt.parse(s),originalText:s})}catch{}return n}const C1={scheme:"*",hasAccessToAllModels:!0};let lZ=class extends se{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(C1,new LC)),this._register(e.documentDropEditProvider.register(C1,new YMe)),this._register(e.documentDropEditProvider.register(C1,new G6(t)))}};lZ=Kae([eM(0,lt),eM(1,tx)],lZ);let cZ=class extends se{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(C1,new LC)),this._register(e.documentPasteEditProvider.register(C1,new YMe)),this._register(e.documentPasteEditProvider.register(C1,new G6(t))),this._register(e.documentPasteEditProvider.register(C1,new sHt))}};cZ=Kae([eM(0,lt),eM(1,tx)],cZ);const ph=class ph{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,n=this.value.charCodeAt(e),s;if(s=ph._table[n],typeof s=="number")return this.pos+=1,{type:s,pos:e,len:1};if(ph.isDigitCharacter(n)){s=8;do t+=1,n=this.value.charCodeAt(e+t);while(ph.isDigitCharacter(n));return this.pos+=t,{type:s,pos:e,len:t}}if(ph.isVariableCharacter(n)){s=9;do n=this.value.charCodeAt(e+ ++t);while(ph.isVariableCharacter(n)||ph.isDigitCharacter(n));return this.pos+=t,{type:s,pos:e,len:t}}s=10;do t+=1,n=this.value.charCodeAt(e+t);while(!isNaN(n)&&typeof ph._table[n]>"u"&&!ph.isDigitCharacter(n)&&!ph.isVariableCharacter(n));return this.pos+=t,{type:s,pos:e,len:t}}};ph._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};let dZ=ph;class WD{constructor(){this._children=[]}appendChild(e){return e instanceof jl&&this._children[this._children.length-1]instanceof jl?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:n}=e,s=n.children.indexOf(e),r=n.children.slice(0);r.splice(s,1,...t),n._children=r,(function o(a,l){for(const c of a)c.parent=l,o(c.children,c)})(t,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof lO)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class jl extends WD{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new jl(this.value)}}class XMe extends WD{}class Nu extends XMe{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof VD?this._children[0]:void 0}clone(){const e=new Nu(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class VD extends WD{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof jl&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new VD;return this.options.forEach(e.appendChild,e),e}}class Yae extends WD{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let n=!1,s=e.replace(this.regexp,function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(r=>r instanceof vg&&!!r.elseValue)&&(s=this._replace([])),s}_replace(e){let t="";for(const n of this._children)if(n instanceof vg){let s=e[n.index]||"";s=n.resolve(s),t+=s}else t+=n.toString();return t}toString(){return""}clone(){const e=new Yae;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class vg extends WD{constructor(e,t,n,s){super(),this.index=e,this.shorthandName=t,this.ifValue=n,this.elseValue=s}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((n,s)=>s===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new vg(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class tM extends XMe{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new jl(t)],!0):!1}clone(){const e=new tM(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function T0e(i,e){const t=[...i];for(;t.length>0;){const n=t.shift();if(!e(n))break;t.unshift(...n.children)}}class lO extends WD{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(n){return n instanceof Nu&&(e.push(n),t=!t||t.indexs===e?(n=!0,!1):(t+=s.len(),!0)),n?t:-1}fullLen(e){let t=0;return T0e([e],n=>(t+=n.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:n}=e;for(;n;)n instanceof Nu&&t.push(n),n=n.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof tM&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new lO;return this._children=this.children.map(t=>t.clone()),e}walk(e){T0e(this.children,e)}}class DC{constructor(){this._scanner=new dZ,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,n){const s=new lO;return this.parseFragment(e,s),this.ensureFinalTabstop(s,n??!1,t??!1),s}parseFragment(e,t){const n=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const s=new Map,r=[];t.walk(l=>(l instanceof Nu&&(l.isFinalTabstop?s.set(0,void 0):!s.has(l.index)&&l.children.length>0?s.set(l.index,l.children):r.push(l)),!0));const o=(l,c)=>{const u=s.get(l.index);if(!u)return;const h=new Nu(l.index);h.transform=l.transform;for(const g of u){const f=g.clone();h.appendChild(f),f instanceof Nu&&s.has(f.index)&&!c.has(f.index)&&(c.add(f.index),o(f,c),c.delete(f.index))}t.replace(l,[h])},a=new Set;for(const l of r)o(l,a);return t.children.slice(n)}ensureFinalTabstop(e,t,n){(t||n&&e.placeholders.length>0)&&(e.placeholders.find(r=>r.index===0)||e.appendChild(new Nu(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const n=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const s=this._scanner.next();if(s.type!==0&&s.type!==4&&s.type!==5)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new jl(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Nu(Number(t)):new tM(t)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);const r=new Nu(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new jl("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else if(r.index>0&&this._accept(7)){const o=new VD;for(;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(o),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseChoiceElement(e){const t=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let s;if((s=this._accept(5,!0))?s=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||s:s=this._accept(void 0,!0),!s)return this._backTo(t),!1;n.push(s)}return n.length===0?(this._backTo(t),!1):(e.appendChild(new jl(n.join(""))),!0)}_parseComplexVariable(e){let t;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);const r=new tM(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new jl("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n)}_parseTransform(e){const t=new Yae;let n="",s="";for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(6,!0)||r,n+=r;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let r;if(r=this._accept(5,!0)){r=this._accept(5,!0)||this._accept(6,!0)||r,t.appendChild(new jl(r));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){s+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(n,s)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);const s=this._accept(8,!0);if(s)if(n){if(this._accept(4))return e.appendChild(new vg(Number(s))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new vg(Number(s))),!0;else return this._backTo(t),!1;if(this._accept(6)){const r=this._accept(9,!0);return!r||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new vg(Number(s),r)),!0)}else if(this._accept(11)){const r=this._until(4);if(r)return e.appendChild(new vg(Number(s),void 0,r,void 0)),!0}else if(this._accept(12)){const r=this._until(4);if(r)return e.appendChild(new vg(Number(s),void 0,void 0,r)),!0}else if(this._accept(13)){const r=this._until(1);if(r){const o=this._until(4);if(o)return e.appendChild(new vg(Number(s),void 0,r,o)),!0}}else{const r=this._until(4);if(r)return e.appendChild(new vg(Number(s),void 0,void 0,r)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new jl(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function ZMe(i,e,t){var n,s;return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:((n=t.additionalEdit)==null?void 0:n.edits)??[]}:{edits:[...e.map(r=>new y_(i,{range:r,text:typeof t.insertText=="string"?DC.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...((s=t.additionalEdit)==null?void 0:s.edits)??[]]}}function JMe(i){function e(o,a){return"mimeType"in o?o.mimeType===a.handledMimeType:!!a.kind&&o.kind.contains(a.kind)}const t=new Map;for(const o of i)for(const a of o.yieldTo??[])for(const l of i)if(l!==o&&e(a,l)){let c=t.get(o);c||(c=[],t.set(o,c)),c.push(l)}if(!t.size)return Array.from(i);const n=new Set,s=[];function r(o){if(!o.length)return[];const a=o[0];if(s.includes(a))return console.warn("Yield to cycle detected",a),o;if(n.has(a))return r(o.slice(1));let l=[];const c=t.get(a);return c&&(s.push(a),l=r(c),s.pop()),n.add(a),[...l,a,...r(o.slice(1))]}return r(Array.from(i))}ye.white.toString(),ye.white.toString();const rHt=Object.freeze({allowedTags:{override:["b","i","u","code","span"]},allowedAttributes:{override:["class"]}});class Y6 extends se{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new ie),this._onDidEscape=this._register(new ie),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const n=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,s=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=s||"",this._element.style.backgroundColor=n||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),typeof t.title=="string"&&this.setTitle(t.title),typeof t.ariaLabel=="string"&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this.enabled=!t.disabled,this._register(Ha.addTarget(this._element)),[Fe.CLICK,Zi.Tap].forEach(r=>{this._register(de(this._element,r,o=>{if(!this.enabled){Vn.stop(o);return}this._onDidClick.fire(o)}))}),this._register(de(this._element,Fe.KEY_DOWN,r=>{const o=new ki(r);let a=!1;this.enabled&&(o.equals(3)||o.equals(10))?(this._onDidClick.fire(r),a=!0):o.equals(9)&&(this._onDidEscape.fire(r),this._element.blur(),a=!0),a&&Vn.stop(o,!0)})),this._register(de(this._element,Fe.MOUSE_OVER,r=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register(de(this._element,Fe.MOUSE_OUT,r=>{this.updateBackground(!1)})),this.focusTracker=this._register($u(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let n of v_(e))if(typeof n=="string"){if(n=n.trim(),n==="")continue;const s=document.createElement("span");s.textContent=n,t.push(s)}else t.push(n);return t}updateBackground(e){let t;this.options.secondary?t=e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:t=e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var s;if(this._label===e||Ib(this._label)&&Ib(e)&&hFt(this._label,e))return;this._element.classList.add("monaco-text-button");const t=this.options.supportShortLabel?this._labelElement:this._element;if(Ib(e)){const r=tO(e,void 0,document.createElement("span"));r.dispose();const o=(s=r.element.querySelector("p"))==null?void 0:s.innerHTML;o?nMe(t,o,rHt):vo(t)}else this.options.supportIcons?vo(t,...this.getContentElements(e)):t.textContent=e;let n="";typeof this.options.title=="string"?n=this.options.title:this.options.title&&(n=A6t(e)),this.setTitle(n),this._setAriaLabel(),this._label=e}get label(){return this._label}_setAriaLabel(){typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):typeof this.options.title=="string"&&this._element.setAttribute("aria-label",this.options.title)}set icon(e){this._setAriaLabel();const t=Array.from(this._element.classList).filter(n=>n.startsWith("codicon-"));this._element.classList.remove(...t),this._element.classList.add(...Tt.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){!this._hover&&e!==""?this._hover=this._register(Xh().setupManagedHover(this.options.hoverDelegate??$p("element"),this._element,e)):this._hover&&this._hover.update(e)}}function Oq(i,e){return e&&(i.stack||i.stacktrace)?S(29,"{0}: {1}",A0e(i),I0e(i.stack)||I0e(i.stacktrace)):A0e(i)}function I0e(i){return Array.isArray(i)?i.join(` +`):i}function A0e(i){return i.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${i.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof i.code=="string"&&typeof i.errno=="number"&&typeof i.syscall=="string"?S(30,"A system error occurred ({0})",i.message):i.message||S(31,"An unknown error occurred. Please consult the log for more details.")}function Q6(i=null,e=!1){if(!i)return S(32,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(i)){const t=ef(i),n=Q6(t[0],e);return t.length>1?S(33,"{0} ({1} errors in total)",n,t.length):n}if(bo(i))return i;if(i.detail){const t=i.detail;if(t.error)return Oq(t.error,e);if(t.exception)return Oq(t.exception,e)}return i.stack?Oq(i,e):i.message?i.message:S(34,"An unknown error occurred. Please consult the log for more details.")}const $3=Oe,oHt={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class zD extends se{constructor(e,t,n){super(),this.os=t,this.keyElements=new Set,this.options=n||Object.create(null);const s=this.options.keybindingLabelForeground;this.domNode=De(e,$3(".monaco-keybinding")),s&&(this.domNode.style.color=s),this.hover=this._register(Xh().setupManagedHover($p("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}set(e,t){this.didEverRender&&this.keybinding===e&&zD.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){const e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let n=1;n=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},xj=function(i,e){return function(t,n){e(t,n,i)}};const tPe="acceptSelectedCodeAction",nPe="previewSelectedCodeAction";class aHt{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var s;n.text.textContent=((s=e.group)==null?void 0:s.title)??e.label??""}disposeTemplate(e){}}class lHt{get templateId(){return"separator"}renderTemplate(e){e.classList.add("separator");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){n.text.textContent=e.label??""}disposeTemplate(e){}}let uZ=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const n=document.createElement("span");n.className="title",e.append(n);const s=document.createElement("span");s.className="description",e.append(s);const r=new zD(e,Vc);return{container:e,icon:t,text:n,description:s,keybinding:r}}renderElement(e,t,n){var o,a,l;if((o=e.group)!=null&&o.icon?(n.icon.className=Tt.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Pe(e.group.icon.color.id))):(n.icon.className=Tt.asClassName(Ee.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;cDt(!e.hideIcon,n.icon),n.text.textContent=X6(e.label),e.keybinding?(n.description.textContent=e.keybinding.getLabel(),n.description.style.display="inline",n.description.style.letterSpacing="0.5px"):e.description?(n.description.textContent=X6(e.description),n.description.style.display="inline"):(n.description.textContent="",n.description.style.display="none");const s=(a=this._keybindingService.lookupKeybinding(tPe))==null?void 0:a.getLabel(),r=(l=this._keybindingService.lookupKeybinding(nPe))==null?void 0:l.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.tooltip?n.container.title=e.tooltip:e.disabled?n.container.title=e.label:s&&r?this._supportsPreview&&e.canPreview?n.container.title=S(1653,"{0} to Apply, {1} to Preview",s,r):n.container.title=S(1654,"{0} to Apply",s):n.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};uZ=ePe([xj(1,zn)],uZ);class cHt extends UIEvent{constructor(){super("acceptSelectedAction")}}class R0e extends UIEvent{constructor(){super("previewSelectedAction")}}function dHt(i){if(i.kind==="action")return i.label}let hZ=class extends se{constructor(e,t,n,s,r,o,a,l){super(),this._delegate=s,this._contextViewService=o,this._keybindingService=a,this._layoutService=l,this._actionLineHeight=28,this._headerLineHeight=28,this._separatorLineHeight=8,this.cts=this._register(new vs),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const c={getHeight:u=>{switch(u.kind){case"header":return this._headerLineHeight;case"separator":return this._separatorLineHeight;default:return this._actionLineHeight}},getTemplateId:u=>u.kind};this._list=this._register(new Jd(e,this.domNode,c,[new uZ(t,this._keybindingService),new aHt,new lHt],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:dHt},accessibilityProvider:{getAriaLabel:u=>{if(u.kind==="action"){let h=u.label?X6(u==null?void 0:u.label):"";return u.description&&(h=h+", "+X6(u.description)),u.disabled&&(h=S(1655,"{0}, Disabled Reason: {1}",h,u.disabled)),h}return null},getWidgetAriaLabel:()=>S(1656,"Action Widget"),getRole:u=>{switch(u.kind){case"action":return"option";case"separator":return"separator";default:return"separator"}},getWidgetRole:()=>"listbox",...r}})),this._list.style(HD),this._register(this._list.onMouseClick(u=>this.onListClick(u))),this._register(this._list.onMouseOver(u=>this.onListHover(u))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(u=>this.onListSelection(u))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(u=>u.kind==="header").length,n=this._allMenuItems.filter(u=>u.kind==="separator").length,o=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight+n*this._separatorLineHeight-n*this._actionLineHeight;this._list.layout(o);let a=e;if(this._allMenuItems.length>=50)a=380;else{const u=this._allMenuItems.map((h,g)=>{const f=this.domNode.ownerDocument.getElementById(this._list.getElementID(g));if(f){f.style.width="auto";const m=f.getBoundingClientRect().width;return f.style.width="",m}return 0});a=Math.max(...u,e)}const c=Math.min(o,this._layoutService.getContainer(xt(this.domNode)).clientHeight*.7);return this._list.layout(c,a),this.domNode.style.height=`${c}px`,this._list.domFocus(),a}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const n=t[0],s=this._list.element(n);if(!this.focusCondition(s))return;const r=e?new R0e:new cHt;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof R0e):this._list.setSelection([])}onFocus(){var s,r;const e=this._list.getFocus();if(e.length===0)return;const t=e[0],n=this._list.element(t);(r=(s=this._delegate).onFocus)==null||r.call(s,n.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const n=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};hZ=ePe([xj(5,fx),xj(6,zn),xj(7,qp)],hZ);function X6(i){return i.replace(/\r\n|\r|\n/g," ")}var uHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},jq=function(i,e){return function(t,n){e(t,n,i)}};Z("actionBar.toggledBackground",MD,S(1657,"Background color for toggled action items in action bar."));const TC={Visible:new Ze("codeActionMenuVisible",!1,S(1658,"Whether the action widget list is visible"))},D0=ln("actionWidgetService");let IC=class extends se{get isVisible(){return TC.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Zn)}show(e,t,n,s,r,o,a,l){const c=TC.Visible.bindTo(this._contextKeyService),u=this._instantiationService.createInstance(hZ,e,t,n,s,l);this._contextViewService.showContextView({getAnchor:()=>r,render:h=>(c.set(!0),this._renderWidget(h,u,a??[])),onHide:h=>{c.reset(),this._onWidgetClosed(h)}},o,!1)}acceptSelected(e){var t;(t=this._list.value)==null||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)==null?void 0:e.value)==null||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)==null?void 0:e.value)==null||t.focusNext()}hide(e){var t;(t=this._list.value)==null||t.hide(e),this._list.clear()}_renderWidget(e,t,n){var f;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,this._list.value)s.appendChild(this._list.value.domNode);else throw new Error("List has no value");const r=new _e,o=document.createElement("div"),a=e.appendChild(o);a.classList.add("context-view-block"),r.add(de(a,Fe.MOUSE_DOWN,m=>m.stopPropagation()));const l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),r.add(de(c,Fe.POINTER_MOVE,()=>c.remove())),r.add(de(c,Fe.MOUSE_DOWN,()=>c.remove()));let u=0;if(n.length){const m=this._createActionBar(".action-widget-action-bar",n);m&&(s.appendChild(m.getContainer().parentElement),r.add(m),u=m.getContainer().offsetWidth)}const h=(f=this._list.value)==null?void 0:f.layout(u);s.style.width=`${h}px`;const g=r.add($u(e));return r.add(g.onDidBlur(()=>this.hide(!0))),r}_createActionBar(e,t){if(!t.length)return;const n=Oe(e),s=new mc(n);return s.push(t,{icon:!1,label:!0}),s}_onWidgetClosed(e){var t;(t=this._list.value)==null||t.hide(e)}};IC=uHt([jq(0,fx),jq(1,Bt),jq(2,ft)],IC);wn(D0,IC,1);const cO=1100;ci(class extends Fo{constructor(){super({id:"hideCodeActionWidget",title:be(1659,"Hide action widget"),precondition:TC.Visible,keybinding:{weight:cO,primary:9,secondary:[1033]}})}run(i){i.get(D0).hide(!0)}});ci(class extends Fo{constructor(){super({id:"selectPrevCodeAction",title:be(1660,"Select previous action"),precondition:TC.Visible,keybinding:{weight:cO,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(i){const e=i.get(D0);e instanceof IC&&e.focusPrevious()}});ci(class extends Fo{constructor(){super({id:"selectNextCodeAction",title:be(1661,"Select next action"),precondition:TC.Visible,keybinding:{weight:cO,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(i){const e=i.get(D0);e instanceof IC&&e.focusNext()}});ci(class extends Fo{constructor(){super({id:tPe,title:be(1662,"Accept selected action"),precondition:TC.Visible,keybinding:{weight:cO,primary:3,secondary:[2137]}})}run(i){const e=i.get(D0);e instanceof IC&&e.acceptSelected()}});ci(class extends Fo{constructor(){super({id:nPe,title:be(1663,"Preview selected action"),precondition:TC.Visible,keybinding:{weight:cO,primary:2051}})}run(i){const e=i.get(D0);e instanceof IC&&e.acceptSelected(!0)}});var iPe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},cE=function(i,e){return function(t,n){e(t,n,i)}},gZ,cw;let fZ=(cw=class extends se{constructor(e,t,n,s,r,o,a,l,c,u,h){super(),this.typeId=e,this.editor=t,this.showCommand=s,this.range=r,this.edits=o,this.onSelectNewEdit=a,this.additionalActions=l,this._keybindingService=u,this._actionWidgetService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(c),this.visibleContext.set(!0),this._register(dt(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(dt((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(g=>{this.dispose()})),this._register(He.runAndSubscribe(u.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var t;const e=(t=this._keybindingService.lookupKeybinding(this.showCommand.id))==null?void 0:t.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=Oe(".post-edit-widget"),this.button=this._register(new Y6(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(de(this.domNode,Fe.CLICK,()=>this.showSelector()))}getId(){return gZ.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){const e=Zs(this.button.element),t={x:e.left+e.width,y:e.top+e.height};this._actionWidgetService.show("postEditWidget",!1,this.edits.allEdits.map((n,s)=>({kind:"action",item:n,label:n.title,disabled:!1,canPreview:!1,group:{title:"",icon:Tt.fromId(s===this.edits.activeEditIndex?Ee.check.id:Ee.blank.id)}})),{onHide:()=>{this.editor.focus()},onSelect:n=>{this._actionWidgetService.hide(!1);const s=this.edits.allEdits.findIndex(r=>r===n);if(s!==this.edits.activeEditIndex)return this.onSelectNewEdit(s)}},t,this.editor.getDomNode()??void 0,this.additionalActions)}},gZ=cw,cw.baseId="editor.widget.postEditWidget",cw);fZ=gZ=iPe([cE(8,Bt),cE(9,zn),cE(10,D0)],fZ);let Z6=class extends se{constructor(e,t,n,s,r,o,a,l){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=s,this._getAdditionalActions=r,this._instantiationService=o,this._bulkEditService=a,this._notificationService=l,this._currentWidget=this._register(new Zn),this._register(He.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,n,s,r){if(!e.length||!this._editor.hasModel())return;const o=this._editor.getModel(),a=t.allEdits.at(t.activeEditIndex);if(!a)return;const l=async _=>{const w=this._editor.getModel();w&&(await w.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:_,allEdits:t.allEdits},n,s,r))},c=(_,w)=>{Zd(_)||(this._notificationService.error(w),n&&this.show(e[0],t,l))},u=new ex(this._editor,3,void 0,r);let h;try{h=await xEt(s(a,u.token),u.token)}catch(_){return c(_,S(937,`Error resolving edit '{0}': +{1}`,a.title,Q6(_)))}finally{u.dispose()}if(r.isCancellationRequested)return;const g=ZMe(o.uri,e,h),f=e[0],m=o.deltaDecorations([],[{range:f,options:{description:"paste-line-suffix",stickiness:0}}]);this._editor.focus();let x,v;try{x=await this._bulkEditService.apply(g,{editor:this._editor,token:r}),v=o.getDecorationRange(m[0])}catch(_){return c(_,S(938,`Error applying edit '{0}': +{1}`,a.title,Q6(_)))}finally{o.deltaDecorations(m,[])}r.isCancellationRequested||n&&x.isApplied&&t.allEdits.length>1&&this.show(v??f,t,l)}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(fZ,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n,this._getAdditionalActions()))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)==null||e.showSelector()}};Z6=iPe([cE(5,ft),cE(6,aO),cE(7,nr)],Z6);var hHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},vm=function(i,e){return function(t,n){e(t,n,i)}},gh;const sPe="editor.changePasteType",gHt="editor.pasteAs.preferences",Qae=new Ze("pasteWidgetVisible",!1,S(917,"Whether the paste widget is showing")),Fq="application/vnd.code.copymetadata";var dw;let nx=(dw=class extends se{static get(e){return e.getContribution(gh.ID)}constructor(e,t,n,s,r,o,a,l,c,u){super(),this._logService=n,this._bulkEditService=s,this._clipboardService=r,this._commandService=o,this._configService=a,this._languageFeaturesService=l,this._quickInputService=c,this._progressService=u,this._editor=e;const h=e.getContainerDomNode();this._register(de(h,"copy",g=>this.handleCopy(g))),this._register(de(h,"cut",g=>this.handleCopy(g))),this._register(de(h,"paste",g=>this.handlePaste(g),!0)),this._pasteProgressManager=this._register(new K6("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(Z6,"pasteIntoEditor",e,Qae,{id:sPe,label:S(918,"Show paste options...")},()=>gh._configureDefaultAction?[gh._configureDefaultAction]:[]))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}async pasteAs(e){this._logService.trace("CopyPasteController.pasteAs"),this._editor.focus();try{this._logService.trace("Before calling editor.action.clipboardPasteAction"),this._pasteAsActionContext={preferred:e},await this._commandService.executeCommand("editor.action.clipboardPasteAction")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(97).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){var v,_,w,k;let t=null;if(e.clipboardData){const[C,E]=U1.getTextData(e.clipboardData),D=E||gp.INSTANCE.get(C);t=(D==null?void 0:D.id)||null,this._logService.trace("CopyPasteController#handleCopy for id : ",t," with text.length : ",C.length)}else this._logService.trace("CopyPasteController#handleCopy");if(!this._editor.hasTextFocus()||((_=(v=this._clipboardService).clearInternalState)==null||_.call(v),!e.clipboardData||!this.isPasteAsEnabled()))return;const n=this._editor.getModel(),s=this._editor.getSelections();if(!n||!(s!=null&&s.length))return;const r=this._editor.getOption(45);let o=s;const a=s.length===1&&s[0].isEmpty();if(a){if(!r)return;o=[new z(o[0].startLineNumber,1,o[0].startLineNumber,1+n.getLineLength(o[0].startLineNumber))]}const l=(w=this._editor._getViewModel())==null?void 0:w.getPlainTextToCopy(s,r,Xo),u={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:a,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(C=>!!C.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:u});return}const g=zMe(e.clipboardData),f=h.flatMap(C=>C.copyMimeTypes??[]),m=t??aS();this.setCopyMetadata(e.clipboardData,{id:m,providerCopyMimeTypes:f,defaultPastePayload:u});const x=h.map(C=>({providerMimeTypes:C.copyMimeTypes,operation:io(E=>C.prepareDocumentPaste(n,o,g,E).catch(D=>{console.error(D)}))}));(k=gh._currentCopyOperation)==null||k.operations.forEach(C=>C.operation.cancel()),gh._currentCopyOperation={handle:m,operations:x}}async handlePaste(e){var c,u,h;if(e.clipboardData){const[g,f]=U1.getTextData(e.clipboardData),m=f||gp.INSTANCE.get(g);this._logService.trace("CopyPasteController#handlePaste for id : ",m==null?void 0:m.id)}else this._logService.trace("CopyPasteController#handlePaste");if(!e.clipboardData||!this._editor.hasTextFocus())return;(c=Kc.get(this._editor))==null||c.closeMessage(),(u=this._currentPasteOperation)==null||u.cancel(),this._currentPasteOperation=void 0;const t=this._editor.getModel(),n=this._editor.getSelections();if(!(n!=null&&n.length)||!t||this._editor.getOption(104)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const s=this.fetchCopyMetadata(e);this._logService.trace("CopyPasteController#handlePaste with metadata : ",s==null?void 0:s.id," and text.length : ",e.clipboardData.getData("text/plain").length);const r=UMe(e.clipboardData);r.delete(Fq);const o=Array.from(e.clipboardData.files).map(g=>g.type),a=[...e.clipboardData.types,...o,...(s==null?void 0:s.providerCopyMimeTypes)??[],dr.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter(g=>{var m,x;const f=(m=this._pasteAsActionContext)==null?void 0:m.preferred;return f&&!this.providerMatchesPreference(g,f)?!1:(x=g.pasteMimeTypes)==null?void 0:x.some(v=>E0e(v,a))});if(!l.length){(h=this._pasteAsActionContext)!=null&&h.preferred&&(this.showPasteAsNoEditMessage(n,this._pasteAsActionContext.preferred),e.preventDefault(),e.stopImmediatePropagation());return}e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,l,n,r,s):this.doPasteInline(l,n,r,s,e)}showPasteAsNoEditMessage(e,t){var s;const n="only"in t?t.only.value:"preferences"in t?t.preferences.length?t.preferences.map(r=>r.value).join(", "):S(919,"empty"):t.providerId;(s=Kc.get(this._editor))==null||s.showMessage(S(920,"No paste edits for '{0}' found",n),e[0].getStartPosition())}doPasteInline(e,t,n,s,r){this._logService.trace("CopyPasteController#doPasteInline");const o=this._editor;if(!o.hasModel())return;const a=new ex(o,3,void 0),l=io(async c=>{const u=this._editor;if(!u.hasModel())return;const h=u.getModel(),g=new _e,f=g.add(new vs(c));g.add(a.token.onCancellationRequested(()=>f.cancel()));const m=f.token;try{if(await this.mergeInDataFromCopy(e,n,s,m),m.isCancellationRequested)return;const x=e.filter(w=>this.isSupportedPasteProvider(w,n));if(!x.length||x.length===1&&x[0]instanceof LC)return this.applyDefaultPasteHandler(n,s,m,r);const v={triggerKind:DR.Automatic},_=await this.getPasteEdits(x,n,h,t,v,m);if(g.add(_),m.isCancellationRequested)return;if(_.edits.length===1&&_.edits[0].provider instanceof LC)return this.applyDefaultPasteHandler(n,s,m,r);if(_.edits.length){const w=u.getOption(97).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:this.getInitialActiveEditIndex(h,_.edits),allEdits:_.edits},w,async(k,C)=>{if(!k.provider.resolveDocumentPasteEdit)return k;const E=k.provider.resolveDocumentPasteEdit(k,C),D=new eS,T=await this._pasteProgressManager.showWhile(t[0].getEndPosition(),S(921,"Resolving paste edit for '{0}'. Click to cancel",k.title),pL(Promise.race([D.p,E]),C),{cancel:()=>D.cancel()},0);return T&&(k.insertText=T.insertText,k.additionalEdit=T.additionalEdit),k},m)}await this.applyDefaultPasteHandler(n,s,m,r)}finally{g.dispose(),this._currentPasteOperation===l&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),S(922,"Running paste handlers. Click to cancel and do basic paste"),l,{cancel:async()=>{l.cancel(),!a.token.isCancellationRequested&&await this.applyDefaultPasteHandler(n,s,a.token,r)}}).finally(()=>{a.dispose()}),this._currentPasteOperation=l}showPasteAsPick(e,t,n,s,r){this._logService.trace("CopyPasteController#showPasteAsPick");const o=io(async a=>{var g;const l=this._editor;if(!l.hasModel())return;const c=l.getModel(),u=new _e,h=u.add(new ex(l,3,void 0,a));try{if(await this.mergeInDataFromCopy(t,s,r,h.token),h.token.isCancellationRequested)return;let f=t.filter(w=>this.isSupportedPasteProvider(w,s,e));e&&(f=f.filter(w=>this.providerMatchesPreference(w,e)));const m={triggerKind:DR.PasteAs,only:e&&"only"in e?e.only:void 0};let x=u.add(await this.getPasteEdits(f,s,c,n,m,h.token));if(h.token.isCancellationRequested)return;if(e&&(x={edits:x.edits.filter(w=>"only"in e?e.only.contains(w.kind):"preferences"in e?e.preferences.some(k=>k.contains(w.kind)):e.providerId===w.provider.id),dispose:x.dispose}),!x.edits.length){e&&this.showPasteAsNoEditMessage(n,e);return}let v;if(e)v=x.edits.at(0);else{const w={id:"editor.pasteAs.default",label:S(923,"Configure default paste action"),edit:void 0},k=await this._quickInputService.pick([...x.edits.map(C=>{var E;return{label:C.title,description:(E=C.kind)==null?void 0:E.value,edit:C}}),...gh._configureDefaultAction?[{type:"separator"},{label:gh._configureDefaultAction.label,edit:void 0}]:[]],{placeHolder:S(924,"Select Paste Action")});if(k===w){(g=gh._configureDefaultAction)==null||g.run();return}v=k==null?void 0:k.edit}if(!v)return;const _=ZMe(c.uri,n,v);await this._bulkEditService.apply(_,{editor:this._editor})}finally{u.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:S(925,"Running paste handlers")},()=>o)}setCopyMetadata(e,t){this._logService.trace("CopyPasteController#setCopyMetadata new id : ",t.id),e.setData(Fq,JSON.stringify(t))}fetchCopyMetadata(e){if(this._logService.trace("CopyPasteController#fetchCopyMetadata"),!e.clipboardData)return;const t=e.clipboardData.getData(Fq);if(t)try{return JSON.parse(t)}catch{return}const[n,s]=U1.getTextData(e.clipboardData);if(s)return{defaultPastePayload:{mode:s.mode,multicursorText:s.multicursorText??null,pasteOnNewLine:!!s.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,n,s){var r;if(this._logService.trace("CopyPasteController#mergeInDataFromCopy with metadata : ",n==null?void 0:n.id),n!=null&&n.id&&((r=gh._currentCopyOperation)==null?void 0:r.handle)===n.id){const o=gh._currentCopyOperation.operations.filter(l=>e.some(c=>c.pasteMimeTypes.some(u=>E0e(u,l.providerMimeTypes)))).map(l=>l.operation),a=await Promise.all(o);if(s.isCancellationRequested)return;for(const l of a.reverse())if(l)for(const[c,u]of l)t.replace(c,u)}if(!t.has(dr.uriList)){const o=await this._clipboardService.readResources();if(s.isCancellationRequested)return;o.length&&t.append(dr.uriList,zae(vW.create(o)))}}async getPasteEdits(e,t,n,s,r,o){const a=new _e,l=await pL(Promise.all(e.map(async u=>{var h,g;try{const f=await((h=u.provideDocumentPasteEdits)==null?void 0:h.call(u,n,s,t,r,o));return f&&a.add(f),(g=f==null?void 0:f.edits)==null?void 0:g.map(m=>({...m,provider:u}))}catch(f){Zd(f)||console.error(f);return}})),o),c=ef(l??[]).flat().filter(u=>!r.only||r.only.contains(u.kind));return{edits:JMe(c),dispose:()=>a.dispose()}}async applyDefaultPasteHandler(e,t,n,s){const r=e.get(dr.text)??e.get("text"),o=await(r==null?void 0:r.asString())??"";if(n.isCancellationRequested)return;const a={clipboardEvent:s,text:o,pasteOnNewLine:(t==null?void 0:t.defaultPastePayload.pasteOnNewLine)??!1,multicursorText:(t==null?void 0:t.defaultPastePayload.multicursorText)??null,mode:null};this._logService.trace("CopyPasteController#applyDefaultPasteHandler for id : ",t==null?void 0:t.id),this._editor.trigger("keyboard","paste",a)}isSupportedPasteProvider(e,t,n){var s;return(s=e.pasteMimeTypes)!=null&&s.some(r=>t.matches(r))?!n||this.providerMatchesPreference(e,n):!1}providerMatchesPreference(e,t){return"only"in t?e.providedPasteEditKinds.some(n=>t.only.contains(n)):"preferences"in t?t.preferences.some(n=>t.preferences.some(s=>s.contains(n))):e.id===t.providerId}getInitialActiveEditIndex(e,t){const n=this._configService.getValue(gHt,{resource:e.uri});for(const s of Array.isArray(n)?n:[]){const r=new Bs(s),o=t.findIndex(a=>r.contains(a.kind));if(o>=0)return o}return 0}},gh=dw,dw.ID="editor.contrib.copyPasteActionController",dw);nx=gh=hHt([vm(1,ft),vm(2,Ji),vm(3,aO),vm(4,ed),vm(5,es),vm(6,Zt),vm(7,lt),vm(8,Wa),vm(9,yRe)],nx);const AC="9_cutcopypaste",fHt=Vg||document.queryCommandSupported("cut"),rPe=Vg||document.queryCommandSupported("copy"),pHt=typeof navigator.clipboard>"u"||bc?document.queryCommandSupported("paste"):!0;function Xae(i){return i.register(),i}const mHt=fHt?Xae(new ED({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Vg?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:ct.MenubarEditMenu,group:"2_ccp",title:S(813,"Cu&&t"),order:1},{menuId:ct.EditorContext,group:AC,title:S(814,"Cut"),when:J.writable,order:1},{menuId:ct.CommandPalette,group:"",title:S(815,"Cut"),order:1},{menuId:ct.SimpleEditorContext,group:AC,title:S(816,"Cut"),when:J.writable,order:1}]})):void 0,bHt=rPe?Xae(new ED({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Vg?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:ct.MenubarEditMenu,group:"2_ccp",title:S(817,"&&Copy"),order:2},{menuId:ct.EditorContext,group:AC,title:S(818,"Copy"),order:2},{menuId:ct.CommandPalette,group:"",title:S(819,"Copy"),order:1},{menuId:ct.SimpleEditorContext,group:AC,title:S(820,"Copy"),order:2}]})):void 0;Ro.appendMenuItem(ct.MenubarEditMenu,{submenu:ct.MenubarCopy,title:be(825,"Copy As"),group:"2_ccp",order:3});Ro.appendMenuItem(ct.EditorContext,{submenu:ct.EditorContextCopy,title:be(826,"Copy As"),group:AC,order:3});Ro.appendMenuItem(ct.EditorContext,{submenu:ct.EditorContextShare,title:be(827,"Share"),group:"11_share",order:-1,when:Ne.and(Ne.notEquals("resourceScheme","output"),J.editorTextFocus)});Ro.appendMenuItem(ct.ExplorerContext,{submenu:ct.ExplorerContextShare,title:be(828,"Share"),group:"11_share",order:-1});const Bq=pHt?Xae(new ED({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Vg?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:ct.MenubarEditMenu,group:"2_ccp",title:S(821,"&&Paste"),order:4},{menuId:ct.EditorContext,group:AC,title:S(822,"Paste"),when:J.writable,order:4},{menuId:ct.CommandPalette,group:"",title:S(823,"Paste"),order:1},{menuId:ct.SimpleEditorContext,group:AC,title:S(824,"Paste"),when:J.writable,order:4}]})):void 0;class xHt extends rt{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:be(829,"Copy with Syntax Highlighting"),precondition:void 0,kbOpts:{kbExpr:J.textInputFocus,primary:0,weight:100}})}run(e,t){const n=e.get(Ji);n.trace("ExecCommandCopyWithSyntaxHighlightingAction#run"),!(!t.hasModel()||!t.getOption(45)&&t.getSelection().isEmpty())&&(EQ.forceCopyWithSyntaxHighlighting=!0,t.focus(),n.trace("ExecCommandCopyWithSyntaxHighlightingAction (before execCommand copy)"),t.getContainerDomNode().ownerDocument.execCommand("copy"),n.trace("ExecCommandCopyWithSyntaxHighlightingAction (after execCommand copy)"),EQ.forceCopyWithSyntaxHighlighting=!1)}}function oPe(i,e){i&&(i.addImplementation(1e4,"code-editor",(t,n)=>{const s=t.get(Ji);s.trace("registerExecCommandImpl (addImplementation code-editor for : ",e,")");const r=t.get(Hn).getFocusedCodeEditor();if(r&&r.hasTextFocus()){const o=r.getOption(45),a=r.getSelection();return a&&a.isEmpty()&&!o||(r.getOption(170)&&e==="cut"?(M0e(r),s.trace("registerExecCommandImpl (before execCommand copy)"),r.getContainerDomNode().ownerDocument.execCommand("copy"),r.trigger(void 0,"cut",void 0),s.trace("registerExecCommandImpl (after execCommand copy)")):(M0e(r),s.trace("registerExecCommandImpl (before execCommand "+e+")"),r.getContainerDomNode().ownerDocument.execCommand(e),s.trace("registerExecCommandImpl (after execCommand "+e+")"))),!0}return!1}),i.addImplementation(0,"generic-dom",(t,n)=>{const s=t.get(Ji);return s.trace("registerExecCommandImpl (addImplementation generic-dom for : ",e,")"),s.trace("registerExecCommandImpl (before execCommand "+e+")"),WP().execCommand(e),s.trace("registerExecCommandImpl (after execCommand "+e+")"),!0}))}function M0e(i){if(i.getOption(170)){const t=Xoe.get(i.getId());t&&t.onWillCopy()}}oPe(mHt,"cut");oPe(bHt,"copy");Bq&&(Bq.addImplementation(1e4,"code-editor",(i,e)=>{const t=i.get(Ji);t.trace("registerExecCommandImpl (addImplementation code-editor for : paste)");const n=i.get(Hn),s=i.get(ed),r=i.get(Ua),o=i.get(T9t),a=n.getFocusedCodeEditor();if(a&&a.hasModel()&&a.hasTextFocus()){if(a.getOption(170)){const h=Xoe.get(a.getId());h&&h.onWillPaste()}const c=_o.create(!0);t.trace("registerExecCommandImpl (before triggerPaste)");const u=s.triggerPaste(oi().vscodeWindowId);return u?(t.trace("registerExecCommandImpl (triggerPaste defined)"),u.then(async()=>{var h;if(t.trace("registerExecCommandImpl (after triggerPaste)"),o.quality!=="stable"){const g=c.elapsed();r.publicLog2("editorAsyncPaste",{duration:g})}return((h=nx.get(a))==null?void 0:h.finishedPaste())??Promise.resolve()})):(t.trace("registerExecCommandImpl (triggerPaste undefined)"),Vp?(t.trace("registerExecCommandImpl (Paste handling on web)"),(async()=>{const h=await s.readText();if(h!==""){const g=gp.INSTANCE.get(h);let f=!1,m=null,x=null;g&&(f=a.getOption(45)&&!!g.isFromEmptySelection,m=typeof g.multicursorText<"u"?g.multicursorText:null,x=g.mode),t.trace("registerExecCommandImpl (clipboardText.length : ",h.length," id : ",g==null?void 0:g.id,")"),a.trigger("keyboard","paste",{text:h,pasteOnNewLine:f,multicursorText:m,mode:x})}})()):!0)}return!1}),Bq.addImplementation(0,"generic-dom",(i,e)=>(i.get(Ji).trace("registerExecCommandImpl (addImplementation generic-dom for : paste)"),i.get(ed).triggerPaste(oi().vscodeWindowId)??!1)));rPe&&Ke(xHt);const _W=Object.freeze({id:"editor",order:5,type:"object",title:S(147,"Editor"),scope:6}),J6={..._W,properties:{"editor.tabSize":{type:"number",default:pa.tabSize,minimum:1,maximum:100,markdownDescription:S(148,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:S(149,'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:pa.insertSpaces,markdownDescription:S(150,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:pa.detectIndentation,markdownDescription:S(151,"Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:pa.trimAutoWhitespace,description:S(152,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:pa.largeFileOptimizations,description:S(153,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[S(154,"Turn off Word Based Suggestions."),S(155,"Only suggest words from the active document."),S(156,"Suggest words from all open documents of the same language."),S(157,"Suggest words from all open documents.")],description:S(158,"Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[S(159,"Semantic highlighting enabled for all color themes."),S(160,"Semantic highlighting disabled for all color themes."),S(161,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:S(162,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:S(163,"Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:S(164,"Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:S(165,"Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:S(166,"Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:S(167,"Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:S(168,"Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `#editor.experimental.preferTreeSitter#` for specific languages will take precedence."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.css":{type:"boolean",default:!1,markdownDescription:S(169,"Controls whether tree sitter parsing should be turned on for css. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for css."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.typescript":{type:"boolean",default:!1,markdownDescription:S(170,"Controls whether tree sitter parsing should be turned on for typescript. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for typescript."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.ini":{type:"boolean",default:!1,markdownDescription:S(171,"Controls whether tree sitter parsing should be turned on for ini. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for ini."),tags:["experimental"],experiment:{mode:"auto"}},"editor.experimental.preferTreeSitter.regex":{type:"boolean",default:!1,markdownDescription:S(172,"Controls whether tree sitter parsing should be turned on for regex. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for regex."),tags:["experimental"],experiment:{mode:"auto"}},"editor.language.brackets":{type:["array","null"],default:null,description:S(173,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:S(174,"The opening bracket character or string sequence.")},{type:"string",description:S(175,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:S(176,"Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:S(177,"The opening bracket character or string sequence.")},{type:"string",description:S(178,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:aa.maxComputationTime,description:S(179,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:aa.maxFileSize,description:S(180,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:aa.renderSideBySide,description:S(181,"Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:aa.renderSideBySideInlineBreakpoint,description:S(182,"If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:aa.useInlineViewWhenSpaceIsLimited,description:S(183,"If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:aa.renderMarginRevertIcon,description:S(184,"When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:aa.renderGutterMenu,description:S(185,"When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:aa.ignoreTrimWhitespace,description:S(186,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:aa.renderIndicators,description:S(187,"Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:aa.diffCodeLens,description:S(188,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:aa.diffWordWrap,markdownEnumDescriptions:[S(189,"Lines will never wrap."),S(190,"Lines will wrap at the viewport width."),S(191,"Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:aa.diffAlgorithm,markdownEnumDescriptions:[S(192,"Uses the legacy diffing algorithm."),S(193,"Uses the advanced diffing algorithm.")]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:aa.hideUnchangedRegions.enabled,markdownDescription:S(194,"Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:aa.hideUnchangedRegions.revealLineCount,markdownDescription:S(195,"Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:aa.hideUnchangedRegions.minimumLineCount,markdownDescription:S(196,"Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:aa.hideUnchangedRegions.contextLineCount,markdownDescription:S(197,"Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:aa.experimental.showMoves,markdownDescription:S(198,"Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:aa.experimental.showEmptyDecorations,description:S(199,"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:aa.experimental.useTrueInlineView,description:S(200,"If enabled and the editor uses the inline view, word changes are rendered inline.")}}};function vHt(i){return typeof i.type<"u"||typeof i.anyOf<"u"}for(const i of rN){const e=i.schema;if(typeof e<"u")if(vHt(e))J6.properties[`editor.${i.name}`]=e;else for(const t in e)Object.hasOwnProperty.call(e,t)&&(J6.properties[t]=e[t])}let q3=null;function aPe(){return q3===null&&(q3=Object.create(null),Object.keys(J6.properties).forEach(i=>{q3[i]=!0})),q3}function _Ht(i){return aPe()[`editor.${i}`]||!1}function yHt(i){return aPe()[`diffEditor.${i}`]||!1}const wHt=Hs.as(tf.Configuration);wHt.registerConfiguration(J6);const ps=new class{constructor(){this.QuickFix=new Bs("quickfix"),this.Refactor=new Bs("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new Bs("notebook"),this.Source=new Bs("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var td;(function(i){i.Refactor="refactor",i.RefactorPreview="refactor preview",i.Lightbulb="lightbulb",i.Default="other (default)",i.SourceAction="source action",i.QuickFix="quick fix action",i.FixAll="fix all",i.OrganizeImports="organize imports",i.AutoFix="auto fix",i.QuickFixHover="quick fix hover window",i.OnSave="save participants",i.ProblemsView="problems view"})(td||(td={}));function CHt(i,e){return!(i.include&&!i.include.intersects(e)||i.excludes&&i.excludes.some(t=>lPe(e,t,i.include))||!i.includeSourceActions&&ps.Source.contains(e))}function SHt(i,e){const t=e.kind?new Bs(e.kind):void 0;return!(i.include&&(!t||!i.include.contains(t))||i.excludes&&t&&i.excludes.some(n=>lPe(t,n,i.include))||!i.includeSourceActions&&t&&ps.Source.contains(t)||i.onlyIncludePreferredActions&&!e.isPreferred)}function lPe(i,e,t){return!(!e.contains(i)||t&&e.contains(t))}class Zf{static fromUser(e,t){return!e||typeof e!="object"?new Zf(t.kind,t.apply,!1):new Zf(Zf.getKindFromUser(e,t.kind),Zf.getApplyFromUser(e,t.apply),Zf.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Bs(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}}class kHt{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}async resolve(e){var t;if((t=this.provider)!=null&&t.resolveCodeAction&&!this.action.edit){let n;try{n=await this.provider.resolveCodeAction(this.action,e)}catch(s){Pr(s)}n&&(this.action.edit=n.edit)}return this}}const cPe="editor.action.codeAction",Zae="editor.action.quickFix",dPe="editor.action.autoFix",uPe="editor.action.refactor",hPe="editor.action.sourceAction",pZ="editor.action.organizeImports",mZ="editor.action.fixAll",NHt=1e3;class $A extends se{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:ul(e.diagnostics)?ul(t.diagnostics)?$A.codeActionsPreferredComparator(e,t):-1:ul(t.diagnostics)?1:$A.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort($A.codeActionsComparator),this.validActions=this.allActions.filter(({action:s})=>!s.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&ps.QuickFix.contains(new Bs(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const P0e={actions:[],documentation:void 0};async function fN(i,e,t,n,s,r){var x;const o=n.filter||{},a={...o,excludes:[...o.excludes||[],ps.Notebook]},l={only:(x=o.include)==null?void 0:x.value,trigger:n.type},c=new qae(e,r),u=n.type===2,h=EHt(i,e,u?a:o),g=new _e,f=h.map(async v=>{const _=setTimeout(()=>s.report(v),1250);try{const w=await v.provideCodeActions(e,t,l,c.token);if(c.token.isCancellationRequested)return w==null||w.dispose(),P0e;w&&g.add(w);const k=((w==null?void 0:w.actions)||[]).filter(E=>E&&SHt(o,E)),C=DHt(v,k,o.include);return{actions:k.map(E=>new kHt(E,v)),documentation:C}}catch(w){if(Zd(w))throw w;return Pr(w),P0e}finally{clearTimeout(_)}}),m=i.onDidChange(()=>{const v=i.all(e);bs(v,h)||c.cancel()});try{const v=await Promise.all(f),_=v.map(C=>C.actions).flat(),w=[...ef(v.map(C=>C.documentation)),...LHt(i,e,n,_)],k=new $A(_,w,g);return g.add(k),k}catch(v){throw g.dispose(),v}finally{m.dispose(),c.dispose()}}function EHt(i,e,t){return i.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(s=>CHt(t,new Bs(s))):!0)}function*LHt(i,e,t,n){var s,r,o;if(e&&n.length)for(const a of i.all(e))a._getAdditionalMenuItems&&(yield*(o=a._getAdditionalMenuItems)==null?void 0:o.call(a,{trigger:t.type,only:(r=(s=t.filter)==null?void 0:s.include)==null?void 0:r.value},n.map(l=>l.action)))}function DHt(i,e,t){if(!i.documentation)return;const n=i.documentation.map(s=>({kind:new Bs(s.kind),command:s.command}));if(t){let s;for(const r of n)r.kind.contains(t)&&(s?s.kind.contains(r.kind)&&(s=r):s=r);if(s)return s==null?void 0:s.command}for(const s of e)if(s.kind){for(const r of n)if(r.kind.contains(new Bs(s.kind)))return r.command}}var n_;(function(i){i.OnSave="onSave",i.FromProblemsView="fromProblemsView",i.FromCodeActions="fromCodeActions",i.FromAILightbulb="fromAILightbulb",i.FromProblemsHover="fromProblemsHover"})(n_||(n_={}));async function THt(i,e,t,n,s=pn.None){var u,h;const r=i.get(aO),o=i.get(es),a=i.get(Ua),l=i.get(nr),c=i.get(hx);if(a.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),c.playSignal(Rl.codeActionTriggered),await e.resolve(s),!s.isCancellationRequested&&!((u=e.action.edit)!=null&&u.edits.length&&!(await r.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==n_.OnSave,showPreview:n==null?void 0:n.preview,reason:Aa.codeAction({kind:e.action.kind,providerId:aW.fromExtensionId((h=e.provider)==null?void 0:h.extensionId)})})).isApplied)){if(e.action.command)try{await o.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(g){const f=IHt(g);l.error(typeof f=="string"?f:S(830,"An unknown error occurred while applying the code action"))}setTimeout(()=>c.playSignal(Rl.codeActionApplied),NHt)}}function IHt(i){return typeof i=="string"?i:i instanceof Error&&typeof i.message=="string"?i.message:void 0}Rn.registerCommand("_executeCodeActionProvider",async function(i,e,t,n,s){if(!(e instanceof kt))throw ju();const{codeActionProvider:r}=i.get(lt),o=i.get(Is).getModel(e);if(!o)throw ju();const a=st.isISelection(t)?st.liftSelection(t):z.isIRange(t)?o.validateRange(t):void 0;if(!a)throw ju();const l=typeof n=="string"?new Bs(n):void 0,c=await fN(r,o,a,{type:1,triggerAction:td.Default,filter:{includeSourceActions:!0,include:l}},Ag.None,pn.None),u=[],h=Math.min(c.validActions.length,typeof s=="number"?s:0);for(let g=0;gg.action)}finally{setTimeout(()=>c.dispose(),100)}});var Fs;(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(Fs||(Fs={}));(function(i){function e(l,c){return c-l}i.compare=e;const t=Object.create(null);t[i.Error]=S(1732,"Error"),t[i.Warning]=S(1733,"Warning"),t[i.Info]=S(1734,"Info");function n(l){return t[l]||""}i.toString=n;const s=Object.create(null);s[i.Error]=S(1735,"Errors"),s[i.Warning]=S(1736,"Warnings"),s[i.Info]=S(1737,"Infos");function r(l){return s[l]||""}i.toStringPlural=r;function o(l){switch(l){case Os.Error:return i.Error;case Os.Warning:return i.Warning;case Os.Info:return i.Info;case Os.Ignore:return i.Hint}}i.fromSeverity=o;function a(l){switch(l){case i.Error:return Os.Error;case i.Warning:return Os.Warning;case i.Info:return Os.Info;case i.Hint:return Os.Ignore}}i.toSeverity=a})(Fs||(Fs={}));var e8;(function(i){function t(s){return n(s,!0)}i.makeKey=t;function n(s,r){const o=[""];return s.source?o.push(s.source.replace("¦","\\¦")):o.push(""),s.code?typeof s.code=="string"?o.push(s.code.replace("¦","\\¦")):o.push(s.code.value.replace("¦","\\¦")):o.push(""),s.severity!==void 0&&s.severity!==null?o.push(Fs.toString(s.severity)):o.push(""),s.message&&r?o.push(s.message.replace("¦","\\¦")):o.push(""),s.startLineNumber!==void 0&&s.startLineNumber!==null?o.push(s.startLineNumber.toString()):o.push(""),s.startColumn!==void 0&&s.startColumn!==null?o.push(s.startColumn.toString()):o.push(""),s.endLineNumber!==void 0&&s.endLineNumber!==null?o.push(s.endLineNumber.toString()):o.push(""),s.endColumn!==void 0&&s.endColumn!==null?o.push(s.endColumn.toString()):o.push(""),o.push(""),o.join("¦")}i.makeKeyOptionalMessage=n})(e8||(e8={}));const Kp=ln("markerService");var AHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},RHt=function(i,e){return function(t,n){e(t,n,i)}},bZ,uw;let xZ=(uw=class{constructor(e){this.keybindingService=e}getResolver(){const e=new ba(()=>this.keybindingService.getKeybindings().filter(t=>bZ.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===pZ?n={kind:ps.SourceOrganizeImports.value}:t.command===mZ&&(n={kind:ps.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...Zf.fromUser(n,{kind:Bs.None,apply:"never"})}}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new Bs(e.kind);return t.filter(s=>s.kind.contains(n)).filter(s=>s.preferred?e.isPreferred:!0).reduceRight((s,r)=>s?s.kind.contains(r.kind)?r:s:r,void 0)}},bZ=uw,uw.codeActionCommands=[uPe,cPe,hPe,pZ,mZ],uw);xZ=bZ=AHt([RHt(0,zn)],xZ);Z("symbolIcon.arrayForeground",_n,S(1495,"The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.booleanForeground",_n,S(1496,"The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},S(1497,"The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.colorForeground",_n,S(1498,"The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.constantForeground",_n,S(1499,"The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},S(1500,"The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},S(1501,"The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},S(1502,"The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},S(1503,"The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},S(1504,"The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.fileForeground",_n,S(1505,"The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.folderForeground",_n,S(1506,"The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},S(1507,"The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},S(1508,"The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.keyForeground",_n,S(1509,"The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.keywordForeground",_n,S(1510,"The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},S(1511,"The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.moduleForeground",_n,S(1512,"The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.namespaceForeground",_n,S(1513,"The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.nullForeground",_n,S(1514,"The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.numberForeground",_n,S(1515,"The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.objectForeground",_n,S(1516,"The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.operatorForeground",_n,S(1517,"The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.packageForeground",_n,S(1518,"The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.propertyForeground",_n,S(1519,"The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.referenceForeground",_n,S(1520,"The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.snippetForeground",_n,S(1521,"The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.stringForeground",_n,S(1522,"The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.structForeground",_n,S(1523,"The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.textForeground",_n,S(1524,"The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.typeParameterForeground",_n,S(1525,"The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.unitForeground",_n,S(1526,"The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Z("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},S(1527,"The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const gPe=Object.freeze({kind:Bs.Empty,title:S(866,"More Actions...")}),MHt=Object.freeze([{kind:ps.QuickFix,title:S(867,"Quick Fix")},{kind:ps.RefactorExtract,title:S(868,"Extract"),icon:Ee.wrench},{kind:ps.RefactorInline,title:S(869,"Inline"),icon:Ee.wrench},{kind:ps.RefactorRewrite,title:S(870,"Rewrite"),icon:Ee.wrench},{kind:ps.RefactorMove,title:S(871,"Move"),icon:Ee.wrench},{kind:ps.SurroundWith,title:S(872,"Surround With"),icon:Ee.surroundWith},{kind:ps.Source,title:S(873,"Source Action"),icon:Ee.symbolFile},gPe]);function PHt(i,e,t){if(!e)return i.map(r=>{var o;return{kind:"action",item:r,group:gPe,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title,canPreview:!!((o=r.action.edit)!=null&&o.edits.length)}});const n=MHt.map(r=>({group:r,actions:[]}));for(const r of i){const o=r.action.kind?new Bs(r.action.kind):Bs.None;for(const a of n)if(a.group.kind.contains(o)){a.actions.push(r);break}}const s=[];for(const r of n)if(r.actions.length){s.push({kind:"header",group:r.group});for(const o of r.actions){const a=r.group;s.push({kind:"action",item:o,group:o.action.isAI?{title:a.title,kind:a.kind,icon:Ee.sparkle}:a,label:o.action.title,disabled:!!o.action.disabled,keybinding:t(o.action)})}}return s}const fPe=new Ze("supportedCodeAction",""),O0e="_typescript.applyFixAllCodeAction";class OHt extends se{constructor(e,t,n,s=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=s,this._autoTriggerTimer=this._register(new Yc),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>J_(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:td.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(e.type===1)return t;const n=this._editor.getOption(73).enabled;if(n!==wh.Off){{if(n===wh.On)return t;if(n===wh.OnCode){if(!t.isEmpty())return t;const r=this._editor.getModel(),{lineNumber:o,column:a}=t.getPosition(),l=r.getLineContent(o);if(l.length===0)return;if(a===1){if(/\s/.test(l[0]))return}else if(a===r.getLineMaxColumn(o)){if(/\s/.test(l[l.length-1]))return}else if(/\s/.test(l[a-2])&&/\s/.test(l[a-1]))return}}return t}}}var qy;(function(i){i.Empty={type:0};class e{constructor(n,s,r){this.trigger=n,this.position=s,this._cancellablePromise=r,this.type=1,this.actions=r.catch(o=>{if(Zd(o))return vZ;throw o})}cancel(){this._cancellablePromise.cancel()}}i.Triggered=e})(qy||(qy={}));const vZ=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class jHt extends se{constructor(e,t,n,s,r,o){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._configurationService=o,this._codeActionOracle=this._register(new Zn),this._state=qy.Empty,this._onDidChangeState=this._register(new ie),this.onDidChangeState=this._onDidChangeState.event,this.codeActionsDisposable=this._register(new Zn),this._disposed=!1,this._supportedCodeActions=fPe.bindTo(s),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(73)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(qy.Empty,!0))}_settingEnabledNearbyQuickfixes(){var t;const e=(t=this._editor)==null?void 0:t.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e==null?void 0:e.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(qy.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(104)){const t=this._registry.all(e).flatMap(n=>n.providedCodeActionKinds??[]);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new OHt(this._editor,this._markerService,n=>{var l;if(!n){this.setState(qy.Empty);return}const s=n.selection.getStartPosition(),r=io(async c=>{var h,g,f,m,x,v,_,w,k,C;if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===td.QuickFix||(g=(h=n.trigger.filter)==null?void 0:h.include)!=null&&g.contains(ps.QuickFix))){const E=await fN(this._registry,e,n.selection,n.trigger,Ag.None,c);this.codeActionsDisposable.value=E;const D=[...E.allActions];if(c.isCancellationRequested)return E.dispose(),vZ;const T=(f=E.validActions)==null?void 0:f.some(R=>R.action.kind&&ps.QuickFix.contains(new Bs(R.action.kind))&&!R.action.isAI),I=this._markerService.read({resource:e.uri});if(T){for(const R of E.validActions)(x=(m=R.action.command)==null?void 0:m.arguments)!=null&&x.some(P=>typeof P=="string"&&P.includes(O0e))&&(R.action.diagnostics=[...I.filter(P=>P.relatedInformation)]);return{validActions:E.validActions,allActions:D,documentation:E.documentation,hasAutoFix:E.hasAutoFix,hasAIFix:E.hasAIFix,allAIFixes:E.allAIFixes,dispose:()=>{this.codeActionsDisposable.value=E}}}else if(!T&&I.length>0){const R=n.selection.getPosition();let P=R,j=Number.MAX_VALUE;const B=[...E.validActions];for(const $ of I){const q=$.endColumn,V=$.endLineNumber,X=$.startLineNumber;if(V===R.lineNumber||X===R.lineNumber){P=new te(V,q);const ae={type:n.trigger.type,triggerAction:n.trigger.triggerAction,filter:{include:(v=n.trigger.filter)!=null&&v.include?(_=n.trigger.filter)==null?void 0:_.include:ps.QuickFix},autoApply:n.trigger.autoApply,context:{notAvailableMessage:((w=n.trigger.context)==null?void 0:w.notAvailableMessage)||"",position:P}},ne=new st(P.lineNumber,P.column,P.lineNumber,P.column),W=await fN(this._registry,e,ne,ae,Ag.None,c);if(c.isCancellationRequested)return W.dispose(),vZ;if(W.validActions.length!==0){for(const Y of W.validActions)(C=(k=Y.action.command)==null?void 0:k.arguments)!=null&&C.some(G=>typeof G=="string"&&G.includes(O0e))&&(Y.action.diagnostics=[...I.filter(G=>G.relatedInformation)]);E.allActions.length===0&&D.push(...W.allActions),Math.abs(R.column-q)V.findIndex(X=>X.action.title===$.action.title)===q);return H.sort(($,q)=>$.action.isPreferred&&!q.action.isPreferred?-1:!$.action.isPreferred&&q.action.isPreferred||$.action.isAI&&!q.action.isAI?1:!$.action.isAI&&q.action.isAI?-1:0),{validActions:H,allActions:D,documentation:E.documentation,hasAutoFix:E.hasAutoFix,hasAIFix:E.hasAIFix,allAIFixes:E.allAIFixes,dispose:()=>{this.codeActionsDisposable.value=E}}}}if(n.trigger.type===1){const E=await fN(this._registry,e,n.selection,n.trigger,Ag.None,c);return this.codeActionsDisposable.value=E,E}const u=await fN(this._registry,e,n.selection,n.trigger,Ag.None,c);return this.codeActionsDisposable.value=u,u});n.trigger.type===1&&((l=this._progressService)==null||l.showWhile(r,250));const o=new qy.Triggered(n.trigger,s,r);let a=!1;this._state.type===1&&(a=this._state.trigger.type===1&&o.type===1&&o.trigger.type===2&&this._state.position!==o.position),a?setTimeout(()=>{this.setState(o)},500):this.setState(o)},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:td.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)==null||t.trigger(e),this.codeActionsDisposable.dispose()}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var FHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},BHt=function(i,e){return function(t,n){e(t,n,i)}},Kk;const j0e=ls("gutter-lightbulb",Ee.lightBulb,S(874,"Icon which spawns code actions menu from the gutter when there is no space in the editor.")),F0e=ls("gutter-lightbulb-auto-fix",Ee.lightbulbAutofix,S(875,"Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),B0e=ls("gutter-lightbulb-sparkle",Ee.lightbulbSparkle,S(876,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),H0e=ls("gutter-lightbulb-aifix-auto-fix",Ee.lightbulbSparkleAutofix,S(877,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),W0e=ls("gutter-lightbulb-sparkle-filled",Ee.sparkleFilled,S(878,"Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var dg;(function(i){i.Hidden={type:0};class e{constructor(n,s,r,o){this.actions=n,this.trigger=s,this.editorPosition=r,this.widgetPosition=o,this.type=1}}i.Showing=e})(dg||(dg={}));var _b;let nM=(_b=class extends se{constructor(e,t){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new ie),this.onClick=this._onClick.event,this._state=dg.Hidden,this._gutterState=dg.Hidden,this._iconClasses=[],this.lightbulbClasses=["codicon-"+j0e.id,"codicon-"+H0e.id,"codicon-"+F0e.id,"codicon-"+B0e.id,"codicon-"+W0e.id],this.gutterDecoration=Kk.GUTTER_DECORATION,this._domNode=Oe("div.lightBulbWidget"),this._domNode.role="listbox",this._register(Ha.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const s=this._editor.getModel();(this.state.type!==1||!s||this.state.editorPosition.lineNumber>=s.getLineCount())&&this.hide(),(this.gutterState.type!==1||!s||this.gutterState.editorPosition.lineNumber>=s.getLineCount())&&this.gutterHide()})),this._register(XLt(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:s,height:r}=Zs(this._domNode),o=this._editor.getOption(75);let a=Math.floor(o/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(He.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var n,s;this._preferredKbLabel=((n=this._keybindingService.lookupKeybinding(dPe))==null?void 0:n.getLabel())??void 0,this._quickFixKbLabel=((s=this._keybindingService.lookupKeybinding(Zae))==null?void 0:s.getLabel())??void 0,this._updateLightBulbTitleAndIcon()})),this._register(this._editor.onMouseDown(async n=>{if(!n.target.element||!this.lightbulbClasses.some(l=>n.target.element&&n.target.element.classList.contains(l))||this.gutterState.type!==1)return;this._editor.focus();const{top:s,height:r}=Zs(n.target.element),o=this._editor.getOption(75);let a=Math.floor(o/3);this.gutterState.widgetPosition.position!==null&&this.gutterState.widgetPosition.position.lineNumber22,m=E=>E>2&&this._editor.getTopForLineNumber(E)===this._editor.getTopForLineNumber(E-1),x=this._editor.getLineDecorations(a);let v=!1;if(x)for(const E of x){const D=E.options.glyphMarginClassName;if(D&&!this.lightbulbClasses.some(T=>D.includes(T))){v=!0;break}}let _=a,w=1;if(!f){const E=D=>{const T=o.getLineContent(D);return/^\s*$|^\s+/.test(T)||T.length<=w};if(a>1&&!m(a-1)){const D=o.getLineCount(),T=a===D,I=a>1&&E(a-1),R=!T&&E(a+1),P=E(a),j=!R&&!I;if(!R&&!I&&!v)return this.gutterState=new dg.Showing(e,t,n,{position:{lineNumber:_,column:w},preference:Kk._posPref}),this.renderGutterLightbub(),this.hide();I||T||I&&!P?_-=1:(R||j&&P)&&(_+=1)}else if(a===1&&(a===o.getLineCount()||!E(a+1)&&!E(a)))if(this.gutterState=new dg.Showing(e,t,n,{position:{lineNumber:_,column:w},preference:Kk._posPref}),v)this.gutterHide();else return this.renderGutterLightbub(),this.hide();else if(a{this._gutterDecorationID=t.addDecoration(new z(e,0,e,0),this.gutterDecoration)})}_removeGutterDecoration(e){this._editor.changeDecorations(t=>{t.removeDecoration(e),this._gutterDecorationID=void 0})}_updateGutterDecoration(e,t){this._editor.changeDecorations(n=>{n.changeDecoration(e,new z(t,0,t,0)),n.changeDecorationOptions(e,this.gutterDecoration)})}_updateLightbulbTitle(e,t){this.state.type===1&&(t?this.title=S(879,"Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=S(880,"Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=S(881,"Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=S(882,"Show Code Actions")))}set title(e){this._domNode.title=e}},Kk=_b,_b.GUTTER_DECORATION=qt.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:Tt.asClassName(Ee.lightBulb),glyphMargin:{position:Ug.Left},stickiness:1}),_b.ID="editor.contrib.lightbulbWidget",_b._posPref=[0],_b);nM=Kk=FHt([BHt(1,zn)],nM);var HHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},mf=function(i,e){return function(t,n){e(t,n,i)}},Gk;const WHt="quickfix-edit-highlight";var L_;let RC=(L_=class extends se{static get(e){return e.getContribution(Gk.ID)}constructor(e,t,n,s,r,o,a,l,c,u,h){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=c,this._instantiationService=u,this._progressService=h,this._activeCodeActions=this._register(new Zn),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new jHt(this._editor,r.codeActionProvider,t,n,o,l)),this._register(this._model.onDidChangeState(g=>this.update(g))),this._lightBulbWidget=new ba(()=>{const g=this._editor.getContribution(nM.ID);return g&&this._register(g.onClick(f=>this.showCodeActionsFromLightbulb(f.actions,f))),g}),this._resolver=s.createInstance(xZ),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&e.validActions.length===1){const n=e.validActions[0],s=n.action.command;s&&s.id==="inlineChat.start"&&s.arguments&&s.arguments.length>=1&&s.arguments[0]&&(s.arguments[0]={...s.arguments[0],autoSend:!1}),await this.applyCodeAction(n,!1,!1,n_.FromAILightbulb);return}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,s){var o;if(!this._editor.hasModel())return;(o=Kc.get(this._editor))==null||o.closeMessage();const r=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:s,context:{notAvailableMessage:e,position:r}})}_trigger(e){return this._model.trigger(e)}async applyCodeAction(e,t,n,s){const r=this._progressService.show(!0,500);try{await this._instantiationService.invokeFunction(THt,e,s,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:td.QuickFix,filter:{}}),r.done()}}hideLightBulbWidget(){var e,t;(e=this._lightBulbWidget.rawValue)==null||e.hide(),(t=this._lightBulbWidget.rawValue)==null||t.gutterHide()}async update(e){var s,r,o,a,l;if(e.type!==1){this.hideLightBulbWidget();return}let t;try{t=await e.actions}catch(c){zt(c);return}if(this._disposed)return;const n=this._editor.getSelection();if((n==null?void 0:n.startLineNumber)===e.position.lineNumber)if((s=this._lightBulbWidget.value)==null||s.update(t,e.trigger,e.position),e.trigger.type===1){if((r=e.trigger.filter)!=null&&r.include){const u=this.tryGetValidActionToApply(e.trigger,t);if(u){try{this.hideLightBulbWidget(),await this.applyCodeAction(u,!1,!1,n_.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(h&&h.action.disabled){(o=Kc.get(this._editor))==null||o.showMessage(h.action.disabled,e.trigger.context.position),t.dispose();return}}}const c=!!((a=e.trigger.filter)!=null&&a.include);if(e.trigger.context&&(!t.allActions.length||!c&&!t.validActions.length)){(l=Kc.get(this._editor))==null||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,t.dispose();return}this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}async showCodeActionList(e,t,n){const s=this._editor.createDecorationsCollection(),r=this._editor.getDomNode();if(!r)return;const o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;const a=te.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(c,u)=>{this.applyCodeAction(c,!0,!!u,n.fromLightbulb?n_.FromAILightbulb:n_.FromCodeActions),this._actionWidgetService.hide(!1),s.clear()},onHide:c=>{var u;(u=this._editor)==null||u.focus(),s.clear()},onHover:async(c,u)=>{var f;if(u.isCancellationRequested)return;let h=!1;const g=c.action.kind;if(g){const m=new Bs(g);h=[ps.RefactorExtract,ps.RefactorInline,ps.RefactorRewrite,ps.RefactorMove,ps.Source].some(v=>v.contains(m))}return{canPreview:h||!!((f=c.action.edit)!=null&&f.edits.length)}},onFocus:c=>{var u,h;if(c&&c.action){const g=c.action.ranges,f=c.action.diagnostics;if(s.clear(),g&&g.length>0){const m=f&&(f==null?void 0:f.length)>1?f.map(x=>({range:x,options:Gk.DECORATION})):g.map(x=>({range:x,options:Gk.DECORATION}));s.set(m)}else if(f&&f.length>0){const m=f.map(v=>({range:v,options:Gk.DECORATION}));s.set(m);const x=f[0];if(x.startLineNumber&&x.startColumn){const v=(h=(u=this._editor.getModel())==null?void 0:u.getWordAtPosition({lineNumber:x.startLineNumber,column:x.startColumn}))==null?void 0:h.word;zg(S(863,"Context: {0} at line {1} and column {2}.",v,x.startLineNumber,x.startColumn))}}}else s.clear()}};this._actionWidgetService.show("codeActionWidget",!0,PHt(o,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,r,this._getActionBarActions(e,t,n))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=Zs(this._editor.getDomNode()),s=n.left+t.left,r=n.top+t.top+t.height;return{x:s,y:r}}_shouldShowHeaders(){var t;const e=(t=this._editor)==null?void 0:t.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e==null?void 0:e.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];const s=e.documentation.map(r=>({id:r.id,label:r.title,tooltip:r.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(r.id,...r.arguments??[])}));return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&s.push(this._showDisabled?{id:"hideMoreActions",label:S(864,"Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:S(865,"Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),s}},Gk=L_,L_.ID="editor.contrib.codeActionController",L_.DECORATION=qt.register({description:"quickfix-highlight",className:WHt}),L_);RC=Gk=HHt([mf(1,Kp),mf(2,Bt),mf(3,ft),mf(4,lt),mf(5,Jb),mf(6,es),mf(7,Zt),mf(8,D0),mf(9,ft),mf(10,Jb)],RC);Zu((i,e)=>{((s,r)=>{r&&e.addRule(`.monaco-editor ${s} { background-color: ${r}; }`)})(".quickfix-edit-highlight",i.getColor(ub));const n=i.getColor(Gv);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${Fg(i.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)});function dO(i){return Ne.regex(fPe.keys()[0],new RegExp("(\\s|^)"+Qc(i.value)+"\\b"))}const Jae={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:S(831,"Kind of the code action to run.")},apply:{type:"string",description:S(832,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[S(833,"Always apply the first returned code action."),S(834,"Apply the first returned code action if it is the only one."),S(835,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:S(836,"Controls if only preferred code actions should be returned.")}}};function gS(i,e,t,n,s=td.Default){if(i.hasModel()){const r=RC.get(i);r==null||r.manualTriggerAtCurrentPosition(e,s,t,n)}}class VHt extends rt{constructor(){super({id:Zae,label:be(853,"Quick Fix..."),precondition:Ne.and(J.writable,J.hasCodeActionsProvider),kbOpts:{kbExpr:J.textInputFocus,primary:2137,weight:100}})}run(e,t){return gS(t,S(837,"No code actions available"),void 0,void 0,td.QuickFix)}}class zHt extends ao{constructor(){super({id:cPe,precondition:Ne.and(J.writable,J.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:Jae}]}})}runEditorCommand(e,t,n){const s=Zf.fromUser(n,{kind:Bs.Empty,apply:"ifSingle"});return gS(t,typeof(n==null?void 0:n.kind)=="string"?s.preferred?S(838,"No preferred code actions for '{0}' available",n.kind):S(839,"No code actions for '{0}' available",n.kind):s.preferred?S(840,"No preferred code actions available"):S(841,"No code actions available"),{include:s.kind,includeSourceActions:!0,onlyIncludePreferredActions:s.preferred},s.apply)}}class UHt extends rt{constructor(){super({id:uPe,label:be(854,"Refactor..."),precondition:Ne.and(J.writable,J.hasCodeActionsProvider),kbOpts:{kbExpr:J.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Ne.and(J.writable,dO(ps.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:Jae}]}})}run(e,t,n){const s=Zf.fromUser(n,{kind:ps.Refactor,apply:"never"});return gS(t,typeof(n==null?void 0:n.kind)=="string"?s.preferred?S(842,"No preferred refactorings for '{0}' available",n.kind):S(843,"No refactorings for '{0}' available",n.kind):s.preferred?S(844,"No preferred refactorings available"):S(845,"No refactorings available"),{include:ps.Refactor.contains(s.kind)?s.kind:Bs.None,onlyIncludePreferredActions:s.preferred},s.apply,td.Refactor)}}class $Ht extends rt{constructor(){super({id:hPe,label:be(855,"Source Action..."),precondition:Ne.and(J.writable,J.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Ne.and(J.writable,dO(ps.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:Jae}]}})}run(e,t,n){const s=Zf.fromUser(n,{kind:ps.Source,apply:"never"});return gS(t,typeof(n==null?void 0:n.kind)=="string"?s.preferred?S(846,"No preferred source actions for '{0}' available",n.kind):S(847,"No source actions for '{0}' available",n.kind):s.preferred?S(848,"No preferred source actions available"):S(849,"No source actions available"),{include:ps.Source.contains(s.kind)?s.kind:Bs.None,includeSourceActions:!0,onlyIncludePreferredActions:s.preferred},s.apply,td.SourceAction)}}class qHt extends rt{constructor(){super({id:pZ,label:be(856,"Organize Imports"),precondition:Ne.and(J.writable,dO(ps.SourceOrganizeImports)),kbOpts:{kbExpr:J.textInputFocus,primary:1581,weight:100},metadata:{description:be(857,"Organize imports in the current file. Also called 'Optimize Imports' by some tools")}})}run(e,t){return gS(t,S(850,"No organize imports action available"),{include:ps.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",td.OrganizeImports)}}class KHt extends rt{constructor(){super({id:mZ,label:be(858,"Fix All"),precondition:Ne.and(J.writable,dO(ps.SourceFixAll))})}run(e,t){return gS(t,S(851,"No fix all action available"),{include:ps.SourceFixAll,includeSourceActions:!0},"ifSingle",td.FixAll)}}class GHt extends rt{constructor(){super({id:dPe,label:be(859,"Auto Fix..."),precondition:Ne.and(J.writable,dO(ps.QuickFix)),kbOpts:{kbExpr:J.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return gS(t,S(852,"No auto fixes available"),{include:ps.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",td.AutoFix)}}Pn(RC.ID,RC,3);Pn(nM.ID,nM,4);Ke(VHt);Ke(UHt);Ke($Ht);Ke(qHt);Ke(GHt);Ke(KHt);Xe(new zHt);Hs.as(tf.Configuration).registerConfiguration({..._W,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:6,description:S(860,"Enable/disable showing group headers in the Code Action menu."),default:!0}}});Hs.as(tf.Configuration).registerConfiguration({..._W,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:6,description:S(861,"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});Hs.as(tf.Configuration).registerConfiguration({..._W,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:6,markdownDescription:S(862,"Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}});const v9=class v9{constructor(){this.lenses=[]}dispose(){var e;(e=this._store)==null||e.dispose()}get isDisposed(){var e;return((e=this._store)==null?void 0:e.isDisposed)??!1}add(e,t){JC(e)&&(this._store??(this._store=new _e),this._store.add(e));for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}};v9.Empty=new v9;let OL=v9;async function pPe(i,e,t){const n=i.ordered(e),s=new Map,r=new OL,o=n.map(async(a,l)=>{s.set(a,l);try{const c=await Promise.resolve(a.provideCodeLenses(e,t));c&&r.add(c,a)}catch(c){Pr(c)}});return await Promise.all(o),t.isCancellationRequested?(r.dispose(),OL.Empty):(r.lenses=r.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:s.get(a.provider)s.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),r)}Rn.registerCommand("_executeCodeLensProvider",function(i,...e){let[t,n]=e;Bn(kt.isUri(t)),Bn(typeof n=="number"||!n);const{codeLensProvider:s}=i.get(lt),r=i.get(Is).getModel(t);if(!r)throw ju();const o=[],a=new _e;return pPe(s,r,pn.None).then(l=>{a.add(l);const c=[];for(const u of l.lenses)n==null||u.symbol.command?o.push(u.symbol):n-- >0&&u.provider.resolveCodeLens&&c.push(Promise.resolve(u.provider.resolveCodeLens(r,u.symbol,pn.None)).then(h=>o.push(h||u.symbol)));return Promise.all(c)}).then(()=>o).finally(()=>{setTimeout(()=>a.dispose(),100)})});var YHt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},QHt=function(i,e){return function(t,n){e(t,n,i)}};const mPe=ln("ICodeLensCache");class V0e{constructor(e,t){this.lineCount=e,this.data=t}}let _Z=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Yh(20,.75);const t="codelens/cache";VI(fi,()=>e.remove(t,1));const n="codelens/cache2",s=e.get(n,1,"{}");this._deserialize(s);const r=He.filter(e.onWillSaveState,o=>o.reason===__.SHUTDOWN);He.once(r)(o=>{e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(o=>{var a;return{range:o.symbol.range,command:o.symbol.command&&{id:"",title:(a=o.symbol.command)==null?void 0:a.title}}}),s=new OL;s.add({lenses:n},this._fakeProvider);const r=new V0e(e.getLineCount(),s);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const s=new Set;for(const r of n.data.lenses)s.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...s.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const s=t[n],r=[];for(const a of s.lines)r.push({range:new z(a,1,a,11)});const o=new OL;o.add({lenses:r},this._fakeProvider),this._cache.set(n,new V0e(s.lineCount,o))}}catch{}}};_Z=YHt([QHt(0,xl)],_Z);wn(mPe,_Z,1);class XHt{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}const C2=class C2{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${C2._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const n=[];let s=!1;for(let r=0;r{c.symbol.command&&l.push(c.symbol),n.addDecoration({range:c.symbol.range,options:z0e},h=>this._decorationIds[u]=h),a?a=z.plusRange(a,c.symbol.range):a=z.lift(c.symbol.range)}),this._viewZone=new XHt(a.startLineNumber-1,r,o),this._viewZoneId=s.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new yZ(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const n=this._editor.getModel().getDecorationRange(e),s=this._data[t].symbol;return!!(n&&z.isEmpty(s.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,s)=>{t.addDecoration({range:n.symbol.range,options:z0e},r=>this._decorationIds[s]=r)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},$0e=function(i,e){return function(t,n){e(t,n,i)}};const Ju=ln("ILanguageFeatureDebounceService");var t8;(function(i){const e=new WeakMap;let t=0;function n(s){let r=e.get(s);return r===void 0&&(r=++t,e.set(s,r)),r}i.of=n})(t8||(t8={}));class JHt{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class e7t{constructor(e,t,n,s,r,o){this._logService=e,this._name=t,this._registry=n,this._default=s,this._min=r,this._max=o,this._cache=new Yh(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,n)=>_7(t8.of(n),t),0)}get(e){const t=this._key(e),n=this._cache.get(t);return n?Il(n.value,this._min,this._max):this.default()}update(e,t){const n=this._key(e);let s=this._cache.get(n);s||(s=new J6t(6),this._cache.set(n,s));const r=Il(s.update(t),this._min,this._max);return v7(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new aMe;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=this._overall()|0||this._default;return Il(e,this._min,this._max)}}let wZ=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,n){const s=(n==null?void 0:n.min)??50,r=(n==null?void 0:n.max)??s**2,o=(n==null?void 0:n.key)??void 0,a=`${t8.of(e)},${s}${o?","+o:""}`;let l=this._data.get(a);return l||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),l=new JHt(s*1.5)):l=new e7t(this._logService,t,e,this._overallAverage()|0||s*1.5,s,r),this._data.set(a,l)),l}_overallAverage(){const e=new aMe;for(const t of this._data.values())e.update(t.default());return e.value}};wZ=ZHt([$0e(0,Ji),$0e(1,ele)],wZ);wn(Ju,wZ,1);var t7t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},vI=function(i,e){return function(t,n){e(t,n,i)}},zE;let iM=(zE=class{constructor(e,t,n,s,r,o){this._editor=e,this._languageFeaturesService=t,this._commandService=s,this._notificationService=r,this._codeLensCache=o,this._disposables=new _e,this._localToDispose=new _e,this._lenses=[],this._oldCodeLensModels=new _e,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new pi(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{(a.hasChanged(59)||a.hasChanged(25)||a.hasChanged(24))&&this._updateLensStyle(),a.hasChanged(23)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._localToDispose.dispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)==null||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(75)/this._editor.getOption(61));let t=this._editor.getOption(25);return(!t||t<5)&&(t=this._editor.getOption(61)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(24),s=this._editor.getOption(59),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",s.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",pc.fontFamily)),this._editor.changeViewZones(o=>{for(const a of this._lenses)a.updateHeight(e,o)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)==null||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)==null||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)==null||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(23)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&zb(()=>{const s=this._codeLensCache.get(e);t===s&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const s of this._languageFeaturesService.codeLensProvider.all(e))if(typeof s.onDidChange=="function"){const r=s.onDidChange(()=>n.schedule());this._localToDispose.add(r)}const n=new pi(()=>{var r;const s=Date.now();(r=this._getCodeLensModelPromise)==null||r.cancel(),this._getCodeLensModelPromise=io(o=>pPe(this._languageFeaturesService.codeLensProvider,e,o)),this._getCodeLensModelPromise.then(o=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=o,this._codeLensCache.put(e,o);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);n.delay=a,this._renderCodeLensSymbols(o),this._resolveCodeLensesInViewportSoon()},zt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(dt(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var s;this._editor.changeDecorations(r=>{this._editor.changeViewZones(o=>{const a=[];let l=-1;this._lenses.forEach(u=>{!u.isValid()||l===u.getLineNumber()?a.push(u):(u.update(o),l=u.getLineNumber())});const c=new Hq;a.forEach(u=>{u.dispose(c,o),this._lenses.splice(this._lenses.indexOf(u),1)}),c.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(s=this._resolveCodeLensesPromise)==null||s.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorText(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(s=>{s.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(dt(()=>{if(this._editor.getModel()){const s=Kg.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(o=>{this._disposeAllLenses(r,o)})}),s.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(s=>{if(s.target.type!==9)return;let r=s.target.element;if((r==null?void 0:r.tagName)==="SPAN"&&(r=r.parentElement),(r==null?void 0:r.tagName)==="A")for(const o of this._lenses){const a=o.getCommand(r);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new Hq;for(const s of this._lenses)s.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),n=[];let s;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(s&&s[s.length-1].symbol.range.startLineNumber===l?s.push(a):(s=[a],n.push(s)))}if(!n.length&&!this._lenses.length)return;const r=Kg.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new Hq;let u=0,h=0;for(;hthis._resolveCodeLensesInViewportSoon())),u++,h++)}for(;uthis._resolveCodeLensesInViewportSoon())),h++;c.commit(a)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var o;(o=this._resolveCodeLensesPromise)==null||o.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const t=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(e);l&&(t.push(l),n.push(a))}),t.length===0){this._oldCodeLensModels.clear();return}const s=Date.now(),r=io(a=>{const l=t.map((c,u)=>{const h=new Array(c.length),g=c.map((f,m)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(e,f.symbol,a)).then(x=>{h[m]=x},Pr):(h[m]=f.symbol,Promise.resolve(void 0)));return Promise.all(g).then(()=>{!a.isCancellationRequested&&!n[u].isDisposed()&&n[u].updateCommands(h)})});return Promise.all(l)});this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(e,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{zt(a),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,(e=this._currentCodeLensModel)!=null&&e.isDisposed?void 0:this._currentCodeLensModel}},zE.ID="css.editor.codeLens",zE);iM=t7t([vI(1,lt),vI(2,Ju),vI(3,es),vI(4,nr),vI(5,mPe)],iM);Pn(iM.ID,iM,1);Ke(class extends rt{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:J.hasCodeLensProvider,label:be(884,"Show CodeLens Commands for Current Line")})}async run(e,t){if(!t.hasModel())return;const n=e.get(Wa),s=e.get(es),r=e.get(nr),o=t.getSelection().positionLineNumber,a=t.getContribution(iM.ID);if(!a)return;const l=await a.getModel();if(!l)return;const c=[];for(const g of l.lenses)g.symbol.command&&g.symbol.range.startLineNumber===o&&c.push({label:g.symbol.command.title,command:g.symbol.command});if(c.length===0)return;const u=await n.pick(c,{canPickMany:!1,placeHolder:S(883,"Select a command")});if(!u)return;let h=u.command;if(l.isDisposed){const g=await a.getModel(),f=g==null?void 0:g.lenses.find(m=>{var x;return m.symbol.range.startLineNumber===o&&((x=m.symbol.command)==null?void 0:x.title)===h.title});if(!f||!f.symbol.command)return;h=f.symbol.command}try{await s.executeCommand(h.id,...h.arguments||[])}catch(g){r.error(g)}}});const bPe=[];function UD(i){bPe.push(i)}function n7t(){return bPe.slice(0)}class Wq{constructor(e,t,n,s){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=s,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class YI{constructor(e,t,n,s,r,o){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=s,this.initialMousePosY=r,this.supportsMarkerHover=o,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}class MC{constructor(e,t){this.renderedHoverParts=e,this.disposables=t}dispose(){var e;for(const t of this.renderedHoverParts)t.dispose();(e=this.disposables)==null||e.dispose()}}const fS=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};var xPe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},CZ=function(i,e){return function(t,n){e(t,n,i)}};let sM=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,n){const s=t.range,r=t.color,o=r.alpha,a=new ye(new Se(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),o)),l=o?ye.Format.CSS.formatRGBA(a):ye.Format.CSS.formatRGB(a),c=o?ye.Format.CSS.formatHSLA(a):ye.Format.CSS.formatHSL(a),u=o?ye.Format.CSS.formatHexA(a):ye.Format.CSS.formatHex(a),h=[];return h.push({label:l,textEdit:{range:s,text:l}}),h.push({label:c,textEdit:{range:s,text:c}}),h.push({label:u,textEdit:{range:s,text:u}}),h}};sM=xPe([CZ(0,Nc)],sM);let SZ=class extends se{constructor(e,t){super(),this._register(e.colorProvider.register("*",new sM(t)))}};SZ=xPe([CZ(0,lt),CZ(1,Nc)],SZ);async function vPe(i,e,t,n="auto"){return tle(new i7t,i,e,t,n)}function _Pe(i,e,t,n){return Promise.resolve(t.provideColorPresentations(i,e,n))}class i7t{constructor(){}async compute(e,t,n,s){const r=await e.provideDocumentColors(t,n);if(Array.isArray(r))for(const o of r)s.push({colorInfo:o,provider:e});return Array.isArray(r)}}class s7t{constructor(){}async compute(e,t,n,s){const r=await e.provideDocumentColors(t,n);if(Array.isArray(r))for(const o of r)s.push({range:o.range,color:[o.color.red,o.color.green,o.color.blue,o.color.alpha]});return Array.isArray(r)}}class r7t{constructor(e){this.colorInfo=e}async compute(e,t,n,s){const r=await e.provideColorPresentations(t,this.colorInfo,pn.None);return Array.isArray(r)&&s.push(...r),Array.isArray(r)}}async function tle(i,e,t,n,s){let r=!1,o;const a=[],l=e.ordered(t);for(let c=l.length-1;c>=0;c--){const u=l[c];if(s!=="always"&&u instanceof sM)o=u;else try{await i.compute(u,t,n,a)&&(r=!0)}catch(h){Pr(h)}}return r?a:o&&s!=="never"?(await i.compute(o,t,n,a),a):[]}function yPe(i,e){const{colorProvider:t}=i.get(lt),n=i.get(Is).getModel(e);if(!n)throw ju();const s=i.get(Zt).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,defaultColorDecoratorsEnablement:s}}var o7t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Vq=function(i,e){return function(t,n){e(t,n,i)}},kZ;const wPe=Object.create({});var D_;let jL=(D_=class extends se{constructor(e,t,n,s){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new _e),this._decorationsIds=[],this._colorDatas=new Map,this._decoratorLimitReporter=this._register(new a7t),this._colorDecorationClassRefs=this._register(new _e),this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=this._register(new e6(this._editor)),this._debounceInformation=s.for(n.colorProvider,"Document Colors",{min:kZ.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(r=>{const o=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._defaultColorDecoratorsEnablement=this._editor.getOption(167);const a=o!==this._isColorDecoratorsEnabled||r.hasChanged(27),l=r.hasChanged(167);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._defaultColorDecoratorsEnablement=this._editor.getOption(167),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){const s=n.colorDecorators;if(s&&s.enable!==void 0&&!s.enable)return s.enable}return this._editor.getOption(26)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Yc,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=io(async e=>{const t=this._editor.getModel();if(!t)return[];const n=new _o(!1),s=await vPe(this._languageFeaturesService.colorProvider,t,e,this._defaultColorDecoratorsEnablement);return this._debounceInformation.update(t,n.elapsed()),s});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){zt(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:qt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((s,r)=>this._colorDatas.set(s,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],n=this._editor.getOption(27);for(let r=0;rthis._colorDatas.has(s.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}},kZ=D_,D_.ID="editor.contrib.colorDetector",D_.RECOMPUTE_TIME=1e3,D_);jL=kZ=o7t([Vq(1,Zt),Vq(2,lt),Vq(3,Ju)],jL);class a7t extends se{constructor(){super(...arguments),this._onDidChange=this._register(new ie),this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}const CPe="editor.action.showHover",l7t="editor.action.showDefinitionPreviewHover",c7t="editor.action.hideHover",d7t="editor.action.scrollUpHover",u7t="editor.action.scrollDownHover",h7t="editor.action.scrollLeftHover",g7t="editor.action.scrollRightHover",f7t="editor.action.pageUpHover",p7t="editor.action.pageDownHover",m7t="editor.action.goToTopHover",b7t="editor.action.goToBottomHover",yW="editor.action.increaseHoverVerbosityLevel",x7t=S(1102,"Increase Hover Verbosity Level"),wW="editor.action.decreaseHoverVerbosityLevel",v7t=S(1103,"Decrease Hover Verbosity Level"),rM="editor.action.inlineSuggest.commit",SPe="editor.action.inlineSuggest.showPrevious",kPe="editor.action.inlineSuggest.showNext",_7t="editor.action.inlineSuggest.jump",NPe="editor.action.inlineSuggest.hide",NZ="editor.action.inlineSuggest.toggleShowCollapsed";var nle=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Lh=function(i,e){return function(t,n){e(t,n,i)}},vj;let EZ=class extends se{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=Gn(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(71).showToolbar==="always"),this.sessionPosition=void 0,this.position=we(this,s=>{var l,c;const r=(l=this.model.read(s))==null?void 0:l.primaryGhostText.read(s);if(!this.alwaysShowToolbar.read(s)||!r||r.parts.length===0)return this.sessionPosition=void 0,null;const o=r.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==r.lineNumber&&(this.sessionPosition=void 0);const a=new te(r.lineNumber,Math.min(o,((c=this.sessionPosition)==null?void 0:c.column)??Number.MAX_SAFE_INTEGER));return this.sessionPosition=a,a}),this._register(Fa((s,r)=>{const o=this.model.read(s);if(!o||!this.alwaysShowToolbar.read(s))return;const a=we(c=>{const u=c.store.add(this.instantiationService.createInstance(FL.hot.read(c),this.editor,!0,this.position,o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.activeCommands,o.warning,()=>{}));return e.addContentWidget(u),c.store.add(dt(()=>e.removeContentWidget(u))),c.store.add(Pt(h=>{this.position.read(h)&&o.lastTriggerKind.read(h)!==lc.Explicit&&o.triggerExplicitly()})),u}),l=dx(this,(c,u)=>!!this.position.read(c)||!!u);r.add(Pt(c=>{l.read(c)&&a.read(c)}))}))}};EZ=nle([Lh(2,ft)],EZ);const y7t=ls("inline-suggestion-hints-next",Ee.chevronRight,S(1207,"Icon for show next parameter hint.")),w7t=ls("inline-suggestion-hints-previous",Ee.chevronLeft,S(1208,"Icon for show previous parameter hint."));var tp;let FL=(tp=class extends se{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){const s=new Wd(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let o=t;return r&&(o=S(1209,"{0} ({1})",t,r.getLabel())),s.tooltip=o,s}constructor(e,t,n,s,r,o,a,l,c,u,h,g,f){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=s,this._suggestionCount=r,this._extraCommands=o,this._warning=a,this._relayout=l,this._commandService=c,this.keybindingService=h,this._contextKeyService=g,this._menuService=f,this.id=`InlineSuggestionHintsContentWidget${vj.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._warningMessageContentNode=we(m=>{const x=this._warning.read(m);return x?typeof x.message=="string"?x.message:m.store.add(tO(x.message)).element:void 0}),this._warningMessageNode=en.div({class:"warningMessage",style:{maxWidth:400,margin:4,marginBottom:4,display:we(m=>this._warning.read(m)?"block":"none")}},[this._warningMessageContentNode]).keepUpdated(this._store),this.nodes=Fn("div.inlineSuggestionsHints",{className:this.withBorder?"monaco-hover monaco-hover-content":""},[this._warningMessageNode.element,Fn("div@toolBar")]),this.previousAction=this._register(this.createCommandAction(SPe,S(1210,"Previous"),Tt.asClassName(w7t))),this.availableSuggestionCountAction=this._register(new Wd("inlineSuggestionHints.availableSuggestionCount","",void 0,!1)),this.nextAction=this._register(this.createCommandAction(kPe,S(1211,"Next"),Tt.asClassName(y7t))),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(ct.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new pi(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new pi(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this._register(Pt(m=>{this._warningMessageContentNode.read(m),this._warningMessageNode.readEffect(m),this._relayout()})),this.toolBar=this._register(u.createInstance(LZ,this.nodes.toolBar,ct.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:m=>m.startsWith("primary")},actionViewItemProvider:(m,x)=>{if(m instanceof Vd)return u.createInstance(S7t,m,void 0);if(m===this.availableSuggestionCountAction){const v=new C7t(void 0,m,{label:!0,icon:!1});return v.setClass("availableSuggestionCount"),v}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(m=>{vj._dropDownVisible=m})),this._register(Pt(m=>{this._position.read(m),this.editor.layoutContentWidget(this)})),this._register(Pt(m=>{const x=this._suggestionCount.read(m),v=this._currentSuggestionIdx.read(m);x!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${v+1}/${x}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),x!==void 0&&x>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Pt(m=>{const v=this._extraCommands.read(m).map(_=>({class:void 0,id:_.command.id,enabled:!0,tooltip:_.command.tooltip||"",label:_.command.title,run:w=>this._commandService.executeCommand(_.command.id)}));for(const[_,w]of this.inlineCompletionsActionsMenus.getActions())for(const k of w)k instanceof Vd&&v.push(k);v.length>0&&v.unshift(new Gr),this.toolBar.setAdditionalSecondaryActions(v)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}},vj=tp,tp.hot=uW(tp),tp._dropDownVisible=!1,tp.id=0,tp);FL=vj=nle([Lh(8,es),Lh(9,ft),Lh(10,zn),Lh(11,Bt),Lh(12,Qu)],FL);class C7t extends ML{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}class S7t extends a0{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService,!0);if(!e)return super.updateLabel();if(this.label){const t=Fn("div.keybinding").root;this._register(new zD(t,Vc,{disableTitle:!0,...oHt})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let LZ=class extends W6{constructor(e,t,n,s,r,o,a,l,c){super(e,{resetMenu:t,...n},s,r,o,a,l,c),this.menuId=t,this.options2=n,this.menuService=s,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this.additionalPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var n,s,r,o,a,l,c;const{primary:e,secondary:t}=LMe(this.menu.getActions((n=this.options2)==null?void 0:n.menuOptions),(r=(s=this.options2)==null?void 0:s.toolbarOptions)==null?void 0:r.primaryGroup,(a=(o=this.options2)==null?void 0:o.toolbarOptions)==null?void 0:a.shouldInlineSubmenu,(c=(l=this.options2)==null?void 0:l.toolbarOptions)==null?void 0:c.useSeparatorsInPrimaryActions);t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),e.push(...this.additionalPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){bs(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){bs(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};LZ=nle([Lh(3,Qu),Lh(4,Bt),Lh(5,eu),Lh(6,zn),Lh(7,es),Lh(8,Ua)],LZ);function CW(i,e,t){const n=Zs(i);return!(en.left+n.width||tn.top+n.height)}class k7t{constructor(e,t,n,s){this.value=e,this.isComplete=t,this.hasLoadingMessage=n,this.options=s}}class EPe extends se{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new ie),this.onResult=this._onResult.event,this._asyncComputationScheduler=this._register(new zq(n=>this._triggerAsyncComputation(n),0)),this._syncComputationScheduler=this._register(new zq(n=>this._triggerSyncComputation(n),0)),this._loadingMessageScheduler=this._register(new zq(n=>this._triggerLoadingMessage(n),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._options=void 0,super.dispose()}get _hoverTime(){return this._editor.getOption(69).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t){this._options=t,this._state=e,this._fireResult(t)}_triggerAsyncComputation(e){this._setState(2,e),this._syncComputationScheduler.schedule(e,this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=SEt(t=>this._computer.computeAsync(e,t)),(async()=>{try{for await(const t of this._asyncIterable)t&&(this._result.push(t),this._fireResult(e));this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0,e)}catch(t){zt(t)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(e){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync(e))),this._setState(this._asyncIterableDone?0:3,e)}_triggerLoadingMessage(e){this._state===3&&this._setState(4,e)}_fireResult(e){if(this._state===1||this._state===2)return;const t=this._state===0,n=this._state===4;this._onResult.fire(new k7t(this._result.slice(0),t,n,e))}start(e,t){if(e===0)this._state===0&&(this._setState(1,t),this._asyncComputationScheduler.schedule(t,this._firstWaitTime),this._loadingMessageScheduler.schedule(t,this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(t),this._syncComputationScheduler.cancel(),this._triggerSyncComputation(t);break;case 2:this._syncComputationScheduler.cancel(),this._triggerSyncComputation(t);break}}cancel(){this._asyncComputationScheduler.cancel(),this._syncComputationScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._options=void 0,this._state=0}get options(){return this._options}}class zq extends se{constructor(e,t){super(),this._scheduler=this._register(new pi(()=>e(this._options),t))}schedule(e,t){this._options=e,this._scheduler.schedule(t)}cancel(){this._scheduler.cancel()}}class ile{get onDidWillResize(){return this._onDidWillResize.event}get onDidResize(){return this._onDidResize.event}constructor(){this._onDidWillResize=new ie,this._onDidResize=new ie,this._sashListener=new _e,this._size=new ni(0,0),this._minSize=new ni(0,0),this._maxSize=new ni(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Ta(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Ta(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Ta(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:P6.North}),this._southSash=new Ta(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:P6.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(He.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(He.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(s=>{e&&(n=s.currentX-s.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(s=>{e&&(n=-(s.currentX-s.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(s=>{e&&(t=-(s.currentY-s.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(s=>{e&&(t=s.currentY-s.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(He.any(this._eastSash.onDidReset,this._westSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(He.any(this._northSash.onDidReset,this._southSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,s){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=s?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:s}=this._minSize,{height:r,width:o}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(s,Math.min(o,t));const a=new ni(t,e);ni.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const N7t=30,E7t=24;class L7t extends se{constructor(e,t=new ni(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new ile),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=ni.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new ni(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return(e=this._contentPosition)!=null&&e.position?te.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:Zs(t).top+n.top-N7t}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;const s=Zs(t),r=X_(t.ownerDocument.body),o=s.top+n.top+n.height;return r.height-o-E7t}_findPositionPreference(e,t){const n=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),s=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),r=Math.min(Math.max(s,n),e),o=Math.min(e,r);let a;return this._editor.getOption(69).above?a=o<=s?1:2:a=o<=n?2:1,a===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),a}_resize(e){this._resizableNode.layout(e.height,e.width)}}const K3=Oe;let sle=class extends se{constructor(e){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.classList.toggle("fade-in",!!e),this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new GP(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}};class SW extends se{static render(e,t,n){return new SW(e,t,n)}constructor(e,t,n){super(),this.actionLabel=t.label,this.actionKeybindingLabel=n,this.actionContainer=De(e,K3("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=De(this.actionContainer,K3("a.action")),this.action.setAttribute("role","button"),t.iconClass&&De(this.action,K3("span.icon")).classList.add(...t.iconClass.split(" ")),this.actionRenderedLabel=n?`${t.label} (${n})`:t.label;const s=De(this.action,K3("span"));s.textContent=this.actionRenderedLabel,this._store.add(new DPe(this.actionContainer,t.run)),this._store.add(new TPe(this.actionContainer,t.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function LPe(i,e){return i&&e?S(7,"Inspect this in the accessible view with {0}.",e):i?S(8,"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class DPe extends se{constructor(e,t){super(),this._register(de(e,Fe.CLICK,n=>{n.stopPropagation(),n.preventDefault(),t(e)}))}}class TPe extends se{constructor(e,t,n){super(),this._register(de(e,Fe.KEY_DOWN,s=>{const r=new ki(s);n.some(o=>r.equals(o))&&(s.stopPropagation(),s.preventDefault(),t(e))}))}}var D7t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},G3=function(i,e){return function(t,n){e(t,n,i)}},fh;const q0e=30;var T_;let DZ=(T_=class extends L7t{get isVisibleFromKeyboard(){var e;return((e=this._renderedHover)==null?void 0:e.source)===2}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,n,s,r){const o=e.getOption(75)+8,a=150,l=new ni(a,o);super(e,l),this._configurationService=n,this._accessibilityService=s,this._keybindingService=r,this._hover=this._register(new sle(!0)),this._onDidResize=this._register(new ie),this.onDidResize=this._onDidResize.event,this._onDidScroll=this._register(new ie),this.onDidScroll=this._onDidScroll.event,this._onContentsChanged=this._register(new ie),this.onContentsChanged=this._onContentsChanged.event,this._minimumSize=l,this._hoverVisibleKey=J.hoverVisible.bindTo(t),this._hoverFocusedKey=J.hoverFocused.bindTo(t),De(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._resizableNode.domNode.className="monaco-resizable-hover",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(59)&&this._updateFont()}));const c=this._register($u(this._resizableNode.domNode));this._register(c.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(c.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._register(this._hover.scrollbar.onScroll(u=>{this._onDidScroll.fire(u)})),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._renderedHover)==null||e.dispose(),this._editor.removeContentWidget(this)}getId(){return fh.ID}static _applyDimensions(e,t,n){const s=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=s,e.style.height=r}_setContentsDomNodeDimensions(e,t){const n=this._hover.contentsDomNode;return fh._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){const n=this._hover.containerDomNode;return fh._applyDimensions(n,e,t)}_setScrollableElementDimensions(e,t){const n=this._hover.scrollbar.getDomNode();return fh._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContainerDomNodeDimensions(e,t),this._setScrollableElementDimensions(e,t),this._setContentsDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){const s=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=s,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){fh._applyMaxDimensions(this._hover.contentsDomNode,e,t),fh._applyMaxDimensions(this._hover.scrollbar.getDomNode(),e,t),fh._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none"),this._setHoverWidgetDimensions(e.width,e.height)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new ni(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){fh._lastDimensions=new ni(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){var t;const e=(t=this._renderedHover)==null?void 0:t.showAtPosition;if(e)return this._positionPreference===1?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let n=this._hover.contentsDomNode.children.length-1;return Array.from(this._hover.contentsDomNode.children).forEach(s=>{n+=s.clientHeight}),Math.min(e,n)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth;return e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4?!1:(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,s),!0)}_setRenderedHover(e){var t;(t=this._renderedHover)==null||t.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(59),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(r=>this._editor.applyFontInfo(r))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,fh._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,750,fh._lastDimensions.width);this._resizableNode.maxSize=new ni(t,e),this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this.handleContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){var o;if(!this._editor||!this._editor.hasModel())return;this._render(e);const t=cb(this._hover.containerDomNode),n=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,n)??1,this.handleContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const r=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&LPe(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),((o=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))==null?void 0:o.getAriaLabel())??"");r&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+r)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new ni(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto"),this._updateMaxDimensions()}setMinimumDimensions(e){this._minimumSize=new ni(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new ni(e,this._minimumSize.height)}handleContentsChanged(){var s;this._removeConstraintsRenderNormally();const e=this._hover.contentsDomNode;let t=cb(e),n=Oc(e)+2;if(this._resizableNode.layout(t,n),this._setHoverWidgetDimensions(n,t),t=cb(e),n=Oc(e),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(t,n),(s=this._renderedHover)!=null&&s.showAtPosition){const r=cb(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._renderedHover.showAtPosition)}this._layoutContentWidget(),this._onContentsChanged.fire()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(59);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(59);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-q0e})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+q0e})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}},fh=T_,T_.ID="editor.contrib.resizableContentHoverWidget",T_._lastDimensions=new ni(0,0),T_);DZ=fh=D7t([G3(1,Bt),G3(2,Zt),G3(3,Zo),G3(4,zn)],DZ);function K0e(i,e,t,n,s,r){const o=t+s/2,a=n+r/2,l=Math.max(Math.abs(i-o)-s/2,0),c=Math.max(Math.abs(e-a)-r/2,0);return Math.sqrt(l*l+c*c)}class n8{constructor(e,t){this._editor=e,this._participants=t}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const n=e.getModel(),s=t.range.startLineNumber;if(s>n.getLineCount())return[];const r=n.getLineMaxColumn(s);return e.getLineDecorations(s).filter(o=>{if(o.options.isWholeLine)return!0;const a=o.range.startLineNumber===s?o.range.startColumn:1,l=o.range.endLineNumber===s?o.range.endColumn:r;if(o.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e,t){const n=e.anchor;if(!this._editor.hasModel()||!n)return Fu.EMPTY;const s=n8._getLineDecorations(this._editor,n);return Fu.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(n,s,e.source,t):Fu.EMPTY))}computeSync(e){if(!this._editor.hasModel())return[];const t=e.anchor,n=n8._getLineDecorations(this._editor,t);let s=[];for(const r of this._participants)s=s.concat(r.computeSync(t,n,e.source));return ef(s)}}class IPe{constructor(e,t,n){this.hoverParts=e,this.isComplete=t,this.options=n}filter(e){const t=this.hoverParts.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.hoverParts.length?this:new T7t(this,t,this.isComplete,this.options)}}class T7t extends IPe{constructor(e,t,n,s){super(t,n,s),this.original=e}filter(e){return this.original.filter(e)}}var I7t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},G0e=function(i,e){return function(t,n){e(t,n,i)}};const Y0e=Oe;let i8=class extends se{get hasContent(){return this._hasContent}constructor(e,t){super(),this._keybindingService=e,this._hoverService=t,this.actions=[],this._hasContent=!1,this.hoverElement=Y0e("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=De(this.hoverElement,Y0e("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;this._hasContent=!0;const s=this._register(SW.render(this.actionsElement,e,n));return this._register(this._hoverService.setupManagedHover($p("element"),s.actionContainer,s.actionRenderedLabel)),this.actions.push(s),s}append(e){const t=De(this.actionsElement,e);return this._hasContent=!0,t}};i8=I7t([G0e(0,zn),G0e(1,Zl)],i8);const APe={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class mx extends id{get onChange(){return this._onChange.event}get onKeyDown(){return this._onKeyDown.event}constructor(e){super(),this._onChange=this._register(new ie),this._onKeyDown=this._register(new ie),this._opts=e,this._title=this._opts.title,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...Tt.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._register(Xh().setupDelayedHover(this.domNode,()=>({content:this._title,style:1}),this._opts.hoverLifecycleOptions)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.setTitle(this._opts.title),this.applyStyles(),this.onclick(this.domNode,n=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),n.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,n=>{if(this.enabled){if(n.keyCode===10||n.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),n.preventDefault(),n.stopPropagation();return}this._onKeyDown.fire(n)}})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(e){this._icon&&this.domNode.classList.remove(...Tt.asClassNameArray(this._icon)),this._icon=e,this._icon&&this.domNode.classList.add(...Tt.asClassNameArray(this._icon))}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1)),this.domNode.classList.remove("disabled")}disable(){this.domNode.setAttribute("aria-disabled",String(!0)),this.domNode.classList.add("disabled")}setTitle(e){this._title=e,this.domNode.setAttribute("aria-label",e)}set visible(e){this.domNode.style.display=e?"":"none"}get visible(){return this.domNode.style.display!=="none"}}const Mce=class Mce extends id{constructor(e,t,n){super(),this.checkbox=e,this.domNode=t,this.styles=n,this._onChange=this._register(new ie),this.onChange=this._onChange.event,this.applyStyles()}get enabled(){return this.checkbox.enabled}enable(){this.checkbox.enable(),this.applyStyles(!0)}disable(){this.checkbox.disable(),this.applyStyles(!1)}setTitle(e){this.checkbox.setTitle(e)}applyStyles(e=this.enabled){this.domNode.style.color=(e?this.styles.checkboxForeground:this.styles.checkboxDisabledForeground)||"",this.domNode.style.backgroundColor=(e?this.styles.checkboxBackground:this.styles.checkboxDisabledBackground)||"",this.domNode.style.borderColor=(e?this.styles.checkboxBorder:this.styles.checkboxDisabledBackground)||"";const t=this.styles.size||18;this.domNode.style.width=this.domNode.style.height=this.domNode.style.fontSize=`${t}px`,this.domNode.style.fontSize=`${t-2}px`}};Mce.CLASS_NAME="monaco-checkbox";let oM=Mce;class RPe extends oM{constructor(e,t,n){const s=new mx({title:e,isChecked:t,icon:Ee.check,actionClassName:oM.CLASS_NAME,hoverLifecycleOptions:n.hoverLifecycleOptions,...APe});super(s,s.domNode,n),this._register(s),this._register(this.checkbox.onChange(r=>{this.applyStyles(),this._onChange.fire(r)}))}get checked(){return this.checkbox.checked}set checked(e){this.checkbox.checked=e,this.applyStyles()}applyStyles(e){this.checkbox.checked?this.checkbox.setIcon(Ee.check):this.checkbox.setIcon(void 0),super.applyStyles(e)}}class MPe extends oM{constructor(e,t,n){let s;switch(t){case!0:s=Ee.check;break;case"mixed":s=Ee.dash;break;case!1:s=void 0;break}const r=new mx({title:e,isChecked:t===!0,icon:s,actionClassName:RPe.CLASS_NAME,hoverLifecycleOptions:n.hoverLifecycleOptions,...APe});super(r,r.domNode,n),this._state=t,this._register(r),this._register(this.checkbox.onChange(o=>{this._state=this.checkbox.checked,this.applyStyles(),this._onChange.fire(o)}))}get checked(){return this._state}set checked(e){this._state!==e&&(this._state=e,this.checkbox.checked=e===!0,this.applyStyles())}applyStyles(e){switch(this._state){case!0:this.checkbox.setIcon(Ee.check);break;case"mixed":this.checkbox.setIcon(Ee.dash);break;case!1:this.checkbox.setIcon(void 0);break}super.applyStyles(e)}}const Ya=class Ya{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(s.changeDecorationOptions(this._highlightedDecorationId,Ya._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,s.changeDecorationOptions(this._highlightedDecorationId,Ya._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(s.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let r=this._editor.getModel().getDecorationRange(t);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){const o=r.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(o);r=new z(r.startLineNumber,r.startColumn,o,a)}this._rangeHighlightDecorationId=s.addDecoration(r,Ya._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let s=Ya._FIND_MATCH_DECORATION;const r=[];if(e.length>1e3){s=Ya._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,u=Math.max(2,Math.ceil(3/c));let h=e[0].range.startLineNumber,g=e[0].range.endLineNumber;for(let f=1,m=e.length;f=x.startLineNumber?x.endLineNumber>g&&(g=x.endLineNumber):(r.push({range:new z(h,1,g,1),options:Ya._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=x.startLineNumber,g=x.endLineNumber)}r.push({range:new z(h,1,g,1),options:Ya._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const o=new Array(e.length);for(let a=0,l=e.length;an.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>n.addDecoration(a,Ya._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const n=this._decorations[t],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.endLineNumber>e.lineNumber)){if(s.endLineNumbere.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return r;if(!(r.startColumn0){const n=[];for(let o=0;oz.compareRangesUsingStarts(o.range,a.range));const s=[];let r=n[0];for(let o=1;o0?e[0].toUpperCase()+e.substr(1):i[0][0].toUpperCase()!==i[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function Q0e(i,e,t){return i[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&i[0].split(t).length===e.split(t).length}function X0e(i,e,t){const n=e.split(t),s=i[0].split(t);let r="";return n.forEach((o,a)=>{r+=PPe([s[a]],o)+t}),r.slice(0,-1)}class Z0e{constructor(e){this.staticValue=e,this.kind=0}}class R7t{constructor(e){this.pieces=e,this.kind=1}}class BL{static fromStaticValue(e){return new BL([X1.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new Z0e(""):e.length===1&&e[0].staticValue!==null?this._state=new Z0e(e[0].staticValue):this._state=new R7t(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?PPe(e,this._state.staticValue):this._state.staticValue;let n="";for(let s=0,r=this._state.pieces.length;s0){const l=[],c=o.caseOps.length;let u=0;for(let h=0,g=a.length;h=c){l.push(a.slice(h));break}switch(o.caseOps[u]){case"U":l.push(a[h].toUpperCase());break;case"u":l.push(a[h].toUpperCase()),u++;break;case"L":l.push(a[h].toLowerCase());break;case"l":l.push(a[h].toLowerCase()),u++;break;default:l.push(a[h])}}a=l.join("")}n+=a}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e=s)break;const o=i.charCodeAt(n);switch(o){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` +`,n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic(" ",n+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(n-1),t.emitStatic("",n+1),e.push(String.fromCharCode(o));break}continue}if(r===36){if(n++,n>=s)break;const o=i.charCodeAt(n);if(o===36){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(o===48||o===38){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1,e),e.length=0;continue}if(49<=o&&o<=57){let a=o-48;if(n+1{if(this._editor.hasModel())return this.research(!1)},100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(n=>{(n.reason===3||n.reason===5||n.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(n=>{this._ignoreModelContentChanged||(n.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(n=>this._onStateChanged(n))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,ii(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){this._isDisposed||this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},O7t)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let n=null;typeof t<"u"?t!==null&&(Array.isArray(t)?n=t:n=[t]):n=this._decorations.getFindScopes(),n!==null&&(n=n.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new z(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));const s=this._findMatches(n,!1,i_);this._decorations.set(s,n);const r=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(r);if(o===0&&s.length>0){const a=ER(s.map(l=>l.range),l=>z.compareRangesUsingStarts(l,r)>=0);o=a>0?a-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(50).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:n,column:s}=e;const r=this._editor.getModel();return t||s===1?(n===1?n=r.getLineCount():n--,s=r.getLineMaxColumn(n)):s--,new te(n,s)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const u=this._decorations.matchAfterPosition(e);u&&this._setCurrentFindMatch(u);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:n,column:s}=e;const r=this._editor.getModel();return t||s===r.getLineMaxColumn(n)?(n===r.getLineCount()?n=1:n++,s=1):s++,new te(n,s)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const n=this._decorations.matchBeforePosition(e);n&&this._setCurrentFindMatch(n);return}if(this._decorations.getCount()qA._getSearchRange(this._editor.getModel(),r));return this._editor.getModel().findMatches(this._state.searchString,s,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(148):null,t,n)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=i_?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new Ny(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(148):null).parseSearchRequest();if(!t)return;let n=t.regex;if(!n.multiline){let h="mu";n.ignoreCase&&(h+="i"),n.global&&(h+="g"),n=new RegExp(n.source,h)}const s=this._editor.getModel(),r=s.getValue(1),o=s.getFullModelRange(),a=this._getReplacePattern();let l;const c=this._state.preserveCase;a.hasReplacementPatterns||c?l=r.replace(n,function(){return a.buildReplaceString(arguments,c)}):l=r.replace(n,a.buildReplaceString(null,c));const u=new hoe(o,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",u)}_regularReplaceAll(e){const t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),s=[];for(let o=0,a=n.length;oo.range),s);this._executeEditorCommand("replaceAll",r)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let n=this._findMatches(e,!1,1073741824).map(r=>new st(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn));const s=this._editor.getSelection();for(let r=0,o=n.length;r=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function BPe(i,e,t,n){let s;if(e.type===2)s=document.createTextNode(e.content||"");else if(e.type===3)s=document.createElement("b");else if(e.type===4)s=document.createElement("i");else if(e.type===7&&n)s=document.createElement("code");else if(e.type===5&&t){const r=document.createElement("a");t.disposables.add(yr(r,"click",o=>{t.callback(String(e.index),o)})),s=r}else e.type===8?s=document.createElement("br"):e.type===1&&(s=i);s&&i!==s&&i.appendChild(s),s&&Array.isArray(e.children)&&e.children.forEach(r=>{BPe(s,r,t,n)})}function z7t(i,e){const t={type:1,children:[]};let n=0,s=t;const r=[],o=new V7t(i);for(;!o.eos();){let a=o.next();const l=a==="\\"&&IZ(o.peek())!==0;if(l&&(a=o.next()),!l&&U7t(a)&&a===o.peek()){o.advance(),s.type===2&&(s=r.pop());const c=IZ(a);if(s.type===c||s.type===5&&c===6)s=r.pop();else{const u={type:c,children:[]};c===5&&(u.index=n,n++),s.children.push(u),r.push(s),s=u}}else if(a===` +`)s.type===2&&(s=r.pop()),s.children.push({type:8});else if(s.type!==2){const c={type:2,content:a};s.children.push(c),r.push(s),s=c}else s.content+=a}return s.type===2&&(s=r.pop()),t}function U7t(i,e){return IZ(i)!==0}function IZ(i,e){switch(i){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return 0;default:return 0}}class $7t{constructor(e,t=0,n=e.length,s=t-1){this.items=e,this.start=t,this.end=n,this.index=s}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class q7t{constructor(e=new Set,t=10){this._history=e,this._limit=t,this._onChange(),this._history.onDidChange&&(this._disposable=this._history.onDidChange(()=>this._onChange()))}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new $7t(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;if(e.length>this._limit){const t=e.slice(e.length-this._limit);this._history.replace?this._history.replace(t):this._history=new Set(t)}}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}dispose(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0)}}const Sk=Oe;let K7t=class extends id{get onDidChange(){return this._onDidChange.event}get onDidHeightChange(){return this._onDidHeightChange.event}constructor(e,t,n){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this.hover=this._register(new Zn),this._onDidChange=this._register(new ie),this._onDidHeightChange=this._register(new ie),this.contextViewProvider=t,this.options=n,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=De(e,Sk(".monaco-inputbox.idle"));const s=this.options.flexibleHeight?"textarea":"input",r=De(this.element,Sk(".ibwrapper"));if(this.input=De(r,Sk(s+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=De(r,Sk("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new s2e(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),De(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(l=>this.input.scrollTop=l.scrollTop));const o=this._register(new ri(e.ownerDocument,"selectionchange")),a=He.filter(o.event,()=>{const l=e.ownerDocument.getSelection();return(l==null?void 0:l.anchorNode)===r});this._register(a(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new mc(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover.value||(this.hover.value=this._register(Xh().setupDelayedHoverAtMouse(this.input,()=>({content:this.tooltip,appearance:{compact:!0}}))))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:cb(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return S7(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){const e=this.input.selectionStart;if(e===null)return null;const t=this.input.selectionEnd??e;return{start:e,end:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}showMessage(e,t){if(this.state==="open"&&qc(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const n=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Tb(n.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=Oc(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:s=>{if(!this.message)return null;e=De(s,Sk(".monaco-inputbox-container")),t();const r=Sk("span.monaco-inputbox-message");this.message.formatContent?W7t(this.message.content,void 0,r):H7t(this.message.content,void 0,r),r.classList.add(this.classForType(this.message.type));const o=this.stylesForType(this.message.type);return r.style.backgroundColor=o.background??"",r.style.color=o.foreground??"",r.style.border=o.border?`1px solid ${o.border}`:"",De(e,r),null},onHide:()=>{this.state="closed"},layout:t});let n;this.message.type===3?n=S(9,"Error: {0}",this.message.content):this.message.type===2?n=S(10,"Warning: {0}",this.message.content):n=S(11,"Info: {0}",this.message.content),$l(n),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,n=e.charCodeAt(e.length-1)===10?" ":"";(e+n).replace(/\u000c/g,"")?this.mirror.textContent=e+n:this.mirror.innerText=" ",this.layout()}applyStyles(){const e=this.options.inputBoxStyles,t=e.inputBackground??"",n=e.inputForeground??"",s=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=n,this.input.style.backgroundColor="inherit",this.input.style.color=n,this.element.style.border=`1px solid ${Tb(s,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=cb(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,n=t.selectionStart,s=t.selectionEnd,r=t.value;n!==null&&s!==null&&(this.value=r.substr(0,n)+e+r.substr(s),t.setSelectionRange(n+1,n+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,(e=this.actionbar)==null||e.dispose(),super.dispose()}};class HPe extends K7t{constructor(e,t,n){const s=S(12," or {0} for history","⇅"),r=S(13," ({0} for history)","⇅");super(e,t,n),this._onDidFocus=this._register(new ie),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new ie),this.onDidBlur=this._onDidBlur.event,this.history=this._register(new q7t(n.history,100));const o=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(r)&&this.history.getHistory().length){const a=this.placeholder.endsWith(")")?s:r,l=this.placeholder+a;n.showPlaceholderOnFocus&&!S7(this.input)?this.placeholder=l:this.setPlaceHolder(l)}};this.observer=new MutationObserver((a,l)=>{a.forEach(c=>{c.target.textContent||o()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>o()),this.onblur(this.input,()=>{const a=l=>{if(this.placeholder.endsWith(l)){const c=this.placeholder.slice(0,this.placeholder.length-l.length);return n.showPlaceholderOnFocus?this.placeholder=c:this.setPlaceHolder(c),!0}else return!1};a(r)||a(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",zg(this.value?this.value:S(14,"Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,zg(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}const G7t=S(1,"input");class WPe extends id{get onDidOptionChange(){return this._onDidOptionChange.event}get onKeyDown(){return this._onKeyDown.event}get onMouseDown(){return this._onMouseDown.event}get onCaseSensitiveKeyDown(){return this._onCaseSensitiveKeyDown.event}get onRegexKeyDown(){return this._onRegexKeyDown.event}constructor(e,t,n){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new Zn),this.additionalToggles=[],this._onDidOptionChange=this._register(new ie),this._onKeyDown=this._register(new ie),this._onMouseDown=this._register(new ie),this._onInput=this._register(new ie),this._onKeyUp=this._register(new ie),this._onCaseSensitiveKeyDown=this._register(new ie),this._onRegexKeyDown=this._register(new ie),this._lastHighlightFindOptions=0,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||G7t,this.showCommonFindToggles=!!n.showCommonFindToggles;const s=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",o=n.appendRegexLabel||"",a=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new HPe(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:n.inputBoxStyles,history:n.history})),this.showCommonFindToggles){const u=(n==null?void 0:n.hoverLifecycleOptions)||{groupId:"find-input"};this.regex=this._register(new FPe({appendTitle:o,isChecked:!1,hoverLifecycleOptions:u,...n.toggleStyles})),this._register(this.regex.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(g=>{this._onRegexKeyDown.fire(g)})),this.wholeWords=this._register(new jPe({appendTitle:r,isChecked:!1,hoverLifecycleOptions:u,...n.toggleStyles})),this._register(this.wholeWords.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new OPe({appendTitle:s,isChecked:!1,hoverLifecycleOptions:u,...n.toggleStyles})),this._register(this.caseSensitive.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(g=>{this._onCaseSensitiveKeyDown.fire(g)}));const h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,g=>{if(g.equals(15)||g.equals(17)||g.equals(9)){const f=h.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let m=-1;g.equals(17)?m=(f+1)%h.length:g.equals(15)&&(f===0?m=h.length-1:m=f-1),g.equals(9)?(h[f].blur(),this.inputBox.focus()):m>=0&&h[m].focus(),Vn.stop(g,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(n==null?void 0:n.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e==null||e.appendChild(this.domNode),this._register(de(this.inputBox.inputElement,"compositionstart",u=>{this.imeSessionInProgress=!0})),this._register(de(this.inputBox.inputElement,"compositionend",u=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,u=>this._onKeyDown.fire(u)),this.onkeyup(this.inputBox.inputElement,u=>this._onKeyUp.fire(u)),this.oninput(this.inputBox.inputElement,u=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,u=>this._onMouseDown.fire(u))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,n;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(e=this.regex)==null||e.enable(),(t=this.wholeWords)==null||t.enable(),(n=this.caseSensitive)==null||n.enable();for(const s of this.additionalToggles)s.enable()}disable(){var e,t,n;this.domNode.classList.add("disabled"),this.inputBox.disable(),(e=this.regex)==null||e.disable(),(t=this.wholeWords)==null||t.disable(),(n=this.caseSensitive)==null||n.disable();for(const s of this.additionalToggles)s.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const t of this.additionalToggles)t.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new _e;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange(n=>{this._onDidOptionChange.fire(n),!n&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,n,s;e?this.inputBox.paddingRight=0:this.inputBox.paddingRight=(((t=this.caseSensitive)==null?void 0:t.width())??0)+(((n=this.wholeWords)==null?void 0:n.width())??0)+(((s=this.regex)==null?void 0:s.width())??0)+this.additionalToggles.reduce((r,o)=>r+o.width(),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e;return((e=this.caseSensitive)==null?void 0:e.checked)??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e;return((e=this.wholeWords)==null?void 0:e.checked)??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e;return((e=this.regex)==null?void 0:e.checked)??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;(e=this.caseSensitive)==null||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}const Y7t=S(5,"input"),Q7t=S(6,"Preserve Case");class X7t extends mx{constructor(e){super({icon:Ee.preserveCase,title:Q7t+e.appendTitle,isChecked:e.isChecked,hoverLifecycleOptions:e.hoverLifecycleOptions,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Z7t extends id{get onDidOptionChange(){return this._onDidOptionChange.event}get onKeyDown(){return this._onKeyDown.event}get onPreserveCaseKeyDown(){return this._onPreserveCaseKeyDown.event}constructor(e,t,n,s){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new ie),this._onKeyDown=this._register(new ie),this._onMouseDown=this._register(new ie),this._onInput=this._register(new ie),this._onKeyUp=this._register(new ie),this._onPreserveCaseKeyDown=this._register(new ie),this.contextViewProvider=t,this.placeholder=s.placeholder||"",this.validation=s.validation,this.label=s.label||Y7t;const r=s.appendPreserveCaseLabel||"",o=s.history||new Set([]),a=!!s.flexibleHeight,l=!!s.flexibleWidth,c=s.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new HPe(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:o,showHistoryHint:s.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c,inputBoxStyles:s.inputBoxStyles})),this.preserveCase=this._register(new X7t({appendTitle:r,isChecked:!1,hoverLifecycleOptions:s.hoverLifecycleOptions,...s.toggleStyles})),this._register(this.preserveCase.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(g=>{this._onPreserveCaseKeyDown.fire(g)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const u=[this.preserveCase.domNode];this.onkeydown(this.domNode,g=>{if(g.equals(15)||g.equals(17)||g.equals(9)){const f=u.indexOf(this.domNode.ownerDocument.activeElement);if(f>=0){let m=-1;g.equals(17)?m=(f+1)%u.length:g.equals(15)&&(f===0?m=u.length-1:m=f-1),g.equals(9)?(u[f].blur(),this.inputBox.focus()):m>=0&&u[m].focus(),Vn.stop(g,!0)}}});const h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,g=>this._onKeyDown.fire(g)),this.onkeyup(this.inputBox.inputElement,g=>this._onKeyUp.fire(g)),this.oninput(this.inputBox.inputElement,g=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,g=>this._onMouseDown.fire(g))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)==null||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var VPe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},zPe=function(i,e){return function(t,n){e(t,n,i)}};const ole=new Ze("suggestWidgetVisible",!1,S(1698,"Whether suggestion are visible")),ale="historyNavigationWidgetFocus",UPe="historyNavigationForwardsEnabled",$Pe="historyNavigationBackwardsEnabled";let Mb;const e4=[];function qPe(i,e){if(e4.includes(e))throw new Error("Cannot register the same widget multiple times");e4.push(e);const t=new _e,n=new Ze(ale,!1).bindTo(i),s=new Ze(UPe,!0).bindTo(i),r=new Ze($Pe,!0).bindTo(i),o=()=>{n.set(!0),Mb=e},a=()=>{n.set(!1),Mb===e&&(Mb=void 0)};return S7(e.element)&&o(),t.add(e.onDidFocus(()=>o())),t.add(e.onDidBlur(()=>a())),t.add(dt(()=>{e4.splice(e4.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:s,historyNavigationBackwardsEnablement:r,dispose(){t.dispose()}}}let AZ=class extends WPe{constructor(e,t,n,s){super(e,t,n);const r=this._register(s.createScoped(this.inputBox.element));this._register(qPe(r,this.inputBox))}};AZ=VPe([zPe(3,Bt)],AZ);let RZ=class extends Z7t{constructor(e,t,n,s,r=!1){super(e,t,r,n);const o=this._register(s.createScoped(this.inputBox.element));this._register(qPe(o,this.inputBox))}};RZ=VPe([zPe(3,Bt)],RZ);jo.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:Ne.and(Ne.has(ale),Ne.equals($Pe,!0),Ne.not("isComposing"),ole.isEqualTo(!1)),primary:16,secondary:[528],handler:i=>{Mb==null||Mb.showPreviousValue()}});jo.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:Ne.and(Ne.has(ale),Ne.equals(UPe,!0),Ne.not("isComposing"),ole.isEqualTo(!1)),primary:18,secondary:[530],handler:i=>{Mb==null||Mb.showNextValue()}});function J0e(i){var e,t;return((e=i.lookupKeybinding("history.showPrevious"))==null?void 0:e.getElectronAccelerator())==="Up"&&((t=i.lookupKeybinding("history.showNext"))==null?void 0:t.getElectronAccelerator())==="Down"}const eye=ls("find-collapsed",Ee.chevronRight,S(956,"Icon to indicate that the editor find widget is collapsed.")),tye=ls("find-expanded",Ee.chevronDown,S(957,"Icon to indicate that the editor find widget is expanded.")),J7t=ls("find-selection",Ee.selection,S(958,"Icon for 'Find in Selection' in the editor find widget.")),eWt=ls("find-replace",Ee.replace,S(959,"Icon for 'Replace' in the editor find widget.")),tWt=ls("find-replace-all",Ee.replaceAll,S(960,"Icon for 'Replace All' in the editor find widget.")),nWt=ls("find-previous-match",Ee.arrowUp,S(961,"Icon for 'Find Previous' in the editor find widget.")),iWt=ls("find-next-match",Ee.arrowDown,S(962,"Icon for 'Find Next' in the editor find widget.")),sWt=S(963,"Find / Replace"),rWt=S(964,"Find"),oWt=S(965,"Find"),aWt=S(966,"Previous Match"),lWt=S(967,"Next Match"),cWt=S(968,"Find in Selection"),dWt=S(969,"Close"),uWt=S(970,"Replace"),hWt=S(971,"Replace"),gWt=S(972,"Replace"),fWt=S(973,"Replace All"),pWt=S(974,"Toggle Replace"),mWt=S(975,"Only the first {0} results are highlighted, but all find operations work on the entire text.",i_),bWt=S(976,"{0} of {1}"),nye=S(977,"No results"),bf=419,xWt=275,vWt=xWt-54;let _I=69;const _Wt=33,iye=bn?256:2048;class Uq{constructor(e){this.afterLineNumber=e,this.heightInPx=_Wt,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function sye(i,e,t){const n=!!e.match(/\n/);if(t&&n&&t.selectionStart>0){i.stopPropagation();return}}function rye(i,e,t){const n=!!e.match(/\n/);if(t&&n&&t.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(u=>this._onStateChanged(u))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(u=>{if(u.hasChanged(104)&&(this._codeEditor.getOption(104)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),u.hasChanged(165)&&this._tryUpdateWidgetWidth(),u.hasChanged(2)&&this.updateAccessibilitySupport(),u.hasChanged(50)){const h=this._codeEditor.getOption(50).loop;this._state.change({loop:h},!1);const g=this._codeEditor.getOption(50).addExtraSpaceOnTop;g&&!this._viewZone&&(this._viewZone=new Uq(0),this._showViewZone()),!g&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const u=await this._controller.getGlobalBufferTerm();u&&u!==this._state.searchString&&(this._state.change({searchString:u},!1),this._findInput.select())}})),this._findInputFocused=kW.bindTo(o),this._findFocusTracker=this._register($u(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=rle.bindTo(o),this._replaceFocusTracker=this._register($u(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(50).addExtraSpaceOnTop&&(this._viewZone=new Uq(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(u=>{if(u.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return _9.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(104)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=Oc(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,zt)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){var t;this._matchesCount.style.minWidth=_I+"px",this._state.matchesCount>=i_?this._matchesCount.title=mWt:this._matchesCount.title="",(t=this._matchesCount.firstChild)==null||t.remove();let e;if(this._state.matchesCount>0){let n=String(this._state.matchesCount);this._state.matchesCount>=i_&&(n+="+");let s=String(this._state.matchesPosition);s==="0"&&(s="?"),e=gC(bWt,s,n)}else e=nye;this._matchesCount.appendChild(document.createTextNode(e)),$l(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),_I=Math.max(_I,this._matchesCount.clientWidth)}_getAriaLabel(e,t,n){if(e===nye)return n===""?S(978,"{0} found",e):S(979,"{0} found for '{1}'",e,n);if(t){const s=S(980,"{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),r=this._codeEditor.getModel();return r&&t.startLineNumber<=r.getLineCount()&&t.startLineNumber>=1?`${r.getLineContent(t.startLineNumber)}, ${s}`:s}return S(981,"{0} found for '{1}'",e,n)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const n=!this._codeEditor.getOption(104);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(50).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const n=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=n;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(50).seedSearchStringFromSelection&&e){const n=this._codeEditor.getDomNode();if(n){const s=Zs(n),r=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=s.left+(r?r.left:0),a=r?r.top:0;if(this._viewZone&&ae.startLineNumber&&(t=!1);const l=AIe(this._domNode).left;o>l&&(t=!1);const c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());s.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(50).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const n=this._viewZone;this._viewZoneId!==void 0||!n||this._codeEditor.changeViewZones(s=>{n.heightInPx=this._getHeight(),this._viewZoneId=s.addZone(n),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+n.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(50).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new Uq(0));const n=this._viewZone;this._codeEditor.changeViewZones(s=>{if(this._viewZoneId!==void 0){const r=this._getHeight();if(r===n.heightInPx)return;const o=r-n.heightInPx;n.heightInPx=r,s.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o);return}else{let r=this._getHeight();if(r-=this._codeEditor.getOption(96).top,r<=0)return;n.heightInPx=r,this._viewZoneId=s.addZone(n),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const n=e.width,s=e.minimap.minimapWidth;let r=!1,o=!1,a=!1;if(this._resized&&Oc(this._domNode)>bf){this._domNode.style.maxWidth=`${n-28-s-15}px`,this._replaceInput.width=Oc(this._findInput.domNode);return}if(bf+28+s>=n&&(o=!0),bf+28+s-_I>=n&&(a=!0),bf+28+s-_I>=n+50&&(r=!0),this._domNode.classList.toggle("collapsed-find-widget",r),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",o),!a&&!r&&(this._domNode.style.maxWidth=`${n-28-s-15}px`),this._findInput.layout({collapsedFindWidget:r,narrowFindWidget:a,reducedFindWidget:o}),this._resized){const l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=Oc(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===e?!1:(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const n=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!z.equalsRange(t,n)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(iye|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return sye(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return rye(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(iye|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._replaceInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return sye(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return rye(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const n=this._codeEditor.getOption(50).history,s=this._codeEditor.getOption(50).replaceHistory;this._findInput=this._register(new AZ(null,this._contextViewProvider,{width:vWt,label:rWt,placeholder:oWt,appendCaseSensitiveLabel:this._keybindingLabelFor(Xi.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Xi.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Xi.ToggleRegexCommand),validation:h=>{if(h.length===0||!this._findInput.getRegex())return null;try{return new RegExp(h,"gu"),null}catch(g){return{content:g.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>J0e(this._keybindingService),inputBoxStyles:B6,toggleStyles:F6,history:n==="workspace"?this._findWidgetSearchHistory:new Set([])},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(h=>{h.equals(3)&&!this._codeEditor.getOption(50).findOnType&&this._state.change({searchString:this._findInput.getValue()},!0),this._onFindInputKeyDown(h)})),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||!this._codeEditor.getOption(50).findOnType||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(h=>{h.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),h.preventDefault())})),this._register(this._findInput.onRegexKeyDown(h=>{h.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),h.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(h=>{this._tryUpdateHeight()&&this._showViewZone()})),xc&&this._register(this._findInput.onMouseDown(h=>this._onFindInputMouseDown(h))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const r={groupId:"find-widget"};this._prevBtn=this._register(new Ty({label:aWt+this._keybindingLabelFor(Xi.PreviousMatchFindAction),icon:nWt,hoverLifecycleOptions:r,onTrigger:()=>{Uv(this._codeEditor.getAction(Xi.PreviousMatchFindAction)).run().then(void 0,zt)}},this._hoverService)),this._nextBtn=this._register(new Ty({label:lWt+this._keybindingLabelFor(Xi.NextMatchFindAction),icon:iWt,hoverLifecycleOptions:r,onTrigger:()=>{Uv(this._codeEditor.getAction(Xi.NextMatchFindAction)).run().then(void 0,zt)}},this._hoverService));const o=document.createElement("div");o.className="find-part",o.appendChild(this._findInput.domNode);const a=document.createElement("div");a.className="find-actions",o.appendChild(a),a.appendChild(this._matchesCount),a.appendChild(this._prevBtn.domNode),a.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new mx({icon:J7t,title:cWt+this._keybindingLabelFor(Xi.ToggleSearchScopeCommand),isChecked:!1,hoverLifecycleOptions:r,inputActiveOptionBackground:Pe(MD),inputActiveOptionBorder:Pe(UP),inputActiveOptionForeground:Pe($P)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let h=this._codeEditor.getSelections();h=h.map(g=>(g.endColumn===1&&g.endLineNumber>g.startLineNumber&&(g=g.setEndPosition(g.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(g.endLineNumber-1))),g.isEmpty()?null:g)).filter(g=>!!g),h.length&&this._state.change({searchScope:h},!0)}}else this._state.change({searchScope:null},!0)})),a.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Ty({label:dWt+this._keybindingLabelFor(Xi.CloseFindWidgetCommand),icon:xMe,hoverLifecycleOptions:r,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:h=>{h.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),h.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new RZ(null,void 0,{label:uWt,placeholder:hWt,appendPreserveCaseLabel:this._keybindingLabelFor(Xi.TogglePreserveCaseCommand),history:s==="workspace"?this._replaceWidgetHistory:new Set([]),flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>J0e(this._keybindingService),inputBoxStyles:B6,toggleStyles:F6,hoverLifecycleOptions:r},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(h=>this._onReplaceInputKeyDown(h))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(h=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(h=>{h.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),h.preventDefault())})),this._replaceBtn=this._register(new Ty({label:gWt+this._keybindingLabelFor(Xi.ReplaceOneAction),icon:eWt,hoverLifecycleOptions:r,onTrigger:()=>{this._controller.replace()},onKeyDown:h=>{h.equals(1026)&&(this._closeBtn.focus(),h.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new Ty({label:fWt+this._keybindingLabelFor(Xi.ReplaceAllAction),icon:tWt,hoverLifecycleOptions:r,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const l=document.createElement("div");l.className="replace-part",l.appendChild(this._replaceInput.domNode);const c=document.createElement("div");c.className="replace-actions",l.appendChild(c),c.appendChild(this._replaceBtn.domNode),c.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Ty({label:pWt,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Oc(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=sWt,this._domNode.role="dialog",this._domNode.style.width=`${bf}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(o),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(l),this._resizeSash=this._register(new Ta(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let u=bf;this._register(this._resizeSash.onDidStart(()=>{u=Oc(this._domNode)})),this._register(this._resizeSash.onDidChange(h=>{this._resized=!0;const g=u+h.startX-h.currentX;if(gf||(this._domNode.style.width=`${g}px`,this._isReplaceVisible&&(this._replaceInput.width=Oc(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const h=Oc(this._domNode);if(hthis._codeEditor.getScrollTop()),{widgetViewZoneVisible:e,scrollTop:this._codeEditor.getScrollTop()}}setViewState(e){e&&e.widgetViewZoneVisible&&this._layoutViewZone(e.scrollTop)}};_9.ID="editor.contrib.findWidget";let MZ=_9;class Ty extends id{constructor(e,t){super(),this._opts=e;let n="button";this._opts.className&&(n=n+" "+this._opts.className),this._opts.icon&&(n=n+" "+Tt.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.tabIndex=0,this._domNode.className=n,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this._register(t.setupDelayedHover(this._domNode,{content:this._opts.label,style:1},e.hoverLifecycleOptions)),this.onclick(this._domNode,s=>{this._opts.onTrigger(),s.preventDefault()}),this.onkeydown(this._domNode,s=>{var r,o;if(s.equals(10)||s.equals(3)){this._opts.onTrigger(),s.preventDefault();return}(o=(r=this._opts).onKeyDown)==null||o.call(r,s)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...Tt.asClassNameArray(eye)),this._domNode.classList.add(...Tt.asClassNameArray(tye))):(this._domNode.classList.remove(...Tt.asClassNameArray(tye)),this._domNode.classList.add(...Tt.asClassNameArray(eye)))}}Zu((i,e)=>{const t=i.getColor(Gv);t&&e.addRule(`.monaco-editor .findMatch { border: 1px ${Fg(i.type)?"dotted":"solid"} ${t}; box-sizing: border-box; }`);const n=i.getColor(o2t);n&&e.addRule(`.monaco-editor .findScope { border: 1px ${Fg(i.type)?"dashed":"solid"} ${n}; }`);const s=i.getColor(Dn);s&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${s}; }`);const r=i.getColor(s2t);r&&e.addRule(`.monaco-editor .findMatchInline { color: ${r}; }`);const o=i.getColor(r2t);o&&e.addRule(`.monaco-editor .currentFindMatchInline { color: ${o}; }`)});var yWt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},oye=function(i,e){return function(t,n){e(t,n,i)}};let PZ=class extends se{constructor(e,t,n,s){super(),this._container=e,this._getContent=t,this._clipboardService=n,this._hoverService=s,this._container.classList.add("hover-row-with-copy"),this._button=this._register(new Ty({label:S(1128,"Copy"),icon:Ee.copy,onTrigger:()=>this._copyContent(),className:"hover-copy-button"},this._hoverService)),this._container.appendChild(this._button.domNode)}async _copyContent(){const e=this._getContent();e&&(await this._clipboardService.writeText(e),zg(S(1129,"Copied to clipboard")))}};PZ=yWt([oye(2,ed),oye(3,Zl)],PZ);class wWt{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}}async function CWt(i,e,t,n,s){const r=await Promise.resolve(i.provideHover(t,n,s)).catch(Pr);if(!(!r||!SWt(r)))return new wWt(i,r,e)}function lle(i,e,t,n,s=!1){const o=i.ordered(e,s).map((a,l)=>CWt(a,l,e,t,n));return Fu.fromPromisesResolveOrder(o).coalesce()}async function KPe(i,e,t,n,s=!1){const r=[];for await(const o of lle(i,e,t,n,s))r.push(o.hover);return r}kc("_executeHoverProvider",(i,e,t)=>{const n=i.get(lt);return KPe(n.hoverProvider,e,t,pn.None)});kc("_executeHoverProvider_recursive",(i,e,t)=>{const n=i.get(lt);return KPe(n.hoverProvider,e,t,pn.None,!0)});function SWt(i){const e=typeof i.range<"u",t=typeof i.contents<"u"&&i.contents&&i.contents.length>0;return e&&t}var kWt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},kk=function(i,e){return function(t,n){e(t,n,i)}};const S1=Oe,NWt=ls("hover-increase-verbosity",Ee.add,S(1130,"Icon for increaseing hover verbosity.")),EWt=ls("hover-decrease-verbosity",Ee.remove,S(1131,"Icon for decreasing hover verbosity."));class Th{constructor(e,t,n,s,r,o=void 0){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=s,this.ordinal=r,this.source=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class GPe{constructor(e,t,n){this.hover=e,this.hoverProvider=t,this.hoverPosition=n}supportsVerbosityAction(e){switch(e){case jc.Increase:return this.hover.canIncreaseVerbosity??!1;case jc.Decrease:return this.hover.canDecreaseVerbosity??!1}}}let aM=class{constructor(e,t,n,s,r,o,a){this._editor=e,this._markdownRendererService=t,this._configurationService=n,this._languageFeaturesService=s,this._keybindingService=r,this._hoverService=o,this._commandService=a,this.hoverOrdinal=3}createLoadingMessage(e){return new Th(this,e.range,[new Ma().appendText(S(1132,"Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),s=e.range.startLineNumber,r=n.getLineMaxColumn(s),o=[];let a=1e3;const l=n.getLineLength(s),c=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(133),h=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:c});let g=!1;u>=0&&l>u&&e.range.startColumn>=u&&(g=!0,o.push(new Th(this,e.range,[{value:S(1133,"Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!g&&typeof h=="number"&&l>=h&&o.push(new Th(this,e.range,[{value:S(1134,"Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(const m of t){const x=m.range.startLineNumber===s?m.range.startColumn:1,v=m.range.endLineNumber===s?m.range.endColumn:r,_=m.options.hoverMessage;if(!_||RL(_))continue;m.options.beforeContentClassName&&(f=!0);const w=new z(e.range.startLineNumber,x,e.range.startLineNumber,v);o.push(new Th(this,w,Zre(_),f,a++))}return o}computeAsync(e,t,n,s){if(!this._editor.hasModel()||e.type!==1)return Fu.EMPTY;const r=this._editor.getModel(),o=this._languageFeaturesService.hoverProvider;return o.has(r)?this._getMarkdownHovers(o,r,e,s):Fu.EMPTY}async*_getMarkdownHovers(e,t,n,s){const r=n.range.getStartPosition(),o=lle(e,t,r,s);for await(const a of o)if(!RL(a.hover.contents)){const l=a.hover.range?z.lift(a.hover.range):n.range,c=new GPe(a.hover,a.provider,r);yield new Th(this,l,a.hover.contents,!1,a.ordinal,c)}}renderHoverParts(e,t){return this._renderedHoverParts=new LWt(t,e.fragment,this,this._editor,this._commandService,this._keybindingService,this._hoverService,this._configurationService,this._markdownRendererService,e.onContentsChanged),this._renderedHoverParts}handleScroll(e){var t;(t=this._renderedHoverParts)==null||t.handleScroll(e)}getAccessibleContent(e){var t;return((t=this._renderedHoverParts)==null?void 0:t.getAccessibleContent(e))??""}updateMarkdownHoverVerbosityLevel(e,t){var n;return Promise.resolve((n=this._renderedHoverParts)==null?void 0:n.updateMarkdownHoverPartVerbosityLevel(e,t))}};aM=kWt([kk(1,Zh),kk(2,Zt),kk(3,lt),kk(4,zn),kk(5,Zl),kk(6,es)],aM);class t4{constructor(e,t,n,s){this.hoverPart=e,this.hoverElement=t,this.disposables=n,this.actionsContainer=s}dispose(){this.disposables.dispose()}}class LWt{constructor(e,t,n,s,r,o,a,l,c,u){this._hoverParticipant=n,this._editor=s,this._commandService=r,this._keybindingService=o,this._hoverService=a,this._configurationService=l,this._markdownRendererService=c,this._onFinishedRendering=u,this._ongoingHoverOperations=new Map,this._disposables=new _e,this.renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._disposables.add(dt(()=>{this.renderedHoverParts.forEach(h=>{h.dispose()}),this._ongoingHoverOperations.forEach(h=>{h.tokenSource.dispose(!0)})}))}_renderHoverParts(e,t,n){return e.sort(_a(s=>s.ordinal,$c)),e.map(s=>{const r=this._renderHoverPart(s,n);return t.appendChild(r.hoverElement),r})}_renderHoverPart(e,t){const n=this._renderMarkdownHover(e,t),s=n.hoverElement,r=e.source,o=new _e;if(o.add(n),!r)return new t4(e,s,o);const a=r.supportsVerbosityAction(jc.Increase),l=r.supportsVerbosityAction(jc.Decrease);if(!a&&!l)return new t4(e,s,o);const c=S1("div.verbosity-actions");s.prepend(c);const u=S1("div.verbosity-actions-inner");return c.append(u),o.add(this._renderHoverExpansionAction(u,jc.Increase,a)),o.add(this._renderHoverExpansionAction(u,jc.Decrease,l)),new t4(e,s,o,u)}_renderMarkdownHover(e,t){return YPe(this._editor,e,this._markdownRendererService,t)}_renderHoverExpansionAction(e,t,n){const s=new _e,r=t===jc.Increase,o=De(e,S1(Tt.asCSSSelector(r?NWt:EWt)));o.tabIndex=0;const a=new PL("mouse",void 0,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(s.add(this._hoverService.setupManagedHover(a,o,TWt(this._keybindingService,t))),!n)return o.classList.add("disabled"),s;o.classList.add("enabled");const l=()=>this._commandService.executeCommand(t===jc.Increase?yW:wW,{focus:!0});return s.add(new DPe(o,l)),s.add(new TPe(o,l,[3,10])),s}handleScroll(e){this.renderedHoverParts.forEach(t=>{const n=t.actionsContainer;if(!n)return;const s=t.hoverElement,o=e.scrollTop+e.height,a=s.offsetTop,l=s.clientHeight,c=a+l,u=22;let h;c<=o||a>=o?h=l-u:h=o-a-u,n.style.top=`${h}px`})}async updateMarkdownHoverPartVerbosityLevel(e,t){const n=this._editor.getModel();if(!n)return;const s=this._getRenderedHoverPartAtIndex(t),r=s==null?void 0:s.hoverPart.source;if(!s||!(r!=null&&r.supportsVerbosityAction(e)))return;const o=await this._fetchHover(r,n,e);if(!o)return;const a=new GPe(o,r.hoverProvider,r.hoverPosition),l=s.hoverPart,c=new Th(this._hoverParticipant,l.range,o.contents,l.isBeforeContent,l.ordinal,a),u=this._updateRenderedHoverPart(t,c);if(u)return{hoverPart:c,hoverElement:u.hoverElement}}getAccessibleContent(e){const t=this.renderedHoverParts.findIndex(o=>o.hoverPart===e);if(t===-1)return;const n=this._getRenderedHoverPartAtIndex(t);return n?n.hoverElement.innerText.replace(/[^\S\n\r]+/gu," "):void 0}async _fetchHover(e,t,n){let s=n===jc.Increase?1:-1;const r=e.hoverProvider,o=this._ongoingHoverOperations.get(r);o&&(o.tokenSource.cancel(),s+=o.verbosityDelta);const a=new vs;this._ongoingHoverOperations.set(r,{verbosityDelta:s,tokenSource:a});const l={verbosityRequest:{verbosityDelta:s,previousHover:e.hover}};let c;try{c=await Promise.resolve(r.provideHover(t,e.hoverPosition,a.token,l))}catch(u){Pr(u)}return a.dispose(),this._ongoingHoverOperations.delete(r),c}_updateRenderedHoverPart(e,t){if(e>=this.renderedHoverParts.length||e<0)return;const n=this._renderHoverPart(t,this._onFinishedRendering),s=this.renderedHoverParts[e],r=s.hoverElement,o=n.hoverElement,a=Array.from(o.children);r.replaceChildren(...a);const l=new t4(t,r,n.disposables,n.actionsContainer);return s.dispose(),this.renderedHoverParts[e]=l,l}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}function DWt(i,e,t,n){e.sort(_a(r=>r.ordinal,$c));const s=[];for(const r of e){const o=YPe(t,r,n,i.onContentsChanged);i.fragment.appendChild(o.hoverElement),s.push(o)}return new MC(s)}function YPe(i,e,t,n){const s=new _e,r=S1("div.hover-row"),o=S1("div.hover-row-contents");r.appendChild(o);const a=e.contents;for(const c of a){if(RL(c))continue;const u=S1("div.markdown-hover"),h=De(u,S1("div.hover-contents")),g=s.add(t.render(c,{context:i,asyncRenderCallback:()=>{h.className="hover-contents code-hover-contents",n()}}));h.appendChild(g.element),o.appendChild(u)}return{hoverPart:e,hoverElement:r,dispose(){s.dispose()}}}function TWt(i,e){switch(e){case jc.Increase:{const t=i.lookupKeybinding(yW);return t?S(1135,"Increase Hover Verbosity ({0})",t.getLabel()):S(1136,"Increase Hover Verbosity")}case jc.Decrease:{const t=i.lookupKeybinding(wW);return t?S(1137,"Decrease Hover Verbosity ({0})",t.getLabel()):S(1138,"Decrease Hover Verbosity")}}}const aye=Oe;class IWt extends se{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new ie,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ie,this.onColorFlushed=this._onColorFlushed.event,this._domNode=aye(".saturation-wrap"),De(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",De(this._domNode,this._canvas),this.selection=aye(".saturation-selection"),De(this._domNode,this.selection),this.layout(),this._register(de(this._domNode,Fe.POINTER_DOWN,s=>this.onPointerDown(s))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new AD);const t=Zs(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangePosition(s.pageX-t.left,s.pageY-t.top),()=>null);const n=de(e.target.ownerDocument,Fe.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),s=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,s),this._onDidChange.fire({s:n,v:s})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new ye(new ap(e.h,1,1,1)),n=this._canvas.getContext("2d"),s=n.createLinearGradient(0,0,this._canvas.width,0);s.addColorStop(0,"rgba(255, 255, 255, 1)"),s.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),s.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this._canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=ye.Format.CSS.format(t),n.fill(),n.fillStyle=s,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class AWt extends se{constructor(e){super(),this._onClicked=this._register(new ie),this.onClicked=this._onClicked.event,this._button=De(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(de(this._button,Fe.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}}const yI=Oe;class QPe extends se{constructor(e,t,n){super(),this.model=t,this._onDidChange=new ie,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ie,this.onColorFlushed=this._onColorFlushed.event,n==="standalone"?(this.domNode=De(e,yI(".standalone-strip")),this.overlay=De(this.domNode,yI(".standalone-overlay"))):(this.domNode=De(e,yI(".strip")),this.overlay=De(this.domNode,yI(".overlay"))),this.slider=De(this.domNode,yI(".slider")),this.slider.style.top="0px",this._register(de(this.domNode,Fe.POINTER_DOWN,s=>this.onPointerDown(s))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new AD),n=Zs(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangeTop(r.pageY-n.top),()=>null);const s=de(e.target.ownerDocument,Fe.POINTER_UP,()=>{this._onColorFlushed.fire(),s.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class RWt extends QPe{constructor(e,t,n){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:n,b:s}=e.rgba,r=new ye(new Se(t,n,s,1)),o=new ye(new Se(t,n,s,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${o} 100%)`}getValue(e){return e.hsva.a}}class MWt extends QPe{constructor(e,t,n){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}const PWt=Oe;class OWt extends se{constructor(e,t,n,s){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=PWt(".colorpicker-body"),De(e,this._domNode),this._saturationBox=new IWt(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new RWt(this._domNode,this.model,s),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new MWt(this._domNode,this.model,s),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),s==="standalone"&&(this._insertButton=this._register(new AWt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new ye(new ap(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new ye(new ap(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new ye(new ap(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}const jWt=Oe;class FWt extends se{constructor(e){super(),this._onClicked=this._register(new ie),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),De(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),De(this._button,t),De(t,jWt(".button"+Tt.asCSSSelector(ls("color-picker-close",Ee.close,S(885,"Icon to close the color picker"))))).classList.add("close-icon"),this._register(de(this._button,Fe.CLICK,()=>{this._onClicked.fire()}))}}const n4=Oe;class BWt extends se{constructor(e,t,n,s){super(),this.model=t,this.type=s,this._closeButton=null,this._domNode=n4(".colorpicker-header"),De(e,this._domNode),this._pickedColorNode=De(this._domNode,n4(".picked-color")),De(this._pickedColorNode,n4("span.codicon.codicon-color-mode")),this._pickedColorPresentation=De(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const r=S(886,"Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",r),this._originalColorNode=De(this._domNode,n4(".original-color")),this._originalColorNode.style.backgroundColor=ye.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=n.getColorTheme().getColor(ZF)||ye.white,this._register(n.onDidColorThemeChange(o=>{this.backgroundColor=o.getColor(ZF)||ye.white})),this._register(de(this._pickedColorNode,Fe.CLICK,()=>this.model.selectNextColorPresentation())),this._register(de(this._originalColorNode,Fe.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=ye.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.type==="standalone"&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new FWt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=ye.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}const HWt=Oe;class XPe extends id{constructor(e,t,n,s,r){super(),this.model=t,this.pixelRatio=n,this._register(bR.getInstance(xt(e)).onDidChange(()=>this.layout())),this._domNode=HWt(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new BWt(this._domNode,this.model,s,r)),this.body=this._register(new OWt(this._domNode,this.model,this.pixelRatio,r))}layout(){this.body.layout()}get domNode(){return this._domNode}}class WWt{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new ie,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new ie,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new ie,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let s=0;s=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},zWt=function(i,e){return function(t,n){e(t,n,i)}};class s8{constructor(e,t,n,s){this.owner=e,this.range=t,this.model=n,this.provider=s,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}static fromBaseColor(e,t){return new s8(e,t.range,t.model,t.provider)}}let r8=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t,n){return[]}computeAsync(e,t,n,s){return Fu.fromPromise(this._computeAsync(e,t,n))}async _computeAsync(e,t,n){if(!this._editor.hasModel())return[];if(!this._isValidRequest(n))return[];const s=jL.get(this._editor);if(!s)return[];for(const r of t){if(!s.isColorDecoration(r))continue;const o=s.getColorData(r.range.getStartPosition());if(o)return[s8.fromBaseColor(this,await ZPe(this._editor.getModel(),o.colorInfo,o.provider))]}return[]}_isValidRequest(e){const t=this._editor.getOption(168);switch(e){case 0:return t==="hover"||t==="clickAndHover";case 1:return t==="click"||t==="clickAndHover";case 2:return!0}}renderHoverParts(e,t){const n=this._editor;if(t.length===0||!n.hasModel())return new MC([]);const s=n.getOption(75)+8;e.setMinimumDimensions(new ni(302,s));const r=new _e,o=t[0],a=n.getModel(),l=o.model;this._colorPicker=r.add(new XPe(e.fragment,l,n.getOption(163),this._themeService,"hover"));let c=!1,u=new z(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);r.add(l.onColorFlushed(async g=>{await lM(a,l,g,u,o),c=!0,u=JPe(n,u,l)})),r.add(l.onDidChangeColor(g=>{lM(a,l,g,u,o)})),r.add(n.onDidChangeModelContent(g=>{c?c=!1:(e.hide(),n.focus())}));const h={hoverPart:s8.fromBaseColor(this,o),hoverElement:this._colorPicker.domNode,dispose(){r.dispose()}};return new MC([h])}getAccessibleContent(e){return S(887,"There is a color picker here.")}handleResize(){var e;(e=this._colorPicker)==null||e.layout()}handleContentsChanged(){var e;(e=this._colorPicker)==null||e.layout()}handleHide(){var e;(e=this._colorPicker)==null||e.dispose(),this._colorPicker=void 0}isColorPickerVisible(){return!!this._colorPicker}};r8=VWt([zWt(1,Ws)],r8);class Qs{static insert(e,t){return{range:new z(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}function OZ(i,e){return!!i[e]}class $q{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.mouseMiddleClickAction=t.mouseMiddleClickAction,this.hasTriggerModifier=OZ(e.event,t.triggerModifier),this.isMiddleClick&&t.mouseMiddleClickAction==="ctrlLeftClick"&&(this.isMiddleClick=!1,this.isLeftClick=!0,this.hasTriggerModifier=!0),this.hasSideBySideModifier=OZ(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class lye{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=OZ(e,t.triggerModifier)}}class i4{constructor(e,t,n,s,r){this.mouseMiddleClickAction=r,this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=s}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier&&this.mouseMiddleClickAction===e.mouseMiddleClickAction}}function cye(i,e){return i==="altKey"?bn?new i4(57,"metaKey",6,"altKey",e):new i4(5,"ctrlKey",6,"altKey",e):bn?new i4(6,"altKey",57,"metaKey",e):new i4(6,"altKey",5,"ctrlKey",e)}class NW extends se{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new ie),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new ie),this.onExecute=this._onExecute.event,this._onCancel=this._register(new ie),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(t==null?void 0:t.extractLineNumberFromMouseEvent)??(n=>n.target.position?n.target.position.lineNumber:0),this._opts=cye(this._editor.getOption(86),this._editor.getOption(87)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(86)||n.hasChanged(87)){const s=cye(this._editor.getOption(86),this._editor.getOption(87));if(this._opts.equals(s))return;this._opts=s,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new $q(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new $q(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new $q(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new lye(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new lye(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);!!this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&(this._hasTriggerKeyOnMouseDown||e.isMiddleClick&&e.mouseMiddleClickAction==="openLink")&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}class eOe{constructor(e,t){this.range=e,this.direction=t}}class cle{constructor(e,t,n){this.hint=e,this.anchor=t,this.provider=n,this._isResolved=!1}with(e){const t=new cle(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(e){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,e.isCancellationRequested?void 0:this.resolve(e);this._isResolved||(this._currentResolve=this._doResolve(e).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(e){try{const t=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=(t==null?void 0:t.tooltip)??this.hint.tooltip,this.hint.label=(t==null?void 0:t.label)??this.hint.label,this.hint.textEdits=(t==null?void 0:t.textEdits)??this.hint.textEdits,this._isResolved=!0}catch(t){Pr(t),this._isResolved=!1}}}const MN=class MN{static async create(e,t,n,s){const r=[],o=e.ordered(t).reverse().map(a=>n.map(async l=>{try{const c=await a.provideInlayHints(t,l,s);(c!=null&&c.hints.length||a.onDidChangeInlayHints)&&r.push([c??MN._emptyInlayHintList,a])}catch(c){Pr(c)}}));if(await Promise.all(o.flat()),s.isCancellationRequested||t.isDisposed())throw new Vu;return new MN(n,r,t)}constructor(e,t,n){this._disposables=new _e,this.ranges=e,this.provider=new Set;const s=[];for(const[r,o]of t){this._disposables.add(r),this.provider.add(o);for(const a of r.hints){const l=n.validatePosition(a.position);let c="before";const u=MN._getRangeAtPosition(n,l);let h;u.getStartPosition().isBefore(l)?(h=z.fromPositions(u.getStartPosition(),l),c="after"):(h=z.fromPositions(l,u.getEndPosition()),c="before"),s.push(new cle(a,new eOe(h,c),o))}}this.items=s.sort((r,o)=>te.compare(r.hint.position,o.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const n=t.lineNumber,s=e.getWordAtPosition(t);if(s)return new z(n,s.startColumn,n,s.endColumn);e.tokenization.tokenizeIfCheap(n);const r=e.tokenization.getLineTokens(n),o=t.column-1,a=r.findTokenIndexAtOffset(o);let l=r.getStartOffset(a),c=r.getEndOffset(a);return c-l===1&&(l===o&&a>1?(l=r.getStartOffset(a-1),c=r.getEndOffset(a-1)):c===o&&a=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},_m=function(i,e){return function(t,n){e(t,n,i)}};let ix=class extends wC{constructor(e,t,n,s,r,o,a,l,c,u,h,g,f){super(e,{...s.getRawOptions(),overflowWidgetsDomNode:s.getOverflowWidgetsDomNode()},n,r,o,a,l,c,u,h,g,f),this._parentEditor=s,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(s.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){H7(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};ix=qWt([_m(4,ft),_m(5,Hn),_m(6,es),_m(7,Bt),_m(8,Ws),_m(9,nr),_m(10,Zo),_m(11,As),_m(12,lt)],ix);function nOe(i){const e=i.get(Hn).getFocusedCodeEditor();return e instanceof ix?e.getParentEditor():e}const dye=new ye(new Se(0,122,204)),KWt={showArrow:!0,showFrame:!0,className:"",frameColor:dye,arrowColor:dye,keepEditorSelection:!1},GWt="vs.editor.contrib.zoneWidget";class YWt{constructor(e,t,n,s,r,o,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=s,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=r,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class QWt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}const y9=class y9{constructor(e){this._editor=e,this._ruleName=y9._IdGenerator.nextId(),this._color=null,this._height=-1,this._decorations=this._editor.createDecorationsCollection()}dispose(){this.hide(),mQ(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){mQ(this._ruleName),QF(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:z.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}};y9._IdGenerator=new Cae(".arrow-decoration-");let jZ=y9;class XWt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._isSashResizeHeight=!1,this._viewZone=null,this._disposables=new _e,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=$f(t),H7(this.options,KWt,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const s=this._getWidth(n);this.domNode.style.width=s+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(s)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new jZ(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const s=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(s))}(t=this._resizeSash)==null||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const n=z.isIRange(e)?z.lift(e):z.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:qt.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)==null||e.hide(),this._positionMarkerId.clear(),this._isSashResizeHeight=!1}_decoratingElementsHeight(){const e=this.editor.getOption(75);let t=0;if(this.options.showArrow){const n=Math.round(e/3);t+=2*n}if(this.options.showFrame){const n=this.options.frameWidth??Math.round(e/9);t+=2*n}return t}_getMaximumHeightInLines(){return Math.max(12,this.editor.getLayoutInfo().height/this.editor.getOption(75)*.8)}_showImpl(e,t){const n=e.getStartPosition(),s=this.editor.getLayoutInfo(),r=this._getWidth(s);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(s)+"px";const o=document.createElement("div");o.style.overflow="hidden";const a=this.editor.getOption(75),l=this._getMaximumHeightInLines();l!==void 0&&(t=Math.min(t,l));let c=0,u=0;if(this._arrow&&this.options.showArrow&&(c=Math.round(a/3),this._arrow.height=c,this._arrow.show(n)),this.options.showFrame&&(u=Math.round(a/9)),this.editor.changeViewZones(f=>{this._viewZone&&f.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new YWt(o,n.lineNumber,n.column,t,m=>this._onViewZoneTop(m),m=>this._onViewZoneHeight(m),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=f.addZone(this._viewZone),this._overlayWidget=new QWt(GWt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this._updateSashEnablement(),this.container&&this.options.showFrame){const f=this.options.frameWidth?this.options.frameWidth:u;this.container.style.borderTopWidth=f+"px",this.container.style.borderBottomWidth=f+"px"}const h=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=c+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,r),this.options.keepEditorSelection||this.editor.setSelection(e);const g=this.editor.getModel();if(g){const f=g.validateRange(new z(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(f,f.startLineNumber===g.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e,t){const n=this._getMaximumHeightInLines(),s=t&&n!==void 0?Math.min(n,e):e;this._viewZone&&this._viewZone.heightInLines!==s&&(this.editor.changeViewZones(r=>{this._viewZone&&(this._viewZone.heightInLines=s,r.layoutZone(this._viewZone.id))}),this._updateSashEnablement())}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Ta(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines,...this._getResizeBounds()})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const n=(t.currentY-e.startY)/this.editor.getOption(75),s=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+s;r>e.minLines&&r=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},sOe=function(i,e){return function(t,n){e(t,n,i)}};const rOe=ln("IPeekViewService");wn(rOe,class{constructor(){this._widgets=new Map}addExclusiveWidget(i,e){const t=this._widgets.get(i);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const s=this._widgets.get(i);s&&s.widget===e&&(s.listener.dispose(),this._widgets.delete(i))};this._widgets.set(i,{widget:e,listener:e.onDidClose(n)})}},1);var yc;(function(i){i.inPeekEditor=new Ze("inReferenceSearchEditor",!0,S(1316,"Whether the current code editor is embedded inside peek")),i.notInPeekEditor=i.inPeekEditor.toNegated()})(yc||(yc={}));var UE;let a8=(UE=class{constructor(e,t){e instanceof ix&&yc.inPeekEditor.bindTo(t)}dispose(){}},UE.ID="editor.contrib.referenceController",UE);a8=iOe([sOe(1,Bt)],a8);Pn(a8.ID,a8,0);const ZWt={headerBackgroundColor:ye.white,primaryHeadingColor:ye.fromHex("#333333"),secondaryHeadingColor:ye.fromHex("#6c6c6cb3")};let l8=class extends XWt{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new ie,this.onDidClose=this._onDidClose.event,H7(this.options,ZWt,!1);const s=Ts(this.editor);s.openedPeekWidgets.set(s.openedPeekWidgets.get()+1,void 0)}dispose(){if(!this.disposed){this.disposed=!0,super.dispose(),this._onDidClose.fire(this);const e=Ts(this.editor);e.openedPeekWidgets.set(e.openedPeekWidgets.get()-1,void 0)}}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Oe(".head"),this._bodyElement=Oe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=Oe(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),yr(this._titleElement,"click",r=>this._onTitleClick(r))),De(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Oe("span.filename"),this._secondaryHeading=Oe("span.dirname"),this._metaHeading=Oe("span.meta"),De(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=Oe(".peekview-actions");De(this._headElement,n);const s=this._getActionBarOptions();this._actionbarWidget=new mc(n,s),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(this._disposables.add(new Wd("peekview.close",S(1317,"Close"),Tt.asClassName(Ee.close),!0,()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Vae.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Qo(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Bc(this._metaHeading)):Al(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(75)*1.2),s=Math.round(e-(n+1));this._doLayoutHead(n,t),this._doLayoutBody(s,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};l8=iOe([sOe(2,ft)],l8);const JWt=Z("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:ye.black,hcLight:ye.white},S(1318,"Background color of the peek view title area.")),oOe=Z("peekViewTitleLabel.foreground",{dark:ye.white,light:ye.black,hcDark:ye.white,hcLight:zp},S(1319,"Color of the peek view title.")),aOe=Z("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},S(1320,"Color of the peek view title info.")),eVt=Z("peekView.border",{dark:Ep,light:Ep,hcDark:Dn,hcLight:Dn},S(1321,"Color of the peek view borders and arrow.")),tVt=Z("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:ye.black,hcLight:ye.white},S(1322,"Background color of the peek view result list."));Z("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:ye.white,hcLight:zp},S(1323,"Foreground color for line nodes in the peek view result list."));Z("peekViewResult.fileForeground",{dark:ye.white,light:"#1E1E1E",hcDark:ye.white,hcLight:zp},S(1324,"Foreground color for file nodes in the peek view result list."));Z("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},S(1325,"Background color of the selected entry in the peek view result list."));Z("peekViewResult.selectionForeground",{dark:ye.white,light:"#6C6C6C",hcDark:ye.white,hcLight:zp},S(1326,"Foreground color of the selected entry in the peek view result list."));const ule=Z("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:ye.black,hcLight:ye.white},S(1327,"Background color of the peek view editor."));Z("peekViewEditorGutter.background",ule,S(1328,"Background color of the gutter in the peek view editor."));Z("peekViewEditorStickyScroll.background",ule,S(1329,"Background color of sticky scroll in the peek view editor."));Z("peekViewEditorStickyScrollGutter.background",ule,S(1330,"Background color of the gutter part of sticky scroll in the peek view editor."));Z("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},S(1331,"Match highlight color in the peek view result list."));Z("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},S(1332,"Match highlight color in the peek view editor."));Z("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:ys,hcLight:ys},S(1333,"Match highlight border in the peek view editor."));class nVt{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:se.None}}renderElement(e,t,n,s){var l;if((l=n.disposable)==null||l.dispose(),!n.data)return;const r=this.modelProvider();if(r.isResolved(e))return this.renderer.renderElement(r.get(e),e,n.data,s);const o=new vs,a=r.resolve(e,o.token);n.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(e,n.data),a.then(c=>this.renderer.renderElement(c,e,n.data,s))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class iVt{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function sVt(i,e){return{...e,accessibilityProvider:e.accessibilityProvider&&new iVt(i,e.accessibilityProvider)}}class rVt{constructor(e,t,n,s,r={}){this.modelDisposables=new _e;const o=()=>this.model,a=s.map(l=>new nVt(l,o));this.list=new Jd(e,t,n,a,sVt(o,r))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return He.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onPointer(){return He.map(this.list.onPointer,({element:e,index:t,browserEvent:n})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:n}))}get onDidChangeSelection(){return He.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:n})=>({elements:e.map(s=>this._model.get(s)),indexes:t,browserEvent:n}))}get model(){return this._model}set model(e){this.modelDisposables.clear(),this._model=e,this.list.splice(0,this.list.length,Tl(e.length)),this.modelDisposables.add(e.onDidIncrementLength(t=>this.list.splice(this.list.length,0,Tl(this.list.length,t))))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose(),this.modelDisposables.dispose()}}const oVt={separatorBorder:ye.transparent};class lOe{set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(e,t){var n,s;if(e!==this.visible){e?(this.size=Il(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{(s=(n=this.view).setVisible)==null||s.call(n,e)}catch(r){console.error("Splitview: Failed to set visible view"),console.error(r)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){return this.view.proportionalLayout??!0}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,n,s){this.container=e,this.view=t,this.disposable=s,this._cachedVisibleSize=void 0,typeof n=="number"?(this._size=n,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=n.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(n){console.error("Splitview: Failed to layout view"),console.error(n)}}dispose(){this.disposable.dispose()}}class aVt extends lOe{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class lVt extends lOe{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var jm;(function(i){i[i.Idle=0]="Idle",i[i.Busy=1]="Busy"})(jm||(jm={}));var c8;(function(i){i.Distribute={type:"distribute"};function e(s){return{type:"split",index:s}}i.Split=e;function t(s){return{type:"auto",index:s}}i.Auto=t;function n(s){return{type:"invisible",cachedVisibleSize:s}}i.Invisible=n})(c8||(c8={}));class cOe extends se{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=jm.Idle,this._onDidSashChange=this._register(new ie),this._onDidSashReset=this._register(new ie),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=t.orientation??0,this.inverseAltBehavior=t.inverseAltBehavior??!1,this.proportionalLayout=t.proportionalLayout??!0,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=De(this.el,Oe(".sash-container")),this.viewContainer=Oe(".split-view-container"),this.scrollable=this._register(new OD({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:s=>vc(xt(this.el),s)})),this.scrollableElement=this._register(new nW(this.viewContainer,{vertical:this.orientation===0?t.scrollbarVisibility??1:2,horizontal:this.orientation===1?t.scrollbarVisibility??1:2},this.scrollable));const n=this._register(new ri(this.viewContainer,"scroll")).event;this._register(n(s=>{const r=this.scrollableElement.getScrollPosition(),o=Math.abs(this.viewContainer.scrollLeft-r.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,a=Math.abs(this.viewContainer.scrollTop-r.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(o!==void 0||a!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:o,scrollTop:a})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(s=>{s.scrollTopChanged&&(this.viewContainer.scrollTop=s.scrollTop),s.scrollLeftChanged&&(this.viewContainer.scrollLeft=s.scrollLeft)})),De(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||oVt),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((s,r)=>{const o=ja(s.visible)||s.visible?s.size:{type:"invisible",cachedVisibleSize:s.size},a=s.view;this.doAddView(a,o,r,!0)}),this._contentSize=this.viewItems.reduce((s,r)=>s+r.size,0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,n=this.viewItems.length,s){this.doAddView(e,t,n,s)}layout(e,t){const n=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let s=0;for(let r=0;r0&&(o.size=Il(Math.round(a*e/s),o.minimumSize,o.maximumSize))}}else{const s=Tl(this.viewItems.length),r=s.filter(a=>this.viewItems[a].priority===1),o=s.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-n,void 0,r,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0))}onSashStart({sash:e,start:t,alt:n}){for(const a of this.viewItems)a.enabled=!1;const s=this.sashItems.findIndex(a=>a.sash===e),r=Mh(de(this.el.ownerDocument.body,"keydown",a=>o(this.sashDragState.current,a.altKey)),de(this.el.ownerDocument.body,"keyup",()=>o(this.sashDragState.current,!1))),o=(a,l)=>{const c=this.viewItems.map(m=>m.size);let u=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(s===this.sashItems.length-1){const x=this.viewItems[s];u=(x.minimumSize-x.size)/2,h=(x.maximumSize-x.size)/2}else{const x=this.viewItems[s+1];u=(x.size-x.maximumSize)/2,h=(x.size-x.minimumSize)/2}let g,f;if(!l){const m=Tl(s,-1),x=Tl(s+1,this.viewItems.length),v=m.reduce((I,R)=>I+(this.viewItems[R].minimumSize-c[R]),0),_=m.reduce((I,R)=>I+(this.viewItems[R].viewMaximumSize-c[R]),0),w=x.length===0?Number.POSITIVE_INFINITY:x.reduce((I,R)=>I+(c[R]-this.viewItems[R].minimumSize),0),k=x.length===0?Number.NEGATIVE_INFINITY:x.reduce((I,R)=>I+(c[R]-this.viewItems[R].viewMaximumSize),0),C=Math.max(v,k),E=Math.min(w,_),D=this.findFirstSnapIndex(m),T=this.findFirstSnapIndex(x);if(typeof D=="number"){const I=this.viewItems[D],R=Math.floor(I.viewMinimumSize/2);g={index:D,limitDelta:I.visible?C-R:C+R,size:I.size}}if(typeof T=="number"){const I=this.viewItems[T],R=Math.floor(I.viewMinimumSize/2);f={index:T,limitDelta:I.visible?E+R:E-R,size:I.size}}}this.sashDragState={start:a,current:a,index:s,sizes:c,minDelta:u,maxDelta:h,alt:l,snapBefore:g,snapAfter:f,disposable:r}};o(t,n)}onSashChange({current:e}){const{index:t,start:n,sizes:s,alt:r,minDelta:o,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;const u=e-n,h=this.resize(t,u,s,void 0,void 0,o,a,l,c);if(r){const g=t===this.sashItems.length-1,f=this.viewItems.map(k=>k.size),m=g?t:t+1,x=this.viewItems[m],v=x.size-x.maximumSize,_=x.size-x.minimumSize,w=g?t-1:t+1;this.resize(w,-h,f,void 0,void 0,v,_)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t=typeof t=="number"?t:e.size,t=Il(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==jm.Idle)throw new Error("Cant modify splitview");this.state=jm.Busy;try{const n=Tl(this.viewItems.length).filter(a=>a!==e),s=[...n.filter(a=>this.viewItems[a].priority===1),e],r=n.filter(a=>this.viewItems[a].priority===2),o=this.viewItems[e];t=Math.round(t),t=Il(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(s,r)}finally{this.state=jm.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const n=Math.floor(t/e.length);for(const a of e)a.size=Il(n,a.minimumSize,a.maximumSize);const s=Tl(this.viewItems.length),r=s.filter(a=>this.viewItems[a].priority===1),o=s.filter(a=>this.viewItems[a].priority===2);this.relayout(r,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,n=this.viewItems.length,s){if(this.state!==jm.Idle)throw new Error("Cant modify splitview");this.state=jm.Busy;try{const r=Oe(".split-view-view");n===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(n));const o=e.onDidChange(g=>this.onViewChange(u,g)),a=dt(()=>r.remove()),l=Mh(o,a);let c;typeof t=="number"?c=t:(t.type==="auto"&&(this.areViewsDistributed()?t={type:"distribute"}:t={type:"split",index:t.index}),t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize);const u=this.orientation===0?new aVt(r,e,c,l):new lVt(r,e,c,l);if(this.viewItems.splice(n,0,u),this.viewItems.length>1){const g={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},f=this.orientation===0?new Ta(this.sashContainer,{getHorizontalSashTop:I=>this.getSashPosition(I),getHorizontalSashWidth:this.getSashOrthogonalSize},{...g,orientation:1}):new Ta(this.sashContainer,{getVerticalSashLeft:I=>this.getSashPosition(I),getVerticalSashHeight:this.getSashOrthogonalSize},{...g,orientation:0}),m=this.orientation===0?I=>({sash:f,start:I.startY,current:I.currentY,alt:I.altKey}):I=>({sash:f,start:I.startX,current:I.currentX,alt:I.altKey}),v=He.map(f.onDidStart,m)(this.onSashStart,this),w=He.map(f.onDidChange,m)(this.onSashChange,this),C=He.map(f.onDidEnd,()=>this.sashItems.findIndex(I=>I.sash===f))(this.onSashEnd,this),E=f.onDidReset(()=>{const I=this.sashItems.findIndex(H=>H.sash===f),R=Tl(I,-1),P=Tl(I+1,this.viewItems.length),j=this.findFirstSnapIndex(R),B=this.findFirstSnapIndex(P);typeof j=="number"&&!this.viewItems[j].visible||typeof B=="number"&&!this.viewItems[B].visible||this._onDidSashReset.fire(I)}),D=Mh(v,w,C,E,f),T={sash:f,disposable:D};this.sashItems.splice(n-1,0,T)}r.appendChild(e.element);let h;typeof t!="number"&&t.type==="split"&&(h=[t.index]),s||this.relayout([n],h),!s&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}finally{this.state=jm.Idle}}relayout(e,t){const n=this.viewItems.reduce((s,r)=>s+r.size,0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,n=this.viewItems.map(u=>u.size),s,r,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const u=Tl(e,-1),h=Tl(e+1,this.viewItems.length);if(r)for(const T of r)L$(u,T),L$(h,T);if(s)for(const T of s)f3(u,T),f3(h,T);const g=u.map(T=>this.viewItems[T]),f=u.map(T=>n[T]),m=h.map(T=>this.viewItems[T]),x=h.map(T=>n[T]),v=u.reduce((T,I)=>T+(this.viewItems[I].minimumSize-n[I]),0),_=u.reduce((T,I)=>T+(this.viewItems[I].maximumSize-n[I]),0),w=h.length===0?Number.POSITIVE_INFINITY:h.reduce((T,I)=>T+(n[I]-this.viewItems[I].minimumSize),0),k=h.length===0?Number.NEGATIVE_INFINITY:h.reduce((T,I)=>T+(n[I]-this.viewItems[I].maximumSize),0),C=Math.max(v,k,o),E=Math.min(w,_,a);let D=!1;if(l){const T=this.viewItems[l.index],I=t>=l.limitDelta;D=I!==T.visible,T.setVisible(I,l.size)}if(!D&&c){const T=this.viewItems[c.index],I=ta+l.size,0);let n=this.size-t;const s=Tl(this.viewItems.length-1,-1),r=s.filter(a=>this.viewItems[a].priority===1),o=s.filter(a=>this.viewItems[a].priority===2);for(const a of o)L$(s,a);for(const a of r)f3(s,a);typeof e=="number"&&f3(s,e);for(let a=0;n!==0&&at+n.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(l=>e=l.size-l.minimumSize>0||e);e=!1;const n=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),s=[...this.viewItems].reverse();e=!1;const r=s.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const o=s.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l0||this.startSnappingEnabled)?c.state=1:w&&t[l]&&(a0)return;if(!n.visible&&n.snap)return t}}areViewsDistributed(){let e,t;for(const n of this.viewItems)if(e=e===void 0?n.size:Math.min(e,n.size),t=t===void 0?n.size:Math.max(t,n.size),t-e>2)return!1;return!0}dispose(){var e;(e=this.sashDragState)==null||e.disposable.dispose(),ii(this.viewItems),this.viewItems=[],this.sashItems.forEach(t=>t.disposable.dispose()),this.sashItems=[],super.dispose()}}const w9=class w9{constructor(e,t,n){this.columns=e,this.getColumnSize=n,this.templateId=w9.TemplateId,this.renderedTemplates=new Set;const s=new Map(t.map(r=>[r.templateId,r]));this.renderers=[];for(const r of e){const o=s.get(r.templateId);if(!o)throw new Error(`Table cell renderer for template id ${r.templateId} not found.`);this.renderers.push(o)}}renderTemplate(e){const t=De(e,Oe(".monaco-table-tr")),n=[],s=[];for(let o=0;othis.disposables.add(new dVt(u,h))),l={size:a.reduce((u,h)=>u+h.column.weight,0),views:a.map(u=>({size:u.column.weight,view:u}))};this.splitview=this.disposables.add(new cOe(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${n.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${n.headerRowHeight}px`;const c=new d8(s,r,u=>this.splitview.getViewSize(u));this.list=this.disposables.add(new Jd(e,this.domNode,cVt(n),[c],o)),He.any(...a.map(u=>u.onDidLayout))(([u,h])=>c.layoutColumn(u,h),null,this.disposables),this.splitview.onDidSashReset(u=>{const h=s.reduce((f,m)=>f+m.weight,0),g=s[u].weight/h*this.cachedWidth;this.splitview.resizeView(u,g)},null,this.disposables),this.styleElement=Yu(this.domNode),this.style(x8t)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,n=[]){this.list.splice(e,t,n)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { + top: ${this.virtualDelegate.headerRowHeight+1}px; + height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); + }`),this.styleElement.textContent=t.join(` +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};C9.InstanceCount=0;let FZ=C9;var Td;(function(i){i[i.Expanded=0]="Expanded",i[i.Collapsed=1]="Collapsed",i[i.PreserveOrExpanded=2]="PreserveOrExpanded",i[i.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(Td||(Td={}));var k1;(function(i){i[i.Unknown=0]="Unknown",i[i.Twistie=1]="Twistie",i[i.Element=2]="Element",i[i.Filter=3]="Filter"})(k1||(k1={}));class Md extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class hle{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}class av{constructor(e,t,n,s){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=s}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class uye{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let n=0,s=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new av(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class Jf{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;const[s,r,o]=Jf._getElements(e),[a,l,c]=Jf._getElements(t);this._hasStrings=o&&c,this._originalStringElements=s,this._originalElementsOrHash=r,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const t=e.getElements();if(Jf._isStringArray(t)){const n=new Int32Array(t.length);for(let s=0,r=t.length;s=e&&s>=n&&this.ElementsAreEqual(t,s);)t--,s--;if(e>t||n>s){let h;return n<=s?(Nk.Assert(e===t+1,"originalStart should only be one more than originalEnd"),h=[new av(e,0,n,s-n+1)]):e<=t?(Nk.Assert(n===s+1,"modifiedStart should only be one more than modifiedEnd"),h=[new av(e,t-e+1,n,0)]):(Nk.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Nk.Assert(n===s+1,"modifiedStart should only be one more than modifiedEnd"),h=[]),h}const o=[0],a=[0],l=this.ComputeRecursionPoint(e,t,n,s,o,a,r),c=o[0],u=a[0];if(l!==null)return l;if(!r[0]){const h=this.ComputeDiffRecursive(e,c,n,u,r);let g=[];return r[0]?g=[new av(c+1,t-(c+1)+1,u+1,s-(u+1)+1)]:g=this.ComputeDiffRecursive(c+1,t,u+1,s,r),this.ConcatenateChanges(h,g)}return[new av(e,t-e+1,n,s-n+1)]}WALKTRACE(e,t,n,s,r,o,a,l,c,u,h,g,f,m,x,v,_,w){let k=null,C=null,E=new hye,D=t,T=n,I=f[0]-v[0]-s,R=-1073741824,P=this.m_forwardHistory.length-1;do{const j=I+e;j===D||j=0&&(c=this.m_forwardHistory[P],e=c[0],D=1,T=c.length-1)}while(--P>=-1);if(k=E.getReverseChanges(),w[0]){let j=f[0]+1,B=v[0]+1;if(k!==null&&k.length>0){const H=k[k.length-1];j=Math.max(j,H.getOriginalEnd()),B=Math.max(B,H.getModifiedEnd())}C=[new av(j,g-j+1,B,x-B+1)]}else{E=new hye,D=o,T=a,I=f[0]-v[0]-l,R=1073741824,P=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const j=I+r;j===D||j=u[j+1]?(h=u[j+1]-1,m=h-I-l,h>R&&E.MarkNextChange(),R=h+1,E.AddOriginalElement(h+1,m+1),I=j+1-r):(h=u[j-1],m=h-I-l,h>R&&E.MarkNextChange(),R=h,E.AddModifiedElement(h+1,m+1),I=j-1-r),P>=0&&(u=this.m_reverseHistory[P],r=u[0],D=1,T=u.length-1)}while(--P>=-1);C=E.getChanges()}return this.ConcatenateChanges(k,C)}ComputeRecursionPoint(e,t,n,s,r,o,a){let l=0,c=0,u=0,h=0,g=0,f=0;e--,n--,r[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=t-e+(s-n),x=m+1,v=new Int32Array(x),_=new Int32Array(x),w=s-n,k=t-e,C=e-n,E=t-s,T=(k-w)%2===0;v[w]=e,_[k]=t,a[0]=!1;for(let I=1;I<=m/2+1;I++){let R=0,P=0;u=this.ClipDiagonalBound(w-I,I,w,x),h=this.ClipDiagonalBound(w+I,I,w,x);for(let B=u;B<=h;B+=2){B===u||BR+P&&(R=l,P=c),!T&&Math.abs(B-k)<=I-1&&l>=_[B])return r[0]=l,o[0]=c,H<=_[B]&&I<=1448?this.WALKTRACE(w,u,h,C,k,g,f,E,v,_,l,t,r,c,s,o,T,a):null}const j=(R-e+(P-n)-I)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(R,j))return a[0]=!0,r[0]=R,o[0]=P,j>0&&I<=1448?this.WALKTRACE(w,u,h,C,k,g,f,E,v,_,l,t,r,c,s,o,T,a):(e++,n++,[new av(e,t-e+1,n,s-n+1)]);g=this.ClipDiagonalBound(k-I,I,k,x),f=this.ClipDiagonalBound(k+I,I,k,x);for(let B=g;B<=f;B+=2){B===g||B=_[B+1]?l=_[B+1]-1:l=_[B-1],c=l-(B-k)-E;const H=l;for(;l>e&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(_[B]=l,T&&Math.abs(B-w)<=I&&l<=v[B])return r[0]=l,o[0]=c,H>=v[B]&&I<=1448?this.WALKTRACE(w,u,h,C,k,g,f,E,v,_,l,t,r,c,s,o,T,a):null}if(I<=1447){let B=new Int32Array(h-u+2);B[0]=w-u+1,Ek.Copy2(v,u,B,1,h-u+1),this.m_forwardHistory.push(B),B=new Int32Array(f-g+2),B[0]=k-g+1,Ek.Copy2(_,g,B,1,f-g+1),this.m_reverseHistory.push(B)}}return this.WALKTRACE(w,u,h,C,k,g,f,E,v,_,l,t,r,c,s,o,T,a)}PrettifyChanges(e){for(let t=0;t0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;t--){const n=e[t];let s=0,r=0;if(t>0){const h=e[t-1];s=h.originalStart+h.originalLength,r=h.modifiedStart+h.modifiedLength}const o=n.originalLength>0,a=n.modifiedLength>0;let l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let h=1;;h++){const g=n.originalStart-h,f=n.modifiedStart-h;if(gc&&(c=x,l=h)}n.originalStart-=l,n.modifiedStart-=l;const u=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],u)){e[t-1]=u[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t0&&f>l&&(l=f,c=h,u=g)}return l>0?[c,u]:null}_contiguousSequenceScore(e,t,n){let s=0;for(let r=0;r=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,s){const r=this._OriginalRegionIsBoundary(e,t)?1:0,o=this._ModifiedRegionIsBoundary(n,s)?1:0;return r+o}ConcatenateChanges(e,t){const n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){const s=new Array(e.length+t.length-1);return Ek.Copy(e,0,s,0,e.length-1),s[e.length-1]=n[0],Ek.Copy(t,1,s,e.length,t.length-1),s}else{const s=new Array(e.length+t.length);return Ek.Copy(e,0,s,0,e.length),Ek.Copy(t,0,s,e.length,t.length),s}}ChangesOverlap(e,t,n){if(Nk.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Nk.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const s=e.originalStart;let r=e.originalLength;const o=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new av(s,r,o,a),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,s){if(e>=0&&e"u"?!1:n.collapseByDefault,this.allowNonCollapsibleParents=n.allowNonCollapsibleParents??!1,this.filter=n.filter,this.autoExpandSingleChildren=typeof n.autoExpandSingleChildren>"u"?!1:n.autoExpandSingleChildren,this.root={parent:void 0,element:t,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,n=En.empty(),s={}){if(e.length===0)throw new Md(this.user,"Invalid tree location");s.diffIdentityProvider?this.spliceSmart(s.diffIdentityProvider,e,t,n,s):this.spliceSimple(e,t,n,s)}spliceSmart(e,t,n,s=En.empty(),r,o=r.diffDepth??0){const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,n,s,r);const l=[...s],c=t[t.length-1],u=new Jf({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+n)].map(x=>e.getId(x.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,n,l,r);const h=t.slice(0,-1),g=(x,v,_)=>{if(o>0)for(let w=0;w<_;w++)x--,v--,this.spliceSmart(e,[...h,x,0],Number.MAX_SAFE_INTEGER,l[v].children,r,o-1)};let f=Math.min(a.children.length,c+n),m=l.length;for(const x of u.changes.sort((v,_)=>_.originalStart-v.originalStart))g(f,m,f-(x.originalStart+x.originalLength)),f=x.originalStart,m=x.modifiedStart-c,this.spliceSimple([...h,f],x.originalLength,En.slice(l,m,m+x.modifiedLength),r);g(f,m,f)}spliceSimple(e,t,n=En.empty(),{onDidCreateNode:s,onDidDeleteNode:r,diffIdentityProvider:o}){const{parentNode:a,listIndex:l,revealed:c,visible:u}=this.getParentNodeWithListIndex(e),h=[],g=En.map(n,E=>this.createTreeNode(E,a,a.visible?1:0,c,h,s)),f=e[e.length-1];let m=0;for(let E=f;E>=0&&Eo.getId(E.element).toString())):a.lastDiffIds=a.children.map(E=>o.getId(E.element).toString()):a.lastDiffIds=void 0;let k=0;for(const E of w)E.visible&&k++;if(k!==0)for(let E=f+x.length;E0&&r){const E=D=>{r(D),D.children.forEach(E)};w.forEach(E)}if(c&&u){const E=w.reduce((D,T)=>D+(T.visible?T.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(a,_-E),this._onDidSpliceRenderedNodes.fire({start:l,deleteCount:E,elements:h})}this._onDidSpliceModel.fire({insertedNodes:x,deletedNodes:w});let C=a;for(;C;){if(C.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}C=C.parent}}rerender(e){if(e.length===0)throw new Md(this.user,"Invalid tree location");const{node:t,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e);t.visible&&s&&this._onDidSpliceRenderedNodes.fire({start:n,deleteCount:1,elements:[t]})}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:n,revealed:s}=this.getTreeNodeWithListIndex(e);return n&&s?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const n=this.getTreeNode(e);typeof t>"u"&&(t=!n.collapsible);const s={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,n){const s=this.getTreeNode(e);typeof t>"u"&&(t=!s.collapsed);const r={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,r))}_setCollapseState(e,t){const{node:n,listIndex:s,revealed:r}=this.getTreeNodeWithListIndex(e),o=this._setListNodeCollapseState(n,s,r,t);if(n!==this.root&&this.autoExpandSingleChildren&&o&&!qq(t)&&n.collapsible&&!n.collapsed&&!t.recursive){let a=-1;for(let l=0;l-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],t)}return o}_setListNodeCollapseState(e,t,n,s){const r=this._setNodeCollapseState(e,s,!1);if(!n||!e.visible||!r)return r;const o=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),l=o-(t===-1?0:1);return this._onDidSpliceRenderedNodes.fire({start:t+1,deleteCount:l,elements:a.slice(1)}),r}_setNodeCollapseState(e,t,n){let s;if(e===this.root?s=!1:(qq(t)?(s=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(s=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):s=!1,s&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!qq(t)&&t.recursive)for(const r of e.children)s=this._setNodeCollapseState(r,t,!0)||s;return s}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this._onDidSpliceRenderedNodes.fire({start:0,deleteCount:e,elements:t}),this.refilterDelayer.cancel()}createTreeNode(e,t,n,s,r,o){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed<"u",collapsed:typeof e.collapsed>"u"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,n);a.visibility=l,s&&r.push(a);const c=e.children||En.empty(),u=s&&l!==0&&!a.collapsed;let h=0,g=1;for(const f of c){const m=this.createTreeNode(f,a,l,u,r,o);a.children.push(m),g+=m.renderNodeCount,m.visible&&(m.visibleChildIndex=h++)}return this.allowNonCollapsibleParents||(a.collapsible=a.collapsible||a.children.length>0),a.visibleChildrenCount=h,a.visible=l===2?h>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=g):(a.renderNodeCount=0,s&&r.pop()),o==null||o(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const n of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(n,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}_updateNodeAfterFilterChange(e,t,n,s=!0){let r;if(e!==this.root){if(r=this._filterNode(e,t),r===0)return e.visible=!1,e.renderNodeCount=0,!1;s&&n.push(e)}const o=n.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||r!==0){let l=0;for(const c of e.children)a=this._updateNodeAfterFilterChange(c,r,n,s&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=r===2?a:r===1,e.visibility=r),e.visible?e.collapsed||(e.renderNodeCount+=n.length-o):(e.renderNodeCount=0,s&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(t!==0)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const n=this.filter?this.filter.filter(e.element,t):1;return typeof n=="boolean"?(e.filterData=void 0,n?1:0):uO(n)?(e.filterData=n.data,PC(n.visibility)):(e.filterData=void 0,PC(n))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[n,...s]=e;return n<0||n>t.children.length?!1:this.hasTreeNode(s,t.children[n])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[n,...s]=e;if(n<0||n>t.children.length)throw new Md(this.user,"Invalid tree location");return this.getTreeNode(s,t.children[n])}getTreeNodeWithListIndex(e){if(e.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:n,revealed:s,visible:r}=this.getParentNodeWithListIndex(e),o=e[e.length-1];if(o<0||o>t.children.length)throw new Md(this.user,"Invalid tree location");const a=t.children[o];return{node:a,listIndex:n,revealed:s,visible:r&&a.visible}}getParentNodeWithListIndex(e,t=this.root,n=0,s=!0,r=!0){const[o,...a]=e;if(o<0||o>t.children.length)throw new Md(this.user,"Invalid tree location");for(let l=0;lt.element)),this.data=e}}function Kq(i){return i instanceof nO?new gVt(i):i}class fVt{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=se.None,this.disposables=new _e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,s;(s=(n=this.dnd).onDragStart)==null||s.call(n,Kq(e),t)}onDragOver(e,t,n,s,r,o=!0){const a=this.dnd.onDragOver(Kq(e),t&&t.element,n,s,r),l=this.autoExpandNode!==t;if(l&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t>"u")return a;if(l&&typeof a!="boolean"&&a.autoExpand&&(this.autoExpandDisposable=zb(()=>{const f=this.modelProvider(),m=f.getNodeLocation(t);f.isCollapsed(m)&&f.setCollapsed(m,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof a=="boolean"||!a.accept||typeof a.bubble>"u"||a.feedback){if(!o){const f=typeof a=="boolean"?a:a.accept,m=typeof a=="boolean"?void 0:a.effect;return{accept:f,effect:m,feedback:[n]}}return a}if(a.bubble===1){const f=this.modelProvider(),m=f.getNodeLocation(t),x=f.getParentNodeLocation(m),v=f.getNode(x),_=x&&f.getListIndex(x);return this.onDragOver(e,v,_,s,r,!1)}const c=this.modelProvider(),u=c.getNodeLocation(t),h=c.getListIndex(u),g=c.getListRenderCount(u);return{...a,feedback:Tl(h,h+g)}}drop(e,t,n,s,r){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(Kq(e),t&&t.element,n,s,r)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)==null||n.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function pVt(i,e,t){return t&&{...t,identityProvider:t.identityProvider&&{getId(n){return t.identityProvider.getId(n.element)}},dnd:t.dnd&&e.add(new fVt(i,t.dnd)),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(n){return t.multipleSelectionController.isSelectionSingleChangeEvent({...n,element:n.element})},isSelectionRangeChangeEvent(n){return t.multipleSelectionController.isSelectionRangeChangeEvent({...n,element:n.element})}},accessibilityProvider:t.accessibilityProvider&&{...t.accessibilityProvider,getSetSize(n){const s=i(),r=s.getNodeLocation(n),o=s.getParentNodeLocation(r);return s.getNode(o).visibleChildrenCount},getPosInSet(n){return n.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?n=>t.accessibilityProvider.isChecked(n.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?n=>t.accessibilityProvider.getRole(n.element):()=>"treeitem",getAriaLabel(n){return t.accessibilityProvider.getAriaLabel(n.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?n=>t.accessibilityProvider.getAriaLevel(n.element):n=>n.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(n=>t.accessibilityProvider.getActiveDescendantId(n.element))},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(n){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n.element)}}}}class gle{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var n,s;(s=(n=this.delegate).setDynamicHeight)==null||s.call(n,e.element,t)}}var OC;(function(i){i.None="none",i.OnHover="onHover",i.Always="always"})(OC||(OC={}));class mVt{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new _e,this.onDidChange=He.forEach(e,n=>this._elements=n,this.disposables)}dispose(){this.disposables.dispose()}}const PN=class PN{constructor(e,t,n,s,r,o={}){var a;this.renderer=e,this.model=t,this.activeNodes=s,this.renderedIndentGuides=r,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=PN.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=se.None,this.disposables=new _e,this.templateId=e.templateId,this.updateOptions(o),He.map(n,l=>l.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(a=e.onDidChangeTwistieState)==null||a.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent<"u"){const t=Il(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[n,s]of this.renderedNodes)s.indentSize=PN.DefaultIndent+(n.depth-1)*this.indent,this.renderTreeElement(n,s)}}if(typeof e.renderIndentGuides<"u"){const t=e.renderIndentGuides!==OC.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[n,s]of this.renderedNodes)this._renderIndentGuides(n,s);if(this.indentGuidesDisposable.dispose(),t){const n=new _e;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof e.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=De(e,Oe(".monaco-tl-row")),n=De(t,Oe(".monaco-tl-indent")),s=De(t,Oe(".monaco-tl-twistie")),r=De(t,Oe(".monaco-tl-contents")),o=this.renderer.renderTemplate(r);return{container:e,indent:n,twistie:s,indentGuidesDisposable:se.None,indentSize:0,templateData:o}}renderElement(e,t,n,s){n.indentSize=PN.DefaultIndent+(e.depth-1)*this.indent,this.renderedNodes.set(e,n),this.renderedElements.set(e.element,e),this.renderTreeElement(e,n),this.renderer.renderElement(e,t,n.templateData,{...s,indent:n.indentSize})}disposeElement(e,t,n,s){var r,o;n.indentGuidesDisposable.dispose(),(o=(r=this.renderer).disposeElement)==null||o.call(r,e,t,n.templateData,{...s,indent:n.indentSize}),typeof(s==null?void 0:s.height)=="number"&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){t.twistie.style.paddingLeft=`${t.indentSize}px`,t.indent.style.width=`${t.indentSize+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...Tt.asClassNameArray(Ee.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...Tt.asClassNameArray(Ee.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(Qo(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const n=new _e;for(;;){const s=this.model.getNodeLocation(e),r=this.model.getParentNodeLocation(s);if(!r)break;const o=this.model.getNode(r),a=Oe(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(o)&&a.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(o,a),n.add(dt(()=>this.renderedIndentGuides.delete(o,a))),e=o}t.indentGuidesDisposable=n}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set;e.forEach(n=>{const s=this.model.getNodeLocation(n);try{const r=this.model.getParentNodeLocation(s);n.collapsible&&n.children.length>0&&!n.collapsed?t.add(n):r&&t.add(this.model.getNode(r))}catch{}}),this.activeIndentNodes.forEach(n=>{t.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.remove("active"))}),t.forEach(n=>{this.activeIndentNodes.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),ii(this.disposables)}};PN.DefaultIndent=8;let BZ=PN;function bVt(i,e){const t=e.toLowerCase().indexOf(i);let n;if(t>-1){n=[Number.MAX_SAFE_INTEGER,0];for(let s=i.length;s>0;s--)n.push(t+s-1)}return n}class dOe{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set findMatchType(e){this._findMatchType=e}get findMatchType(){return this._findMatchType}set findMode(e){this._findMode=e}get findMode(){return this._findMode}constructor(e,t,n){this._keyboardNavigationLabelProvider=e,this._filter=t,this._defaultFindVisibility=n,this._totalCount=0,this._matchCount=0,this._findMatchType=Dg.Fuzzy,this._findMode=Pd.Highlight,this._pattern="",this._lowercasePattern="",this.disposables=new _e}filter(e,t){let n=1;if(this._filter){const o=this._filter.filter(e,t);if(typeof o=="boolean"?n=o?1:0:uO(o)?n=PC(o.visibility):n=o,n===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:jh.Default,visibility:n};const s=this._keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(s)?s:[s];for(const o of r){const a=o&&o.toString();if(typeof a>"u")return{data:jh.Default,visibility:n};let l;if(this._findMatchType===Dg.Contiguous?l=bVt(this._lowercasePattern,a.toLowerCase()):l=SC(this._pattern,this._lowercasePattern,0,a,a.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0}),l)return this._matchCount++,r.length===1?{data:l,visibility:n}:{data:{label:a,score:l},visibility:n}}return this._findMode===Pd.Filter?typeof this._defaultFindVisibility=="number"?this._defaultFindVisibility:this._defaultFindVisibility?this._defaultFindVisibility(e):2:{data:jh.Default,visibility:n}}reset(){this._totalCount=0,this._matchCount=0}dispose(){ii(this.disposables)}}class xVt{constructor(e){this.stateMap=new Map(e.map(t=>[t.id,{...t}]))}get(e){const t=this.stateMap.get(e);if(t===void 0)throw new Error(`No state found for toggle id ${e}`);return t.isChecked}set(e,t){const n=this.stateMap.get(e);if(n===void 0)throw new Error(`No state found for toggle id ${e}`);return n.isChecked===t?!1:(n.isChecked=t,!0)}}var Pd;(function(i){i[i.Highlight=0]="Highlight",i[i.Filter=1]="Filter"})(Pd||(Pd={}));var Dg;(function(i){i[i.Fuzzy=0]="Fuzzy",i[i.Contiguous=1]="Contiguous"})(Dg||(Dg={}));var hv;(function(i){i.Mode="mode",i.MatchType="matchType"})(hv||(hv={}));class vVt{get pattern(){return this._pattern}get placeholder(){return this._placeholder}set placeholder(e){var t;this._placeholder=e,(t=this.widget)==null||t.setPlaceHolder(e)}constructor(e,t,n,s={}){this.tree=e,this.filter=t,this.contextViewProvider=n,this.options=s,this._pattern="",this._onDidChangePattern=new ie,this._onDidChangeOpenState=new ie,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new _e,this.disposables=new _e,this.toggles=new xVt(s.toggles??[]),this._placeholder=s.placeholder??S(20,"Type to search")}isOpened(){return!!this.widget}updateToggleState(e,t){var n;this.toggles.set(e,t),(n=this.widget)==null||n.setToggleState(e,t)}renderMessage(e,t){var n,s,r;e?this.tree.options.showNotFoundMessage??!0?(n=this.widget)==null||n.showMessage({type:2,content:t??S(21,"No results found.")}):(s=this.widget)==null||s.showMessage({type:2}):(r=this.widget)==null||r.clearMessage()}alertResults(e){$l(e?S(23,"{0} results",e):S(22,"No results"))}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}let uOe=class extends vVt{get mode(){return this.toggles.get(hv.Mode)?Pd.Filter:Pd.Highlight}set mode(e){if(e===this.mode)return;const t=e===Pd.Filter;this.updateToggleState(hv.Mode,t),this.placeholder=t?S(24,"Type to filter"):S(25,"Type to search"),this.filter.findMode=e,this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e)}get matchType(){return this.toggles.get(hv.MatchType)?Dg.Fuzzy:Dg.Contiguous}set matchType(e){e!==this.matchType&&(this.updateToggleState(hv.MatchType,e===Dg.Fuzzy),this.filter.findMatchType=e,this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,n,s={}){const r=s.defaultFindMode??Pd.Highlight,o=s.defaultFindMatchType??Dg.Fuzzy,a=[{id:hv.Mode,icon:Ee.listFilter,title:S(26,"Filter"),isChecked:r===Pd.Filter},{id:hv.MatchType,icon:Ee.searchFuzzy,title:S(27,"Fuzzy Match"),isChecked:o===Dg.Fuzzy}];t.findMatchType=o,t.findMode=r,super(e,t,n,{...s,toggles:a}),this.filter=t,this._onDidChangeMode=new ie,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new ie,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this.disposables.add(this.tree.onDidChangeModel(()=>{this.isOpened()&&(this.pattern.length!==0&&this.tree.refilter(),this.render())})),this.disposables.add(this.tree.onWillRefilter(()=>this.filter.reset()))}updateOptions(e={}){e.defaultFindMode!==void 0&&(this.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.matchType=e.defaultFindMatchType)}shouldAllowFocus(e){return!this.isOpened()||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!jh.isDefault(e.filterData)}render(){const t=this.filter.matchCount===0&&this.filter.totalCount>0&&this.pattern.length>0;this.renderMessage(t),this.pattern.length&&this.alertResults(this.filter.matchCount)}};function _Vt(i,e){return i.position===e.position&&hOe(i,e)}function hOe(i,e){return i.node.element===e.node.element&&i.startIndex===e.startIndex&&i.height===e.height&&i.endIndex===e.endIndex}class yVt{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return bs(this.stickyNodes,e.stickyNodes,_Vt)}contains(e){return this.stickyNodes.some(t=>t.node.element===e.element)}lastNodePartiallyVisible(){if(this.count===0)return!1;const e=this.stickyNodes[this.count-1];if(this.count===1)return e.position!==0;const t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!bs(this.stickyNodes,e.stickyNodes,hOe)||this.count===0)return!1;const t=this.stickyNodes[this.count-1],n=e.stickyNodes[e.count-1];return t.position!==n.position}}class wVt{constrainStickyScrollNodes(e,t,n){for(let s=0;sn||s>=t)return e.slice(0,s)}return e}}let gye=class extends se{constructor(e,t,n,s,r,o={}){super(),this.tree=e,this.model=t,this.view=n,this.treeDelegate=r,this.maxWidgetViewRatio=.4;const a=this.validateStickySettings(o);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this.stickyScrollDelegate=o.stickyScrollDelegate??new wVt,this.paddingTop=o.paddingTop??0,this._widget=this._register(new CVt(n.getScrollableElement(),n,e,s,r,o.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(n.onDidScroll(()=>this.update())),this._register(n.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this._register(t.onDidSpliceRenderedNodes(l=>{const c=this._widget.state;if(!c)return;if(l.deleteCount>0&&c.stickyNodes.some(g=>!this.model.has(this.model.getNodeLocation(g.node)))){this.update();return}c.stickyNodes.some(g=>{const f=this.model.getListIndex(this.model.getNodeLocation(g.node));return f>=l.start&&f=this.view.length))return this.view.element(t)}update(){const e=this.getNodeAtHeight(this.paddingTop);if(!e||this.tree.scrollTop<=this.paddingTop){this._widget.setState(void 0);return}const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[];let n=e,s=0,r=this.getNextStickyNode(n,void 0,s);for(;r&&(t.push(r),s+=r.height,!(t.length<=this.stickyScrollMaxItemCount&&(n=this.getNextVisibleNode(r),!n)));)r=this.getNextStickyNode(n,r.node,s);const o=this.constrainStickyNodes(t);return o.length?new yVt(o):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,n){const s=this.getAncestorUnderPrevious(e,t);if(s&&!(s===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,n))))return this.createStickyScrollNode(s,n)}nodeTopAlignsWithStickyNodesBottom(e,t){const n=this.getNodeIndex(e),s=this.view.getElementTop(n),r=t;return this.view.scrollTop===s-r}createStickyScrollNode(e,t){const n=this.treeDelegate.getHeight(e),{startIndex:s,endIndex:r}=this.getNodeRange(e),o=this.calculateStickyNodePosition(r,t,n);return{node:e,position:o,height:n,startIndex:s,endIndex:r}}getAncestorUnderPrevious(e,t=void 0){let n=e,s=this.getParentNode(n);for(;s;){if(s===t)return n;n=s,s=this.getParentNode(n)}if(t===void 0)return n}calculateStickyNodePosition(e,t,n){let s=this.view.getRelativeTop(e);if(s===null&&this.view.firstVisibleIndex===e&&e+1l&&t<=l?l-n:t}constrainStickyNodes(e){if(e.length===0)return[];const t=this.view.renderHeight*this.maxWidgetViewRatio,n=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&n.position+n.height<=t)return e;const s=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!s.length)return[];const r=s[s.length-1];if(s.length>this.stickyScrollMaxItemCount||r.position+r.height>t)throw new Error("stickyScrollDelegate violates constraints");return s}getParentNode(e){const t=this.model.getNodeLocation(e),n=this.model.getParentNodeLocation(t);return n?this.model.getNode(n):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){const t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){const t=this.model.getNodeLocation(e),n=this.model.getListIndex(t);if(n<0)throw new Error("Node not found in tree");const s=this.model.getListRenderCount(t),r=n+s-1;return{startIndex:n,endIndex:r}}nodePositionTopBelowWidget(e){const t=[];let n=this.getParentNode(e);for(;n;)t.push(n),n=this.getParentNode(n);let s=0;for(let r=0;r0,n=!!e&&e.count>0;if(!t&&!n||t&&n&&this._previousState.equal(e))return;if(t!==n&&this.setVisible(n),!n){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}const s=e.stickyNodes[e.count-1];this._previousState&&e.animationStateChanged(this._previousState)?this._previousElements[this._previousState.count-1].style.top=`${s.position}px`:this.renderState(e),this._previousState=e,this._rootDomNode.style.height=`${s.position+s.height}px`}renderState(e){this._previousStateDisposables.clear();const t=Array(e.count);for(let n=e.count-1;n>=0;n--){const s=e.stickyNodes[n],{element:r,disposable:o}=this.createElement(s,n,e.count);t[n]=r,this._rootDomNode.appendChild(r),this._previousStateDisposables.add(o)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}rerender(){this._previousState&&this.renderState(this._previousState)}createElement(e,t,n){const s=e.startIndex,r=document.createElement("div");r.style.top=`${e.position}px`,this.tree.options.setRowHeight!==!1&&(r.style.height=`${e.height}px`),this.tree.options.setRowLineHeight!==!1&&(r.style.lineHeight=`${e.height}px`),r.classList.add("monaco-tree-sticky-row"),r.classList.add("monaco-list-row"),r.setAttribute("data-index",`${s}`),r.setAttribute("data-parity",s%2===0?"even":"odd"),r.setAttribute("id",this.view.getElementID(s));const o=this.setAccessibilityAttributes(r,e.node.element,t,n),a=this.treeDelegate.getTemplateId(e.node),l=this.treeRenderers.find(g=>g.templateId===a);if(!l)throw new Error(`No renderer found for template id ${a}`);let c=e.node;c===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(c=new Proxy(e.node,{}));const u=l.renderTemplate(r);l.renderElement(c,e.startIndex,u,{height:e.height});const h=dt(()=>{o.dispose(),l.disposeElement(c,e.startIndex,u,{height:e.height}),l.disposeTemplate(u),r.remove()});return{element:r,disposable:h}}setAccessibilityAttributes(e,t,n,s){if(!this.accessibilityProvider)return se.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,n,s))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,n))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");const r=this.accessibilityProvider.getAriaLabel(t),o=r&&typeof r!="string"?r:zi(r),a=Pt(c=>{const u=c.readObservable(o);u?e.setAttribute("aria-label",u):e.removeAttribute("aria-label")});typeof r=="string"||r&&e.setAttribute("aria-label",r.get());const l=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return typeof l=="number"&&e.setAttribute("aria-level",`${l}`),e.setAttribute("aria-selected",String(!1)),a}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}};class SVt extends se{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new ie,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new ie,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register(de(this.container,"focus",()=>this.onFocus())),this._register(de(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(n=>this.onKeyDown(n))),this._register(this.view.onMouseDown(n=>this.onMouseDown(n))),this._register(this.view.onContextMenu(n=>this.handleContextMenu(n)))}handleContextMenu(e){const t=e.browserEvent.target;if(!KR(t)&&!VA(t)){this.focusedLast()&&this.view.domFocus();return}if(!$m(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const o=this.state.stickyNodes.findIndex(a=>{var l;return a.node.element===((l=e.element)==null?void 0:l.element)});if(o===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(o);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const s=this.state.stickyNodes[this.focusedIndex].node.element,r=this.elements[this.focusedIndex];this._onContextMenu.fire({element:s,anchor:r,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if(e.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){const t=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([t]),this.scrollNodeUnderWidget(t,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){const t=e.browserEvent.target;!KR(t)&&!VA(t)||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&t.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const n=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){const s=Il(n,0,t.count-1);this.setFocus(s)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){const t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,r=this.view.getElementTop(e),o=s?s.position+s.height+n.height:n.height;this.view.scrollTop=r-o}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){this.focusedIndex!==-1&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function s4(i){let e=k1.Unknown;return A$(i.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=k1.Twistie:A$(i.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?e=k1.Element:A$(i.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(e=k1.Filter),{browserEvent:i.browserEvent,element:i.element?i.element.element:null,target:e}}function kVt(i){const e=KR(i.browserEvent.target);return{element:i.element?i.element.element:null,browserEvent:i.browserEvent,anchor:i.anchor,isStickyScroll:e}}function _j(i,e){e(i),i.children.forEach(t=>_j(t,e))}class Gq{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new ie,this.onDidChange=this._onDidChange.event}set(e,t){const n=t;!(n!=null&&n.__forceEvent)&&bs(this.nodes,e)||this._set(e,!1,t)}_set(e,t,n){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const s=this;this._onDidChange.fire({get elements(){return s.get()},browserEvent:n})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const l=this.createNodeSet(),c=u=>l.delete(u);t.forEach(u=>_j(u,c)),this.set([...l.values()]);return}const n=new Set,s=l=>n.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>_j(l,s));const r=new Map,o=l=>r.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>_j(l,o));const a=[];for(const l of this.nodes){const c=this.identityProvider.getId(l.element).toString();if(!n.has(c))a.push(l);else{const h=r.get(c);h&&h.visible&&a.push(h)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class NVt extends hMe{constructor(e,t,n){super(e),this.tree=t,this.stickyScrollProvider=n}onViewPointer(e){if(lMe(e.browserEvent.target)||Og(e.browserEvent.target)||KI(e.browserEvent.target)||e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const n=e.browserEvent.target,s=n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,r=VA(e.browserEvent.target);let o=!1;if(r?o=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?o=this.tree.expandOnlyOnTwistieClick(t.element):o=!!this.tree.expandOnlyOnTwistieClick,r)this.handleStickyScrollMouseEvent(e,t);else{if(o&&!s&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e)}if(t.collapsible&&(!r||s)){const a=this.tree.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),this.tree.toggleCollapsed(a,l),s){e.browserEvent.isHandledByList=!0;return}}r||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(u8t(e.browserEvent.target)||h8t(e.browserEvent.target))return;const n=this.stickyScrollProvider();if(!n)throw new Error("Sticky scroll controller not found");const s=this.list.indexOf(t),r=this.list.getElementTop(s),o=n.nodePositionTopBelowWidget(t);this.tree.scrollTop=r-o,this.list.domFocus(),this.list.setFocus([s]),this.list.setSelection([s])}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||e.browserEvent.isHandledByList||super.onDoubleClick(e)}onMouseDown(e){const t=e.browserEvent.target;if(!KR(t)&&!VA(t)){super.onMouseDown(e);return}}onContextMenu(e){const t=e.browserEvent.target;if(!KR(t)&&!VA(t)){super.onContextMenu(e);return}}}class EVt extends Jd{constructor(e,t,n,s,r,o,a,l){super(e,t,n,s,l),this.focusTrait=r,this.selectionTrait=o,this.anchorTrait=a}createMouseController(e){return new NVt(this,e.tree,e.stickyScrollProvider)}splice(e,t,n=[]){if(super.splice(e,t,n),n.length===0)return;const s=[],r=[];let o;n.forEach((a,l)=>{this.focusTrait.has(a)&&s.push(e+l),this.selectionTrait.has(a)&&r.push(e+l),this.anchorTrait.has(a)&&(o=e+l)}),s.length>0&&super.setFocus(qb([...super.getFocus(),...s])),r.length>0&&super.setSelection(qb([...super.getSelection(),...r])),typeof o=="number"&&super.setAnchor(o)}setFocus(e,t,n=!1){super.setFocus(e,t),n||this.focusTrait.set(e.map(s=>this.element(s)),t)}setSelection(e,t,n=!1){super.setSelection(e,t),n||this.selectionTrait.set(e.map(s=>this.element(s)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class gOe{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return He.filter(He.map(this.view.onMouseDblClick,s4),e=>e.target!==k1.Filter)}get onMouseOver(){return He.map(this.view.onMouseOver,s4)}get onMouseOut(){return He.map(this.view.onMouseOut,s4)}get onContextMenu(){var e;return He.any(He.filter(He.map(this.view.onContextMenu,kVt),t=>!t.isStickyScroll),((e=this.stickyScrollController)==null?void 0:e.onContextMenu)??He.None)}get onPointer(){return He.map(this.view.onPointer,s4)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return He.any(this.onDidChangeModelRelay.event,this.onDidSwapModel.event)}get onDidChangeCollapseState(){return this.onDidChangeCollapseStateRelay.event}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,n,s,r={}){this._user=e,this._options=r,this.eventBufferer=new OP,this.onDidChangeFindOpenState=He.None,this.onDidChangeStickyScrollFocused=He.None,this.disposables=new _e,this.onDidSwapModel=this.disposables.add(new ie),this.onDidChangeModelRelay=this.disposables.add(new JT),this.onDidSpliceModelRelay=this.disposables.add(new JT),this.onDidChangeCollapseStateRelay=this.disposables.add(new JT),this.onDidChangeRenderNodeCountRelay=this.disposables.add(new JT),this.onDidChangeActiveNodesRelay=this.disposables.add(new JT),this._onWillRefilter=new ie,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new ie,this.modelDisposables=new _e,r.keyboardNavigationLabelProvider&&(r.findWidgetEnabled??!0)&&(this.findFilter=new dOe(r.keyboardNavigationLabelProvider,r.filter,r.defaultFindVisibility),r={...r,filter:this.findFilter},this.disposables.add(this.findFilter)),this.model=this.createModel(e,r),this.treeDelegate=new gle(n);const o=this.disposables.add(new mVt(this.onDidChangeActiveNodesRelay.event)),a=new $Ie;this.renderers=s.map(l=>new BZ(l,this.model,this.onDidChangeCollapseStateRelay.event,o,a,r));for(const l of this.renderers)this.disposables.add(l);if(this.focus=new Gq(()=>this.view.getFocusedElements()[0],r.identityProvider),this.selection=new Gq(()=>this.view.getSelectedElements()[0],r.identityProvider),this.anchor=new Gq(()=>this.view.getAnchorElement(),r.identityProvider),this.view=new EVt(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...pVt(()=>this.model,this.disposables,r),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.setupModel(this.model),r.keyboardSupport!==!1){const l=He.chain(this.view.onKeyDown,c=>c.filter(u=>!Og(u.target)).map(u=>new ki(u)));He.chain(l,c=>c.filter(u=>u.keyCode===15))(this.onLeftArrow,this,this.disposables),He.chain(l,c=>c.filter(u=>u.keyCode===17))(this.onRightArrow,this,this.disposables),He.chain(l,c=>c.filter(u=>u.keyCode===10))(this.onSpace,this,this.disposables)}if((r.findWidgetEnabled??!0)&&r.keyboardNavigationLabelProvider&&r.contextViewProvider){const l={styles:r.findWidgetStyles,defaultFindMode:r.defaultFindMode,defaultFindMatchType:r.defaultFindMatchType,showNotFoundMessage:r.showNotFoundMessage};this.findController=this.disposables.add(new uOe(this,this.findFilter,r.contextViewProvider,l)),this.focusNavigationFilter=c=>this.findController.shouldAllowFocus(c),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=He.None,this.onDidChangeFindMatchType=He.None;r.enableStickyScroll&&(this.stickyScrollController=new gye(this,this.model,this.view,this.renderers,this.treeDelegate,r),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=Yu(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===OC.Always)}updateOptions(e={}){var t;this._options={...this._options,...e};for(const n of this.renderers)n.updateOptions(e);this.view.updateOptions(this._options),(t=this.findController)==null||t.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===OC.Always)}get options(){return this._options}updateStickyScroll(e){var t;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new gye(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=He.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(t=this.stickyScrollController)==null||t.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){var e;(e=this.stickyScrollController)!=null&&e.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,n=[];e.treeIndentGuidesStroke&&(n.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { opacity: 1; border-color: ${e.treeInactiveIndentGuidesStroke}; }`),n.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { opacity: 1; border-color: ${e.treeIndentGuidesStroke}; }`));const s=e.treeStickyScrollBackground??e.listBackground;s&&(n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${s}; }`),n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${s}; }`)),e.treeStickyScrollBorder&&n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&n.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const r=Tb(e.listFocusAndSelectionOutline,Tb(e.listSelectionOutline,e.listFocusOutline??""));r&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(n.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),n.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),n.push(`.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),n.push(`.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),n.push(`.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=n.join(` +`),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{const n=e.map(r=>this.model.getNode(r));this.selection.set(n,t);const s=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setSelection(s,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{const n=e.map(r=>this.model.getNode(r));this.focus.set(n,t);const s=e.map(r=>this.model.getListIndex(r)).filter(r=>r>-1);this.view.setFocus(s,t,!0)})}focusNext(e=1,t=!1,n,s=$m(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,n,s)}focusPrevious(e=1,t=!1,n,s=$m(n)&&n.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,n,s)}focusNextPage(e,t=$m(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=$m(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>{var n;return((n=this.stickyScrollController)==null?void 0:n.height)??0})}focusLast(e,t=$m(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=$m(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const n=this.model.getListIndex(e);if(n!==-1)if(!this.stickyScrollController)this.view.reveal(n,t);else{const s=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(n,t,s)}}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],s=this.model.getNodeLocation(n);if(!this.model.setCollapsed(s,!0)){const o=this.model.getParentNodeLocation(s);if(!o)return;const a=this.model.getListIndex(o);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],s=this.model.getNodeLocation(n);if(!this.model.setCollapsed(s,!1)){if(!n.children.some(l=>l.visible))return;const[o]=this.view.getFocus(),a=o+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const n=t[0],s=this.model.getNodeLocation(n),r=e.browserEvent.altKey;this.model.setCollapsed(s,void 0,r)}setupModel(e){this.modelDisposables.clear(),this.modelDisposables.add(e.onDidSpliceRenderedNodes(({start:r,deleteCount:o,elements:a})=>this.view.splice(r,o,a)));const t=He.forEach(e.onDidSpliceModel,r=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(r),this.selection.onDidModelSplice(r)})},this.modelDisposables);t(()=>null,null,this.modelDisposables);const n=this.modelDisposables.add(new ie),s=this.modelDisposables.add(new Uu(0));this.modelDisposables.add(He.any(t,this.focus.onDidChange,this.selection.onDidChange)(()=>{s.trigger(()=>{const r=new Set;for(const o of this.focus.getNodes())r.add(o);for(const o of this.selection.getNodes())r.add(o);n.fire([...r.values()])})})),this.onDidChangeActiveNodesRelay.input=n.event,this.onDidChangeModelRelay.input=He.signal(e.onDidSpliceModel),this.onDidChangeCollapseStateRelay.input=e.onDidChangeCollapseState,this.onDidChangeRenderNodeCountRelay.input=e.onDidChangeRenderNodeCount,this.onDidSpliceModelRelay.input=e.onDidSpliceModel}dispose(){var e;ii(this.disposables),(e=this.stickyScrollController)==null||e.dispose(),this.view.dispose(),this.modelDisposables.dispose()}}class fle{constructor(e,t={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new hVt(e,null,t),this.onDidSpliceModel=this.model.onDidSpliceModel,this.onDidSpliceRenderedNodes=this.model.onDidSpliceRenderedNodes,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,t.sorter&&(this.sorter={compare(n,s){return t.sorter.compare(n.element,s.element)}}),this.identityProvider=t.identityProvider}setChildren(e,t=En.empty(),n={}){const s=this.getElementLocation(e);this._setChildren(s,this.preserveCollapseState(t),n)}_setChildren(e,t=En.empty(),n){const s=new Set,r=new Set,o=l=>{var u;if(l.element===null)return;const c=l;if(s.add(c.element),this.nodes.set(c.element,c),this.identityProvider){const h=this.identityProvider.getId(c.element).toString();r.add(h),this.nodesByIdentity.set(h,c)}(u=n.onDidCreateNode)==null||u.call(n,c)},a=l=>{var u;if(l.element===null)return;const c=l;if(s.has(c.element)||this.nodes.delete(c.element),this.identityProvider){const h=this.identityProvider.getId(c.element).toString();r.has(h)||this.nodesByIdentity.delete(h)}(u=n.onDidDeleteNode)==null||u.call(n,c)};this.model.splice([...e,0],Number.MAX_VALUE,t,{...n,onDidCreateNode:o,onDidDeleteNode:a})}preserveCollapseState(e=En.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),En.map(e,t=>{let n=this.nodes.get(t.element);if(!n&&this.identityProvider){const o=this.identityProvider.getId(t.element).toString();n=this.nodesByIdentity.get(o)}if(!n){let o;return typeof t.collapsed>"u"?o=void 0:t.collapsed===Td.Collapsed||t.collapsed===Td.PreserveOrCollapsed?o=!0:t.collapsed===Td.Expanded||t.collapsed===Td.PreserveOrExpanded?o=!1:o=!!t.collapsed,{...t,children:this.preserveCollapseState(t.children),collapsed:o}}const s=typeof t.collapsible=="boolean"?t.collapsible:n.collapsible;let r;return typeof t.collapsed>"u"||t.collapsed===Td.PreserveOrCollapsed||t.collapsed===Td.PreserveOrExpanded?r=n.collapsed:t.collapsed===Td.Collapsed?r=!0:t.collapsed===Td.Expanded?r=!1:r=!!t.collapsed,{...t,collapsible:s,collapsed:r,children:this.preserveCollapseState(t.children)}})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}resort(e=null,t=!0){if(!this.sorter)return;const n=this.getElementLocation(e),s=this.model.getNode(n);this._setChildren(n,this.resortChildren(s,t),{})}resortChildren(e,t,n=!0){let s=[...e.children];return(t||n)&&(s=s.sort(this.sorter.compare.bind(this.sorter))),En.map(s,r=>({element:r.element,collapsible:r.collapsible,collapsed:r.collapsed,children:this.resortChildren(r,t,!1)}))}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const s=this.getElementLocation(e);return this.model.setCollapsed(s,t,n)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Md(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Md(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Md(this.user,`Tree element not found: ${e}`);const n=this.model.getNodeLocation(t),s=this.model.getParentNodeLocation(n);return this.model.getNode(s).element}getElementLocation(e){if(e===null)return[];const t=this.nodes.get(e);if(!t)throw new Md(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function yj(i){const e=[i.element],t=i.incompressible||!1;return{element:{elements:e,incompressible:t},children:En.map(En.from(i.children),yj),collapsible:i.collapsible,collapsed:i.collapsed}}function wj(i){const e=[i.element],t=i.incompressible||!1;let n,s;for(;[s,n]=En.consume(En.from(i.children),2),!(s.length!==1||s[0].incompressible);)i=s[0],e.push(i.element);return{element:{elements:e,incompressible:t},children:En.map(En.concat(s,n),wj),collapsible:i.collapsible,collapsed:i.collapsed}}function HZ(i,e=0){let t;return eHZ(n,0)),e===0&&i.element.incompressible?{element:i.element.elements[e],children:t,incompressible:!0,collapsible:i.collapsible,collapsed:i.collapsed}:{element:i.element.elements[e],children:t,collapsible:i.collapsible,collapsed:i.collapsed}}function fye(i){return HZ(i,0)}function fOe(i,e,t){return i.element===e?{...i,children:t}:{...i,children:En.map(En.from(i.children),n=>fOe(n,e,t))}}const LVt=i=>({getId(e){return e.elements.map(t=>i.getId(t).toString()).join("\0")}});class DVt{get onDidSpliceRenderedNodes(){return this.model.onDidSpliceRenderedNodes}get onDidSpliceModel(){return this.model.onDidSpliceModel}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new fle(e,t),this.enabled=typeof t.compressionEnabled>"u"?!0:t.compressionEnabled,this.identityProvider=t.identityProvider}setChildren(e,t=En.empty(),n){const s=n.diffIdentityProvider&&LVt(n.diffIdentityProvider);if(e===null){const m=En.map(t,this.enabled?wj:yj);this._setChildren(null,m,{diffIdentityProvider:s,diffDepth:1/0});return}const r=this.nodes.get(e);if(!r)throw new Md(this.user,"Unknown compressed tree node");const o=this.model.getNode(r),a=this.model.getParentNodeLocation(r),l=this.model.getNode(a),c=fye(o),u=fOe(c,e,t),h=(this.enabled?wj:yj)(u),g=n.diffIdentityProvider?((m,x)=>n.diffIdentityProvider.getId(m)===n.diffIdentityProvider.getId(x)):void 0;if(bs(h.element.elements,o.element.elements,g)){this._setChildren(r,h.children||En.empty(),{diffIdentityProvider:s,diffDepth:1});return}const f=l.children.map(m=>m===o?h:m);this._setChildren(l.element,f,{diffIdentityProvider:s,diffDepth:o.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const n=this.model.getNode().children,s=En.map(n,fye),r=En.map(s,e?wj:yj);this._setChildren(null,r,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,n){const s=new Set,r=a=>{for(const l of a.element.elements)s.add(l),this.nodes.set(l,a.element)},o=a=>{for(const l of a.element.elements)s.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,{...n,onDidCreateNode:r,onDidDeleteNode:o})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(typeof e>"u")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return n===null?null:n.elements[n.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,n){const s=this.getCompressedNode(e);return this.model.setCollapsed(s,t,n)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}resort(e=null,t=!0){const n=this.getCompressedNode(e);this.model.resort(n,t)}getCompressedNode(e){if(e===null)return null;const t=this.nodes.get(e);if(!t)throw new Md(this.user,`Tree element not found: ${e}`);return t}}const TVt=i=>i[i.length-1];class ple{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new ple(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}function IVt(i,e){return{...e,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(i(t))}},sorter:e.sorter&&{compare(t,n){return e.sorter.compare(t.elements[0],n.elements[0])}},filter:e.filter&&{filter(t,n){const s=t.elements;for(let r=0;r({insertedNodes:e.map(n=>this.nodeMapper.map(n)),deletedNodes:t.map(n=>this.nodeMapper.map(n))}))}get onDidSpliceRenderedNodes(){return He.map(this.model.onDidSpliceRenderedNodes,({start:e,deleteCount:t,elements:n})=>({start:e,deleteCount:t,elements:n.map(s=>this.nodeMapper.map(s))}))}get onDidChangeCollapseState(){return He.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return He.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}constructor(e,t={}){this.rootRef=null,this.elementMapper=t.elementMapper||TVt;const n=s=>this.elementMapper(s.elements);this.nodeMapper=new hle(s=>new ple(n,s)),this.model=new DVt(e,IVt(n,t))}setChildren(e,t=En.empty(),n={}){this.model.setChildren(e,t,n)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return t===null||typeof t>"u"?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,n){return this.model.setCollapsed(e,t,n)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}resort(e=null,t=!0){return this.model.resort(e,t)}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var RVt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};class mle extends gOe{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,n,s,r={}){super(e,t,n,s,r),this.user=e}setChildren(e,t=En.empty(),n){this.model.setChildren(e,t,n)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}resort(e,t=!0){this.model.resort(e,t)}hasElement(e){return this.model.has(e)}createModel(e,t){return new fle(e,t)}}class pOe{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,n){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,n,s){let r=this.stickyScrollDelegate.getCompressedNode(e);r||(r=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),r.element.elements.length===1?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,s)):(n.compressedTreeNode=r,this.renderer.renderCompressedElements(r,t,n.data,s))}disposeElement(e,t,n,s){var r,o,a,l;n.compressedTreeNode?(o=(r=this.renderer).disposeCompressedElements)==null||o.call(r,n.compressedTreeNode,t,n.data,s):(l=(a=this.renderer).disposeElement)==null||l.call(a,e,t,n.data,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){var n,s;return((s=(n=this.renderer).renderTwistie)==null?void 0:s.call(n,e,t))??!1}}RVt([gr],pOe.prototype,"compressedTreeNodeProvider",null);class MVt{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,n){if(this.compressedStickyNodes.clear(),e.length===0)return[];for(let s=0;sn||s>=t-1&&tthis,a=new MVt(()=>this.model),l=s.map(c=>new pOe(o,a,c));super(e,t,n,l,{...PVt(o,r),stickyScrollDelegate:a})}setChildren(e,t=En.empty(),n){this.model.setChildren(e,t,n)}createModel(e,t){return new AVt(e,t)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled<"u"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}function Yq(i){return{...i,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function WZ(i,e){return e.parent?e.parent===i?!0:WZ(i,e.parent):!1}function OVt(i,e){return i===e||WZ(i,e)||WZ(e,i)}class ble{get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new ble(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class jVt{constructor(e,t,n){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,s){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,s)}renderTwistie(e,t){return e.slow?(t.classList.add(...Tt.asClassNameArray(Ee.treeItemLoading)),!0):(t.classList.remove(...Tt.asClassNameArray(Ee.treeItemLoading)),!1)}disposeElement(e,t,n,s){var r,o;(o=(r=this.renderer).disposeElement)==null||o.call(r,this.nodeMapper.map(e),t,n.templateData,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function pye(i){return{browserEvent:i.browserEvent,elements:i.elements.map(e=>e.element)}}function mye(i){return{browserEvent:i.browserEvent,element:i.element&&i.element.element,target:i.target}}class FVt extends nO{constructor(e){super(e.elements.map(t=>t.element)),this.data=e}}function Qq(i){return i instanceof nO?new FVt(i):i}class BVt{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(n=>n.element),t)}onDragStart(e,t){var n,s;(s=(n=this.dnd).onDragStart)==null||s.call(n,Qq(e),t)}onDragOver(e,t,n,s,r,o=!0){return this.dnd.onDragOver(Qq(e),t&&t.element,n,s,r)}drop(e,t,n,s,r){this.dnd.drop(Qq(e),t&&t.element,n,s,r)}onDragEnd(e){var t,n;(n=(t=this.dnd).onDragEnd)==null||n.call(t,e)}dispose(){this.dnd.dispose()}}class HVt extends dOe{constructor(e,t,n){super(t,n),this.findProvider=e,this.isFindSessionActive=!1}filter(e,t){const n=super.filter(e,t);if(!this.isFindSessionActive||this.findMode===Pd.Highlight||!this.findProvider.isVisible)return n;const s=uO(n)?n.visibility:n;return PC(s)===0?0:this.findProvider.isVisible(e)?n:0}}class WVt extends uOe{constructor(e,t,n,s,r){super(e,n,s,r),this.findProvider=t,this.filter=n,this.activeSession=!1,this.asyncWorkInProgress=!1,this.disposables.add(dt(async()=>{var o,a;this.activeSession&&await((a=(o=this.findProvider).endSession)==null?void 0:a.call(o))}))}render(){if(this.asyncWorkInProgress||!this.activeFindMetadata)return;const e=this.activeFindMetadata.matchCount===0&&this.pattern.length>0;this.renderMessage(e),this.pattern.length&&this.alertResults(this.activeFindMetadata.matchCount)}shouldAllowFocus(e){return this.shouldFocusWhenNavigating(e)}shouldFocusWhenNavigating(e){var n;if(!this.activeSession||!this.activeFindMetadata)return!0;const t=(n=e.element)==null?void 0:n.element;return t&&this.activeFindMetadata.isMatch(t)?!0:!jh.isDefault(e.filterData)}}function bOe(i){return i&&{...i,collapseByDefault:!0,identityProvider:i.identityProvider&&{getId(e){return i.identityProvider.getId(e.element)}},dnd:i.dnd&&new BVt(i.dnd),multipleSelectionController:i.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return i.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return i.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:i.accessibilityProvider&&{...i.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:i.accessibilityProvider.getRole?e=>i.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:i.accessibilityProvider.isChecked?e=>{var t;return!!((t=i.accessibilityProvider)!=null&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return i.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return i.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:i.accessibilityProvider.getWidgetRole?()=>i.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:i.accessibilityProvider.getAriaLevel&&(e=>i.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:i.accessibilityProvider.getActiveDescendantId&&(e=>i.accessibilityProvider.getActiveDescendantId(e.element))},filter:i.filter&&{filter(e,t){return i.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{...i.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof i.expandOnlyOnTwistieClick>"u"?void 0:typeof i.expandOnlyOnTwistieClick!="function"?i.expandOnlyOnTwistieClick:(e=>i.expandOnlyOnTwistieClick(e.element)),defaultFindVisibility:e=>e.hasChildren&&e.stale?1:typeof i.defaultFindVisibility=="number"?i.defaultFindVisibility:typeof i.defaultFindVisibility>"u"?2:i.defaultFindVisibility(e.element),stickyScrollDelegate:i.stickyScrollDelegate}}function VZ(i,e){e(i),i.children.forEach(t=>VZ(t,e))}class xOe{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return He.map(this.tree.onDidChangeFocus,pye)}get onDidChangeSelection(){return He.map(this.tree.onDidChangeSelection,pye)}get onMouseDblClick(){return He.map(this.tree.onMouseDblClick,mye)}get onPointer(){return He.map(this.tree.onPointer,mye)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,n,s,r,o={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new ie,this._onDidChangeNodeSlowState=new ie,this.nodeMapper=new hle(c=>new ble(c)),this.disposables=new _e,this.identityProvider=o.identityProvider,this.autoExpandSingleChildren=typeof o.autoExpandSingleChildren>"u"?!1:o.autoExpandSingleChildren,this.sorter=o.sorter,this.getDefaultCollapseState=c=>o.collapseByDefault?o.collapseByDefault(c)?Td.PreserveOrCollapsed:Td.PreserveOrExpanded:void 0;let a=!1,l;if(o.findProvider&&(o.findWidgetEnabled??!0)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider&&(a=!0,l=new HVt(o.findProvider,o.keyboardNavigationLabelProvider,o.filter)),this.tree=this.createTree(e,t,n,s,{...o,findWidgetEnabled:!a,filter:l??o.filter}),this.root=Yq({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables),a){const c={styles:o.findWidgetStyles,showNotFoundMessage:o.showNotFoundMessage,defaultFindMatchType:o.defaultFindMatchType,defaultFindMode:o.defaultFindMode};this.findController=this.disposables.add(new WVt(this.tree,o.findProvider,l,this.tree.options.contextViewProvider,c)),this.focusNavigationFilter=u=>this.findController.shouldFocusWhenNavigating(u),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindOpenState=this.tree.onDidChangeFindOpenState,this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType}createTree(e,t,n,s,r){const o=new gle(n),a=s.map(c=>new jVt(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=bOe(r)||{};return new mle(e,t,o,a,l)}updateOptions(e={}){this.findController&&(e.defaultFindMode!==void 0&&(this.findController.mode=e.defaultFindMode),e.defaultFindMatchType!==void 0&&(this.findController.matchType=e.defaultFindMatchType)),this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.cancelAllRefreshPromises(),this.root.element=e;const n=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,n),n&&(this.tree.setFocus(n.focus),this.tree.setSelection(n.selection)),t&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)}cancelAllRefreshPromises(e=!1){this.refreshPromises.forEach(t=>t.cancel()),this.refreshPromises.clear(),e&&(this.subTreeRefreshPromises.forEach(t=>t.cancel()),this.subTreeRefreshPromises.clear())}async _updateChildren(e=this.root.element,t=!0,n=!1,s,r){if(typeof this.root.element>"u")throw new Md(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await He.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(await this.refreshAndRenderNode(o,t,s,r),n)try{this.tree.rerender(o)}catch{}}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),n=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(n)}collapse(e,t=!1){const n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}async expand(e,t=!1){if(typeof this.root.element>"u")throw new Md(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await He.toPromise(this._onDidRender.event));const n=this.getDataNode(e);if(this.tree.hasElement(n)&&!this.tree.isCollapsible(n)||(n.refreshPromise&&(await n.refreshPromise,await He.toPromise(this._onDidRender.event)),n!==this.root&&!n.refreshPromise&&!this.tree.isCollapsed(n)))return!1;const s=this.tree.expand(n===this.root?null:n,t);return n.refreshPromise&&(await n.refreshPromise,await He.toPromise(this._onDidRender.event)),s}setSelection(e,t){const n=e.map(s=>this.getDataNode(s));this.tree.setSelection(n,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const n=e.map(s=>this.getDataNode(s));this.tree.setFocus(n,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),n=this.tree.getFirstElementChild(t===this.root?null:t);return n&&n.element}getDataNode(e){var n;const t=this.nodes.get(e===this.root.element?null:e);if(!t){const s=(n=this.identityProvider)==null?void 0:n.getId(e).toString();throw new Md(this.user,`Data tree node not found${s?`: ${s}`:""}`)}return t}async refreshAndRenderNode(e,t,n,s){this.disposables.isDisposed||(await this.refreshNode(e,t,n),!this.disposables.isDisposed&&this.render(e,n,s))}async refreshNode(e,t,n){let s;if(this.subTreeRefreshPromises.forEach((r,o)=>{!s&&OVt(o,e)&&(s=r.then(()=>this.refreshNode(e,t,n)))}),s)return s;if(e!==this.root&&this.tree.getNode(e).collapsed){e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,this.setChildren(e,[],t,n);return}return this.doRefreshSubTree(e,t,n)}async doRefreshSubTree(e,t,n){const s=io(async()=>{const r=await this.doRefreshNode(e,t,n);e.stale=!1,await iR.settled(r.map(o=>this.doRefreshSubTree(o,t,n)))});return e.refreshPromise=s,this.subTreeRefreshPromises.set(e,s),s.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}),s}async doRefreshNode(e,t,n){e.hasChildren=!!this.dataSource.hasChildren(e.element);let s;if(!e.hasChildren)s=Promise.resolve(En.empty());else{const r=this.doGetChildren(e);if(kY(r))s=Promise.resolve(r);else{const o=kp(800);o.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},a=>null),s=r.finally(()=>o.cancel())}}try{const r=await s;return this.setChildren(e,r,t,n)}catch(r){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Zd(r))return[];throw r}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const n=this.dataSource.getChildren(e.element);return kY(n)?this.processChildren(n):(t=io(async()=>this.processChildren(await n)),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(zt))}setChildren(e,t,n,s){const r=[...t];if(e.children.length===0&&r.length===0)return[];const o=new Map,a=new Map;for(const u of e.children)o.set(u.element,u),this.identityProvider&&a.set(u.id,{node:u,collapsed:this.tree.hasElement(u)&&this.tree.isCollapsed(u)});const l=[],c=r.map(u=>{const h=!!this.dataSource.hasChildren(u);if(!this.identityProvider){const x=Yq({element:u,parent:e,hasChildren:h,defaultCollapseState:this.getDefaultCollapseState(u)});return h&&x.defaultCollapseState===Td.PreserveOrExpanded&&l.push(x),x}const g=this.identityProvider.getId(u).toString(),f=a.get(g);if(f){const x=f.node;return o.delete(x.element),this.nodes.delete(x.element),this.nodes.set(u,x),x.element=u,x.hasChildren=h,n?f.collapsed?(x.children.forEach(v=>VZ(v,_=>this.nodes.delete(_.element))),x.children.splice(0,x.children.length),x.stale=!0):l.push(x):h&&!f.collapsed&&l.push(x),x}const m=Yq({element:u,parent:e,id:g,hasChildren:h,defaultCollapseState:this.getDefaultCollapseState(u)});return s&&s.viewState.focus&&s.viewState.focus.indexOf(g)>-1&&s.focus.push(m),s&&s.viewState.selection&&s.viewState.selection.indexOf(g)>-1&&s.selection.push(m),(s&&s.viewState.expanded&&s.viewState.expanded.indexOf(g)>-1||h&&m.defaultCollapseState===Td.PreserveOrExpanded)&&l.push(m),m});for(const u of o.values())VZ(u,h=>this.nodes.delete(h.element));for(const u of c)this.nodes.set(u.element,u);return DF(e.children,0,e.children.length,c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].forceExpanded=!0,l.push(c[0])),l}render(e,t,n){const s=e.children.map(o=>this.asTreeElement(o,t)),r=n&&{...n,diffIdentityProvider:n.diffIdentityProvider&&{getId(o){return n.diffIdentityProvider.getId(o.element)}}};this.tree.setChildren(e===this.root?null:e,s,r),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let n;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?n=!1:e.forceExpanded?(n=!1,e.forceExpanded=!1):n=e.defaultCollapseState,{element:e,children:e.hasChildren?En.map(e.children,s=>this.asTreeElement(s,t)):[],collapsible:e.hasChildren,collapsed:n}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class xle{get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new xle(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class VVt{constructor(e,t,n,s){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=n,this.onDidChangeTwistieState=s,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,n,s){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,s)}renderCompressedElements(e,t,n,s){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,s)}renderTwistie(e,t){return e.slow?(t.classList.add(...Tt.asClassNameArray(Ee.treeItemLoading)),!0):(t.classList.remove(...Tt.asClassNameArray(Ee.treeItemLoading)),!1)}disposeElement(e,t,n,s){var r,o;(o=(r=this.renderer).disposeElement)==null||o.call(r,this.nodeMapper.map(e),t,n.templateData,s)}disposeCompressedElements(e,t,n,s){var r,o;(o=(r=this.renderer).disposeCompressedElements)==null||o.call(r,this.compressibleNodeMapperProvider().map(e),t,n.templateData,s)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=ii(this.disposables)}}function zVt(i){const e=i&&bOe(i);return e&&{...e,keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(n=>n.element))}},stickyScrollDelegate:e.stickyScrollDelegate}}class UVt extends xOe{constructor(e,t,n,s,r,o,a={}){super(e,t,n,r,o,a),this.compressionDelegate=s,this.compressibleNodeMapper=new hle(l=>new xle(l)),this.filter=a.filter}createTree(e,t,n,s,r){const o=new gle(n),a=s.map(c=>new VVt(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=zVt(r)||{};return new mOe(e,t,o,a,l)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}render(e,t,n){if(!this.identityProvider)return super.render(e,t);const s=f=>this.identityProvider.getId(f).toString(),r=f=>{const m=new Set;for(const x of f){const v=this.tree.getCompressedTreeNode(x===this.root?null:x);if(v.element)for(const _ of v.element.elements)m.add(s(_.element))}return m},o=r(this.tree.getSelection()),a=r(this.tree.getFocus());super.render(e,t,n);const l=this.getSelection();let c=!1;const u=this.getFocus();let h=!1;const g=f=>{const m=f.element;if(m)for(let x=0;x{const n=this.filter.filter(t,1),s=$Vt(n);if(s===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return s===1})),super.processChildren(e)}}function $Vt(i){return typeof i=="boolean"?i?1:0:uO(i)?PC(i.visibility):PC(i)}class qVt extends gOe{constructor(e,t,n,s,r,o={}){super(e,t,n,s,o),this.user=e,this.dataSource=r,this.identityProvider=o.identityProvider}createModel(e,t){return new fle(e,t)}}new Ze("isMac",bn,S(1684,"Whether the operating system is macOS"));new Ze("isLinux",xc,S(1685,"Whether the operating system is Linux"));const EW=new Ze("isWindows",Xo,S(1686,"Whether the operating system is Windows")),vOe=new Ze("isWeb",Vp,S(1687,"Whether the platform is a web browser"));new Ze("isMacNative",bn&&!Vp,S(1688,"Whether the operating system is macOS on a non-browser platform"));new Ze("isIOS",zu,S(1689,"Whether the operating system is iOS"));new Ze("isMobile",zTe,S(1690,"Whether the platform is a mobile web browser"));new Ze("isDevelopment",!1,!0);new Ze("productQualityType","",S(1691,"Quality type of VS Code"));const _Oe="inputFocus",vle=new Ze(_Oe,!1,S(1692,"Whether keyboard focus is inside an input box"));var xx=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},as=function(i,e){return function(t,n){e(t,n,i)}};const eh=ln("listService");class KVt{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new _e,this.lists=[],this._lastFocusedWidget=void 0}setLastFocusedList(e){var t,n;e!==this._lastFocusedWidget&&((t=this._lastFocusedWidget)==null||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,(n=this._lastFocusedWidget)==null||n.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this.lists.some(s=>s.widget===e))throw new Error("Cannot register the same widget multiple times");const n={widget:e,extraContextKeys:t};return this.lists.push(n),S7(e.getHTMLElement())&&this.setLastFocusedList(e),Mh(e.onDidFocus(()=>this.setLastFocusedList(e)),dt(()=>this.lists.splice(this.lists.indexOf(n),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(s=>s!==n),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}const cM=new Ze("listScrollAtBoundary","none");Ne.or(cM.isEqualTo("top"),cM.isEqualTo("both"));Ne.or(cM.isEqualTo("bottom"),cM.isEqualTo("both"));const yOe=new Ze("listFocus",!0),wOe=new Ze("treestickyScrollFocused",!1),LW=new Ze("listSupportsMultiselect",!0),COe=Ne.and(yOe,Ne.not(_Oe),wOe.negate()),_le=new Ze("listHasSelectionOrFocus",!1),yle=new Ze("listDoubleSelection",!1),wle=new Ze("listMultiSelection",!1),DW=new Ze("listSelectionNavigation",!1),GVt=new Ze("listSupportsFind",!0),Cle=new Ze("treeElementCanCollapse",!1),YVt=new Ze("treeElementHasParent",!1),Sle=new Ze("treeElementCanExpand",!1),QVt=new Ze("treeElementHasChild",!1),XVt=new Ze("treeFindOpen",!1),SOe="listTypeNavigationMode",kOe="listAutomaticKeyboardNavigation";function TW(i,e){const t=i.createScoped(e.getHTMLElement());return yOe.bindTo(t),t}function IW(i,e){const t=cM.bindTo(i),n=()=>{const s=e.scrollTop===0,r=e.scrollHeight-e.renderHeight-e.scrollTop<1;s&&r?t.set("both"):s?t.set("top"):r?t.set("bottom"):t.set("none")};return n(),e.onDidScroll(n)}const pS="workbench.list.multiSelectModifier",Cj="workbench.list.openMode",Hu="workbench.list.horizontalScrolling",kle="workbench.list.defaultFindMode",Nle="workbench.list.typeNavigationMode",u8="workbench.list.keyboardNavigation",Qg="workbench.list.scrollByPage",Ele="workbench.list.defaultFindMatchType",dM="workbench.tree.indent",h8="workbench.tree.renderIndentGuides",Xg="workbench.list.smoothScrolling",Ip="workbench.list.mouseWheelScrollSensitivity",Ap="workbench.list.fastScrollSensitivity",g8="workbench.tree.expandMode",f8="workbench.tree.enableStickyScroll",p8="workbench.tree.stickyScrollMaxItemCount";function Rp(i){return i.getValue(pS)==="alt"}class ZVt extends se{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Rp(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(pS)&&(this.useAltAsMultipleSelectionModifier=Rp(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:dMe(e)}isSelectionRangeChangeEvent(e){return uMe(e)}}function AW(i,e){const t=i.get(Zt),n=i.get(zn),s=new _e;return[{...e,keyboardNavigationDelegate:{mightProducePrintableCharacter(o){return n.mightProducePrintableCharacter(o)}},smoothScrolling:!!t.getValue(Xg),mouseWheelScrollSensitivity:t.getValue(Ip),fastScrollSensitivity:t.getValue(Ap),multipleSelectionController:e.multipleSelectionController??s.add(new ZVt(t)),keyboardNavigationEventFilter:tzt(n),scrollByPage:!!t.getValue(Qg)},s]}let bye=class extends Jd{constructor(e,t,n,s,r,o,a,l,c){const u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!l.getValue(Hu),[h,g]=c.invokeFunction(AW,r);super(e,t,n,s,{keyboardSupport:!1,...h,horizontalScrolling:u}),this.disposables.add(g),this.contextKeyService=TW(o,this),this.disposables.add(IW(this.contextKeyService,this)),this.listSupportsMultiSelect=LW.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),DW.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this.listHasSelectionOrFocus=_le.bindTo(this.contextKeyService),this.listDoubleSelection=yle.bindTo(this.contextKeyService),this.listMultiSelection=wle.bindTo(this.contextKeyService),this.horizontalScrolling=r.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Rp(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const m=this.getSelection(),x=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(m.length>0||x.length>0),this.listMultiSelection.set(m.length>1),this.listDoubleSelection.set(m.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const m=this.getSelection(),x=this.getFocus();this.listHasSelectionOrFocus.set(m.length>0||x.length>0)})),this.disposables.add(l.onDidChangeConfiguration(m=>{m.affectsConfiguration(pS)&&(this._useAltAsMultipleSelectionModifier=Rp(l));let x={};if(m.affectsConfiguration(Hu)&&this.horizontalScrolling===void 0){const v=!!l.getValue(Hu);x={...x,horizontalScrolling:v}}if(m.affectsConfiguration(Qg)){const v=!!l.getValue(Qg);x={...x,scrollByPage:v}}if(m.affectsConfiguration(Xg)){const v=!!l.getValue(Xg);x={...x,smoothScrolling:v}}if(m.affectsConfiguration(Ip)){const v=l.getValue(Ip);x={...x,mouseWheelScrollSensitivity:v}}if(m.affectsConfiguration(Ap)){const v=l.getValue(Ap);x={...x,fastScrollSensitivity:v}}Object.keys(x).length>0&&this.updateOptions(x)})),this.navigator=new NOe(this,{configurationService:l,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?uS(e):HD)}};bye=xx([as(5,Bt),as(6,eh),as(7,Zt),as(8,ft)],bye);let xye=class extends rVt{constructor(e,t,n,s,r,o,a,l,c){const u=typeof r.horizontalScrolling<"u"?r.horizontalScrolling:!!l.getValue(Hu),[h,g]=c.invokeFunction(AW,r);super(e,t,n,s,{keyboardSupport:!1,...h,horizontalScrolling:u}),this.disposables=new _e,this.disposables.add(g),this.contextKeyService=TW(o,this),this.disposables.add(IW(this.contextKeyService,this.widget)),this.horizontalScrolling=r.horizontalScrolling,this.listSupportsMultiSelect=LW.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(r.multipleSelectionSupport!==!1),DW.bindTo(this.contextKeyService).set(!!r.selectionNavigation),this._useAltAsMultipleSelectionModifier=Rp(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(r.overrideStyles),this.disposables.add(l.onDidChangeConfiguration(m=>{m.affectsConfiguration(pS)&&(this._useAltAsMultipleSelectionModifier=Rp(l));let x={};if(m.affectsConfiguration(Hu)&&this.horizontalScrolling===void 0){const v=!!l.getValue(Hu);x={...x,horizontalScrolling:v}}if(m.affectsConfiguration(Qg)){const v=!!l.getValue(Qg);x={...x,scrollByPage:v}}if(m.affectsConfiguration(Xg)){const v=!!l.getValue(Xg);x={...x,smoothScrolling:v}}if(m.affectsConfiguration(Ip)){const v=l.getValue(Ip);x={...x,mouseWheelScrollSensitivity:v}}if(m.affectsConfiguration(Ap)){const v=l.getValue(Ap);x={...x,fastScrollSensitivity:v}}Object.keys(x).length>0&&this.updateOptions(x)})),this.navigator=new NOe(this,{configurationService:l,...r}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?uS(e):HD)}dispose(){this.disposables.dispose(),super.dispose()}};xye=xx([as(5,Bt),as(6,eh),as(7,Zt),as(8,ft)],xye);let vye=class extends FZ{constructor(e,t,n,s,r,o,a,l,c,u){const h=typeof o.horizontalScrolling<"u"?o.horizontalScrolling:!!c.getValue(Hu),[g,f]=u.invokeFunction(AW,o);super(e,t,n,s,r,{keyboardSupport:!1,...g,horizontalScrolling:h}),this.disposables.add(f),this.contextKeyService=TW(a,this),this.disposables.add(IW(this.contextKeyService,this)),this.listSupportsMultiSelect=LW.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),DW.bindTo(this.contextKeyService).set(!!o.selectionNavigation),this.listHasSelectionOrFocus=_le.bindTo(this.contextKeyService),this.listDoubleSelection=yle.bindTo(this.contextKeyService),this.listMultiSelection=wle.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Rp(c),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const x=this.getSelection(),v=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(x.length>0||v.length>0),this.listMultiSelection.set(x.length>1),this.listDoubleSelection.set(x.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const x=this.getSelection(),v=this.getFocus();this.listHasSelectionOrFocus.set(x.length>0||v.length>0)})),this.disposables.add(c.onDidChangeConfiguration(x=>{x.affectsConfiguration(pS)&&(this._useAltAsMultipleSelectionModifier=Rp(c));let v={};if(x.affectsConfiguration(Hu)&&this.horizontalScrolling===void 0){const _=!!c.getValue(Hu);v={...v,horizontalScrolling:_}}if(x.affectsConfiguration(Qg)){const _=!!c.getValue(Qg);v={...v,scrollByPage:_}}if(x.affectsConfiguration(Xg)){const _=!!c.getValue(Xg);v={...v,smoothScrolling:_}}if(x.affectsConfiguration(Ip)){const _=c.getValue(Ip);v={...v,mouseWheelScrollSensitivity:_}}if(x.affectsConfiguration(Ap)){const _=c.getValue(Ap);v={...v,fastScrollSensitivity:_}}Object.keys(v).length>0&&this.updateOptions(v)})),this.navigator=new JVt(this,{configurationService:c,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles!==void 0&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?uS(e):HD)}dispose(){this.disposables.dispose(),super.dispose()}};vye=xx([as(6,Bt),as(7,eh),as(8,Zt),as(9,ft)],vye);class Lle extends se{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new ie),this.onDidOpen=this._onDidOpen.event,this._register(He.filter(this.widget.onDidChangeSelection,n=>$m(n.browserEvent))(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t!=null&&t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(Cj))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(Cj)&&(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(Cj))!=="doubleClick")}))):this.openOnSingleClick=(t==null?void 0:t.openOnSingleClick)??!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,n=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,s=typeof t.pinned=="boolean"?t.pinned:!n;this._open(this.getSelectedElement(),n,s,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const s=t.button===1,r=!0,o=s,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,o,a,t)}onMouseDblClick(e,t){if(!t)return;const n=t.target;if(n.classList.contains("monaco-tl-twistie")||n.classList.contains("monaco-icon-label")&&n.classList.contains("folder-icon")&&t.offsetX<16)return;const r=!1,o=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,r,o,a,t)}_open(e,t,n,s,r){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:n,revealIfVisible:!0},sideBySide:s,element:e,browserEvent:r})}}class NOe extends Lle{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class JVt extends Lle{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ezt extends Lle{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function tzt(i){let e=!1;return t=>{if(t.toKeyCodeChord().isModifierKey())return!1;if(e)return e=!1,!1;const n=i.softDispatch(t,t.target);return n.kind===1?(e=!0,!1):(e=!1,n.kind===0)}}let m8=class extends mle{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,n,s,r,o,a,l,c){const{options:u,getTypeNavigationMode:h,disposable:g}=o.invokeFunction(hO,r);super(e,t,n,s,u),this.disposables.add(g),this.internals=new jC(this,r,h,r.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};m8=xx([as(5,ft),as(6,Bt),as(7,eh),as(8,Zt)],m8);let _ye=class extends mOe{constructor(e,t,n,s,r,o,a,l,c){const{options:u,getTypeNavigationMode:h,disposable:g}=o.invokeFunction(hO,r);super(e,t,n,s,u),this.disposables.add(g),this.internals=new jC(this,r,h,r.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};_ye=xx([as(5,ft),as(6,Bt),as(7,eh),as(8,Zt)],_ye);let yye=class extends qVt{constructor(e,t,n,s,r,o,a,l,c,u){const{options:h,getTypeNavigationMode:g,disposable:f}=a.invokeFunction(hO,o);super(e,t,n,s,r,h),this.disposables.add(f),this.internals=new jC(this,o,g,o.overrideStyles,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles!==void 0&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};yye=xx([as(6,ft),as(7,Bt),as(8,eh),as(9,Zt)],yye);let zZ=class extends xOe{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,n,s,r,o,a,l,c,u){const{options:h,getTypeNavigationMode:g,disposable:f}=a.invokeFunction(hO,o);super(e,t,n,s,r,h),this.disposables.add(f),this.internals=new jC(this,o,g,o.overrideStyles,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};zZ=xx([as(6,ft),as(7,Bt),as(8,eh),as(9,Zt)],zZ);let wye=class extends UVt{constructor(e,t,n,s,r,o,a,l,c,u,h){const{options:g,getTypeNavigationMode:f,disposable:m}=l.invokeFunction(hO,a);super(e,t,n,s,r,o,g),this.disposables.add(m),this.internals=new jC(this,a,f,a.overrideStyles,c,u,h),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};wye=xx([as(7,ft),as(8,Bt),as(9,eh),as(10,Zt)],wye);function EOe(i){const e=i.getValue(kle);if(e==="highlight")return Pd.Highlight;if(e==="filter")return Pd.Filter;const t=i.getValue(u8);if(t==="simple"||t==="highlight")return Pd.Highlight;if(t==="filter")return Pd.Filter}function LOe(i){const e=i.getValue(Ele);if(e==="fuzzy")return Dg.Fuzzy;if(e==="contiguous")return Dg.Contiguous}function hO(i,e){const t=i.get(Zt),n=i.get(fx),s=i.get(Bt),r=i.get(ft),o=()=>{const g=s.getContextKeyValue(SOe);if(g==="automatic")return Xf.Automatic;if(g==="trigger"||s.getContextKeyValue(kOe)===!1)return Xf.Trigger;const m=t.getValue(Nle);if(m==="automatic")return Xf.Automatic;if(m==="trigger")return Xf.Trigger},a=e.horizontalScrolling!==void 0?e.horizontalScrolling:!!t.getValue(Hu),[l,c]=r.invokeFunction(AW,e),u=e.paddingBottom,h=e.renderIndentGuides!==void 0?e.renderIndentGuides:t.getValue(h8);return{getTypeNavigationMode:o,disposable:c,options:{keyboardSupport:!1,...l,indent:typeof t.getValue(dM)=="number"?t.getValue(dM):void 0,renderIndentGuides:h,smoothScrolling:!!t.getValue(Xg),defaultFindMode:e.defaultFindMode??EOe(t),defaultFindMatchType:e.defaultFindMatchType??LOe(t),horizontalScrolling:a,scrollByPage:!!t.getValue(Qg),paddingBottom:u,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:e.expandOnlyOnTwistieClick??t.getValue(g8)==="doubleClick",contextViewProvider:n,findWidgetStyles:zBt,enableStickyScroll:!!t.getValue(f8),stickyScrollMaxItemCount:Number(t.getValue(p8))}}}let jC=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,n,s,r,o,a){this.tree=e,this.disposables=[],this.contextKeyService=TW(r,e),this.disposables.push(IW(this.contextKeyService,e)),this.listSupportsMultiSelect=LW.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),DW.bindTo(this.contextKeyService).set(!!t.selectionNavigation),this.listSupportFindWidget=GVt.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=_le.bindTo(this.contextKeyService),this.hasDoubleSelection=yle.bindTo(this.contextKeyService),this.hasMultiSelection=wle.bindTo(this.contextKeyService),this.treeElementCanCollapse=Cle.bindTo(this.contextKeyService),this.treeElementHasParent=YVt.bindTo(this.contextKeyService),this.treeElementCanExpand=Sle.bindTo(this.contextKeyService),this.treeElementHasChild=QVt.bindTo(this.contextKeyService),this.treeFindOpen=XVt.bindTo(this.contextKeyService),this.treeStickyScrollFocused=wOe.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Rp(a),this.updateStyleOverrides(s);const c=()=>{const h=e.getFocus()[0];if(!h)return;const g=e.getNode(h);this.treeElementCanCollapse.set(g.collapsible&&!g.collapsed),this.treeElementHasParent.set(!!e.getParentElement(h)),this.treeElementCanExpand.set(g.collapsible&&g.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(h))},u=new Set;u.add(SOe),u.add(kOe),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection(()=>{const h=e.getSelection(),g=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(h.length>0||g.length>0),this.hasMultiSelection.set(h.length>1),this.hasDoubleSelection.set(h.length===2)})}),e.onDidChangeFocus(()=>{const h=e.getSelection(),g=e.getFocus();this.hasSelectionOrFocus.set(h.length>0||g.length>0),c()}),e.onDidChangeCollapseState(c),e.onDidChangeModel(c),e.onDidChangeFindOpenState(h=>this.treeFindOpen.set(h)),e.onDidChangeStickyScrollFocused(h=>this.treeStickyScrollFocused.set(h)),a.onDidChangeConfiguration(h=>{let g={};if(h.affectsConfiguration(pS)&&(this._useAltAsMultipleSelectionModifier=Rp(a)),h.affectsConfiguration(dM)){const f=a.getValue(dM);g={...g,indent:f}}if(h.affectsConfiguration(h8)&&t.renderIndentGuides===void 0){const f=a.getValue(h8);g={...g,renderIndentGuides:f}}if(h.affectsConfiguration(Xg)){const f=!!a.getValue(Xg);g={...g,smoothScrolling:f}}if(h.affectsConfiguration(kle)||h.affectsConfiguration(u8)){const f=EOe(a);g={...g,defaultFindMode:f}}if(h.affectsConfiguration(Nle)||h.affectsConfiguration(u8)){const f=n();g={...g,typeNavigationMode:f}}if(h.affectsConfiguration(Ele)){const f=LOe(a);g={...g,defaultFindMatchType:f}}if(h.affectsConfiguration(Hu)&&t.horizontalScrolling===void 0){const f=!!a.getValue(Hu);g={...g,horizontalScrolling:f}}if(h.affectsConfiguration(Qg)){const f=!!a.getValue(Qg);g={...g,scrollByPage:f}}if(h.affectsConfiguration(g8)&&t.expandOnlyOnTwistieClick===void 0&&(g={...g,expandOnlyOnTwistieClick:a.getValue(g8)==="doubleClick"}),h.affectsConfiguration(f8)){const f=a.getValue(f8);g={...g,enableStickyScroll:f}}if(h.affectsConfiguration(p8)){const f=Math.max(1,a.getValue(p8));g={...g,stickyScrollMaxItemCount:f}}if(h.affectsConfiguration(Ip)){const f=a.getValue(Ip);g={...g,mouseWheelScrollSensitivity:f}}if(h.affectsConfiguration(Ap)){const f=a.getValue(Ap);g={...g,fastScrollSensitivity:f}}Object.keys(g).length>0&&e.updateOptions(g)}),this.contextKeyService.onDidChangeContext(h=>{h.affectsSome(u)&&e.updateOptions({typeNavigationMode:n()})})),this.navigator=new ezt(e,{configurationService:a,...t}),this.disposables.push(this.navigator)}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?uS(e):HD)}dispose(){this.disposables=ii(this.disposables)}};jC=xx([as(4,Bt),as(5,eh),as(6,Zt)],jC);const nzt=Hs.as(tf.Configuration);nzt.registerConfiguration({id:"workbench",order:7,title:S(1705,"Workbench"),type:"object",properties:{[pS]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[S(1706,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),S(1707,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:S(1708,"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[Cj]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:S(1709,"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Hu]:{type:"boolean",default:!1,description:S(1710,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Qg]:{type:"boolean",default:!1,description:S(1711,"Controls whether clicks in the scrollbar scroll page by page.")},[dM]:{type:"number",default:8,minimum:4,maximum:40,description:S(1712,"Controls tree indentation in pixels.")},[h8]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:S(1713,"Controls whether the tree should render indent guides.")},[Xg]:{type:"boolean",default:!1,description:S(1714,"Controls whether lists and trees have smooth scrolling.")},[Ip]:{type:"number",default:1,markdownDescription:S(1715,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Ap]:{type:"number",default:5,markdownDescription:S(1716,"Scrolling speed multiplier when pressing `Alt`.")},[kle]:{type:"string",enum:["highlight","filter"],enumDescriptions:[S(1717,"Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),S(1718,"Filter elements when searching.")],default:"highlight",description:S(1719,"Controls the default find mode for lists and trees in the workbench.")},[u8]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[S(1720,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),S(1721,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),S(1722,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:S(1723,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:S(1724,"Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")},[Ele]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[S(1725,"Use fuzzy matching when searching."),S(1726,"Use contiguous matching when searching.")],default:"fuzzy",description:S(1727,"Controls the type of matching used when searching lists and trees in the workbench.")},[g8]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:S(1728,"Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[f8]:{type:"boolean",default:!0,description:S(1729,"Controls whether sticky scrolling is enabled in trees.")},[p8]:{type:"number",minimum:1,default:7,markdownDescription:S(1730,"Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[Nle]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:S(1731,"Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});class sx{constructor(e,t,n,s){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=s,this.id=_X.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var t;const e=(t=this.parent.getPreview(this))==null?void 0:t.preview(this.range);return e?S(1088,"{0} in {1} on line {2} at column {3}",e.value,qu(this.uri),this.range.startLineNumber,this.range.startColumn):S(1087,"in {0} on line {1} at column {2}",qu(this.uri),this.range.startLineNumber,this.range.startColumn)}}class izt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:s,startColumn:r,endLineNumber:o,endColumn:a}=e,l=n.getWordUntilPosition({lineNumber:s,column:r-t}),c=new z(s,l.startColumn,s,r),u=new z(o,a,o,1073741824),h=n.getValueInRange(c).replace(/^\s+/,""),g=n.getValueInRange(e),f=n.getValueInRange(u).replace(/\s+$/,"");return{value:h+g+f,highlight:{start:h.length,end:h.length+g.length}}}}class HL{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Sr}dispose(){ii(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?S(1089,"1 symbol in {0}, full path {1}",qu(this.uri),this.uri.fsPath):S(1090,"{0} symbols in {1}, full path {2}",e,qu(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const n=await e.createModelReference(t.uri);this._previews.set(t.uri,new izt(n))}catch(n){zt(n)}return this}}class Gc{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new ie,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(Gc._compareReferences);let s;for(const r of e)if((!s||!_s.isEqual(s.uri,r.uri,!0))&&(s=new HL(this,r.uri),this.groups.push(s)),s.children.length===0||Gc._compareReferences(r,s.children[s.children.length-1])!==0){const o=new sx(n===r,s,r,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(o),s.children.push(o)}}dispose(){ii(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new Gc(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?S(1091,"No results found"):this.references.length===1?S(1092,"Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?S(1093,"Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):S(1094,"Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:n}=e;let s=n.children.indexOf(e);const r=n.children.length,o=n.parent.groups.length;return o===1||t&&s+10?(t?s=(s+1)%r:s=(s+r-1)%r,n.children[s]):(s=n.parent.groups.indexOf(n),t?(s=(s+1)%o,n.parent.groups[s].children[0]):(s=(s+o-1)%o,n.parent.groups[s].children[n.parent.groups[s].children.length-1]))}nearestReference(e,t){const n=this.references.map((s,r)=>({idx:r,prefixLen:Wh(s.uri.toString(),e.toString()),offsetDist:Math.abs(s.range.startLineNumber-t.lineNumber)*100+Math.abs(s.range.startColumn-t.column)})).sort((s,r)=>s.prefixLen>r.prefixLen?-1:s.prefixLenr.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&z.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return _s.compare(e.uri,t.uri)||z.compareRangesUsingStarts(e.range,t.range)}}class UZ extends se{constructor(e,t,n){super(),this.options=t,this.styles=n,this.count=0,this.hover=this._register(new Zn),this.element=De(e,Oe(".monaco-count-badge")),this._register(dt(()=>e.removeChild(this.element))),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0),this.updateHover()}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.updateHover(),this.render()}updateHover(){this.titleFormat!==""&&!this.hover.value?this.hover.value=Xh().setupDelayedHoverAtMouse(this.element,()=>({content:gC(this.titleFormat,this.count),appearance:{compact:!0}})):this.titleFormat===""&&this.hover.value&&(this.hover.value=void 0)}render(){this.element.textContent=gC(this.countFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}class w_ extends se{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=De(e,Oe("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],n="",s,r){e||(e=""),s&&(e=w_.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===n&&qc(this.highlights,t))&&(this.text=e,this.title=n,this.highlights=t,this.render(r))}render(e){var s;const t=[];let n=0;for(const r of this.highlights){if(r.end===r.start)continue;if(n{s=r===`\r +`?-1:0,o+=n;for(const a of t)a.end<=o||(a.start>=o&&(a.start+=s),a.end>=o&&(a.end+=s));return n+=s,"⏎"})}}class wI{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||qc(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class uM extends se{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new wI(De(e,Oe(".monaco-icon-label")))),this.labelContainer=De(this.domNode.element,Oe(".monaco-icon-label-container")),this.nameContainer=De(this.labelContainer,Oe("span.monaco-icon-name-container")),t!=null&&t.supportHighlights||t!=null&&t.supportIcons?this.nameNode=this._register(new ozt(this.nameContainer,!!t.supportIcons)):this.nameNode=new szt(this.nameContainer),this.hoverDelegate=(t==null?void 0:t.hoverDelegate)??$p("mouse")}get element(){return this.domNode.element}setLabel(e,t,n){var l;const s=["monaco-icon-label"],r=["monaco-icon-label-container"];let o="";n&&(n.extraClasses&&s.push(...n.extraClasses),n.bold&&s.push("bold"),n.italic&&s.push("italic"),n.strikethrough&&s.push("strikethrough"),n.disabledCommand&&r.push("disabled"),n.title&&(typeof n.title=="string"?o+=n.title:o+=e));const a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(n!=null&&n.iconPath){let c;if(!a||!er(a)?(c=Oe(".monaco-icon-label-iconpath"),this.domNode.element.prepend(c)):c=a,Tt.isThemeIcon(n.iconPath)){const u=Tt.asClassName(n.iconPath);c.className=`monaco-icon-label-iconpath ${u}`,c.style.backgroundImage=""}else c.style.backgroundImage=Dp(n==null?void 0:n.iconPath);c.style.backgroundRepeat="no-repeat",c.style.backgroundPosition="center",c.style.backgroundSize="contain"}else a&&a.remove();if(this.domNode.classNames=s,this.domNode.element.setAttribute("aria-label",o),this.labelContainer.classList.value="",this.labelContainer.classList.add(...r),this.setupHover(n!=null&&n.descriptionTitle?this.labelContainer:this.element,n==null?void 0:n.title),this.nameNode.setLabel(e,n),t||this.descriptionNode){const c=this.getOrCreateDescriptionNode();if(c instanceof w_){const u=(n==null?void 0:n.supportIcons)??((l=this.creationOptions)==null?void 0:l.supportIcons);c.set(t||"",n?n.descriptionMatches:void 0,void 0,n==null?void 0:n.labelEscapeNewLines,u),this.setupHover(c.element,n==null?void 0:n.descriptionTitle)}else c.textContent=t&&(n!=null&&n.labelEscapeNewLines)?w_.escapeNewLines(t,[]):t||"",this.setupHover(c.element,(n==null?void 0:n.descriptionTitle)||""),c.empty=!t}if(n!=null&&n.suffix||this.suffixNode){const c=this.getOrCreateSuffixNode();c.textContent=(n==null?void 0:n.suffix)??""}}setupHover(e,t){var o;const n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}let s=e;if((o=this.creationOptions)!=null&&o.hoverTargetOverride){if(!xo(e,this.creationOptions.hoverTargetOverride))throw new Error("hoverTargetOverrride must be an ancestor of the htmlElement");s=this.creationOptions.hoverTargetOverride}const r=Xh().setupManagedHover(this.hoverDelegate,s,t);r&&this.customHovers.set(e,r)}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new wI(aDt(this.nameContainer,Oe("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new wI(De(e.element,Oe("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new wI(De(this.labelContainer,Oe("span.monaco-icon-description-container"))));(e=this.creationOptions)!=null&&e.supportDescriptionHighlights?this.descriptionNode=this._register(new w_(De(t.element,Oe("span.label-description")))):this.descriptionNode=this._register(new wI(De(t.element,Oe("span.label-description"))))}return this.descriptionNode}}class szt{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&qc(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=De(this.container,Oe("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let n=0;n{const r={start:n,end:n+s.length},o=t.map(a=>Da.intersect(r,a)).filter(a=>!Da.isEmpty(a)).map(({start:a,end:l})=>({start:a-n,end:l-n}));return n=r.end+e.length,o})}class ozt extends se{constructor(e,t){super(),this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label===e&&qc(this.options,t))return;this.label=e,this.options=t;const n=(t==null?void 0:t.supportIcons)??this.supportIcons;if(typeof e=="string")this.singleLabel||(this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=this._register(new w_(De(this.container,Oe("a.label-name",{id:t==null?void 0:t.domId}))))),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines,n);else{this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;const s=(t==null?void 0:t.separator)||"/",r=rzt(e,s,t==null?void 0:t.matches);for(let o=0;o=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},MW=function(i,e){return function(t,n){e(t,n,i)}},$Z;let qZ=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Gc||e instanceof HL}getChildren(e){if(e instanceof Gc)return e.groups;if(e instanceof HL)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};qZ=RW([MW(0,bl)],qZ);class azt{getHeight(){return 23}getTemplateId(e){return e instanceof HL?b8.id:x8.id}}let KZ=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof sx){const n=(t=e.parent.getPreview(e))==null?void 0:t.preview(e.range);if(n)return n.value}return qu(e.uri)}};KZ=RW([MW(0,zn)],KZ);class lzt{getId(e){return e instanceof sx?e.id:e.uri}}let GZ=class extends se{constructor(e,t){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new uM(n,{supportHighlights:!0})),this.badge=this._register(new UZ(De(n,Oe(".count")),{},NMe)),e.appendChild(n)}set(e,t){const n=P7(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const s=e.children.length;this.badge.setCount(s),s>1?this.badge.setTitleFormat(S(1081,"{0} references",s)):this.badge.setTitleFormat(S(1082,"{0} reference",s))}};GZ=RW([MW(1,FC)],GZ);var hw;let b8=(hw=class{constructor(e){this._instantiationService=e,this.templateId=$Z.id}renderTemplate(e){return this._instantiationService.createInstance(GZ,e)}renderElement(e,t,n){n.set(e.element,ZP(e.filterData))}disposeTemplate(e){e.dispose()}},$Z=hw,hw.id="FileReferencesRenderer",hw);b8=$Z=RW([MW(0,ft)],b8);class czt extends se{constructor(e){super(),this.label=this._register(new w_(e))}set(e,t){var s;const n=(s=e.parent.getPreview(e))==null?void 0:s.preview(e.range);if(!n||!n.value)this.label.set(`${qu(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:r,highlight:o}=n;t&&!jh.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,ZP(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[o]))}}}const S9=class S9{constructor(){this.templateId=S9.id}renderTemplate(e){return new czt(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}};S9.id="OneReferenceRenderer";let x8=S9;class dzt{getWidgetAriaLabel(){return S(1083,"References")}getAriaLabel(e){return e.ariaMessage}}var DOe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Iy=function(i,e){return function(t,n){e(t,n,i)}};const k9=class k9{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new _e,this._callOnModelChange=new _e,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let s=0,r=e.children.length;s{const r=s.deltaDecorations([],t);for(let o=0;othis.labelService.getUriBasenameLabel(n.uri)).join(", ")}onDragStart(e,t){if(!t.dataTransfer)return;const s=e.elements.map(r=>this.getDragURI(r)).filter(Boolean);s.length&&(t.dataTransfer.setData(CC.RESOURCES,JSON.stringify(s)),t.dataTransfer.setData(CC.TEXT,s.join(` +`)))}onDragOver(){return!1}drop(){}dispose(){this.disposables.dispose()}};QZ=DOe([Iy(0,FC)],QZ);let XZ=class extends l8{constructor(e,t,n,s,r,o,a,l,c){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},o),this._defaultTreeKeyboardSupport=t,this.layoutData=n,this._textModelResolverService=r,this._instantiationService=o,this._peekViewService=a,this._uriLabel=l,this._keybindingService=c,this._disposeOnNewModel=new _e,this._callOnDispose=new _e,this._onDidSelectReference=new ie,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new ni(0,0),this._isClosing=!1,this._applyTheme(s.getColorTheme()),this._callOnDispose.add(s.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}get isClosing(){return this._isClosing}dispose(){this._isClosing=!0,this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),ii(this._preview),ii(this._previewNotAvailableMessage),ii(this._tree),ii(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(eVt)||ye.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(JWt)||ye.transparent,primaryHeadingColor:e.getColor(oOe),secondaryHeadingColor:e.getColor(aOe)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=De(e,Oe("div.messages")),Al(this._messageContainer),this._splitView=new cOe(e,{orientation:1}),this._previewContainer=De(e,Oe("div.preview.inline"));const t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(ix,this._previewContainer,t,{},this.editor),Al(this._previewContainer),this._previewNotAvailableMessage=this._instantiationService.createInstance(yC,S(1084,"no preview available"),Ud,yC.DEFAULT_CREATION_OPTIONS,null),this._treeContainer=De(e,Oe("div.ref-tree.inline"));const n={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new dzt,keyboardNavigationLabelProvider:this._instantiationService.createInstance(KZ),identityProvider:new lzt,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:tVt},dnd:this._instantiationService.createInstance(QZ)};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(yr(this._treeContainer,"keydown",r=>{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(hzt,"ReferencesWidget",this._treeContainer,new azt,[this._instantiationService.createInstance(b8),this._instantiationService.createInstance(x8)],this._instantiationService.createInstance(qZ),n),this._splitView.addView({onDidChange:He.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},c8.Distribute),this._splitView.addView({onDidChange:He.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:r=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${r}px`,this._tree.layout(this._dim.height,r)}},c8.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const s=(r,o)=>{r instanceof sx&&(o==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:o,source:"tree"}))};this._disposables.add(this._tree.onDidOpen(r=>{r.sideBySide?s(r.element,"side"):r.editorOptions.pinned?s(r.element,"goto"):s(r.element,"show")})),Al(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new ni(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=S(1085,"No results"),Bc(this._messageContainer),Promise.resolve(void 0)):(Al(this._messageContainer),this._decorationsManager=new YZ(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:n}=e;if(t.detail!==2)return;const s=this._getFocusedReference();s&&this._onDidSelectReference.fire({element:{uri:s.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),Bc(this._treeContainer),Bc(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof sx)return e;if(e instanceof HL&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ot.inMemory?this.setTitle(qDt(e.uri),this._uriLabel.getUriLabel(P7(e.uri))):this.setTitle(S(1086,"References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const s=await n;if(!this._model){s.dispose();return}ii(this._previewModelReference);const r=s.object;if(r){const o=this._preview.getModel()===r.textEditorModel?0:1,a=z.lift(e.range).collapseToStart();this._previewModelReference=s,this._preview.setModel(r.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,o)}else this._preview.setModel(this._previewNotAvailableMessage),s.dispose()}};XZ=DOe([Iy(3,Ws),Iy(4,bl),Iy(5,ft),Iy(6,rOe),Iy(7,FC),Iy(8,zn)],XZ);var gzt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Lk=function(i,e){return function(t,n){e(t,n,i)}},Sj;const mS=new Ze("referenceSearchVisible",!1,S(1078,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));var gw;let BC=(gw=class{static get(e){return e.getContribution(Sj.ID)}constructor(e,t,n,s,r,o,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=s,this._notificationService=r,this._instantiationService=o,this._storageService=a,this._configurationService=l,this._disposables=new _e,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=mS.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)==null||e.dispose(),(t=this._model)==null||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let s;if(this._widget&&(s=this._widget.position),this.closeWidget(),s&&e.containsPosition(s))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const r="peekViewLayout",o=uzt.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(XZ,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(S(1079,"Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget?(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:c,kind:u}=l;if(c)switch(u){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":n?this._gotoReference(c,!0):this.openReference(c,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)==null||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(S(1080,"{0} ({1})",this._model.title,this._model.references.length));const u=this._editor.getModel().uri,h=new te(e.startLineNumber,e.startColumn),g=this._model.nearestReference(u,h);if(g)return this._widget.setSelection(g).then(()=>{this._widget&&this._editor.getOption(99)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const s=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused();await this._widget.setSelection(s),await this._gotoReference(s,!1),r?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){var t,n;(t=this._widget)==null||t.dispose(),(n=this._model)==null||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var s;(s=this._widget)==null||s.hide(),this._ignoreModelChangeEvent=!0;const n=z.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(n),this._widget.focusOnReferenceTree();else{const o=Sj.get(r),a=this._model.clone();this.closeWidget(),r.focus(),o==null||o.toggleWidget(n,io(l=>Promise.resolve(a)),this._peekMode??!1)}},r=>{this._ignoreModelChangeEvent=!1,zt(r)})}openReference(e,t,n){t||this.closeWidget();const{uri:s,range:r}=e;this._editorService.openCodeEditor({resource:s,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}},Sj=gw,gw.ID="editor.contrib.referencesController",gw);BC=Sj=gzt([Lk(2,Bt),Lk(3,Hn),Lk(4,nr),Lk(5,ft),Lk(6,xl),Lk(7,Zt)],BC);function bS(i,e){const t=nOe(i);if(!t)return;const n=BC.get(t);n&&e(n)}jo.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Or(2089,60),when:Ne.or(mS,yc.inPeekEditor),handler(i){bS(i,e=>{e.changeFocusBetweenPreviewAndReferences()})}});jo.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:Ne.or(mS,yc.inPeekEditor),handler(i){bS(i,e=>{e.goToNextOrPreviousReference(!0)})}});jo.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:Ne.or(mS,yc.inPeekEditor),handler(i){bS(i,e=>{e.goToNextOrPreviousReference(!1)})}});Rn.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");Rn.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");Rn.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");Rn.registerCommand("closeReferenceSearch",i=>bS(i,e=>e.closeWidget()));jo.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:Ne.and(yc.inPeekEditor,Ne.not("config.editor.stablePeek"))});jo.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:Ne.and(mS,Ne.not("config.editor.stablePeek"),Ne.or(J.editorTextFocus,vle.negate()))});jo.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Ne.and(mS,COe,Cle.negate(),Sle.negate()),handler(i){var n;const t=(n=i.get(eh).lastFocusedList)==null?void 0:n.getFocus();Array.isArray(t)&&t[0]instanceof sx&&bS(i,s=>s.revealReference(t[0]))}});jo.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Ne.and(mS,COe,Cle.negate(),Sle.negate()),handler(i){var n;const t=(n=i.get(eh).lastFocusedList)==null?void 0:n.getFocus();Array.isArray(t)&&t[0]instanceof sx&&bS(i,s=>s.openReference(t[0],!0,!0))}});Rn.registerCommand("openReference",i=>{var n;const t=(n=i.get(eh).lastFocusedList)==null?void 0:n.getFocus();Array.isArray(t)&&t[0]instanceof sx&&bS(i,s=>s.openReference(t[0],!1,!0))});var TOe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},QI=function(i,e){return function(t,n){e(t,n,i)}};const Dle=new Ze("hasSymbols",!1,S(1095,"Whether there are symbol locations that can be navigated via keyboard-only.")),PW=ln("ISymbolNavigationService");let ZZ=class{constructor(e,t,n,s){this._editorService=t,this._notificationService=n,this._keybindingService=s,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=Dle.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)==null||e.dispose(),(t=this._currentMessage)==null||t.close(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new JZ(this._editorService),s=n.onDidChange(r=>{if(this._ignoreEditorChange)return;const o=this._editorService.getActiveCodeEditor();if(!o)return;const a=o.getModel(),l=o.getPosition();if(!a||!l)return;let c=!1,u=!1;for(const h of t.references)if(J_(h.uri,a.uri))c=!0,u=u||z.containsPosition(h.range,l);else if(c)break;(!c||!u)&&this.reset()});this._currentState=Mh(n,s)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:z.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var n;(n=this._currentMessage)==null||n.close();const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?S(1096,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):S(1097,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};ZZ=TOe([QI(0,Bt),QI(1,Hn),QI(2,nr),QI(3,zn)],ZZ);wn(PW,ZZ,1);Xe(new class extends ao{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:Dle,kbOpts:{weight:100,primary:70}})}runEditorCommand(i,e){return i.get(PW).revealNext(e)}});jo.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:Dle,primary:9,handler(i){i.get(PW).reset()}});let JZ=class{constructor(e){this._listener=new Map,this._disposables=new _e,this._onDidChange=new ie,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),ii(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Mh(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))==null||t.dispose(),this._listener.delete(e)}};JZ=TOe([QI(0,Hn)],JZ);function eJ(i,e){return e.uri.scheme===i.uri.scheme?!0:!FY(e.uri,Ot.walkThroughSnippet,Ot.vscodeChatCodeBlock,Ot.vscodeChatCodeCompareBlock)}async function gO(i,e,t,n,s){const o=t.ordered(i,n).map(l=>Promise.resolve(s(l,i,e)).then(void 0,c=>{Pr(c)})),a=await Promise.all(o);return ef(a.flat()).filter(l=>eJ(i,l))}function fO(i,e,t,n,s){return gO(e,t,i,n,(r,o,a)=>r.provideDefinition(o,a,s))}function Tle(i,e,t,n,s){return gO(e,t,i,n,(r,o,a)=>r.provideDeclaration(o,a,s))}function Ile(i,e,t,n,s){return gO(e,t,i,n,(r,o,a)=>r.provideImplementation(o,a,s))}function Ale(i,e,t,n,s){return gO(e,t,i,n,(r,o,a)=>r.provideTypeDefinition(o,a,s))}function pO(i,e,t,n,s,r){return gO(e,t,i,s,async(o,a,l)=>{var h,g;const c=(h=await o.provideReferences(a,l,{includeDeclaration:!0},r))==null?void 0:h.filter(f=>eJ(a,f));if(!n||!c||c.length!==2)return c;const u=(g=await o.provideReferences(a,l,{includeDeclaration:!1},r))==null?void 0:g.filter(f=>eJ(a,f));return u&&u.length===1?u:c})}async function Gp(i){const e=await i(),t=new Gc(e,""),n=t.references.map(s=>s.link);return t.dispose(),n}kc("_executeDefinitionProvider",(i,e,t)=>{const n=i.get(lt),s=fO(n.definitionProvider,e,t,!1,pn.None);return Gp(()=>s)});kc("_executeDefinitionProvider_recursive",(i,e,t)=>{const n=i.get(lt),s=fO(n.definitionProvider,e,t,!0,pn.None);return Gp(()=>s)});kc("_executeTypeDefinitionProvider",(i,e,t)=>{const n=i.get(lt),s=Ale(n.typeDefinitionProvider,e,t,!1,pn.None);return Gp(()=>s)});kc("_executeTypeDefinitionProvider_recursive",(i,e,t)=>{const n=i.get(lt),s=Ale(n.typeDefinitionProvider,e,t,!0,pn.None);return Gp(()=>s)});kc("_executeDeclarationProvider",(i,e,t)=>{const n=i.get(lt),s=Tle(n.declarationProvider,e,t,!1,pn.None);return Gp(()=>s)});kc("_executeDeclarationProvider_recursive",(i,e,t)=>{const n=i.get(lt),s=Tle(n.declarationProvider,e,t,!0,pn.None);return Gp(()=>s)});kc("_executeReferenceProvider",(i,e,t)=>{const n=i.get(lt),s=pO(n.referenceProvider,e,t,!1,!1,pn.None);return Gp(()=>s)});kc("_executeReferenceProvider_recursive",(i,e,t)=>{const n=i.get(lt),s=pO(n.referenceProvider,e,t,!1,!0,pn.None);return Gp(()=>s)});kc("_executeImplementationProvider",(i,e,t)=>{const n=i.get(lt),s=Ile(n.implementationProvider,e,t,!1,pn.None);return Gp(()=>s)});kc("_executeImplementationProvider_recursive",(i,e,t)=>{const n=i.get(lt),s=Ile(n.implementationProvider,e,t,!0,pn.None);return Gp(()=>s)});Ro.appendMenuItem(ct.EditorContext,{submenu:ct.EditorContextPeek,title:S(1038,"Peek"),group:"navigation",order:100});class WL{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof WL||te.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}const mh=class mh extends Qh{static all(){return mh._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const n of En.wrap(t.menu))(n.id===ct.EditorContext||n.id===ct.EditorContextPeek)&&(n.when=Ne.and(e.precondition,n.when));return t}constructor(e,t){super(mh._patchConfig(t)),this.configuration=e,mh._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,s){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(nr),o=e.get(Hn),a=e.get(Jb),l=e.get(PW),c=e.get(lt),u=e.get(ft),h=t.getModel(),g=t.getPosition(),f=WL.is(n)?n:new WL(h,g),m=new ex(t,5),x=pL(this._getLocationModel(c,f.model,f.position,m.token),m.token).then(async v=>{var k;if(!v||m.token.isCancellationRequested)return;$l(v.ariaMessage);let _;if(v.referenceAt(h.uri,g)){const C=this._getAlternativeCommand(t);C!==void 0&&!mh._activeAlternativeCommands.has(C)&&mh._allSymbolNavigationCommands.has(C)&&(_=mh._allSymbolNavigationCommands.get(C))}const w=v.references.length;if(w===0){if(!this.configuration.muteMessage){const C=h.getWordAtPosition(g);(k=Kc.get(t))==null||k.showMessage(this._getNoResultFoundMessage(C),g)}}else if(w===1&&_)mh._activeAlternativeCommands.add(this.desc.id),u.invokeFunction(C=>_.runEditorCommand(C,t,n,s).finally(()=>{mh._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(o,l,t,v,s)},v=>{r.error(v)}).finally(()=>{m.dispose()});return a.showWhile(x,250),x}async _onResult(e,t,n,s,r){const o=this._getGoToPreference(n);if(!(n instanceof ix)&&(this.configuration.openInPeek||o==="peek"&&s.references.length>1))this._openInPeek(n,s,r);else{const a=s.firstReference(),l=s.references.length>1&&o==="gotoAndPeek",c=await this._openReference(n,e,a,this.configuration.openToSide,!l);l&&c?this._openInPeek(c,s,r):s.dispose(),o==="goto"&&t.put(a)}}async _openReference(e,t,n,s,r){let o;if(qPt(n)&&(o=n.targetSelectionRange),o||(o=n.range),!o)return;const a=await t.openCodeEditor({resource:n.uri,options:{selection:z.collapseToStart(o),selectionRevealType:3,selectionSource:"code.jump"}},e,s);if(a){if(r){const l=a.getModel(),c=a.createDecorationsCollection([{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&c.clear()},350)}return a}}_openInPeek(e,t,n){const s=BC.get(e);s&&e.hasModel()?s.toggleWidget(n??e.getSelection(),io(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}};mh._allSymbolNavigationCommands=new Map,mh._activeAlternativeCommands=new Set;let rx=mh;class mO extends rx{async _getLocationModel(e,t,n,s){return new Gc(await fO(e.definitionProvider,t,n,!1,s),S(1039,"Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?S(1040,"No definition found for '{0}'",e.word):S(1041,"No definition found")}_getAlternativeCommand(e){return e.getOption(67).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(67).multipleDefinitions}}var I_;ci((I_=class extends mO{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:I_.id,title:{...be(1065,"Go to Definition"),mnemonicTitle:S(1042,"Go to &&Definition")},precondition:J.hasDefinitionProvider,keybinding:[{when:J.editorTextFocus,primary:70,weight:100},{when:Ne.and(J.editorTextFocus,vOe),primary:2118,weight:100}],menu:[{id:ct.EditorContext,group:"navigation",order:1.1},{id:ct.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Rn.registerCommandAlias("editor.action.goToDeclaration",I_.id)}},I_.id="editor.action.revealDefinition",I_));var A_;ci((A_=class extends mO{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:A_.id,title:be(1066,"Open Definition to the Side"),precondition:Ne.and(J.hasDefinitionProvider,J.isInEmbeddedEditor.toNegated()),keybinding:[{when:J.editorTextFocus,primary:Or(2089,70),weight:100},{when:Ne.and(J.editorTextFocus,vOe),primary:Or(2089,2118),weight:100}]}),Rn.registerCommandAlias("editor.action.openDeclarationToTheSide",A_.id)}},A_.id="editor.action.revealDefinitionAside",A_));var R_;ci((R_=class extends mO{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:R_.id,title:be(1067,"Peek Definition"),precondition:Ne.and(J.hasDefinitionProvider,yc.notInPeekEditor,J.isInEmbeddedEditor.toNegated()),keybinding:{when:J.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:ct.EditorContextPeek,group:"peek",order:2}}),Rn.registerCommandAlias("editor.action.previewDeclaration",R_.id)}},R_.id="editor.action.peekDefinition",R_));class IOe extends rx{async _getLocationModel(e,t,n,s){return new Gc(await Tle(e.declarationProvider,t,n,!1,s),S(1043,"Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?S(1044,"No declaration found for '{0}'",e.word):S(1045,"No declaration found")}_getAlternativeCommand(e){return e.getOption(67).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(67).multipleDeclarations}}var fw;ci((fw=class extends IOe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:fw.id,title:{...be(1068,"Go to Declaration"),mnemonicTitle:S(1046,"Go to &&Declaration")},precondition:Ne.and(J.hasDeclarationProvider,J.isInEmbeddedEditor.toNegated()),menu:[{id:ct.EditorContext,group:"navigation",order:1.3},{id:ct.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?S(1047,"No declaration found for '{0}'",e.word):S(1048,"No declaration found")}},fw.id="editor.action.revealDeclaration",fw));ci(class extends IOe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:be(1069,"Peek Declaration"),precondition:Ne.and(J.hasDeclarationProvider,yc.notInPeekEditor,J.isInEmbeddedEditor.toNegated()),menu:{id:ct.EditorContextPeek,group:"peek",order:3}})}});class AOe extends rx{async _getLocationModel(e,t,n,s){return new Gc(await Ale(e.typeDefinitionProvider,t,n,!1,s),S(1049,"Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?S(1050,"No type definition found for '{0}'",e.word):S(1051,"No type definition found")}_getAlternativeCommand(e){return e.getOption(67).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(67).multipleTypeDefinitions}}var pw;ci((pw=class extends AOe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:pw.ID,title:{...be(1070,"Go to Type Definition"),mnemonicTitle:S(1052,"Go to &&Type Definition")},precondition:J.hasTypeDefinitionProvider,keybinding:{when:J.editorTextFocus,primary:0,weight:100},menu:[{id:ct.EditorContext,group:"navigation",order:1.4},{id:ct.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},pw.ID="editor.action.goToTypeDefinition",pw));var mw;ci((mw=class extends AOe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:mw.ID,title:be(1071,"Peek Type Definition"),precondition:Ne.and(J.hasTypeDefinitionProvider,yc.notInPeekEditor,J.isInEmbeddedEditor.toNegated()),menu:{id:ct.EditorContextPeek,group:"peek",order:4}})}},mw.ID="editor.action.peekTypeDefinition",mw));class ROe extends rx{async _getLocationModel(e,t,n,s){return new Gc(await Ile(e.implementationProvider,t,n,!1,s),S(1053,"Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?S(1054,"No implementation found for '{0}'",e.word):S(1055,"No implementation found")}_getAlternativeCommand(e){return e.getOption(67).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(67).multipleImplementations}}var bw;ci((bw=class extends ROe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:bw.ID,title:{...be(1072,"Go to Implementations"),mnemonicTitle:S(1056,"Go to &&Implementations")},precondition:J.hasImplementationProvider,keybinding:{when:J.editorTextFocus,primary:2118,weight:100},menu:[{id:ct.EditorContext,group:"navigation",order:1.45},{id:ct.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},bw.ID="editor.action.goToImplementation",bw));var xw;ci((xw=class extends ROe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:xw.ID,title:be(1073,"Peek Implementations"),precondition:Ne.and(J.hasImplementationProvider,yc.notInPeekEditor,J.isInEmbeddedEditor.toNegated()),keybinding:{when:J.editorTextFocus,primary:3142,weight:100},menu:{id:ct.EditorContextPeek,group:"peek",order:5}})}},xw.ID="editor.action.peekImplementation",xw));class MOe extends rx{_getNoResultFoundMessage(e){return e?S(1057,"No references found for '{0}'",e.word):S(1058,"No references found")}_getAlternativeCommand(e){return e.getOption(67).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(67).multipleReferences}}ci(class extends MOe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...be(1074,"Go to References"),mnemonicTitle:S(1059,"Go to &&References")},precondition:Ne.and(J.hasReferenceProvider,yc.notInPeekEditor,J.isInEmbeddedEditor.toNegated()),keybinding:{when:J.editorTextFocus,primary:1094,weight:100},menu:[{id:ct.EditorContext,group:"navigation",order:1.45},{id:ct.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,n,s){return new Gc(await pO(e.referenceProvider,t,n,!0,!1,s),S(1060,"References"))}});ci(class extends MOe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:be(1075,"Peek References"),precondition:Ne.and(J.hasReferenceProvider,yc.notInPeekEditor,J.isInEmbeddedEditor.toNegated()),menu:{id:ct.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,n,s){return new Gc(await pO(e.referenceProvider,t,n,!1,!1,s),S(1061,"References"))}});class fzt extends rx{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:be(1076,"Go to Any Symbol"),precondition:Ne.and(yc.notInPeekEditor,J.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}async _getLocationModel(e,t,n,s){return new Gc(this._references,S(1062,"Locations"))}_getNoResultFoundMessage(e){return e&&S(1063,"No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(67).multipleReferences}_getAlternativeCommand(){}}Rn.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:kt},{name:"position",description:"The position at which to start",constraint:te.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(i,e,t,n,s,r,o)=>{Bn(kt.isUri(e)),Bn(te.isIPosition(t)),Bn(Array.isArray(n)),Bn(typeof s>"u"||typeof s=="string"),Bn(typeof o>"u"||typeof o=="boolean");const a=i.get(Hn),l=await a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(Yg(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{const u=new class extends fzt{_getNoResultFoundMessage(h){return r||super._getNoResultFoundMessage(h)}}({muteMessage:!r,openInPeek:!!o,openToSide:!1},n,s);c.get(ft).invokeFunction(u.run.bind(u),l)})}});Rn.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:kt},{name:"position",description:"The position at which to start",constraint:te.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(i,e,t,n,s)=>{i.get(es).executeCommand("editor.action.goToLocations",e,t,n,s,void 0,!0)}});Rn.registerCommand({id:"editor.action.findReferences",handler:(i,e,t)=>{Bn(kt.isUri(e)),Bn(te.isIPosition(t));const n=i.get(lt),s=i.get(Hn);return s.openCodeEditor({resource:e},s.getFocusedCodeEditor()).then(r=>{if(!Yg(r)||!r.hasModel())return;const o=BC.get(r);if(!o)return;const a=io(c=>pO(n.referenceProvider,r.getModel(),te.lift(t),!1,!1,c).then(u=>new Gc(u,S(1064,"References")))),l=new z(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(o.toggleWidget(l,a,!1))})}});Rn.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");async function pzt(i,e,t,n){const s=i.get(bl),r=i.get(eu),o=i.get(es),a=i.get(ft),l=i.get(nr);if(await n.item.resolve(pn.None),!n.part.location)return;const c=n.part.location,u=[],h=new Set(Ro.getMenuItems(ct.EditorContext).map(f=>$N(f)?f.command.id:aS()));for(const f of rx.all())h.has(f.desc.id)&&u.push(new Wd(f.desc.id,Vd.label(f.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const m=await s.createModelReference(c.uri);try{const x=new WL(m.object.textEditorModel,z.getStartPosition(c.range)),v=n.item.anchor.range;await a.invokeFunction(f.runEditorCommand.bind(f),e,x,v)}finally{m.dispose()}}));if(n.part.command){const{command:f}=n.part;u.push(new Gr),u.push(new Wd(f.id,f.title,void 0,!0,async()=>{try{await o.executeCommand(f.id,...f.arguments??[])}catch(m){l.notify({severity:jD.Error,source:n.item.provider.displayName,message:m})}}))}const g=e.getOption(144);r.showContextMenu({domForShadowRoot:g?e.getDomNode()??void 0:void 0,getAnchor:()=>{const f=Zs(t);return{x:f.left,y:f.top+f.height+8}},getActions:()=>u,onHide:()=>{e.focus()},autoSelectFirstItem:!0})}async function POe(i,e,t,n){const r=await i.get(bl).createModelReference(n.uri);await t.invokeWithinContext(async o=>{const a=e.hasSideBySideModifier,l=o.get(Bt),c=yc.inPeekEditor.getValue(l),u=!a&&t.getOption(101)&&!c;return new mO({openToSide:a,openInPeek:u,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(o,new WL(r.object.textEditorModel,z.getStartPosition(n.range)),z.lift(n.range))}),r.dispose()}var mzt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Dk=function(i,e){return function(t,n){e(t,n,i)}},Yk;class v8{constructor(){this._entries=new Yh(50)}get(e){const t=v8._key(e);return this._entries.get(t)}set(e,t){const n=v8._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const OOe=ln("IInlayHintsCache");wn(OOe,v8,1);class tJ{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return typeof e=="string"?{label:e}:e[this.index]}}class bzt{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}class xzt{constructor(){this._store=new Zn,this._tokenSource=new vs}dispose(){this._store.dispose(),this._tokenSource.dispose(!0)}reset(){return this._tokenSource.dispose(!0),this._tokenSource=new vs,this._store.value=new _e,{store:this._store.value,token:this._tokenSource.token}}}var yb;let hM=(yb=class{static get(e){return e.getContribution(Yk.ID)??void 0}constructor(e,t,n,s,r,o,a){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=s,this._commandService=r,this._notificationService=o,this._instaService=a,this._disposables=new _e,this._sessionDisposables=new _e,this._decorationsMetadata=new Map,this._activeRenderMode=0,this._ruleFactory=this._disposables.add(new e6(this._editor)),this._debounceInfo=n.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(l=>{l.hasChanged(159)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(159);if(e.enabled==="off")return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if(e.enabled==="on")this._activeRenderMode=0;else{let c,u;e.enabled==="onUnlessPressed"?(c=0,u=1):(c=1,u=0),this._activeRenderMode=c,this._sessionDisposables.add(db.getInstance().event(h=>{if(!this._editor.hasModel())return;const g=h.altKey&&h.ctrlKey&&!(h.shiftKey||h.metaKey)?u:c;if(g!==this._activeRenderMode){this._activeRenderMode=g;const f=this._editor.getModel(),m=this._copyInlayHintsWithCurrentAnchor(f);this._updateHintsDecorators([f.getFullModelRange()],m),a.schedule(0)}}))}const n=this._inlayHintsCache.get(t);n&&this._updateHintsDecorators([t.getFullModelRange()],n),this._sessionDisposables.add(dt(()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)}));let s;const r=new Set;this._sessionDisposables.add(t.onWillDispose(()=>s==null?void 0:s.cancel()));const o=this._sessionDisposables.add(new xzt),a=new pi(async()=>{const c=Date.now(),{store:u,token:h}=o.reset();try{const g=await o8.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),h);if(a.delay=this._debounceInfo.update(t,Date.now()-c),h.isCancellationRequested){g.dispose();return}for(const f of g.provider)typeof f.onDidChangeInlayHints=="function"&&!r.has(f)&&(r.add(f),u.add(f.onDidChangeInlayHints(()=>{a.isScheduled()||a.schedule()})));u.add(g),this._updateHintsDecorators(g.ranges,g.items),this._cacheHintsForFastRestore(t)}catch(g){zt(g)}},this._debounceInfo.get(t));this._sessionDisposables.add(a),a.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(c=>{(c.scrollTopChanged||!a.isScheduled())&&a.schedule()}));const l=this._sessionDisposables.add(new Zn);this._sessionDisposables.add(this._editor.onDidChangeModelContent(c=>{const u=Math.max(a.delay,800);this._cursorInfo={position:this._editor.getPosition(),notEarlierThan:Date.now()+u},l.value=zb(()=>a.schedule(0),u),a.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(159)&&a.schedule()})),this._sessionDisposables.add(this._installDblClickGesture(()=>a.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new _e,t=e.add(new NW(this._editor)),n=new _e;return e.add(n),e.add(t.onMouseMoveOrRelevantKeyDown(s=>{const[r]=s,o=this._getInlayHintLabelPart(r),a=this._editor.getModel();if(!o||!a){n.clear();return}const l=new vs;n.add(dt(()=>l.dispose(!0))),o.item.resolve(l.token),this._activeInlayHintPart=o.part.command||o.part.location?new bzt(o,r.hasTriggerModifier):void 0;const c=a.validatePosition(o.item.hint.position).lineNumber,u=new z(c,1,c,a.getLineMaxColumn(c)),h=this._getInlineHintsForRange(u);this._updateHintsDecorators([u],h),n.add(dt(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([u],h)}))})),e.add(t.onCancel(()=>n.clear())),e.add(t.onExecute(async s=>{const r=this._getInlayHintLabelPart(s);if(r){const o=r.part;o.location?this._instaService.invokeFunction(POe,s,this._editor,o.location):PQ.is(o.command)&&await this._invokeCommand(o.command,r.item)}})),e}_getInlineHintsForRange(e){const t=new Set;for(const n of this._decorationsMetadata.values())e.containsRange(n.item.anchor.range)&&t.add(n.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp(async t=>{if(t.event.detail!==2)return;const n=this._getInlayHintLabelPart(t);if(n&&(t.event.preventDefault(),await n.item.resolve(pn.None),ul(n.item.hint.textEdits))){const s=n.item.hint.textEdits.map(r=>Qs.replace(z.lift(r.range),r.text));this._editor.executeEdits("inlayHint.default",s),e()}})}_installContextMenu(){return this._editor.onContextMenu(async e=>{if(!er(e.event.target))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(pzt,this._editor,e.event.target,t)})}_getInlayHintLabelPart(e){var n;if(e.target.type!==6)return;const t=(n=e.target.detail.injectedText)==null?void 0:n.options;if(t instanceof r0&&(t==null?void 0:t.attachedData)instanceof tJ)return t.attachedData}async _invokeCommand(e,t){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(n){this._notificationService.notify({severity:jD.Error,source:t.provider.displayName,message:n})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[n,s]of this._decorationsMetadata){if(t.has(s.item))continue;const r=e.getDecorationRange(n);if(r){const o=new eOe(r,s.item.anchor.direction),a=s.item.with({anchor:o});t.set(s.item,a)}}return Array.from(t.values())}_getHintsRanges(){const t=this._editor.getModel(),n=this._editor.getVisibleRangesPlusViewportAboveBelow(),s=[];for(const r of n.sort(z.compareRangesUsingStarts)){const o=t.validateRange(new z(r.startLineNumber-30,r.startColumn,r.endLineNumber+30,r.endColumn));s.length===0||!z.areIntersectingOrTouching(s[s.length-1],o)?s.push(o):s[s.length-1]=z.plusRange(s[s.length-1],o)}return s}_updateHintsDecorators(e,t){var v,_;const n=new Map;if(this._cursorInfo&&this._cursorInfo.notEarlierThan>Date.now()&&e.some(w=>w.containsPosition(this._cursorInfo.position))){const{position:w}=this._cursorInfo;this._cursorInfo=void 0;const k=new Map;for(const T of this._editor.getLineDecorations(w.lineNumber)??[]){const I=this._decorationsMetadata.get(T.id);if(T.range.startColumn>w.column)continue;const R=I==null?void 0:I.decoration.options[I.item.anchor.direction];if(R&&R.attachedData!==Yk._whitespaceData){const P=k.get(I.item)??0;k.set(I.item,P+R.content.length)}}const C=t.filter(T=>T.anchor.range.startLineNumber===w.lineNumber&&T.anchor.range.endColumn<=w.column),E=Array.from(k.values());let D;for(;;){const T=C.shift(),I=E.shift();if(!I&&!T)break;if(T)n.set(T,I??0),D=T;else if(D&&I){let R=n.get(D);R+=I,R+=E.reduce((P,j)=>P+j,0),E.length=0;break}}}const s=[],r=(w,k,C,E,D)=>{const T={content:C,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:k.className,cursorStops:E,attachedData:D};s.push({item:w,classNameRef:k,decoration:{range:w.anchor.range,options:{description:"InlayHint",showIfCollapsed:w.anchor.range.isEmpty(),collapseOnReplaceEdit:!w.anchor.range.isEmpty(),stickiness:0,[w.anchor.direction]:this._activeRenderMode===0?T:void 0}}})},o=(w,k)=>{const C=this._ruleFactory.createClassNameRef({width:`${a/3|0}px`,display:"inline-block"});r(w,C," ",k?Du.Right:Du.None,Yk._whitespaceData)},{fontSize:a,fontFamily:l,padding:c,isUniform:u}=this._getLayoutInfo(),h=this._editor.getOption(159).maximumLength,g="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(g,l);let f={line:0,totalLen:0};for(let w=0;wh)continue;k.hint.paddingLeft&&o(k,!1);const C=typeof k.hint.label=="string"?[{label:k.hint.label}]:k.hint.label,E=n.get(k);let D=0;for(let T=0;T0&&(B=B.slice(0,-$)+"…",H=!0),D+=B.length,E!==void 0){const q=D-E;q>=0&&(D-=q,B=B.slice(0,-(1+q))+"…",H=!0)}if(c&&(R&&(P||H)?(j.padding=`1px ${Math.max(1,a/4)|0}px`,j.borderRadius=`${a/4|0}px`):R?(j.padding=`1px 0 1px ${Math.max(1,a/4)|0}px`,j.borderRadius=`${a/4|0}px 0 0 ${a/4|0}px`):P||H?(j.padding=`1px ${Math.max(1,a/4)|0}px 1px 0`,j.borderRadius=`0 ${a/4|0}px ${a/4|0}px 0`):j.padding="1px 0 1px 0"),r(k,this._ruleFactory.createClassNameRef(j),vzt(B),P&&!k.hint.paddingRight?Du.Right:Du.None,new tJ(k,T)),H)break}if(E!==void 0&&DYk._MAX_DECORATORS)break}const m=[];for(const[w,k]of this._decorationsMetadata){const C=(_=this._editor.getModel())==null?void 0:_.getDecorationRange(w);C&&e.some(E=>E.containsRange(C))&&(m.push(w),k.classNameRef.dispose(),this._decorationsMetadata.delete(w))}const x=Kg.capture(this._editor);this._editor.changeDecorations(w=>{const k=w.deltaDecorations(m,s.map(C=>C.decoration));for(let C=0;Cn)&&(r=n);const o=e.fontFamily||s;return{fontSize:r,fontFamily:o,padding:t,isUniform:!t&&o===s&&r===n}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}},Yk=yb,yb.ID="editor.contrib.InlayHints",yb._MAX_DECORATORS=1500,yb._whitespaceData={},yb);hM=Yk=mzt([Dk(1,lt),Dk(2,Ju),Dk(3,OOe),Dk(4,es),Dk(5,nr),Dk(6,ft)],hM);function vzt(i){return i.replace(/[ \t]/g," ")}Rn.registerCommand("_executeInlayHintProvider",async(i,...e)=>{const[t,n]=e;Bn(kt.isUri(t)),Bn(z.isIRange(n));const{inlayHintsProvider:s}=i.get(lt),r=await i.get(bl).createModelReference(t);try{const o=await o8.create(s,r.object.textEditorModel,[z.lift(n)],pn.None),a=o.items.map(l=>l.hint);return setTimeout(()=>o.dispose(),0),a}finally{r.dispose()}});var _zt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},py=function(i,e){return function(t,n){e(t,n,i)}};class Cye extends YI{constructor(e,t,n,s){super(10,t,e.item.anchor.range,n,s,!0),this.part=e}}let _8=class extends aM{constructor(e,t,n,s,r,o,a,l){super(e,t,r,a,n,s,l),this._resolverService=o,this.hoverOrdinal=6}suggestHoverAnchor(e){var s;if(!hM.get(this._editor)||e.target.type!==6)return null;const n=(s=e.target.detail.injectedText)==null?void 0:s.options;return n instanceof r0&&n.attachedData instanceof tJ?new Cye(n.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,n,s){return e instanceof Cye?new Fu(async r=>{const{part:o}=e;if(await o.item.resolve(s),s.isCancellationRequested)return;let a;typeof o.item.hint.tooltip=="string"?a=new Ma().appendText(o.item.hint.tooltip):o.item.hint.tooltip&&(a=o.item.hint.tooltip),a&&r.emitOne(new Th(this,e.range,[a],!1,0)),ul(o.item.hint.textEdits)&&r.emitOne(new Th(this,e.range,[new Ma().appendText(S(1164,"Double-click to insert"))],!1,10001));let l;if(typeof o.part.tooltip=="string"?l=new Ma().appendText(o.part.tooltip):o.part.tooltip&&(l=o.part.tooltip),l&&r.emitOne(new Th(this,e.range,[l],!1,1)),o.part.location||o.part.command){let u;const g=this._editor.getOption(86)==="altKey"?bn?S(1165,"cmd + click"):S(1166,"ctrl + click"):bn?S(1167,"option + click"):S(1168,"alt + click");o.part.location&&o.part.command?u=new Ma().appendText(S(1169,"Go to Definition ({0}), right click for more",g)):o.part.location?u=new Ma().appendText(S(1170,"Go to Definition ({0})",g)):o.part.command&&(u=new Ma(`[${S(1171,"Execute Command")}](${UWt(o.part.command)} "${o.part.command.title}") (${g})`,{isTrusted:!0})),u&&r.emitOne(new Th(this,e.range,[u],!1,1e4))}const c=this._resolveInlayHintLabelPartHover(o,s);for await(const u of c)r.emitOne(u)}):Fu.EMPTY}async*_resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return;const{uri:n,range:s}=e.part.location,r=await this._resolverService.createModelReference(n);try{const o=r.object.textEditorModel;if(!this._languageFeaturesService.hoverProvider.has(o))return;for await(const a of lle(this._languageFeaturesService.hoverProvider,o,new te(s.startLineNumber,s.startColumn),t))RL(a.hover.contents)||(yield new Th(this,e.item.anchor.range,a.hover.contents,!1,2+a.ordinal))}finally{r.dispose()}}};_8=_zt([py(1,Zh),py(2,zn),py(3,Zl),py(4,Zt),py(5,bl),py(6,lt),py(7,es)],_8);var jOe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},y8=function(i,e){return function(t,n){e(t,n,i)}};class Sye{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let nJ=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new ie,this.onDidChange=this._onDidChange.event,this._dispoables=new _e,this._markers=[],this._nextIdx=-1,kt.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const s=this._configService.getValue("problems.sortOrder"),r=(a,l)=>{let c=sR(a.resource.toString(),l.resource.toString());return c===0&&(s==="position"?c=z.compareRangesUsingStarts(a,l)||Fs.compare(a.severity,l.severity):c=Fs.compare(a.severity,l.severity)||z.compareRangesUsingStarts(a,l)),c},o=()=>{let a=this._markerService.read({resource:kt.isUri(e)?e:void 0,severities:Fs.Error|Fs.Warning|Fs.Info});return typeof e=="function"&&(a=a.filter(l=>this._resourceFilter(l.resource))),a.sort(r),bs(a,this._markers,(l,c)=>l.resource.toString()===c.resource.toString()&&l.startLineNumber===c.startLineNumber&&l.startColumn===c.startColumn&&l.endLineNumber===c.endLineNumber&&l.endColumn===c.endColumn&&l.severity===c.severity&&l.message===c.message)?!1:(this._markers=a,!0)};o(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&o()&&(this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new Sye(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let s=this._markers.findIndex(r=>J_(r.resource,e.uri));if(s<0)s=Qre(this._markers.length,r=>sR(this._markers[r].resource.toString(),e.uri.toString())),s<0&&(s=~s),n?this._nextIdx=s:this._nextIdx=(this._markers.length+s-1)%this._markers.length;else{let r=!1,o=!1;for(let a=s;as.resource.toString()===e.toString());if(!(n<0)){for(;n=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Tk=function(i,e){return function(t,n){e(t,n,i)}},rJ;class wzt{constructor(e,t,n,s,r){this._openerService=s,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new _e,this._editor=t;const o=document.createElement("div");o.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),o.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),o.appendChild(this._relatedBlock),this._disposables.add(yr(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&n(l)})),this._scrollable=new s2e(o,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{o.style.left=`-${a.scrollLeft}px`,o.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){ii(this._disposables)}update(e){const{source:t,message:n,relatedInformation:s,code:r}=e;let o=((t==null?void 0:t.length)||0)+2;r&&(typeof r=="string"?o+=r.length:o+=r.value.length);const a=Xc(n);this._lines=a.length,this._longestLineLength=0;for(const g of a)this._longestLineLength=Math.max(g.length+o,this._longestLineLength);Qo(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const g of a)l=document.createElement("div"),l.innerText=g,g===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||r){const g=document.createElement("span");if(g.classList.add("details"),l.appendChild(g),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),g.appendChild(f)}if(r)if(typeof r=="string"){const f=document.createElement("span");f.innerText=`(${r})`,f.classList.add("code"),g.appendChild(f)}else{this._codeLink=Oe("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(r.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};const f=De(this._codeLink,Oe("span"));f.innerText=r.value,g.appendChild(this._codeLink)}}if(Qo(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),ul(s)){const g=this._relatedBlock.appendChild(document.createElement("div"));g.style.paddingTop=`${Math.floor(this._editor.getOption(75)*.66)}px`,this._lines+=1;for(const f of s){const m=document.createElement("div"),x=document.createElement("a");x.classList.add("filename"),x.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,x.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(x,f);const v=document.createElement("span");v.innerText=f.message,m.appendChild(x),m.appendChild(v),this._lines+=1,g.appendChild(m)}}const c=this._editor.getOption(59),u=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:u,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Fs.Error:t=S(1024,"Error");break;case Fs.Warning:t=S(1025,"Warning");break;case Fs.Info:t=S(1026,"Info");break;case Fs.Hint:t=S(1027,"Hint");break}let n=S(1028,"{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const s=this._editor.getModel();return s&&e.startLineNumber<=s.getLineCount()&&e.startLineNumber>=1&&(n=`${s.getLineContent(e.startLineNumber)}, ${n}`),n}}var vw;let gM=(vw=class extends l8{constructor(e,t,n,s,r,o,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=s,this._contextKeyService=o,this._labelService=a,this._callOnDispose=new _e,this._onDidSelectRelatedInformation=new ie,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Fs.Warning,this._backgroundColor=ye.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Nzt);let t=oJ,n=Czt;this._severity===Fs.Warning?(t=kj,n=Szt):this._severity===Fs.Info&&(t=aJ,n=kzt);const s=e.getColor(t),r=e.getColor(n);this.style({arrowColor:s,frameColor:s,headerBackgroundColor:r,primaryHeadingColor:e.getColor(oOe),secondaryHeadingColor:e.getColor(aOe)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(s=>this.editor.focus()));const t=this._menuService.getMenuActions(rJ.TitleMenu,this._contextKeyService),n=XBt(t);this._actionbarWidget.push(n,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=De(e,Oe(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new wzt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const s=z.lift(e),r=this.editor.getPosition(),o=r&&s.containsPosition(r)?r:s.getStartPosition();super.show(o,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=n>1?S(1029,"{0} of {1} problems",t,n):S(1030,"{0} of {1} problem",t,n);this.setTitle(qu(a.uri),l)}this._icon.className=`codicon ${sJ.className(Fs.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}},rJ=vw,vw.TitleMenu=new ct("gotoErrorTitleMenu"),vw);gM=rJ=yzt([Tk(1,Ws),Tk(2,px),Tk(3,Qu),Tk(4,ft),Tk(5,Bt),Tk(6,FC)],gM);const kye=vR(Y7,JAt),Nye=vR(Yb,_R),Eye=vR(Ep,yR),oJ=Z("editorMarkerNavigationError.background",{dark:kye,light:kye,hcDark:Dn,hcLight:Dn},S(1031,"Editor marker navigation widget error color.")),Czt=Z("editorMarkerNavigationError.headerBackground",{dark:Kt(oJ,.1),light:Kt(oJ,.1),hcDark:null,hcLight:null},S(1032,"Editor marker navigation widget error heading background.")),kj=Z("editorMarkerNavigationWarning.background",{dark:Nye,light:Nye,hcDark:Dn,hcLight:Dn},S(1033,"Editor marker navigation widget warning color.")),Szt=Z("editorMarkerNavigationWarning.headerBackground",{dark:Kt(kj,.1),light:Kt(kj,.1),hcDark:"#0C141F",hcLight:Kt(kj,.2)},S(1034,"Editor marker navigation widget warning heading background.")),aJ=Z("editorMarkerNavigationInfo.background",{dark:Eye,light:Eye,hcDark:Dn,hcLight:Dn},S(1035,"Editor marker navigation widget info color.")),kzt=Z("editorMarkerNavigationInfo.headerBackground",{dark:Kt(aJ,.1),light:Kt(aJ,.1),hcDark:null,hcLight:null},S(1036,"Editor marker navigation widget info heading background.")),Nzt=Z("editorMarkerNavigation.background",wr,S(1037,"Editor marker navigation widget background."));var Ezt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},r4=function(i,e){return function(t,n){e(t,n,i)}},XI,_w;let HC=(_w=class{static get(e){return e.getContribution(XI.ID)}constructor(e,t,n,s,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=s,this._instantiationService=r,this._sessionDispoables=new _e,this._editor=e,this._widgetVisible=BOe.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(gM,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var s,r,o;(!((s=this._model)!=null&&s.selected)||!z.containsPosition((r=this._model)==null?void 0:r.selected.marker,n.position))&&((o=this._model)==null||o.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:z.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._getOrCreateModel(t.uri);n.resetIndex(),n.move(!0,t,new te(e.startLineNumber,e.startColumn)),n.selected&&this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}async navigate(e,t){var r,o;if(!this._editor.hasModel())return;const n=this._editor.getModel(),s=this._getOrCreateModel(t?void 0:n.uri);if(s.move(e,n,this._editor.getPosition()),!!s.selected)if(s.selected.marker.resource.toString()!==n.uri.toString()){this._cleanUp();const a=await this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);a&&((r=XI.get(a))==null||r.close(),(o=XI.get(a))==null||o.navigate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}},XI=_w,_w.ID="editor.contrib.markerController",_w);HC=XI=Ezt([r4(1,FOe),r4(2,Bt),r4(3,Hn),r4(4,ft)],HC);class OW extends rt{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}async run(e,t){var n;t.hasModel()&&await((n=HC.get(t))==null?void 0:n.navigate(this._next,this._multiFile))}}const r1=class r1 extends OW{constructor(){super(!0,!1,{id:r1.ID,label:r1.LABEL,precondition:void 0,kbOpts:{kbExpr:J.focus,primary:578,weight:100},menuOpts:{menuId:gM.TitleMenu,title:r1.LABEL.value,icon:ls("marker-navigation-next",Ee.arrowDown,S(1016,"Icon for goto next marker.")),group:"navigation",order:1}})}};r1.ID="editor.action.marker.next",r1.LABEL=be(1020,"Go to Next Problem (Error, Warning, Info)");let w8=r1;const o1=class o1 extends OW{constructor(){super(!1,!1,{id:o1.ID,label:o1.LABEL,precondition:void 0,kbOpts:{kbExpr:J.focus,primary:1602,weight:100},menuOpts:{menuId:gM.TitleMenu,title:o1.LABEL.value,icon:ls("marker-navigation-previous",Ee.arrowUp,S(1017,"Icon for goto previous marker.")),group:"navigation",order:2}})}};o1.ID="editor.action.marker.prev",o1.LABEL=be(1021,"Go to Previous Problem (Error, Warning, Info)");let lJ=o1;class Lzt extends OW{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:be(1022,"Go to Next Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:J.focus,primary:66,weight:100},menuOpts:{menuId:ct.MenubarGoMenu,title:S(1018,"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Dzt extends OW{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:be(1023,"Go to Previous Problem in Files (Error, Warning, Info)"),precondition:void 0,kbOpts:{kbExpr:J.focus,primary:1090,weight:100},menuOpts:{menuId:ct.MenubarGoMenu,title:S(1019,"Previous &&Problem"),group:"6_problem_nav",order:2}})}}Pn(HC.ID,HC,4);Ke(w8);Ke(lJ);Ke(Lzt);Ke(Dzt);const BOe=new Ze("markersNavigationVisible",!1),Tzt=ao.bindToContribution(HC.get);Xe(new Tzt({id:"closeMarkersNavigation",precondition:BOe,handler:i=>i.close(),kbOpts:{weight:150,kbExpr:J.focus,primary:9,secondary:[1033]}}));var Izt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Xq=function(i,e){return function(t,n){e(t,n,i)}};const dh=Oe;class HOe{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Lye={type:1,filter:{include:ps.QuickFix},triggerAction:td.QuickFixHover};let cJ=class{constructor(e,t,n,s){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=s,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),s=e.range;if(!n.isValidRange(e.range))return[];const r=s.startLineNumber,o=n.getLineMaxColumn(r),a=[];for(const l of t){const c=l.range.startLineNumber===r?l.range.startColumn:1,u=l.range.endLineNumber===r?l.range.endColumn:o,h=this._markerDecorationsService.getMarker(n.uri,l);if(!h)continue;const g=new z(e.range.startLineNumber,c,e.range.startLineNumber,u);a.push(new HOe(this,g,h))}return a}renderHoverParts(e,t){if(!t.length)return new MC([]);const n=[];t.forEach(o=>{const a=this._renderMarkerHover(o);e.fragment.appendChild(a.hoverElement),n.push(a)});const s=t.length===1?t[0]:t.sort((o,a)=>Fs.compare(o.marker.severity,a.marker.severity))[0],r=this._renderMarkerStatusbar(e,s);return new MC(n,r)}getAccessibleContent(e){return e.marker.message}_renderMarkerHover(e){const t=new _e,n=dh("div.hover-row"),s=De(n,dh("div.marker.hover-contents")),{source:r,message:o,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(s);const c=De(s,dh("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=o,r||a)if(a&&typeof a!="string"){const h=dh("span");if(r){const x=De(h,dh("span"));x.innerText=r}const g=De(h,dh("a.code-link"));g.setAttribute("href",a.target.toString(!0)),t.add(de(g,"click",x=>{this._openerService.open(a.target,{allowCommands:!0}),x.preventDefault(),x.stopPropagation()}));const f=De(g,dh("span"));f.innerText=a.value;const m=De(s,h);m.style.opacity="0.6",m.style.paddingLeft="6px"}else{const h=De(s,dh("span"));h.style.opacity="0.6",h.style.paddingLeft="6px",h.innerText=r&&a?`${r}(${a})`:r||`(${a})`}if(ul(l))for(const{message:h,resource:g,startLineNumber:f,startColumn:m}of l){const x=De(s,dh("div"));x.style.marginTop="8px";const v=De(x,dh("a"));v.innerText=`${qu(g)}(${f}, ${m}): `,v.style.cursor="pointer",t.add(de(v,"click",w=>{if(w.stopPropagation(),w.preventDefault(),this._openerService){const k={selection:{startLineNumber:f,startColumn:m}};this._openerService.open(g,{fromUserGesture:!0,editorOptions:k}).catch(zt)}}));const _=De(x,dh("span"));_.innerText=h,this._editor.applyFontInfo(_)}return{hoverPart:e,hoverElement:n,dispose:()=>t.dispose()}}_renderMarkerStatusbar(e,t){const n=new _e;if(t.marker.severity===Fs.Error||t.marker.severity===Fs.Warning||t.marker.severity===Fs.Info){const s=HC.get(this._editor);s&&e.statusBar.addAction({label:S(1139,"View Problem"),commandId:w8.ID,run:()=>{e.hide(),s.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(104)){const s=e.statusBar.append(dh("div"));this.recentMarkerCodeActionsInfo&&(e8.makeKey(this.recentMarkerCodeActionsInfo.marker)===e8.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(s.textContent=S(1140,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?se.None:zb(()=>s.textContent=S(1141,"Checking for quick fixes..."),200,n);s.textContent||(s.textContent=" ");const o=this.getCodeActions(t.marker);n.add(dt(()=>o.cancel())),o.then(a=>{var u;if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),s.textContent=S(1142,"No quick fixes available");return}s.style.display="none";let l=!1;n.add(dt(()=>{l||a.dispose()})),e.statusBar.addAction({label:S(1143,"Quick Fix..."),commandId:Zae,run:h=>{l=!0;const g=RC.get(this._editor),f=Zs(h);e.hide(),g==null||g.showCodeActions(Lye,a,{x:f.left,y:f.top,width:f.width,height:f.height})}});const c=a.validActions.find(h=>h.action.isAI);c&&e.statusBar.addAction({label:c.action.title,commandId:((u=c.action.command)==null?void 0:u.id)??"",iconClass:Tt.asClassName(Ee.sparkle),run:()=>{const h=RC.get(this._editor);h==null||h.applyCodeAction(c,!1,!1,n_.FromProblemsHover)}}),e.onContentsChanged()},zt)}return n}getCodeActions(e){return io(t=>fN(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new z(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Lye,Ag.None,t))}};cJ=Izt([Xq(1,Soe),Xq(2,px),Xq(3,lt)],cJ);var WOe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},dE=function(i,e){return function(t,n){e(t,n,i)}},dJ,uJ;let hJ=dJ=class extends se{constructor(e,t,n,s,r,o,a){super();const l=t.hoverParts;this._renderedHoverParts=this._register(new gJ(e,n,l,s,r,o,a));const c=t.options,u=c.anchor,{showAtPosition:h,showAtSecondaryPosition:g}=dJ.computeHoverPositions(e,u.range,l);this.shouldAppearBeforeContent=l.some(f=>f.isBeforeContent),this.showAtPosition=h,this.showAtSecondaryPosition=g,this.initialMousePosX=u.initialMousePosX,this.initialMousePosY=u.initialMousePosY,this.shouldFocus=c.shouldFocus,this.source=c.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}get hoverPartsCount(){return this._renderedHoverParts.hoverPartsCount}focusHoverPartWithIndex(e){this._renderedHoverParts.focusHoverPartWithIndex(e)}async updateHoverVerbosityLevel(e,t,n){this._renderedHoverParts.updateHoverVerbosityLevel(e,t,n)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,t,n){let s=1;if(e.hasModel()){const u=e._getViewModel(),h=u.coordinatesConverter,g=h.convertModelRangeToViewRange(t),f=u.getLineMinColumn(g.startLineNumber),m=new te(g.startLineNumber,f);s=h.convertViewPositionToModelPosition(m).column}const r=t.startLineNumber;let o=t.startColumn,a;for(const u of n){const h=u.range,g=h.startLineNumber===r,f=h.endLineNumber===r;if(g&&f){const x=h.startColumn,v=Math.min(o,x);o=Math.max(v,s)}u.forceShowAtRange&&(a=h)}let l,c;if(a){const u=a.getStartPosition();l=u,c=u}else l=t.getStartPosition(),c=new te(r,o);return{showAtPosition:l,showAtSecondaryPosition:c}}};hJ=dJ=WOe([dE(4,zn),dE(5,Zl),dE(6,ed)],hJ);class Azt{constructor(e,t){this._statusBar=t,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}}var yw;let gJ=(yw=class extends se{constructor(e,t,n,s,r,o,a){super(),this._hoverService=o,this._clipboardService=a,this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=s,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(t,n,s,r,this._hoverService)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,n)),this._updateMarkdownAndColorParticipantInfo(t)}_createEditorDecorations(e,t){if(t.length===0)return se.None;let n=t[0].range;for(const r of t){const o=r.range;n=z.plusRange(n,o)}const s=e.createDecorationsCollection();return s.set([{range:n,options:uJ._DECORATION_OPTIONS}]),dt(()=>{s.clear()})}_renderParts(e,t,n,s,r){const o=new i8(s,r),a={fragment:this._fragment,statusBar:o,...n},l=new _e;l.add(o);for(const u of e){const h=this._renderHoverPartsForParticipant(t,u,a);l.add(h);for(const g of h.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:u,hoverPart:g.hoverPart,hoverElement:g.hoverElement})}const c=this._renderStatusBar(this._fragment,o);return c&&(l.add(c),this._renderedParts.push({type:"statusBar",hoverElement:c.hoverElement,actions:c.actions})),l}_renderHoverPartsForParticipant(e,t,n){const s=e.filter(o=>o.owner===t);return s.length>0?t.renderHoverParts(n,s):new MC([])}_renderStatusBar(e,t){if(t.hasContent)return new Azt(e,t)}_registerListenersOnRenderedParts(){const e=new _e;return this._renderedParts.forEach((t,n)=>{const s=t.hoverElement;s.tabIndex=0,e.add(de(s,Fe.FOCUS_IN,r=>{r.stopPropagation(),this._focusedHoverPartIndex=n})),e.add(de(s,Fe.FOCUS_OUT,r=>{r.stopPropagation(),this._focusedHoverPartIndex=-1})),t.type==="hoverPart"&&t.hoverPart instanceof HOe&&e.add(new PZ(s,()=>t.participant.getAccessibleContent(t.hoverPart),this._clipboardService,this._hoverService))}),e}_updateMarkdownAndColorParticipantInfo(e){const t=e.find(n=>n instanceof aM&&!(n instanceof _8));t&&(this._markdownHoverParticipant=t),this._colorHoverParticipant=e.find(n=>n instanceof r8)}focusHoverPartWithIndex(e){e<0||e>=this._renderedParts.length||this._renderedParts[e].hoverElement.focus()}async updateHoverVerbosityLevel(e,t,n){if(!this._markdownHoverParticipant)return;let s;t>=0?s={start:t,endExclusive:t+1}:s=this._findRangeOfMarkdownHoverParts(this._markdownHoverParticipant);for(let r=s.start;r=0?this.focusHoverPartWithIndex(t):this._context.focus()),this._context.onContentsChanged()}isColorPickerVisible(){var e;return((e=this._colorHoverParticipant)==null?void 0:e.isColorPickerVisible())??!1}_normalizedIndexToMarkdownHoverIndexRange(e,t){const n=this._renderedParts[t];if(!n||n.type!=="hoverPart"||!(n.participant===e))return;const r=this._renderedParts.findIndex(o=>o.type==="hoverPart"&&o.participant===e);if(r===-1)throw new Nt;return t-r}_findRangeOfMarkdownHoverParts(e){const t=this._renderedParts.slice(),n=t.findIndex(o=>o.type==="hoverPart"&&o.participant===e),s=t.reverse().findIndex(o=>o.type==="hoverPart"&&o.participant===e),r=s>=0?t.length-s:s;return{start:n,endExclusive:r+1}}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}get hoverPartsCount(){return this._renderedParts.length}},uJ=yw,yw._DECORATION_OPTIONS=qt.register({description:"content-hover-highlight",className:"hoverHighlight"}),yw);gJ=uJ=WOe([dE(4,zn),dE(5,Zl),dE(6,ed)],gJ);var Rzt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},o4=function(i,e){return function(t,n){e(t,n,i)}};let fJ=class extends se{constructor(e,t,n,s,r){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._hoverService=s,this._clipboardService=r,this._currentResult=null,this._renderedContentHover=this._register(new Zn),this._onContentsChanged=this._register(new ie),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(DZ,this._editor)),this._participants=this._initializeHoverParticipants(),this._hoverOperation=this._register(new EPe(this._editor,new n8(this._editor,this._participants))),this._registerListeners()}_initializeHoverParticipants(){const e=[];for(const t of fS.getAll()){const n=this._instantiationService.createInstance(t,this._editor);e.push(n)}return e.sort((t,n)=>t.hoverOrdinal-n.hoverOrdinal),this._register(this._contentHoverWidget.onDidResize(()=>{this._participants.forEach(t=>{var n;return(n=t.handleResize)==null?void 0:n.call(t)})})),this._register(this._contentHoverWidget.onDidScroll(t=>{this._participants.forEach(n=>{var s;return(s=n.handleScroll)==null?void 0:s.call(n,t)})})),this._register(this._contentHoverWidget.onContentsChanged(()=>{this._participants.forEach(t=>{var n;return(n=t.handleContentsChanged)==null?void 0:n.call(t)})})),e}_registerListeners(){this._register(this._hoverOperation.onResult(t=>{const n=t.hasLoadingMessage?this._addLoadingMessage(t):t.value;this._withResult(new IPe(n,t.isComplete,t.options))}));const e=this._contentHoverWidget.getDomNode();this._register(yr(e,"keydown",t=>{t.equals(9)&&this.hide()})),this._register(yr(e,"mouseleave",t=>{this._onMouseLeave(t)})),this._register(Gs.onDidChange(()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})),this._register(this._contentHoverWidget.onContentsChanged(()=>{this._onContentsChanged.fire()}))}_startShowingOrUpdateHover(e,t,n,s,r){if(!(this._contentHoverWidget.position&&this._currentResult))return e?(this._startHoverOperationIfNecessary(e,t,n,s,!1),!0):!1;const a=this._editor.getOption(69).sticky,l=r&&this._contentHoverWidget.isMouseGettingCloser(r.event.posx,r.event.posy);return a&&l?(e&&this._startHoverOperationIfNecessary(e,t,n,s,!0),!0):e?this._currentResult&&this._currentResult.options.anchor.equals(e)?!0:this._currentResult&&e.canAdoptVisibleHover(this._currentResult.options.anchor,this._contentHoverWidget.position)?(this._currentResult&&this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,s,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,s,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,s,r){if(this._hoverOperation.options&&this._hoverOperation.options.anchor.equals(e))return;this._hoverOperation.cancel();const a={anchor:e,source:n,shouldFocus:s,insistOnKeepingHoverVisible:r};this._hoverOperation.start(t,a)}_setCurrentResult(e){let t=e;if(this._currentResult===t)return;t&&t.hoverParts.length===0&&(t=null),this._currentResult=t,this._currentResult?this._showHover(this._currentResult):this._hideHover()}_addLoadingMessage(e){for(const t of this._participants){if(!t.createLoadingMessage)continue;const n=t.createLoadingMessage(e.options.anchor);if(n)return e.value.slice(0).concat([n])}return e.value}_withResult(e){if(this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete||this._setCurrentResult(e),!e.isComplete)return;const s=e.hoverParts.length===0,r=e.options.insistOnKeepingHoverVisible;s&&r||this._setCurrentResult(e)}_showHover(e){const t=this._getHoverContext();this._renderedContentHover.value=new hJ(this._editor,e,this._participants,t,this._keybindingService,this._hoverService,this._clipboardService),this._renderedContentHover.value.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover.value):this._renderedContentHover.clear()}_hideHover(){this._contentHoverWidget.hide(),this._participants.forEach(e=>{var t;return(t=e.handleHide)==null?void 0:t.call(e)})}_getHoverContext(){return{hide:()=>{this.hide()},onContentsChanged:()=>{this._contentHoverWidget.handleContentsChanged()},setMinimumDimensions:r=>{this._contentHoverWidget.setMinimumDimensions(r)},focus:()=>this.focus()}}showsOrWillShow(e){if(this._contentHoverWidget.isResizing)return!0;const n=this._findHoverAnchorCandidates(e);if(!(n.length>0))return this._startShowingOrUpdateHover(null,0,0,!1,e);const r=n[0];return this._startShowingOrUpdateHover(r,0,0,!1,e)}_findHoverAnchorCandidates(e){const t=[];for(const s of this._participants){if(!s.suggestHoverAnchor)continue;const r=s.suggestHoverAnchor(e);r&&t.push(r)}const n=e.target;switch(n.type){case 6:{t.push(new Wq(0,n.range,e.event.posx,e.event.posy));break}case 7:{const s=this._editor.getOption(59).typicalHalfwidthCharacterWidth/2;if(!(!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextr.priority-s.priority),t}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!CW(t,e.x,e.y))&&this.hide()}startShowingAtRange(e,t,n,s){this._startShowingOrUpdateHover(new Wq(0,e,void 0,void 0),t,n,s,null)}async updateHoverVerbosityLevel(e,t,n){var s;(s=this._renderedContentHover.value)==null||s.updateHoverVerbosityLevel(e,t,n)}focusedHoverPartIndex(){var e;return((e=this._renderedContentHover.value)==null?void 0:e.focusedHoverPartIndex)??-1}containsNode(e){return e?this._contentHoverWidget.getDomNode().contains(e):!1}focus(){var t;if(((t=this._renderedContentHover.value)==null?void 0:t.hoverPartsCount)===1){this.focusHoverPartWithIndex(0);return}this._contentHoverWidget.focus()}focusHoverPartWithIndex(e){var t;(t=this._renderedContentHover.value)==null||t.focusHoverPartWithIndex(e)}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){var e;return((e=this._renderedContentHover.value)==null?void 0:e.isColorPickerVisible())??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};fJ=Rzt([o4(1,ft),o4(2,zn),o4(3,Zl),o4(4,ed)],fJ);function VOe(i){var t;const e=i.target;return!!e&&e.type===6&&((t=e.detail.injectedText)==null?void 0:t.options.attachedData)===wPe}var Mzt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Zq=function(i,e){return function(t,n){e(t,n,i)}},pJ,ww;let Va=(ww=class extends se{constructor(e,t,n,s){super(),this._editor=e,this._instantiationService=n,this._keybindingService=s,this._onHoverContentsChanged=this._register(new ie),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new _e,this._isMouseDown=!1,this._ignoreMouseEvents=!1,this._reactToEditorMouseMoveRunner=this._register(new pi(()=>{this._mouseMoveEvent&&this._reactToEditorMouseMove(this._mouseMoveEvent)},0)),this._register(t.onDidShowContextMenu(()=>{this.hideContentHover(),this._ignoreMouseEvents=!0})),this._register(t.onDidHideContextMenu(()=>{this._ignoreMouseEvents=!1})),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(69)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution(pJ.ID)}_hookListeners(){const e=this._editor.getOption(69);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled||this._cancelSchedulerAndHide(),this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>this._cancelSchedulerAndHide())),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelSchedulerAndHide(){this._cancelScheduler(),this.hideContentHover()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){this._ignoreMouseEvents||(e.scrollTopChanged||e.scrollLeftChanged)&&this.hideContentHover()}_onEditorMouseDown(e){this._ignoreMouseEvents||(this._isMouseDown=!0,this._shouldKeepHoverWidgetVisible(e))||this.hideContentHover()}_shouldKeepHoverWidgetVisible(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()||VOe(e)}_isMouseOnContentHoverWidget(e){return this._contentWidget?CW(this._contentWidget.getDomNode(),e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._ignoreMouseEvents||(this._isMouseDown=!1)}_onEditorMouseLeave(e){this._ignoreMouseEvents||this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldKeepHoverWidgetVisible(e))||this.hideContentHover()}_shouldKeepCurrentHover(e){const t=this._contentWidget;if(!t)return!1;const n=this._hoverSettings.sticky,s=(u,h)=>{const g=this._isMouseOnContentHoverWidget(u);return h&&g},r=u=>{const h=t.isColorPickerVisible,g=this._isMouseOnContentHoverWidget(u),f=h&&g,m=h&&this._isMouseDown;return f||m},o=(u,h)=>{var f;const g=u.event.browserEvent.view;return g?h&&t.containsNode(g.document.activeElement)&&!((f=g.getSelection())!=null&&f.isCollapsed):!1},a=t.isFocused,l=t.isResizing,c=this._hoverSettings.sticky&&t.isVisibleFromKeyboard;return this.shouldKeepOpenOnEditorMouseMoveOrLeave||a||l||c||s(e,n)||r(e)||o(e,n)}_onEditorMouseMove(e){if(this._ignoreMouseEvents)return;if(this._mouseMoveEvent=e,this._shouldKeepCurrentHover(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(this._shouldRescheduleHoverComputation()){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hoverSettings.hidingDelay);return}this._reactToEditorMouseMove(e)}_shouldRescheduleHoverComputation(){var n;const e=this._hoverSettings.hidingDelay;return(((n=this._contentWidget)==null?void 0:n.isVisible)??!1)&&this._hoverSettings.sticky&&e>0}_reactToEditorMouseMove(e){this._hoverSettings.enabled&&this._getOrCreateContentWidget().showsOrWillShow(e)||this.hideContentHover()}_onKeyDown(e){if(this._ignoreMouseEvents||!this._contentWidget)return;const t=this._isPotentialKeyboardShortcut(e),n=this._isModifierKeyPressed(e);t||n||this._contentWidget.isFocused&&e.keyCode===2||this.hideContentHover()}_isPotentialKeyboardShortcut(e){if(!this._editor.hasModel()||!this._contentWidget)return!1;const t=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=t.kind===1,s=t.kind===2&&(t.commandId===CPe||t.commandId===yW||t.commandId===wW)&&this._contentWidget.isVisible;return n||s}_isModifierKeyPressed(e){return e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4}hideContentHover(){var e;FL.dropDownVisible||(e=this._contentWidget)==null||e.hide()}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(fJ,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged(()=>this._onHoverContentsChanged.fire()))),this._contentWidget}showContentHover(e,t,n,s){this._getOrCreateContentWidget().startShowingAtRange(e,t,n,s)}_isContentWidgetResizing(){var e;return((e=this._contentWidget)==null?void 0:e.widget.isResizing)||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,t,n){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,t,n)}focus(){var e;(e=this._contentWidget)==null||e.focus()}scrollUp(){var e;(e=this._contentWidget)==null||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)==null||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)==null||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)==null||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)==null||e.pageUp()}pageDown(){var e;(e=this._contentWidget)==null||e.pageDown()}goToTop(){var e;(e=this._contentWidget)==null||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)==null||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)==null?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)==null?void 0:e.isVisible}dispose(){var e;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(e=this._contentWidget)==null||e.dispose()}},pJ=ww,ww.ID="editor.contrib.contentHover",ww);Va=pJ=Mzt([Zq(1,eu),Zq(2,ft),Zq(3,zn)],Va);const Pce=class Pce extends se{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(168);if(t!=="click"&&t!=="clickAndHover"||!VOe(e))return;const n=this._editor.getContribution(Va.ID);if(!n||n.isColorPickerVisible)return;const s=e.target.range;if(!s)return;const r=new z(s.startLineNumber,s.startColumn+1,s.endLineNumber,s.endColumn+1);n.showContentHover(r,1,1,!1)}};Pce.ID="editor.contrib.colorContribution";let C8=Pce;var Pzt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Ozt=function(i,e){return function(t,n){e(t,n,i)}};class Rle{constructor(e,t,n,s){this.owner=e,this.range=t,this.model=n,this.provider=s}static fromBaseColor(e,t){return new Rle(e,t.range,t.model,t.provider)}}class jzt extends se{constructor(e,t,n,s){super();const r=e.getModel(),o=n.model;this.color=n.model.color,this.colorPicker=this._register(new XPe(t.fragment,o,e.getOption(163),s,"standalone")),this._register(o.onColorFlushed(a=>{this.color=a})),this._register(o.onDidChangeColor(a=>{lM(r,o,a,n.range,n)})),this._register(e.onDidChangeModelContent(a=>{t.hide(),e.focus()})),lM(r,o,this.color,n.range,n)}}let mJ=class{constructor(e,t){this._editor=e,this._themeService=t}async createColorHover(e,t,n){if(!this._editor.hasModel()||!jL.get(this._editor))return null;const r=await vPe(n,this._editor.getModel(),pn.None);let o=null,a=null;for(const g of r){const f=g.colorInfo;z.containsRange(f.range,e.range)&&(o=f,a=g.provider)}const l=o??e,c=a??t,u=!!o;return{colorHover:Rle.fromBaseColor(this,await ZPe(this._editor.getModel(),l,c)),foundInEditor:u}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let n=new z(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await lM(this._editor.getModel(),t,this._color,n,e),n=JPe(this._editor,n,t))}renderHoverParts(e,t){if(!(t.length===0||!this._editor.hasModel()))return this._setMinimumDimensions(e),this._renderedParts=new jzt(this._editor,e,t[0],this._themeService),this._renderedParts}_setMinimumDimensions(e){const t=this._editor.getOption(75)+8;e.setMinimumDimensions(new ni(302,t))}get _color(){var e;return(e=this._renderedParts)==null?void 0:e.color}};mJ=Pzt([Ozt(1,Ws)],mJ);var Fzt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},CI=function(i,e){return function(t,n){e(t,n,i)}},bJ;class Bzt{constructor(e,t){this.value=e,this.foundInEditor=t}}const Dye=8,Hzt=22;var Cw;let xJ=(Cw=class extends se{constructor(e,t,n,s,r,o,a,l){var g;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._keybindingService=r,this._languageFeaturesService=o,this._editorWorkerService=a,this._hoverService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new ie),this.onResult=this._onResult.event,this._renderedHoverParts=this._register(new Zn),this._renderedStatusBar=this._register(new Zn),this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=s.createInstance(mJ,this._editor),this._position=(g=this._editor._getViewModel())==null?void 0:g.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),u=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register($u(this._body));this._register(h.onDidBlur(f=>{this.hide()})),this._register(h.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var x;const m=(x=f.target.element)==null?void 0:x.classList;m&&m.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(u),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return bJ.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(69).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new Bzt(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=await this._standaloneColorPickerParticipant.createColorHover(t,new sM(this._editorWorkerService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null}_render(e,t){const n=document.createDocumentFragment();this._renderedStatusBar.value=this._register(new i8(this._keybindingService,this._hoverService));const s={fragment:n,statusBar:this._renderedStatusBar.value,onContentsChanged:()=>{},setMinimumDimensions:()=>{},hide:()=>this.hide(),focus:()=>this.focus()};if(this._colorHover=e,this._renderedHoverParts.value=this._standaloneColorPickerParticipant.renderHoverParts(s,[e]),!this._renderedHoverParts.value){this._renderedStatusBar.clear(),this._renderedHoverParts.clear();return}const r=this._renderedHoverParts.value.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),r.layout();const o=r.body,a=o.saturationBox.domNode.clientWidth,l=o.domNode.clientWidth-a-Hzt-Dye,c=r.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const u=r.header,h=u.pickedColorNode;h.style.width=a+Dye+"px";const g=u.originalColorNode;g.style.width=l+"px";const f=r.header.closeButton;f==null||f.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}},bJ=Cw,Cw.ID="editor.contrib.standaloneColorPickerWidget",Cw);xJ=bJ=Fzt([CI(3,ft),CI(4,zn),CI(5,lt),CI(6,Nc),CI(7,Zl)],xJ);var Wzt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Tye=function(i,e){return function(t,n){e(t,n,i)}},vJ,Sw;let WC=(Sw=class extends se{constructor(e,t,n){super(),this._editor=e,this._instantiationService=n,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=J.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=J.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)==null||e.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(xJ,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)==null||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)==null||e.updateEditor(),this.hide()}static get(e){return e.getContribution(vJ.ID)}},vJ=Sw,Sw.ID="editor.contrib.standaloneColorPickerController",Sw);WC=vJ=Wzt([Tye(1,Bt),Tye(2,ft)],WC);class Vzt extends Qh{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...be(889,"Show or Focus Standalone Color Picker"),mnemonicTitle:S(888,"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:ct.CommandPalette}],metadata:{description:be(890,"Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){var n;(n=WC.get(t))==null||n.showOrFocus()}}class zzt extends rt{constructor(){super({id:"editor.action.hideColorPicker",label:be(891,"Hide the Color Picker"),precondition:J.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:be(892,"Hide the standalone color picker.")}})}run(e,t){var n;(n=WC.get(t))==null||n.hide()}}class Uzt extends rt{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:be(893,"Insert Color with Standalone Color Picker"),precondition:J.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:be(894,"Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){var n;(n=WC.get(t))==null||n.insertColor()}}Ke(zzt);Ke(Uzt);ci(Vzt);Pn(C8.ID,C8,2);Pn(WC.ID,WC,1);Pn(jL.ID,jL,1);UD(SZ);fS.register(r8);Rn.registerCommand("_executeDocumentColorProvider",function(i,...e){const[t]=e;if(!(t instanceof kt))throw ju();const{model:n,colorProviderRegistry:s,defaultColorDecoratorsEnablement:r}=yPe(i,t);return tle(new s7t,s,n,pn.None,r)});Rn.registerCommand("_executeColorPresentationProvider",function(i,...e){const[t,n]=e;if(!n)return;const{uri:s,range:r}=n;if(!(s instanceof kt)||!Array.isArray(t)||t.length!==4||!z.isIRange(r))throw ju();const{model:o,colorProviderRegistry:a,defaultColorDecoratorsEnablement:l}=yPe(i,s),[c,u,h,g]=t;return tle(new r7t({range:r,color:{red:c,green:u,blue:h,alpha:g}}),a,o,pn.None,l)});class s_{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const s=t.length,r=e.length;if(n+s>r)return!1;for(let o=0;o=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,n,s,r,o){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,u=e.endColumn,h=r.getLineContent(a),g=r.getLineContent(c);let f=h.lastIndexOf(t,l-1+t.length),m=g.indexOf(n,u-1-n.length);if(f!==-1&&m!==-1)if(a===c)h.substring(f+t.length,m).indexOf(n)>=0&&(f=-1,m=-1);else{const v=h.substring(f+t.length),_=g.substring(0,m);(v.indexOf(n)>=0||_.indexOf(n)>=0)&&(f=-1,m=-1)}let x;f!==-1&&m!==-1?(s&&f+t.length0&&g.charCodeAt(m-1)===32&&(n=" "+n,m-=1),x=s_._createRemoveBlockCommentOperations(new z(a,f+t.length+1,c,m+1),t,n)):(x=s_._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=x.length===1?n:null);for(const v of x)o.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,n){const s=[];return z.isEmpty(e)?s.push(Qs.delete(new z(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(s.push(Qs.delete(new z(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),s.push(Qs.delete(new z(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),s}static _createAddBlockCommentOperations(e,t,n,s){const r=[];return z.isEmpty(e)?r.push(Qs.replace(new z(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(Qs.insert(new te(e.startLineNumber,e.startColumn),t+(s?" ":""))),r.push(Qs.insert(new te(e.endLineNumber,e.endColumn),(s?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,s=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,s),o=this.languageConfigurationService.getLanguageConfiguration(r).comments;!o||!o.blockCommentStartToken||!o.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,o.blockCommentStartToken,o.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(n.length===2){const s=n[0],r=n[1];return new st(s.range.endLineNumber,s.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const s=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new st(s.endLineNumber,s.endColumn+r,s.endLineNumber,s.endColumn+r)}}}class Fm{constructor(e,t,n,s,r,o,a){this.languageConfigurationService=e,this._selection=t,this._indentSize=n,this._type=s,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,n,s){e.tokenization.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),o=s.getLanguageConfiguration(r).comments,a=o?o.lineCommentToken:null;if(!a)return null;const l=[];for(let c=0,u=n-t+1;cr?t[l].commentStrOffset=o-1:t[l].commentStrOffset=o}}}class Mle extends rt{constructor(e,t){super(t),this._type=e}run(e,t){const n=e.get(As);if(!t.hasModel())return;const s=t.getModel(),r=[],o=s.getOptions(),a=t.getOption(29),l=t.getSelections().map((u,h)=>({selection:u,index:h,ignoreFirstLine:!1}));l.sort((u,h)=>z.compareRangesUsingStarts(u.selection,h.selection));let c=l[0];for(let u=1;u=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},my=function(i,e){return function(t,n){e(t,n,i)}},_J,kw;let fM=(kw=class{static get(e){return e.getContribution(_J.ID)}constructor(e,t,n,s,r,o,a,l){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=s,this._keybindingService=r,this._menuService=o,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new _e,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(c=>this._onContextMenu(c))),this._toDispose.add(this._editor.onMouseWheel(c=>{if(this._contextMenuIsBeingShownCount>0){const u=this._contextViewService.getContextViewElement(),h=c.srcElement;h.shadowRoot&&Z_(u)===h.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(c=>{this._editor.getOption(30)&&c.keyCode===58&&(c.preventDefault(),c.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(30)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(const s of this._editor.getSelections())if(s.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(30)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const n=[],s=this._menuService.getMenuActions(t,this._contextKeyService,{arg:e.uri});for(const r of s){const[,o]=r;let a=0;for(const l of o)if(l instanceof z1){const c=this._getMenuActions(e,l.item.submenu);c.length>0&&(n.push(new vL(l.id,l.label,c)),a++)}else n.push(l),a++;a&&n.push(new Gr)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const r=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),o=Zs(this._editor.getDomNode()),a=o.left+r.left,l=o.top+r.top+r.height;n={x:a,y:l}}const s=this._editor.getOption(144)&&!zu;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:r=>{const o=this._keybindingFor(r);if(o)return new ML(r,r,{label:!0,keybinding:o.getLabel(),isMenu:!0});const a=r;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new ML(r,r,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:r=>this._keybindingFor(r),onHide:r=>{this._contextMenuIsBeingShownCount--}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||iHt(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(81);let n=0;const s=c=>({id:`menu-action-${++n}`,label:c.label,tooltip:"",class:void 0,enabled:typeof c.enabled>"u"?!0:c.enabled,checked:c.checked,run:c.run}),r=(c,u)=>new vL(`menu-action-${++n}`,c,u,void 0),o=(c,u,h,g,f)=>{if(!u)return s({label:c,enabled:u,run:()=>{}});const m=v=>()=>{this._configurationService.updateValue(h,v)},x=[];for(const v of f)x.push(s({label:v.label,checked:g===v.value,run:m(v.value)}));return r(c,x)},a=[];a.push(s({label:S(901,"Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new Gr),a.push(s({label:S(902,"Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(o(S(903,"Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:S(904,"Proportional"),value:"proportional"},{label:S(905,"Fill"),value:"fill"},{label:S(906,"Fit"),value:"fit"}])),a.push(o(S(907,"Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:S(908,"Mouse Over"),value:"mouseover"},{label:S(909,"Always"),value:"always"}]));const l=this._editor.getOption(144)&&!zu;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:c=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}},_J=kw,kw.ID="editor.contrib.contextmenu",kw);fM=_J=Yzt([my(1,eu),my(2,fx),my(3,Bt),my(4,zn),my(5,Qu),my(6,Zt),my(7,tx)],fM);class Qzt extends rt{constructor(){super({id:"editor.action.showContextMenu",label:be(910,"Show Editor Context Menu"),precondition:void 0,kbOpts:{kbExpr:J.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=fM.get(t))==null||n.showContextMenu()}}Pn(fM.ID,fM,2);Ke(Qzt);class Jq{constructor(e){this.selections=e}equals(e){const t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let s=0;s{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const n=new Jq(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new eK(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new eK(new Jq(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new eK(new Jq(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}};N9.ID="editor.contrib.cursorUndoRedoController";let VL=N9;class Xzt extends rt{constructor(){super({id:"cursorUndo",label:be(911,"Cursor Undo"),precondition:void 0,kbOpts:{kbExpr:J.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var s;(s=VL.get(t))==null||s.cursorUndo()}}class Zzt extends rt{constructor(){super({id:"cursorRedo",label:be(912,"Cursor Redo"),precondition:void 0})}run(e,t,n){var s;(s=VL.get(t))==null||s.cursorRedo()}}Pn(VL.ID,VL,0);Ke(Xzt);Ke(Zzt);class Jzt{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){const n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new z(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new st(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new st(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(42)||this._editor.getOption(28)||(Ik(e)&&(this._modifierPressed=!0),this._mouseDown&&Ik(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(42)||this._editor.getOption(28)||(Ik(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===bv.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const s=(this._editor.getSelections()||[]).filter(r=>t.position&&r.containsPosition(t.position));if(s.length===1)this._dragSelection=s[0];else return}Ik(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new te(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){const s=this._editor.getSelection();if(s){const{selectionStartLineNumber:r,selectionStartColumn:o}=s;n=[new st(r,o,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(s=>s.containsPosition(t)?new st(t.lineNumber,t.column,t.lineNumber,t.column):s);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Ik(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(bv.ID,new Jzt(this._dragSelection,t,Ik(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new z(e.lineNumber,e.column,e.lineNumber,e.column),options:bv._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}};bv.ID="editor.contrib.dragAndDrop",bv.TRIGGER_KEY_VALUE=bn?6:5,bv._DECORATION_OPTIONS=qt.register({description:"dnd-target",className:"dnd-target"});let S8=bv;Pn(S8.ID,S8,2);const eUt="editor.action.pasteAs";Pn(nx.ID,nx,0);UD(cZ);Xe(new class extends ao{constructor(){super({id:sPe,precondition:Qae,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e){var t;return(t=nx.get(e))==null?void 0:t.changePasteType()}});Xe(new class extends ao{constructor(){super({id:"editor.hidePasteWidget",precondition:Qae,kbOpts:{weight:100,primary:9}})}runEditorCommand(i,e){var t;(t=nx.get(e))==null||t.clearWidgets()}});var Nw;Ke((Nw=class extends rt{constructor(){super({id:eUt,label:be(915,"Paste As..."),precondition:J.writable,metadata:{description:"Paste as",args:[{name:"args",schema:Nw.argsSchema}]},canTriggerInlineEdits:!0})}run(e,t,n){var r;let s;return n&&("kind"in n?s={only:new Bs(n.kind)}:"preferences"in n&&(s={preferences:n.preferences.map(o=>new Bs(o))})),(r=nx.get(t))==null?void 0:r.pasteAs(s)}},Nw.argsSchema={oneOf:[{type:"object",required:["kind"],properties:{kind:{type:"string",description:S(913,`The kind of the paste edit to try pasting with. +If there are multiple edits for this kind, the editor will show a picker. If there are no edits of this kind, the editor will show an error message.`)}}},{type:"object",required:["preferences"],properties:{preferences:{type:"array",description:S(914,`List of preferred paste edit kind to try applying. +The first edit matching the preferences will be applied.`),items:{type:"string"}}}}]},Nw));Ke(class extends rt{constructor(){super({id:"editor.action.pasteAsText",label:be(916,"Paste as Text"),precondition:J.writable,canTriggerInlineEdits:!0})}run(i,e){var t;return(t=nx.get(e))==null?void 0:t.pasteAs({providerId:LC.id})}});class tUt{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class Iye{constructor(e){this.identifier=e}}const zOe=ln("treeViewsDndService");wn(zOe,tUt,1);var nUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},a4=function(i,e){return function(t,n){e(t,n,i)}},Rm;const iUt="editor.dropIntoEditor.preferences",UOe="editor.changeDropType",Ple=new Ze("dropWidgetVisible",!1,S(934,"Whether the drop widget is showing"));var Ew;let zL=(Ew=class extends se{static get(e){return e.getContribution(Rm.ID)}constructor(e,t,n,s,r){super(),this._configService=n,this._languageFeaturesService=s,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=nZ.getInstance(),this._dropProgressManager=this._register(t.createInstance(K6,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(Z6,"dropIntoEditor",e,Ple,{id:UOe,label:S(935,"Show drop options...")},()=>Rm._configureDefaultAction?[Rm._configureDefaultAction]:[])),this._register(e.onDropIntoEditor(o=>this.onDropIntoEditor(e,o.position,o.event)))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,n){var r;if(!n.dataTransfer||!e.hasModel())return;(r=Rm._currentDropOperation)==null||r.cancel(),e.focus(),e.setPosition(t);const s=io(async o=>{const a=new _e,l=a.add(new ex(e,1,void 0,o));try{const c=await this.extractDataTransferData(n);if(c.size===0||l.token.isCancellationRequested)return;const u=e.getModel();if(!u)return;const h=this._languageFeaturesService.documentDropEditProvider.ordered(u).filter(f=>f.dropMimeTypes?f.dropMimeTypes.some(m=>c.matches(m)):!0),g=a.add(await this.getDropEdits(h,u,t,c,l.token));if(l.token.isCancellationRequested)return;if(g.edits.length){const f=this.getInitialActiveEditIndex(u,g.edits),m=e.getOption(43).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([z.fromPositions(t)],{activeEditIndex:f,allEdits:g.edits},m,async x=>x,o)}}finally{a.dispose(),Rm._currentDropOperation===s&&(Rm._currentDropOperation=void 0)}});this._dropProgressManager.showWhile(t,S(936,"Running drop handlers. Click to cancel"),s,{cancel:()=>s.cancel()}),Rm._currentDropOperation=s}async getDropEdits(e,t,n,s,r){const o=new _e,a=await pL(Promise.all(e.map(async c=>{try{const u=await c.provideDocumentDropEdits(t,n,s,r);return u&&o.add(u),u==null?void 0:u.edits.map(h=>({...h,providerId:c.id}))}catch(u){Zd(u)||console.error(u),console.error(u)}})),r),l=ef(a??[]).flat();return{edits:JMe(l),dispose:()=>o.dispose()}}getInitialActiveEditIndex(e,t){const n=this._configService.getValue(iUt,{resource:e.uri});for(const s of Array.isArray(n)?n:[]){const r=new Bs(s),o=t.findIndex(a=>a.kind&&r.contains(a.kind));if(o>=0)return o}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new HMe;const t=UMe(e.dataTransfer);if(this.treeItemsTransfer.hasData(Iye.prototype)){const n=this.treeItemsTransfer.getData(Iye.prototype);if(Array.isArray(n))for(const s of n){const r=await this._treeViewsDragAndDropService.removeDragOperationTransfer(s.identifier);if(r)for(const[o,a]of r)t.replace(o,a)}}return t}},Rm=Ew,Ew.ID="editor.contrib.dropIntoEditorController",Ew);zL=Rm=nUt([a4(1,ft),a4(2,Zt),a4(3,lt),a4(4,zOe)],zL);Pn(zL.ID,zL,2);UD(lZ);Xe(new class extends ao{constructor(){super({id:UOe,precondition:Ple,kbOpts:{weight:100,primary:2137}})}runEditorCommand(i,e,t){var n;(n=zL.get(e))==null||n.changeDropType()}});Xe(new class extends ao{constructor(){super({id:"editor.hideDropWidget",precondition:Ple,kbOpts:{weight:100,primary:9}})}runEditorCommand(i,e,t){var n;(n=zL.get(e))==null||n.clearWidgets()}});const E9=class E9 extends id{constructor(e,t,n){super(),this._hideSoon=this._register(new pi(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=n,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s={inputActiveOptionBorder:Pe(UP),inputActiveOptionForeground:Pe($P),inputActiveOptionBackground:Pe(MD)},r={groupId:"find-options-widget"};this.caseSensitive=this._register(new OPe({appendTitle:this._keybindingLabelFor(Xi.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,hoverLifecycleOptions:r,...s})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new jPe({appendTitle:this._keybindingLabelFor(Xi.ToggleWholeWordCommand),isChecked:this._state.wholeWord,hoverLifecycleOptions:r,...s})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new FPe({appendTitle:this._keybindingLabelFor(Xi.ToggleRegexCommand),isChecked:this._state.isRegex,hoverLifecycleOptions:r,...s})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(o=>{let a=!1;o.isRegex&&(this.regex.checked=this._state.isRegex,a=!0),o.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,a=!0),o.matchCase&&(this.caseSensitive.checked=this._state.matchCase,a=!0),!this._state.isRevealed&&a&&this._revealTemporarily()})),this._register(de(this._domNode,Fe.MOUSE_LEAVE,o=>this._onMouseLeave())),this._register(de(this._domNode,"mouseover",o=>this._onMouseOver()))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return E9.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}};E9.ID="editor.contrib.findOptionsWidget";let yJ=E9;function l4(i,e){return i===1?!0:i===2?!1:e}class sUt extends se{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return l4(this._isRegexOverride,this._isRegex)}get wholeWord(){return l4(this._wholeWordOverride,this._wholeWord)}get matchCase(){return l4(this._matchCaseOverride,this._matchCase)}get preserveCase(){return l4(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new ie),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,n){const s={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let r=!1;t===0&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,s.matchesPosition=!0,r=!0),this._matchesCount!==t&&(this._matchesCount=t,s.matchesCount=!0,r=!0),typeof n<"u"&&(z.equalsRange(this._currentMatch,n)||(this._currentMatch=n,s.currentMatch=!0,r=!0)),r&&this._onFindReplaceStateChange.fire(s)}change(e,t,n=!0){var u;const s={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let r=!1;const o=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;typeof e.searchString<"u"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,r=!0),typeof e.replaceString<"u"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,r=!0),typeof e.isRevealed<"u"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,r=!0),typeof e.isReplaceRevealed<"u"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,r=!0),typeof e.isRegex<"u"&&(this._isRegex=e.isRegex),typeof e.wholeWord<"u"&&(this._wholeWord=e.wholeWord),typeof e.matchCase<"u"&&(this._matchCase=e.matchCase),typeof e.preserveCase<"u"&&(this._preserveCase=e.preserveCase),typeof e.searchScope<"u"&&((u=e.searchScope)!=null&&u.every(h=>{var g;return(g=this._searchScope)==null?void 0:g.some(f=>!z.equalsRange(f,h))})||(this._searchScope=e.searchScope,s.searchScope=!0,r=!0)),typeof e.loop<"u"&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,r=!0),typeof e.isSearching<"u"&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,s.isSearching=!0,r=!0),typeof e.filters<"u"&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,s.filters=!0,r=!0),this._isRegexOverride=typeof e.isRegexOverride<"u"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride<"u"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride<"u"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride<"u"?e.preserveCaseOverride:0,o!==this.isRegex&&(r=!0,s.isRegex=!0),a!==this.wholeWord&&(r=!0,s.wholeWord=!0),l!==this.matchCase&&(r=!0,s.matchCase=!0),c!==this.preserveCase&&(r=!0,s.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=i_}}var rUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},oUt=function(i,e){return function(t,n){e(t,n,i)}},lv,M_;let wJ=(M_=class{static getOrCreate(e){return lv._instance||(lv._instance=new lv(e)),lv._instance}constructor(e){this.storageService=e,this.inMemoryValues=new Set,this._onDidChangeEmitter=new ie,this.onDidChange=this._onDidChangeEmitter.event,this.load()}delete(e){const t=this.inMemoryValues.delete(e);return this.save(),t}add(e){return this.inMemoryValues.add(e),this.save(),this}has(e){return this.inMemoryValues.has(e)}forEach(e,t){return this.load(),this.inMemoryValues.forEach(e)}replace(e){this.inMemoryValues=new Set(e),this.save()}load(){let e;const t=this.storageService.get(lv.FIND_HISTORY_KEY,1);if(t)try{e=JSON.parse(t)}catch{}this.inMemoryValues=new Set(e||[])}save(){const e=[];return this.inMemoryValues.forEach(t=>e.push(t)),new Promise(t=>{this.storageService.store(lv.FIND_HISTORY_KEY,JSON.stringify(e),1,0),this._onDidChangeEmitter.fire(e),t()})}},lv=M_,M_.FIND_HISTORY_KEY="workbench.find.history",M_._instance=null,M_);wJ=lv=rUt([oUt(0,xl)],wJ);var aUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},lUt=function(i,e){return function(t,n){e(t,n,i)}},cv,P_;let CJ=(P_=class{static getOrCreate(e){return cv._instance||(cv._instance=new cv(e)),cv._instance}constructor(e){this.storageService=e,this.inMemoryValues=new Set,this._onDidChangeEmitter=new ie,this.onDidChange=this._onDidChangeEmitter.event,this.load()}delete(e){const t=this.inMemoryValues.delete(e);return this.save(),t}add(e){return this.inMemoryValues.add(e),this.save(),this}has(e){return this.inMemoryValues.has(e)}forEach(e,t){return this.load(),this.inMemoryValues.forEach(e)}replace(e){this.inMemoryValues=new Set(e),this.save()}load(){let e;const t=this.storageService.get(cv.FIND_HISTORY_KEY,1);if(t)try{e=JSON.parse(t)}catch{}this.inMemoryValues=new Set(e||[])}save(){const e=[];return this.inMemoryValues.forEach(t=>e.push(t)),new Promise(t=>{this.storageService.store(cv.FIND_HISTORY_KEY,JSON.stringify(e),1,0),this._onDidChangeEmitter.fire(e),t()})}},cv=P_,P_.FIND_HISTORY_KEY="workbench.replace.history",P_._instance=null,P_);CJ=cv=aUt([lUt(0,xl)],CJ);var $Oe=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Ch=function(i,e){return function(t,n){e(t,n,i)}},SJ;const cUt=524288;function kJ(i,e="single",t=!1){if(!i.hasModel())return null;const n=i.getSelection();if(e==="single"&&n.startLineNumber===n.endLineNumber||e==="multiple"){if(n.isEmpty()){const s=i.getConfiguredWordAtPosition(n.getStartPosition());if(s&&t===!1)return s.word}else if(i.getModel().getValueLengthInRange(n)this._onStateChanged(a))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const a=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),a&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(50).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!kW.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Qc(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const n={...t,isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){const s=kJ(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);s&&(this._state.isRegex?n.searchString=Qc(s):n.searchString=s)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){const s=kJ(this._editor,e.seedSearchStringFromSelection);s&&(n.searchString=s)}if(!n.searchString&&e.seedSearchStringFromGlobalClipboard){const s=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;s&&(n.searchString=s)}if(e.forceRevealReplace||n.isReplaceRevealed?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope){const s=this._editor.getSelections();s.some(r=>!r.isEmpty())&&(n.searchScope=s)}n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new qA(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(e){return this._model?(this._model.moveToMatch(e),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var e;return this._model?(e=this._editor.getModel())!=null&&e.isTooLargeForHeapOperation()?(this._notificationService.warn(S(940,"The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(50).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(50).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}},SJ=Lw,Lw.ID="editor.contrib.findController",Lw);wc=SJ=$Oe([Ch(1,Bt),Ch(2,xl),Ch(3,ed),Ch(4,nr),Ch(5,Zl)],wc);let NJ=class extends wc{constructor(e,t,n,s,r,o,a,l){super(e,n,o,a,r,l),this._contextViewService=t,this._keybindingService=s,this._widget=null,this._findOptionsWidget=null,this._findWidgetSearchHistory=wJ.getOrCreate(o),this._replaceWidgetHistory=CJ.getOrCreate(o)}async _start(e,t){this._widget||this._createFindWidget();const n=this._editor.getSelection();let s=!1;switch(this._editor.getOption(50).autoFindInSelection){case"always":s=!0;break;case"never":s=!1;break;case"multiline":{s=!!n&&n.startLineNumber!==n.endLineNumber;break}}e.updateSearchScope=e.updateSearchScope||s,await super._start(e,t),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new MZ(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._hoverService,this._findWidgetSearchHistory,this._replaceWidgetHistory)),this._findOptionsWidget=this._register(new yJ(this._editor,this._state,this._keybindingService))}saveViewState(){var e;return(e=this._widget)==null?void 0:e.getViewState()}restoreViewState(e){var t;(t=this._widget)==null||t.setViewState(e)}};NJ=$Oe([Ch(1,fx),Ch(2,Bt),Ch(3,zn),Ch(4,nr),Ch(5,xl),Ch(6,ed),Ch(7,Zl)],NJ);const dUt=F7(new j7({id:Xi.StartFindAction,label:be(947,"Find"),precondition:Ne.or(J.focus,Ne.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:ct.MenubarEditMenu,group:"3_find",title:S(941,"&&Find"),order:1}}));dUt.addImplementation(0,(i,e,t)=>{const n=wc.get(e);return n?n.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(50).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(50).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(50).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(50).loop}):!1});const uUt={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class hUt extends rt{constructor(){super({id:Xi.StartFindWithArgs,label:be(948,"Find with Arguments"),precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:uUt})}async run(e,t,n){const s=wc.get(t);if(s){const r=n?{searchString:n.searchString,replaceString:n.replaceString,isReplaceRevealed:n.replaceString!==void 0,isRegex:n.isRegex,wholeWord:n.matchWholeWord,matchCase:n.isCaseSensitive,preserveCase:n.preserveCase}:{};await s.start({forceRevealReplace:!1,seedSearchStringFromSelection:s.getState().searchString.length===0&&t.getOption(50).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(50).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(n==null?void 0:n.findInSelection)||!1,loop:t.getOption(50).loop},r),s.setGlobalBufferTerm(s.getState().searchString)}}}class gUt extends rt{constructor(){super({id:Xi.StartFindWithSelection,label:be(949,"Find with Selection"),precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const n=wc.get(t);n&&(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(50).loop}),n.setGlobalBufferTerm(n.getState().searchString))}}async function qOe(i,e){const t=wc.get(i);if(!t)return;const n=()=>(e?t.moveToNextMatch():t.moveToPrevMatch())?(t.editor.pushUndoStop(),!0):!1;n()||(await t.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getState().searchString.length===0&&i.getOption(50).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:i.getOption(50).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:i.getOption(50).loop}),n())}const fUt=F7(new j7({id:Xi.NextMatchFindAction,label:be(950,"Find Next"),precondition:void 0,kbOpts:[{kbExpr:J.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:Ne.and(J.focus,kW),primary:3,weight:100}]}));fUt.addImplementation(0,async(i,e,t)=>qOe(e,!0));const pUt=F7(new j7({id:Xi.PreviousMatchFindAction,label:be(951,"Find Previous"),precondition:void 0,kbOpts:[{kbExpr:J.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:Ne.and(J.focus,kW),primary:1027,weight:100}]}));pUt.addImplementation(0,async(i,e,t)=>qOe(e,!1));class mUt extends rt{constructor(){super({id:Xi.GoToMatchFindAction,label:be(952,"Go to Match..."),precondition:bx}),this._highlightDecorations=[]}run(e,t,n){const s=wc.get(t);if(!s)return;const r=s.getState().matchesCount;if(r<1){e.get(nr).notify({severity:jD.Warning,message:S(942,"No matches. Try searching for something else.")});return}const o=e.get(Wa),a=new _e,l=a.add(o.createInputBox());l.placeholder=S(943,"Type a number to go to a specific match (between 1 and {0})",r);const c=h=>{const g=parseInt(h);if(isNaN(g))return;const f=s.getState().matchesCount;if(g>0&&g<=f)return g-1;if(g<0&&g>=-f)return f+g},u=h=>{const g=c(h);if(typeof g=="number"){l.validationMessage=void 0,s.goToMatch(g);const f=s.getState().currentMatch;f&&this.addDecorations(t,f)}else l.validationMessage=S(944,"Please type a number between 1 and {0}",s.getState().matchesCount),this.clearDecorations(t)};a.add(l.onDidChangeValue(h=>{u(h)})),a.add(l.onDidAccept(()=>{const h=c(l.value);typeof h=="number"?(s.goToMatch(h),l.hide()):l.validationMessage=S(945,"Please type a number between 1 and {0}",s.getState().matchesCount)})),a.add(l.onDidHide(()=>{this.clearDecorations(t),a.dispose()})),l.show()}clearDecorations(e){e.changeDecorations(t=>{this._highlightDecorations=t.deltaDecorations(this._highlightDecorations,[])})}addDecorations(e,t){e.changeDecorations(n=>{this._highlightDecorations=n.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Ks(b2e),position:zd.Full}}}])})}}class KOe extends rt{async run(e,t){const n=wc.get(t);if(!n)return;const s=kJ(t,"single",!1);s&&n.setSearchString(s),this._run(n)||(await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(50).loop}),this._run(n))}}class bUt extends KOe{constructor(){super({id:Xi.NextSelectionMatchFindAction,label:be(953,"Find Next Selection"),precondition:void 0,kbOpts:{kbExpr:J.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class xUt extends KOe{constructor(){super({id:Xi.PreviousSelectionMatchFindAction,label:be(954,"Find Previous Selection"),precondition:void 0,kbOpts:{kbExpr:J.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const vUt=F7(new j7({id:Xi.StartFindReplaceAction,label:be(955,"Replace"),precondition:Ne.or(J.focus,Ne.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:ct.MenubarEditMenu,group:"3_find",title:S(946,"&&Replace"),order:2}}));vUt.addImplementation(0,(i,e,t)=>{if(!e.hasModel()||e.getOption(104))return!1;const n=wc.get(e);if(!n)return!1;const s=e.getSelection(),r=n.isFindInputFocused(),o=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&e.getOption(50).seedSearchStringFromSelection!=="never"&&!r,a=r||o?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:o?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(50).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(50).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(50).loop})});Pn(wc.ID,NJ,0);Ke(hUt);Ke(gUt);Ke(mUt);Ke(bUt);Ke(xUt);const nf=ao.bindToContribution(wc.get);Xe(new nf({id:Xi.CloseFindWidgetCommand,precondition:bx,handler:i=>i.closeFindWidget(),kbOpts:{weight:105,kbExpr:Ne.and(J.focus,Ne.not("isComposing")),primary:9,secondary:[1033]}}));Xe(new nf({id:Xi.ToggleCaseSensitiveCommand,precondition:void 0,handler:i=>i.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:J.focus,primary:Y3.primary,mac:Y3.mac,win:Y3.win,linux:Y3.linux}}));Xe(new nf({id:Xi.ToggleWholeWordCommand,precondition:void 0,handler:i=>i.toggleWholeWords(),kbOpts:{weight:105,kbExpr:J.focus,primary:Q3.primary,mac:Q3.mac,win:Q3.win,linux:Q3.linux}}));Xe(new nf({id:Xi.ToggleRegexCommand,precondition:void 0,handler:i=>i.toggleRegex(),kbOpts:{weight:105,kbExpr:J.focus,primary:X3.primary,mac:X3.mac,win:X3.win,linux:X3.linux}}));Xe(new nf({id:Xi.ToggleSearchScopeCommand,precondition:void 0,handler:i=>i.toggleSearchScope(),kbOpts:{weight:105,kbExpr:J.focus,primary:Z3.primary,mac:Z3.mac,win:Z3.win,linux:Z3.linux}}));Xe(new nf({id:Xi.TogglePreserveCaseCommand,precondition:void 0,handler:i=>i.togglePreserveCase(),kbOpts:{weight:105,kbExpr:J.focus,primary:J3.primary,mac:J3.mac,win:J3.win,linux:J3.linux}}));Xe(new nf({id:Xi.ReplaceOneAction,precondition:bx,handler:i=>i.replace(),kbOpts:{weight:105,kbExpr:J.focus,primary:3094}}));Xe(new nf({id:Xi.ReplaceOneAction,precondition:bx,handler:i=>i.replace(),kbOpts:{weight:105,kbExpr:Ne.and(J.focus,rle),primary:3}}));Xe(new nf({id:Xi.ReplaceAllAction,precondition:bx,handler:i=>i.replaceAll(),kbOpts:{weight:105,kbExpr:J.focus,primary:2563}}));Xe(new nf({id:Xi.ReplaceAllAction,precondition:bx,handler:i=>i.replaceAll(),kbOpts:{weight:105,kbExpr:Ne.and(J.focus,rle),primary:void 0,mac:{primary:2051}}}));Xe(new nf({id:Xi.SelectAllMatchesAction,precondition:bx,handler:i=>i.selectAllMatches(),kbOpts:{weight:105,kbExpr:J.focus,primary:515}}));const _Ut={0:" ",1:"u",2:"r"},Aye=65535,_g=16777215,Rye=4278190080;class tK{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,n=e%32;return(this._states[t]&1<Aye)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new tK(e.length),this._userDefinedStates=new tK(e.length),this._recoveredStates=new tK(e.length),this._types=n,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(n,s)=>{const r=e[e.length-1];return this.getStartLineNumber(r)<=n&&this.getEndLineNumber(r)>=s};for(let n=0,s=this._startIndexes.length;n_g||o>_g)throw new Error("startLineNumber or endLineNumber must not exceed "+_g);for(;e.length>0&&!t(r,o);)e.pop();const a=e.length>0?e[e.length-1]:-1;e.push(n),this._startIndexes[n]=r+((a&255)<<24),this._endIndexes[n]=o+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&_g}getEndLineNumber(e){return this._endIndexes[e]&_g}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){t===1?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):t===2?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let n=!1;if(this._types)for(let s=0;s>>24)+((this._endIndexes[e]&Rye)>>>16);return t===Aye?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,n=this._startIndexes.length;if(n===0)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(v)?(w=>w<_?v[w]:void 0):(w=>w<_?v.toFoldRange(w):void 0),o=r(e,e.length),a=r(t,t.length);let l=0,c=0,u=o(0),h=a(0);const g=[];let f,m=0;const x=[];for(;u||h;){let v;if(h&&(!u||u.startLineNumber>=h.startLineNumber))u&&u.startLineNumber===h.startLineNumber?(h.source===1?v=h:(v=u,v.isCollapsed=h.isCollapsed&&(u.endLineNumber===h.endLineNumber||!(s!=null&&s.startsInside(u.startLineNumber+1,u.endLineNumber+1))),v.source=0),u=o(++l)):(v=h,h.isCollapsed&&h.source===0&&(v.source=2)),h=a(++c);else{let _=c,w=h;for(;;){if(!w||w.startLineNumber>u.endLineNumber){v=u;break}if(w.source===1&&w.endLineNumber>u.endLineNumber)break;w=a(++_)}u=o(++l)}if(v){for(;f&&f.endLineNumberv.startLineNumber&&v.startLineNumber>m&&v.endLineNumber<=n&&(!f||f.endLineNumber>=v.endLineNumber)&&(x.push(v),m=v.startLineNumber,f&&g.push(f),f=v)}}return x}}class yUt{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class wUt{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new ie,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new Rd(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort((n,s)=>n.regionIndex-s.regionIndex);const t={};this._decorationProvider.changeDecorations(n=>{let s=0,r=-1,o=-1;const a=l=>{for(;so&&(o=c),s++}};for(const l of e){const c=l.regionIndex,u=this._editorDecorationIds[c];if(u&&!t[u]){t[u]=!0,a(c);const h=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,h),r=Math.max(r,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,n=s=>{for(const r of e)if(!(r.startLineNumber>s.endLineNumber||s.startLineNumber>r.endLineNumber))return!0;return!1};for(let s=0;sn&&(n=a)}this._decorationProvider.changeDecorations(s=>this._editorDecorationIds=s.deltaDecorations(this._editorDecorationIds,t)),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){const t=[];for(let n=0,s=this._regions.length;n=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>n)continue;const a=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:a})}return t.length>0?t:void 0}applyMemento(e){if(!Array.isArray(e))return;const t=[],n=this._textModel.getLineCount();for(const r of e){if(r.startLineNumber>=r.endLineNumber||r.startLineNumber<1||r.endLineNumber>n)continue;const o=this._getLinesChecksum(r.startLineNumber+1,r.endLineNumber);(!r.checksum||o===r.checksum)&&t.push({startLineNumber:r.startLineNumber,endLineNumber:r.endLineNumber,type:void 0,isCollapsed:r.isCollapsed??!0,source:r.source??0})}const s=Rd.sanitizeAndMerge(this._regions,t,n);this.updatePost(Rd.fromFoldRanges(s))}_getLinesChecksum(e,t){return BP(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const n=[];if(this._regions){let s=this._regions.findRange(e),r=1;for(;s>=0;){const o=this._regions.toRegion(s);(!t||t(o,r))&&n.push(o),r++,s=o.parentIndex}}return n}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const n=[],s=e?e.regionIndex+1:0,r=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const o=[];for(let a=s,l=this._regions.length;a0&&!c.containedBy(o[o.length-1]);)o.pop();o.push(c),t(c,o.length)&&n.push(c)}else break}}else for(let o=s,a=this._regions.length;o1){const a=i.getRegionsInside(r,(l,c)=>l.isCollapsed!==o&&c0)for(const r of n){const o=i.getRegionAtLine(r);if(o&&(o.isCollapsed!==e&&s.push(o),t>1)){const a=i.getRegionsInside(o,(l,c)=>l.isCollapsed!==e&&co.isCollapsed!==e&&aa.isCollapsed!==e&&l<=t);s.push(...o)}i.toggleCollapseState(s)}function CUt(i,e,t){const n=[];for(const s of t){const r=i.getAllRegionsAtLine(s,o=>o.isCollapsed!==e);r.length>0&&n.push(r[0])}i.toggleCollapseState(n)}function SUt(i,e,t,n){const s=(o,a)=>a===e&&o.isCollapsed!==t&&!n.some(l=>o.containsLine(l)),r=i.getRegionsInside(null,s);i.toggleCollapseState(r)}function YOe(i,e,t){const n=[];for(const o of t){const a=i.getAllRegionsAtLine(o,void 0);a.length>0&&n.push(a[0])}const s=o=>n.every(a=>!a.containedBy(o)&&!o.containedBy(a))&&o.isCollapsed!==e,r=i.getRegionsInside(null,s);i.toggleCollapseState(r)}function jle(i,e,t){const n=i.textModel,s=i.regions,r=[];for(let o=s.length-1;o>=0;o--)if(t!==s.isCollapsed(o)){const a=s.getStartLineNumber(o);e.test(n.getLineContent(a))&&r.push(s.toRegion(o))}i.toggleCollapseState(r)}function Fle(i,e,t){const n=i.regions,s=[];for(let r=n.length-1;r>=0;r--)t!==n.isCollapsed(r)&&e===n.getType(r)&&s.push(n.toRegion(r));i.toggleCollapseState(s)}function kUt(i,e){let t=null;const n=e.getRegionAtLine(i);if(n!==null&&(t=n.startLineNumber,i===t)){const s=n.parentIndex;s!==-1?t=e.regions.getStartLineNumber(s):t=null}return t}function NUt(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){if(i!==t.startLineNumber)return t.startLineNumber;{const n=t.parentIndex;let s=0;for(n!==-1&&(s=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=s)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function EUt(i,e){let t=e.getRegionAtLine(i);if(t!==null&&t.startLineNumber===i){const n=t.parentIndex;let s=0;if(n!==-1)s=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;s=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex=s)return null;if(t.parentIndex===n)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>i)return t.startLineNumber;t.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some(t=>t.range.endLineNumber!==t.range.startLineNumber||i0(t.text)[0]!==0))}updateHiddenRanges(){let e=!1;const t=[];let n=0,s=0,r=Number.MAX_VALUE,o=-1;const a=this._foldingModel.regions;for(;n0}isHidden(e){return Mye(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1;const n=this._foldingModel.textModel;let s=null;const r=o=>((!s||!DUt(o,s))&&(s=Mye(this._hiddenRanges,o)),s?s.startLineNumber-1:null);for(let o=0,a=e.length;o0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function DUt(i,e){return i>=e.startLineNumber&&i<=e.endLineNumber}function Mye(i,e){const t=ER(i,n=>e=0&&i[t].endLineNumber>=e?i[t]:null}const TUt=5e3,IUt="indent";class Ble{constructor(e,t,n){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=n,this.id=IUt}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=t&&!!t.offSide,s=t&&t.markers;return Promise.resolve(MUt(this.editorModel,n,s,this.foldingRangesLimit))}}let AUt=class{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,n){if(e>_g||t>_g)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),s=new Uint32Array(this._length);for(let r=this._length-1,o=0;r>=0;r--,o++)n[o]=this._startIndexes[r],s[o]=this._endIndexes[r];return new Rd(n,s)}else{this._foldingRangesLimit.update(this._length,t);let n=0,s=this._indentOccurrences.length;for(let l=0;lt){s=l;break}n+=c}}const r=e.getOptions().tabSize,o=new Uint32Array(t),a=new Uint32Array(t);for(let l=this._length-1,c=0;l>=0;l--){const u=this._startIndexes[l],h=e.getLineContent(u),g=rW(h,r);(g{}};function MUt(i,e,t,n=RUt){const s=i.getOptions().tabSize,r=new AUt(n);let o;t&&(o=new RegExp(`(${t.start.source})|(?:${t.end.source})`));const a=[],l=i.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=i.getLineCount();c>0;c--){const u=i.getLineContent(c),h=rW(u,s);let g=a[a.length-1];if(h===-1){e&&(g.endAbove=c);continue}let f;if(o&&(f=u.match(o)))if(f[1]){let m=a.length-1;for(;m>0&&a[m].indent!==-2;)m--;if(m>0){a.length=m+1,g=a[m],r.insertFirst(c,g.line,h),g.line=c,g.indent=h,g.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(g.indent>h){do a.pop(),g=a[a.length-1];while(g.indent>h);const m=g.endAbove-1;m-c>=1&&r.insertFirst(c,m,h)}g.indent===h?g.endAbove=c:a.push({indent:h,endAbove:c,line:c})}return r.toIndentRanges(i)}const PUt=Z("editor.foldBackground",{light:Kt(Kv,.3),dark:Kt(Kv,.3),hcDark:null,hcLight:null},S(1002,"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Z("editor.foldPlaceholderForeground",{light:"#808080",dark:"#808080",hcDark:null,hcLight:null},S(1003,"Color of the collapsed text after the first line of a folded range."));Z("editorGutter.foldingControlForeground",XF,S(1004,"Color of the folding control in the editor gutter."));const k8=ls("folding-expanded",Ee.chevronDown,S(1005,"Icon for expanded ranges in the editor glyph margin.")),N8=ls("folding-collapsed",Ee.chevronRight,S(1006,"Icon for collapsed ranges in the editor glyph margin.")),Pye=ls("folding-manual-collapsed",N8,S(1007,"Icon for manually collapsed ranges in the editor glyph margin.")),Oye=ls("folding-manual-expanded",k8,S(1008,"Icon for manually expanded ranges in the editor glyph margin.")),nK={color:Ks(PUt),position:1},Ak=S(1009,"Click to expand the range."),c4=S(1010,"Click to collapse the range."),Fr=class Fr{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,n){return t?Fr.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?e?this.showFoldingHighlights?Fr.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:Fr.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:Fr.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?n?this.showFoldingHighlights?Fr.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Fr.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?Fr.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:Fr.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?n?Fr.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:Fr.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:n?Fr.MANUALLY_EXPANDED_VISUAL_DECORATION:Fr.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}};Fr.COLLAPSED_VISUAL_DECORATION=qt.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Ak,firstLineDecorationClassName:Tt.asClassName(N8)}),Fr.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=qt.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:nK,isWholeLine:!0,linesDecorationsTooltip:Ak,firstLineDecorationClassName:Tt.asClassName(N8)}),Fr.MANUALLY_COLLAPSED_VISUAL_DECORATION=qt.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Ak,firstLineDecorationClassName:Tt.asClassName(Pye)}),Fr.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=qt.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:nK,isWholeLine:!0,linesDecorationsTooltip:Ak,firstLineDecorationClassName:Tt.asClassName(Pye)}),Fr.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=qt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Ak}),Fr.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=qt.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:nK,isWholeLine:!0,linesDecorationsTooltip:Ak}),Fr.EXPANDED_VISUAL_DECORATION=qt.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Tt.asClassName(k8),linesDecorationsTooltip:c4}),Fr.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=qt.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Tt.asClassName(k8),linesDecorationsTooltip:c4}),Fr.MANUALLY_EXPANDED_VISUAL_DECORATION=qt.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Tt.asClassName(Oye),linesDecorationsTooltip:c4}),Fr.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=qt.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:Tt.asClassName(Oye),linesDecorationsTooltip:c4}),Fr.NO_CONTROLS_EXPANDED_RANGE_DECORATION=qt.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),Fr.HIDDEN_RANGE_DECORATION=qt.register({description:"folding-hidden-range-decoration",stickiness:1});let EJ=Fr;const OUt={},jUt="syntax";class Hle{constructor(e,t,n,s,r){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=n,this.foldingRangesLimit=s,this.fallbackRangeProvider=r,this.id=jUt,this.disposables=new _e,r&&this.disposables.add(r);for(const o of t)typeof o.onDidChange=="function"&&this.disposables.add(o.onDidChange(n))}compute(e){return FUt(this.providers,this.editorModel,e).then(t=>{var n;return this.editorModel.isDisposed()?null:t?HUt(t,this.foldingRangesLimit):((n=this.fallbackRangeProvider)==null?void 0:n.compute(e))??null})}dispose(){this.disposables.dispose()}}function FUt(i,e,t){let n=null;const s=i.map((r,o)=>Promise.resolve(r.provideFoldingRanges(e,OUt,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(n)||(n=[]);const l=e.getLineCount();for(const c of a)c.start>0&&c.end>c.start&&c.end<=l&&n.push({start:c.start,end:c.end,rank:o,kind:c.kind})}},Pr));return Promise.all(s).then(r=>n)}class BUt{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,n,s){if(e>_g||t>_g)return;const r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=s,this._types[r]=n,this._length++,s<30&&(this._nestingLevelCounts[s]=(this._nestingLevelCounts[s]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const t=new Uint32Array(this._length),n=new Uint32Array(this._length);for(let s=0;se){n=a;break}t+=l}}const s=new Uint32Array(e),r=new Uint32Array(e),o=[];for(let a=0,l=0;a{let l=o.start-a.start;return l===0&&(l=o.rank-a.rank),l}),n=new BUt(e);let s;const r=[];for(const o of t)if(!s)s=o,n.add(o.start,o.end,o.kind&&o.kind.value,r.length);else if(o.start>s.start)if(o.end<=s.end)r.push(s),s=o,n.add(o.start,o.end,o.kind&&o.kind.value,r.length);else{if(o.start>s.end){do s=r.pop();while(s&&o.start>s.end);s&&r.push(s),s=o}n.add(o.start,o.end,o.kind&&o.kind.value,r.length)}return n.toIndentRanges()}var WUt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},SI=function(i,e){return function(t,n){e(t,n,i)}},Ay;const Jo=new Ze("foldingEnabled",!1);var Dw;let c0=(Dw=class extends se{static get(e){return e.getContribution(Ay.ID)}static getFoldingRangeProviders(e,t){var s;const n=e.foldingRangeProvider.ordered(t);return((s=Ay._foldingRangeSelector)==null?void 0:s.call(Ay,n,t))??n}constructor(e,t,n,s,r,o){super(),this.contextKeyService=t,this.languageConfigurationService=n,this.languageFeaturesService=o,this.localToDispose=this._register(new _e),this.editor=e,this._foldingLimitReporter=this._register(new QOe(e));const a=this.editor.getOptions();this._isEnabled=a.get(52),this._useFoldingProviders=a.get(53)!=="indentation",this._unfoldOnClickAfterEndOfLine=a.get(57),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(55),this.updateDebounceInfo=r.for(o.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new EJ(e),this.foldingDecorationProvider.showFoldingControls=a.get(126),this.foldingDecorationProvider.showFoldingHighlights=a.get(54),this.foldingEnabled=Jo.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(l=>{if(l.hasChanged(52)&&(this._isEnabled=this.editor.getOptions().get(52),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),l.hasChanged(56)&&this.onModelChanged(),l.hasChanged(126)||l.hasChanged(54)){const c=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=c.get(126),this.foldingDecorationProvider.showFoldingHighlights=c.get(54),this.triggerFoldingModelChanged()}l.hasChanged(53)&&(this._useFoldingProviders=this.editor.getOptions().get(53)!=="indentation",this.onFoldingStrategyChanged()),l.hasChanged(57)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(57)),l.hasChanged(55)&&(this._foldingImportsByDefault=this.editor.getOptions().get(55))})),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(!(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new wUt(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new LUt(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Uu(this.updateDebounceInfo.get(e)),this.localToDispose.add(this.updateScheduler),this.cursorChangedScheduler=new pi(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(t=>this.onDidChangeModelContent(t))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{var t,n;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(t=this.updateScheduler)==null||t.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(n=this.rangeProvider)==null||n.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;(e=this.rangeProvider)==null||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new Ble(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const n=Ay.getFoldingRangeProviders(this.languageFeaturesService,e);n.length>0&&(this.rangeProvider=new Hle(e,n,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;(t=this.hiddenRangeModel)==null||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const e=this.foldingModel;if(!e)return null;const t=new _o,n=this.getRangeProvider(e.textModel),s=this.foldingRegionPromise=io(r=>n.compute(r));return s.then(r=>{if(r&&s===this.foldingRegionPromise){let o;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const c=r.setCollapsedAllOfType(lS.Imports.value,!0);c&&(o=Kg.capture(this.editor),this._currentModelHasFoldedImports=c)}const a=this.editor.getSelections();e.update(r,VUt(a)),o==null||o.restore(this.editor);const l=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=l)}return e})}).then(void 0,e=>(zt(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then(t=>{if(t){const n=this.editor.getSelections();if(n&&n.length>0){const s=[];for(const r of n){const o=r.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(o)&&s.push(...t.getAllRegionsAtLine(o,a=>a.isCollapsed&&o>a.startLineNumber))}s.length&&(t.toggleCollapseState(s),this.reveal(n[0].getPosition()))}}}).then(void 0,zt)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let n=!1;switch(e.target.type){case 4:{const s=e.target.detail,r=e.target.element.offsetLeft;if(s.offsetX-r<4)return;n=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const s=this.editor.getModel();if(s&&t.startColumn===s.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const n=this.mouseDownInfo.lineNumber,s=this.mouseDownInfo.iconClicked,r=e.target.range;if(!r||r.startLineNumber!==n)return;if(s){if(e.target.type!==4)return}else{const a=this.editor.getModel();if(!a||r.startColumn!==a.getLineMaxColumn(n))return}const o=t.getRegionAtLine(n);if(o&&o.startLineNumber===n){const a=o.isCollapsed;if(s||a){const l=e.event.altKey;let c=[];if(l){const u=g=>!g.containedBy(o)&&!o.containedBy(g),h=t.getRegionsInside(null,u);for(const g of h)g.isCollapsed&&c.push(g);c.length===0&&(c=h)}else{const u=e.event.middleButton||e.event.shiftKey;if(u)for(const h of t.getRegionsInside(o))h.isCollapsed===a&&c.push(h);(a||!u||c.length===0)&&c.push(o)}t.toggleCollapseState(c),this.reveal({lineNumber:n,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}},Ay=Dw,Dw.ID="editor.contrib.folding",Dw);c0=Ay=WUt([SI(1,Bt),SI(2,As),SI(3,nr),SI(4,Ju),SI(5,lt)],c0);class QOe extends se{constructor(e){super(),this.editor=e,this._onDidChange=this._register(new ie),this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(56)}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}class Sa extends rt{runEditorCommand(e,t,n){const s=e.get(As),r=c0.get(t);if(!r)return;const o=r.getFoldingModel();if(o)return this.reportTelemetry(e,t),o.then(a=>{if(a){this.invoke(r,a,t,n,s);const l=t.getSelection();l&&r.reveal(l.getStartPosition())}})}getSelectedLines(e){const t=e.getSelections();return t?t.map(n=>n.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(n=>n+1):this.getSelectedLines(t)}run(e,t){}}function VUt(i){return!i||i.length===0?{startsInside:()=>!1}:{startsInside(e,t){for(const n of i){const s=n.startLineNumber;if(s>=e&&s<=t)return!0}return!1}}}function XOe(i){if(!ja(i)){if(!no(i))return!1;const e=i;if(!ja(e.levels)&&!Wb(e.levels)||!ja(e.direction)&&!bo(e.direction)||!ja(e.selectionLines)&&(!Array.isArray(e.selectionLines)||!e.selectionLines.every(Wb)))return!1}return!0}class zUt extends Sa{constructor(){super({id:"editor.unfold",label:be(982,"Unfold"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument: + * 'levels': Number of levels to unfold. If not set, defaults to 1. + * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. + * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used. + `,constraint:XOe,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,s){const r=s&&s.levels||1,o=this.getLineNumbers(s,n);s&&s.direction==="up"?GOe(t,!1,r,o):$D(t,!1,r,o)}}class UUt extends Sa{constructor(){super({id:"editor.unfoldRecursively",label:be(983,"Unfold Recursively"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2142),weight:100}})}invoke(e,t,n,s){$D(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}}class $Ut extends Sa{constructor(){super({id:"editor.fold",label:be(984,"Fold"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument: + * 'levels': Number of levels to fold. + * 'direction': If 'up', folds given number of levels up otherwise folds down. + * 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used. + If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. + `,constraint:XOe,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,n,s){const r=this.getLineNumbers(s,n),o=s&&s.levels,a=s&&s.direction;typeof o!="number"&&typeof a!="string"?CUt(t,!0,r):a==="up"?GOe(t,!0,o||1,r):$D(t,!0,o||1,r)}}class qUt extends Sa{constructor(){super({id:"editor.toggleFold",label:be(985,"Toggle Fold"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2090),weight:100}})}invoke(e,t,n){const s=this.getSelectedLines(n);Ole(t,1,s)}}class KUt extends Sa{constructor(){super({id:"editor.foldRecursively",label:be(986,"Fold Recursively"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2140),weight:100}})}invoke(e,t,n){const s=this.getSelectedLines(n);$D(t,!0,Number.MAX_VALUE,s)}}class GUt extends Sa{constructor(){super({id:"editor.toggleFoldRecursively",label:be(987,"Toggle Fold Recursively"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,3114),weight:100}})}invoke(e,t,n){const s=this.getSelectedLines(n);Ole(t,Number.MAX_VALUE,s)}}class YUt extends Sa{constructor(){super({id:"editor.foldAllBlockComments",label:be(988,"Fold All Block Comments"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2138),weight:100}})}invoke(e,t,n,s,r){if(t.regions.hasTypes())Fle(t,lS.Comment.value,!0);else{const o=n.getModel();if(!o)return;const a=r.getLanguageConfiguration(o.getLanguageId()).comments;if(a&&a.blockCommentStartToken){const l=new RegExp("^\\s*"+Qc(a.blockCommentStartToken));jle(t,l,!0)}}}}class QUt extends Sa{constructor(){super({id:"editor.foldAllMarkerRegions",label:be(989,"Fold All Regions"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2077),weight:100}})}invoke(e,t,n,s,r){if(t.regions.hasTypes())Fle(t,lS.Region.value,!0);else{const o=n.getModel();if(!o)return;const a=r.getLanguageConfiguration(o.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);jle(t,l,!0)}}}}class XUt extends Sa{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:be(990,"Unfold All Regions"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2078),weight:100}})}invoke(e,t,n,s,r){if(t.regions.hasTypes())Fle(t,lS.Region.value,!1);else{const o=n.getModel();if(!o)return;const a=r.getLanguageConfiguration(o.getLanguageId()).foldingRules;if(a&&a.markers&&a.markers.start){const l=new RegExp(a.markers.start);jle(t,l,!1)}}}}class ZUt extends Sa{constructor(){super({id:"editor.foldAllExcept",label:be(991,"Fold All Except Selected"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2136),weight:100}})}invoke(e,t,n){const s=this.getSelectedLines(n);YOe(t,!0,s)}}class JUt extends Sa{constructor(){super({id:"editor.unfoldAllExcept",label:be(992,"Unfold All Except Selected"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2134),weight:100}})}invoke(e,t,n){const s=this.getSelectedLines(n);YOe(t,!1,s)}}class e$t extends Sa{constructor(){super({id:"editor.foldAll",label:be(993,"Fold All"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2069),weight:100}})}invoke(e,t,n){$D(t,!0)}}class t$t extends Sa{constructor(){super({id:"editor.unfoldAll",label:be(994,"Unfold All"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2088),weight:100}})}invoke(e,t,n){$D(t,!1)}}const ON=class ON extends Sa{getFoldingLevel(){return parseInt(this.id.substr(ON.ID_PREFIX.length))}invoke(e,t,n){SUt(t,this.getFoldingLevel(),!0,this.getSelectedLines(n))}};ON.ID_PREFIX="editor.foldLevel",ON.ID=e=>ON.ID_PREFIX+e;let E8=ON;class n$t extends Sa{constructor(){super({id:"editor.gotoParentFold",label:be(995,"Go to Parent Fold"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,weight:100}})}invoke(e,t,n){const s=this.getSelectedLines(n);if(s.length>0){const r=kUt(s[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class i$t extends Sa{constructor(){super({id:"editor.gotoPreviousFold",label:be(996,"Go to Previous Folding Range"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,weight:100}})}invoke(e,t,n){const s=this.getSelectedLines(n);if(s.length>0){const r=NUt(s[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class s$t extends Sa{constructor(){super({id:"editor.gotoNextFold",label:be(997,"Go to Next Folding Range"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,weight:100}})}invoke(e,t,n){const s=this.getSelectedLines(n);if(s.length>0){const r=EUt(s[0],t);r!==null&&n.setSelection({startLineNumber:r,startColumn:1,endLineNumber:r,endColumn:1})}}}class r$t extends Sa{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:be(998,"Create Folding Range from Selection"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2135),weight:100}})}invoke(e,t,n){var o;const s=[],r=n.getSelections();if(r){for(const a of r){let l=a.endLineNumber;a.endColumn===1&&--l,l>a.startLineNumber&&(s.push({startLineNumber:a.startLineNumber,endLineNumber:l,type:void 0,isCollapsed:!0,source:1}),n.setSelection({startLineNumber:a.startLineNumber,startColumn:1,endLineNumber:a.startLineNumber,endColumn:1}))}if(s.length>0){s.sort((l,c)=>l.startLineNumber-c.startLineNumber);const a=Rd.sanitizeAndMerge(t.regions,s,(o=n.getModel())==null?void 0:o.getLineCount());t.updatePost(Rd.fromFoldRanges(a))}}}}class o$t extends Sa{constructor(){super({id:"editor.removeManualFoldingRanges",label:be(999,"Remove Manual Folding Ranges"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2137),weight:100}})}invoke(e,t,n){const s=n.getSelections();if(s){const r=[];for(const o of s){const{startLineNumber:a,endLineNumber:l}=o;r.push(l>=a?{startLineNumber:a,endLineNumber:l}:{endLineNumber:l,startLineNumber:a})}t.removeManualRanges(r),e.triggerFoldingModelChanged()}}}class a$t extends Sa{constructor(){super({id:"editor.toggleImportFold",label:be(1e3,"Toggle Import Fold"),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,weight:100}})}async invoke(e,t){const n=[],s=t.regions;for(let r=s.length-1;r>=0;r--)s.getType(r)===lS.Imports.value&&n.push(s.toRegion(r));t.toggleCollapseState(n),e.triggerFoldingModelChanged()}}Pn(c0.ID,c0,0);Ke(zUt);Ke(UUt);Ke($Ut);Ke(KUt);Ke(GUt);Ke(e$t);Ke(t$t);Ke(YUt);Ke(QUt);Ke(XUt);Ke(ZUt);Ke(JUt);Ke(qUt);Ke(n$t);Ke(i$t);Ke(s$t);Ke(r$t);Ke(o$t);Ke(a$t);for(let i=1;i<=7;i++)nTt(new E8({id:E8.ID(i),label:be(1001,"Fold Level {0}",i),precondition:Jo,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2048|21+i),weight:100}}));Rn.registerCommand("_executeFoldingRangeProvider",async function(i,...e){const[t]=e;if(!(t instanceof kt))throw ju();const n=i.get(lt),s=i.get(Is).getModel(t);if(!s)throw ju();const r=i.get(Zt);if(!r.getValue("editor.folding",{resource:t}))return[];const o=i.get(As),a=r.getValue("editor.foldingStrategy",{resource:t}),l={get limit(){return r.getValue("editor.foldingMaximumRegions",{resource:t})},update:(f,m)=>{}},c=new Ble(s,o,l);let u=c;if(a!=="indentation"){const f=c0.getFoldingRangeProviders(n,s);f.length&&(u=new Hle(s,f,()=>{},l,c))}const h=await u.compute(pn.None),g=[];try{if(h)for(let f=0;fQs.replace(z.lift(o.range),o.text))):e.executeEdits("formatEditsCommand",r.map(o=>Qs.replaceMove(z.lift(o.range),o.text))),n&&e.pushUndoStop(),s.restoreRelativeVerticalPositionOfCursor(e)}}class jye{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class u$t{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(jye.toKey(e))}has(e){return this._set.has(jye.toKey(e))}}function ZOe(i,e,t){const n=[],s=new u$t,r=i.ordered(t);for(const a of r)n.push(a),a.extensionId&&s.add(a.extensionId);const o=e.ordered(t);for(const a of o){if(a.extensionId){if(s.has(a.extensionId))continue;s.add(a.extensionId)}n.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,c,u){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),c,u)}})}return n}const S2=class S2{static setFormatterSelector(e){return{dispose:S2._selectors.unshift(e)}}static async select(e,t,n,s){if(e.length===0)return;const r=En.first(S2._selectors);if(r)return await r(e,t,n,s)}};S2._selectors=new ll;let pM=S2;async function JOe(i,e,t,n,s,r,o){const a=i.get(ft),{documentRangeFormattingEditProvider:l}=i.get(lt),c=Yg(e)?e.getModel():e,u=l.ordered(c),h=await pM.select(u,c,n,2);h&&(s.report(h),await a.invokeFunction(h$t,h,e,t,r,o))}async function h$t(i,e,t,n,s,r){var _,w;const o=i.get(Nc),a=i.get(Ji),l=i.get(hx);let c,u;Yg(t)?(c=t.getModel(),u=new ex(t,5,void 0,s)):(c=t,u=new qae(t,s));const h=[];let g=0;for(const k of Zre(n).sort(z.compareRangesUsingStarts))g>0&&z.areIntersectingOrTouching(h[g-1],k)?h[g-1]=z.fromPositions(h[g-1].getStartPosition(),k.getEndPosition()):g=h.push(k);const f=async k=>{var E,D;a.trace("[format][provideDocumentRangeFormattingEdits] (request)",(E=e.extensionId)==null?void 0:E.value,k);const C=await e.provideDocumentRangeFormattingEdits(c,k,c.getFormattingOptions(),u.token)||[];return a.trace("[format][provideDocumentRangeFormattingEdits] (response)",(D=e.extensionId)==null?void 0:D.value,C),C},m=(k,C)=>{if(!k.length||!C.length)return!1;const E=k.reduce((D,T)=>z.plusRange(D,T.range),k[0].range);if(!C.some(D=>z.intersectRanges(E,D.range)))return!1;for(const D of k)for(const T of C)if(z.intersectRanges(D.range,T.range))return!0;return!1},x=[],v=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){a.trace("[format][provideDocumentRangeFormattingEdits] (request)",(_=e.extensionId)==null?void 0:_.value,h);const k=await e.provideDocumentRangesFormattingEdits(c,h,c.getFormattingOptions(),u.token)||[];a.trace("[format][provideDocumentRangeFormattingEdits] (response)",(w=e.extensionId)==null?void 0:w.value,k),v.push(k)}else{for(const k of h){if(u.token.isCancellationRequested)return!0;v.push(await f(k))}for(let k=0;k({text:E.text,range:z.lift(E.range),forceMoveMarkers:!0})),E=>{for(const{range:D}of E)if(z.areIntersectingOrTouching(D,C))return[new st(D.startLineNumber,D.startColumn,D.endLineNumber,D.endColumn)];return null})}return l.playSignal(Rl.format,{userGesture:r}),!0}async function g$t(i,e,t,n,s,r){const o=i.get(ft),a=i.get(lt),l=Yg(e)?e.getModel():e,c=ZOe(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),u=await pM.select(c,l,t,1);u&&(n.report(u),await o.invokeFunction(f$t,u,e,t,s,r))}async function f$t(i,e,t,n,s,r){const o=i.get(Nc),a=i.get(hx);let l,c;Yg(t)?(l=t.getModel(),c=new ex(t,5,void 0,s)):(l=t,c=new qae(t,s));let u;try{const h=await e.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(u=await o.computeMoreMinimalEdits(l.uri,h),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!u||u.length===0)return!1;if(Yg(t))UL.execute(t,u,n!==2),n!==2&&t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:h}]=u,g=new st(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn);l.pushEditOperations([g],u.map(f=>({text:f.text,range:z.lift(f.range),forceMoveMarkers:!0})),f=>{for(const{range:m}of f)if(z.areIntersectingOrTouching(m,g))return[new st(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn)];return null})}return a.playSignal(Rl.format,{userGesture:r}),!0}async function p$t(i,e,t,n,s,r){const o=e.documentRangeFormattingEditProvider.ordered(t);for(const a of o){const l=await Promise.resolve(a.provideDocumentRangeFormattingEdits(t,n,s,r)).catch(Pr);if(ul(l))return await i.computeMoreMinimalEdits(t.uri,l)}}async function m$t(i,e,t,n,s){const r=ZOe(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const o of r){const a=await Promise.resolve(o.provideDocumentFormattingEdits(t,n,s)).catch(Pr);if(ul(a))return await i.computeMoreMinimalEdits(t.uri,a)}}function e5e(i,e,t,n,s,r,o){const a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(s)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,n,s,r,o)).catch(Pr).then(l=>i.computeMoreMinimalEdits(t.uri,l))}Rn.registerCommand("_executeFormatRangeProvider",async function(i,...e){const[t,n,s]=e;Bn(kt.isUri(t)),Bn(z.isIRange(n));const r=i.get(bl),o=i.get(Nc),a=i.get(lt),l=await r.createModelReference(t);try{return p$t(o,a,l.object.textEditorModel,z.lift(n),s,pn.None)}finally{l.dispose()}});Rn.registerCommand("_executeFormatDocumentProvider",async function(i,...e){const[t,n]=e;Bn(kt.isUri(t));const s=i.get(bl),r=i.get(Nc),o=i.get(lt),a=await s.createModelReference(t);try{return m$t(r,o,a.object.textEditorModel,n,pn.None)}finally{a.dispose()}});Rn.registerCommand("_executeFormatOnTypeProvider",async function(i,...e){const[t,n,s,r]=e;Bn(kt.isUri(t)),Bn(te.isIPosition(n)),Bn(typeof s=="string");const o=i.get(bl),a=i.get(Nc),l=i.get(lt),c=await o.createModelReference(t);try{return e5e(a,l,c.object.textEditorModel,te.lift(n),s,r,pn.None)}finally{c.dispose()}});var t5e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},KA=function(i,e){return function(t,n){e(t,n,i)}},$E;let L8=($E=class{constructor(e,t,n,s){this._editor=e,this._languageFeaturesService=t,this._workerService=n,this._accessibilitySignalService=s,this._disposables=new _e,this._sessionDisposables=new _e,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(r=>{r.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(65)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const n=new FF;for(const s of t.autoFormatTriggerCharacters)n.add(s.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(s=>{const r=s.charCodeAt(s.length-1);n.has(r)&&this._trigger(String.fromCharCode(r))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),n=this._editor.getPosition(),s=new vs,r=this._editor.onDidChangeModelContent(o=>{if(o.isFlush){s.cancel(),r.dispose();return}for(let a=0,l=o.changes.length;a{s.token.isCancellationRequested||ul(o)&&(this._accessibilitySignalService.playSignal(Rl.format,{userGesture:!1}),UL.execute(this._editor,o,!0))}).finally(()=>{r.dispose()})}},$E.ID="editor.contrib.autoFormat",$E);L8=t5e([KA(1,lt),KA(2,Nc),KA(3,hx)],L8);var qE;let D8=(qE=class{constructor(e,t,n){this.editor=e,this._languageFeaturesService=t,this._instantiationService=n,this._callOnDispose=new _e,this._callOnModel=new _e,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(64)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:e})=>this._trigger(e)))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(JOe,this.editor,e,2,Ag.None,pn.None,!1).catch(zt))}},qE.ID="editor.contrib.formatOnPaste",qE);D8=t5e([KA(1,lt),KA(2,ft)],D8);class b$t extends rt{constructor(){super({id:"editor.action.formatDocument",label:be(1014,"Format Document"),precondition:Ne.and(J.notInCompositeEditor,J.writable,J.hasDocumentFormattingProvider),kbOpts:{kbExpr:J.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const n=e.get(ft);await e.get(Jb).showWhile(n.invokeFunction(g$t,t,1,Ag.None,pn.None,!0),250)}}}class x$t extends rt{constructor(){super({id:"editor.action.formatSelection",label:be(1015,"Format Selection"),precondition:Ne.and(J.writable,J.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2084),weight:100},contextMenuOpts:{when:J.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const n=e.get(ft),s=t.getModel(),r=t.getSelections().map(a=>a.isEmpty()?new z(a.startLineNumber,1,a.startLineNumber,s.getLineMaxColumn(a.startLineNumber)):a);await e.get(Jb).showWhile(n.invokeFunction(JOe,t,r,1,Ag.None,pn.None,!0),250)}}Pn(L8.ID,L8,2);Pn(D8.ID,D8,2);Ke(b$t);Ke(x$t);Rn.registerCommand("editor.action.format",async i=>{const e=i.get(Hn).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=i.get(es);e.getSelection().isEmpty()?await t.executeCommand("editor.action.formatDocument"):await t.executeCommand("editor.action.formatSelection")});var v$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},iK=function(i,e){return function(t,n){e(t,n,i)}};class pN{remove(){var e;(e=this.parent)==null||e.children.delete(this.id)}static findId(e,t){let n;typeof e=="string"?n=`${t.id}/${e}`:(n=`${t.id}/${e.name}`,t.children.get(n)!==void 0&&(n=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let s=n;for(let r=0;t.children.get(s)!==void 0;r++)s=`${n}_${r}`;return s}static empty(e){return e.children.size===0}}class LJ extends pN{constructor(e,t,n){super(),this.id=e,this.parent=t,this.symbol=n,this.children=new Map}}class n5e extends pN{constructor(e,t,n,s){super(),this.id=e,this.parent=t,this.label=n,this.order=s,this.children=new Map}}class Ym extends pN{static create(e,t,n){const s=new vs(n),r=new Ym(t.uri),o=e.ordered(t),a=o.map((c,u)=>{const h=pN.findId(`provider_${u}`,r),g=new n5e(h,r,c.displayName??"Unknown Outline Provider",u);return Promise.resolve(c.provideDocumentSymbols(t,s.token)).then(f=>{for(const m of f||[])Ym._makeOutlineElement(m,g);return g},f=>(Pr(f),g)).then(f=>{pN.empty(f)?f.remove():r._groups.set(h,f)})}),l=e.onDidChange(()=>{const c=e.ordered(t);bs(c,o)||s.cancel()});return Promise.all(a).then(()=>s.token.isCancellationRequested&&!n.isCancellationRequested?Ym.create(e,t,n):r._compact()).finally(()=>{s.dispose(),l.dispose(),s.dispose()})}static _makeOutlineElement(e,t){const n=pN.findId(e,t),s=new LJ(n,t,e);if(e.children)for(const r of e.children)Ym._makeOutlineElement(r,s);t.children.set(s.id,s)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,n]of this._groups)n.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{const t=En.first(this._groups.values());for(const[,n]of t.children)n.parent=this,this.children.set(n.id,n)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof LJ?e.push(t.symbol):e.push(...En.map(t.children.values(),n=>n.symbol));return e.sort((t,n)=>z.compareRangesUsingStarts(t.range,n.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return Ym._flattenDocumentSymbols(t,e,""),t.sort((n,s)=>te.compare(z.getStartPosition(n.range),z.getStartPosition(s.range))||te.compare(z.getEndPosition(s.range),z.getEndPosition(n.range)))}static _flattenDocumentSymbols(e,t,n){for(const s of t)e.push({kind:s.kind,tags:s.tags,name:s.name,detail:s.detail,containerName:s.containerName||n,range:s.range,selectionRange:s.selectionRange,children:void 0}),s.children&&Ym._flattenDocumentSymbols(e,s.children,s.name)}}const bO=ln("IOutlineModelService");let DJ=class{constructor(e,t,n){this._languageFeaturesService=e,this._disposables=new _e,this._cache=new Yh(15,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(n.onModelRemoved(s=>{this._cache.delete(s.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const n=this._languageFeaturesService.documentSymbolProvider,s=n.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!bs(r.provider,s)){const a=new vs;r={versionId:e.getVersionId(),provider:s,promiseCnt:0,source:a,promise:Ym.create(n,e,a.token),model:void 0},this._cache.set(e.id,r);const l=Date.now();r.promise.then(c=>{r.model=c,this._debounceInformation.update(e,Date.now()-l)}).catch(c=>{this._cache.delete(e.id)})}if(r.model)return r.model;r.promiseCnt+=1;const o=t.onCancellationRequested(()=>{--r.promiseCnt===0&&(r.source.cancel(),this._cache.delete(e.id))});try{return await r.promise}finally{o.dispose()}}};DJ=v$t([iK(0,lt),iK(1,Ju),iK(2,Is)],DJ);wn(bO,DJ,1);Rn.registerCommand("_executeDocumentSymbolProvider",async function(i,...e){const[t]=e;Bn(kt.isUri(t));const n=i.get(bO),r=await i.get(bl).createModelReference(t);try{return(await n.getOrCreate(r.object.textEditorModel,pn.None)).getTopLevelSymbols()}finally{r.dispose()}});const jW=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const t=this._implementations.indexOf(e);t!==-1&&this._implementations.splice(t,1)}}}getImplementations(){return this._implementations}};var _$t=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},y$t=function(i,e){return function(t,n){e(t,n,i)}};function w$t(i){return i instanceof i5e?i._instance:i}let i5e=class{constructor(e){this.instantiationService=e}init(...e){}};function C$t(i){return i.get()}let Fye=class extends i5e{constructor(e,t){super(t),this.init(e)}};Fye=_$t([y$t(1,ft)],Fye);class xO{validateOrThrow(e){const t=this.validate(e);if(t.error)throw new Error(t.error.message);return t.content}}class FW extends xO{constructor(e){super(),this.type=e}validate(e){return typeof e!==this.type?{content:void 0,error:{message:`Expected ${this.type}, but got ${typeof e}`}}:{content:e,error:void 0}}getJSONSchema(){return{type:this.type}}}const S$t=new FW("string");function k$t(){return S$t}new FW("number");const N$t=new FW("boolean");function Bye(){return N$t}new FW("object");class s5e extends xO{validate(e){return e!==void 0?{content:void 0,error:{message:`Expected undefined, but got ${typeof e}`}}:{content:void 0,error:void 0}}getJSONSchema(){return{}}}function E$t(){return new s5e}class TJ{constructor(e){this.validator=e}}function sK(i){return new TJ(i)}class L$t extends xO{constructor(e){super(),this.properties=e}validate(e){if(typeof e!="object"||e===null)return{content:void 0,error:{message:"Expected object"}};const t={};for(const n in this.properties){const s=this.properties[n],r=e[n],o=s instanceof TJ,a=o?s.validator:s;if(o&&r===void 0)continue;const{content:l,error:c}=a.validate(r);if(c)return{content:void 0,error:{message:`Error in property '${n}': ${c.message}`}};t[n]=l}return{content:t,error:void 0}}getJSONSchema(){const e=[],t={};for(const[s,r]of Object.entries(this.properties)){const o=r instanceof TJ,a=o?r.validator:r;t[s]=a.getJSONSchema(),o||e.push(s)}return{type:"object",properties:t,...e.length>0?{required:e}:{}}}}function D$t(i){return new L$t(i)}class T$t extends xO{constructor(e){super(),this.validators=e}validate(e){let t;for(const n of this.validators){const{content:s,error:r}=n.validate(e);if(!r)return{content:s,error:void 0};t=r}return{content:void 0,error:t}}getJSONSchema(){return{oneOf:yLt(this.validators,e=>{if(!(e instanceof s5e))return e.getJSONSchema()})}}}function I$t(...i){return new T$t(i)}class A$t extends xO{constructor(e,t){super(),this._ref=e,this._validator=t}validate(e){return this._validator.validate(e)}getJSONSchema(){return{$ref:this._ref}}}function R$t(i,e){return new A$t(i,e)}const dn={Visible:ole,HasFocusedSuggestion:new Ze("suggestWidgetHasFocusedSuggestion",!1,S(1455,"Whether any suggestion is focused")),DetailsVisible:new Ze("suggestWidgetDetailsVisible",!1,S(1456,"Whether suggestion details are visible")),MultipleSuggestions:new Ze("suggestWidgetMultipleSuggestions",!1,S(1457,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new Ze("suggestionMakesTextEdit",!0,S(1458,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Ze("acceptSuggestionOnEnter",!0,S(1459,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Ze("suggestionHasInsertAndReplaceRange",!1,S(1460,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new Ze("suggestionInsertMode",void 0,{type:"string",description:S(1461,"Whether the default behaviour is to insert or replace")}),CanResolve:new Ze("suggestionCanResolve",!1,S(1462,"Whether the current suggestion supports to resolve further details"))},C_=new ct("suggestWidgetStatusBar");class M$t{constructor(e,t,n,s){var r;this.position=e,this.completion=t,this.container=n,this.provider=s,this.isInvalid=!1,this.score=jh.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(r=t.label)==null?void 0:r.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,z.isIRange(t.range)?(this.editStart=new te(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new te(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new te(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||z.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new te(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new te(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new te(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||z.spansMultipleLines(t.range.insert)||z.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof s.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),n=new _o(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(s=>{Object.assign(this.completion,s),this._resolveDuration=n.elapsed()},s=>{Zd(s)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{t.dispose()})}return this._resolveCache}}const L9=class L9{constructor(e=2,t=new Set,n=new Set,s=new Map,r=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=n,this.providerItemsToReuse=s,this.showDeprecated=r}};L9.default=new L9;let mM=L9;class P$t{constructor(e,t,n,s){this.items=e,this.needsClipboard=t,this.durations=n,this.disposable=s}}async function Wle(i,e,t,n=mM.default,s={triggerKind:0},r=pn.None){const o=new _o;t=t.clone();const a=e.getWordAtPosition(t),l=a?new z(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):z.fromPositions(t),c={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},u=[],h=new _e,g=[];let f=!1;const m=(v,_,w)=>{var C;let k=!1;if(!_)return k;for(const E of _.suggestions)if(!n.kindFilter.has(E.kind)){if(!n.showDeprecated&&((C=E==null?void 0:E.tags)!=null&&C.includes(1)))continue;E.range||(E.range=c),E.sortText||(E.sortText=typeof E.label=="string"?E.label:E.label.label),!f&&E.insertTextRules&&E.insertTextRules&4&&(f=DC.guessNeedsClipboard(E.insertText)),u.push(new M$t(t,E,_,v)),k=!0}return JC(_)&&h.add(_),g.push({providerName:v._debugDisplayName??"unknown_provider",elapsedProvider:_.duration??-1,elapsedOverall:w.elapsed()}),k},x=(async()=>{})();for(const v of i.orderedGroups(e)){let _=!1;if(await Promise.all(v.map(async w=>{if(n.providerItemsToReuse.has(w)){const k=n.providerItemsToReuse.get(w);k.forEach(C=>u.push(C)),_=_||k.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(w)))try{const k=new _o,C=await w.provideCompletionItems(e,t,s,r);_=m(w,C,k)||_}catch(k){Pr(k)}})),_||r.isCancellationRequested)break}return await x,r.isCancellationRequested?(h.dispose(),Promise.reject(new Vu)):new P$t(u.sort(F$t(n.snippetSortOrder)),f,{entries:g,elapsed:o.elapsed()},h)}function Vle(i,e){if(i.sortTextLow&&e.sortTextLow){if(i.sortTextLowe.sortTextLow)return 1}return i.textLabele.textLabel?1:i.completion.kind-e.completion.kind}function O$t(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===28)return-1;if(e.completion.kind===28)return 1}return Vle(i,e)}function j$t(i,e){if(i.completion.kind!==e.completion.kind){if(i.completion.kind===28)return 1;if(e.completion.kind===28)return-1}return Vle(i,e)}const BW=new Map;BW.set(0,O$t);BW.set(2,j$t);BW.set(1,Vle);function F$t(i){return BW.get(i)}Rn.registerCommand("_executeCompletionItemProvider",async(i,...e)=>{const[t,n,s,r]=e;Bn(kt.isUri(t)),Bn(te.isIPosition(n)),Bn(typeof s=="string"||!s),Bn(typeof r=="number"||!r);const{completionProvider:o}=i.get(lt),a=await i.get(bl).createModelReference(t);try{const l={incomplete:!1,suggestions:[]},c=[],u=a.object.textEditorModel.validatePosition(n),h=await Wle(o,a.object.textEditorModel,u,void 0,{triggerCharacter:s??void 0,triggerKind:s?1:0});for(const g of h.items)c.length<(r??0)&&c.push(g.resolve(pn.None)),l.incomplete=l.incomplete||g.container.incomplete,l.suggestions.push(g.completion);try{return await Promise.all(c),l}finally{setTimeout(()=>h.disposable.dispose(),100)}}finally{a.dispose()}});function B$t(i,e){var t;(t=i.getContribution("editor.contrib.suggestController"))==null||t.triggerSuggest(new Set().add(e),void 0,!0)}class mN{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}const yd=class yd{};yd.inlineSuggestionVisible=new Ze("inlineSuggestionVisible",!1,S(1192,"Whether an inline suggestion is visible")),yd.inlineSuggestionHasIndentation=new Ze("inlineSuggestionHasIndentation",!1,S(1193,"Whether the inline suggestion starts with whitespace")),yd.inlineSuggestionHasIndentationLessThanTabSize=new Ze("inlineSuggestionHasIndentationLessThanTabSize",!0,S(1194,"Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),yd.suppressSuggestions=new Ze("inlineSuggestionSuppressSuggestions",void 0,S(1195,"Whether suggestions should be suppressed for the current suggestion")),yd.cursorBeforeGhostText=new Ze("cursorBeforeGhostText",!1,S(1196,"Whether the cursor is at ghost text")),yd.cursorInIndentation=new Ze("cursorInIndentation",!1,S(1197,"Whether the cursor is in indentation")),yd.hasSelection=new Ze("editor.hasSelection",!1,S(1198,"Whether the editor has a selection")),yd.cursorAtInlineEdit=new Ze("cursorAtInlineEdit",!1,S(1199,"Whether the cursor is at an inline edit")),yd.inlineEditVisible=new Ze("inlineEditIsVisible",!1,S(1200,"Whether an inline edit is visible")),yd.tabShouldJumpToInlineEdit=new Ze("tabShouldJumpToInlineEdit",!1,S(1201,"Whether tab should jump to an inline edit.")),yd.tabShouldAcceptInlineEdit=new Ze("tabShouldAcceptInlineEdit",!1,S(1202,"Whether tab should accept the inline edit.")),yd.inInlineEditsPreviewEditor=new Ze("inInlineEditsPreviewEditor",!0,S(1203,"Whether the current code editor is showing an inline edits preview"));let Si=yd;class H$t{constructor(e,t,n){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=n}getEditOperations(e,t){const n=W$t(e,this._cursors,this._trimInRegexesAndStrings);for(let s=0,r=n.length;sa.lineNumber===l.lineNumber?a.column-l.column:a.lineNumber-l.lineNumber);for(let a=e.length-2;a>=0;a--)e[a].lineNumber===e[a+1].lineNumber&&e.splice(a,1);const n=[];let s=0,r=0;const o=e.length;for(let a=1,l=i.getLineCount();a<=l;a++){const c=i.getLineContent(a),u=c.length+1;let h=0;if(r=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},z$t=function(i,e){return function(t,n){e(t,n,i)}};let IJ=class{constructor(e,t,n,s){this._languageConfigurationService=s,this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){const n=()=>e.getLanguageId(),s=(h,g)=>e.getLanguageIdAtPosition(h,g),r=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let o=this._selection;o.startLineNumberw===o.startLineNumber?e.tokenization.getLineTokens(h):e.tokenization.getLineTokens(w),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:w=>w===o.startLineNumber?e.getLineContent(h):e.getLineContent(w)},_=CA(this._autoIndent,v,e.getLanguageIdAtPosition(h,1),o.startLineNumber,u,this._languageConfigurationService);if(_!==null){const w=Mi(e.getLineContent(h)),k=Mc(_,a),C=Mc(w,a);k!==C&&(f=GA(k,a,c)+this.trimStart(g))}}t.addEditOperation(new z(o.startLineNumber,1,o.startLineNumber,1),f+` +`);const x=this.matchEnterRuleMovingDown(e,u,a,o.startLineNumber,h,f);if(x!==null)x!==0&&this.getIndentEditsOfMovingBlock(e,t,o,a,c,x);else{const v={tokenization:{getLineTokens:w=>w===o.startLineNumber?e.tokenization.getLineTokens(h):w>=o.startLineNumber+1&&w<=o.endLineNumber+1?e.tokenization.getLineTokens(w-1):e.tokenization.getLineTokens(w),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:w=>w===o.startLineNumber?f:w>=o.startLineNumber+1&&w<=o.endLineNumber+1?e.getLineContent(w-1):e.getLineContent(w)},_=CA(this._autoIndent,v,e.getLanguageIdAtPosition(h,1),o.startLineNumber+1,u,this._languageConfigurationService);if(_!==null){const w=Mi(e.getLineContent(o.startLineNumber)),k=Mc(_,a),C=Mc(w,a);if(k!==C){const E=k-C;this.getIndentEditsOfMovingBlock(e,t,o,a,c,E)}}}}else t.addEditOperation(new z(o.startLineNumber,1,o.startLineNumber,1),f+` +`)}else if(h=o.startLineNumber-1,g=e.getLineContent(h),t.addEditOperation(new z(h,1,h+1,1),null),t.addEditOperation(new z(o.endLineNumber,e.getLineMaxColumn(o.endLineNumber),o.endLineNumber,e.getLineMaxColumn(o.endLineNumber)),` +`+g),this.shouldAutoIndent(e,o)){const f={tokenization:{getLineTokens:x=>x===h?e.tokenization.getLineTokens(o.startLineNumber):e.tokenization.getLineTokens(x),getLanguageId:n,getLanguageIdAtPosition:s},getLineContent:x=>x===h?e.getLineContent(o.startLineNumber):e.getLineContent(x)},m=this.matchEnterRule(e,u,a,o.startLineNumber,o.startLineNumber-2);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(e,t,o,a,c,m);else{const x=CA(this._autoIndent,f,e.getLanguageIdAtPosition(o.startLineNumber,1),h,u,this._languageConfigurationService);if(x!==null){const v=Mi(e.getLineContent(o.startLineNumber)),_=Mc(x,a),w=Mc(v,a);if(_!==w){const k=_-w;this.getIndentEditsOfMovingBlock(e,t,o,a,c,k)}}}}}this._selectionId=t.trackSelection(o)}buildIndentConverter(e,t,n){return{shiftIndent:s=>Gu.shiftIndent(s,s.length+1,e,t,n),unshiftIndent:s=>Gu.unshiftIndent(s,s.length+1,e,t,n)}}parseEnterResult(e,t,n,s,r){if(r){let o=r.indentation;r.indentAction===Wr.None||r.indentAction===Wr.Indent?o=r.indentation+r.appendText:r.indentAction===Wr.IndentOutdent?o=r.indentation:r.indentAction===Wr.Outdent&&(o=t.unshiftIndent(r.indentation)+r.appendText);const a=e.getLineContent(s);if(this.trimStart(a).indexOf(this.trimStart(o))>=0){const l=Mi(e.getLineContent(s));let c=Mi(o);const u=_Ae(e,s,this._languageConfigurationService);u!==null&&u&2&&(c=t.unshiftIndent(c));const h=Mc(c,n),g=Mc(l,n);return h-g}}return null}matchEnterRuleMovingDown(e,t,n,s,r,o){if(Oh(o)>=0){const a=e.getLineMaxColumn(r),l=GN(this._autoIndent,e,new z(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,n,s,l)}else{let a=s-1;for(;a>=1;){const u=e.getLineContent(a);if(Oh(u)>=0)break;a--}if(a<1||s>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=GN(this._autoIndent,e,new z(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,s,c)}}matchEnterRule(e,t,n,s,r,o){let a=r;for(;a>=1;){let u;if(a===r&&o!==void 0?u=o:u=e.getLineContent(a),Oh(u)>=0)break;a--}if(a<1||s>e.getLineCount())return null;const l=e.getLineMaxColumn(a),c=GN(this._autoIndent,e,new z(a,l,a,l),this._languageConfigurationService);return this.parseEnterResult(e,t,n,s,c)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const n=e.getLanguageIdAtPosition(t.startLineNumber,1),s=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(n!==s||this._languageConfigurationService.getLanguageConfiguration(n).indentRulesSupport===null)}getIndentEditsOfMovingBlock(e,t,n,s,r,o){for(let a=n.startLineNumber;a<=n.endLineNumber;a++){const l=e.getLineContent(a),c=Mi(l),h=Mc(c,s)+o,g=GA(h,s,r);g!==c&&(t.addEditOperation(new z(a,1,a,c.length+1),g),a===n.endLineNumber&&n.endColumn<=c.length+1&&g===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=s)return null;const r=[];for(let a=n;a<=s;a++)r.push(i.getLineContent(a));let o=r.slice(0);return o.sort(bM._COLLATOR.value.compare),t===!0&&(o=o.reverse()),{startLineNumber:n,endLineNumber:s,before:r,after:o}}function U$t(i,e,t){const n=o5e(i,e,t);return n?Qs.replace(new z(n.startLineNumber,1,n.endLineNumber,i.getLineMaxColumn(n.endLineNumber)),n.after.join(` +`)):null}class a5e extends rt{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const n=t.getSelections().map((o,a)=>({selection:o,index:a,ignore:!1}));n.sort((o,a)=>z.compareRangesUsingStarts(o.selection,a.selection));let s=n[0];for(let o=1;o=g.startLineNumber;_--)f.push(n.getLineContent(_));const m=Qs.replace(g,f.join(` +`));o.push(m);const x=function(_){return _<=g.endLineNumber?g.endLineNumber-_+g.startLineNumber:_},v=function(_){if(_.isEmpty())return new st(x(_.positionLineNumber),_.positionColumn,x(_.positionLineNumber),_.positionColumn);{const w=x(_.selectionStartLineNumber),k=x(_.positionLineNumber),C=_.selectionStartColumn,E=_.positionColumn;return new st(w,C,k,E)}};a.push(v(u))}t.pushUndoStop(),t.executeEdits(this.id,o,a),t.pushUndoStop()}}const D9=class D9 extends rt{constructor(){super({id:D9.ID,label:be(1258,"Trim Trailing Whitespace"),precondition:J.writable,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2102),weight:100}})}run(e,t,n){let s=[];n.reason==="auto-save"&&(s=(t.getSelections()||[]).map(u=>new te(u.positionLineNumber,u.positionColumn)));const r=t.getSelection();if(r===null)return;const o=e.get(Zt),a=t.getModel(),l=o.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:a==null?void 0:a.getLanguageId(),resource:a==null?void 0:a.uri}),c=new H$t(r,s,l);t.pushUndoStop(),t.executeCommands(this.id,[c]),t.pushUndoStop()}};D9.ID="editor.action.trimTrailingWhitespace";let AJ=D9;class eqt extends rt{constructor(){super({id:"editor.action.deleteLines",label:be(1259,"Delete Line"),precondition:J.writable,kbOpts:{kbExpr:J.textInputFocus,primary:3113,weight:100},canTriggerInlineEdits:!0})}run(e,t){if(!t.hasModel())return;const n=this._getLinesToRemove(t),s=t.getModel();if(s.getLineCount()===1&&s.getLineMaxColumn(1)===1)return;let r=0;const o=[],a=[];for(let l=0,c=n.length;l1&&(h-=1,f=s.getLineMaxColumn(h)),o.push(Qs.replace(new st(h,f,g,m),"")),a.push(new st(h-r,u.positionColumn,h-r,u.positionColumn)),r+=u.endLineNumber-u.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,a),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map(r=>{let o=r.endLineNumber;return r.startLineNumberr.startLineNumber===o.startLineNumber?r.endLineNumber-o.endLineNumber:r.startLineNumber-o.startLineNumber);const n=[];let s=t[0];for(let r=1;r=t[r].startLineNumber?s.endLineNumber=t[r].endLineNumber:(n.push(s),s=t[r]);return n.push(s),n}}class tqt extends rt{constructor(){super({id:"editor.action.indentLines",label:be(1260,"Indent Line"),precondition:J.writable,kbOpts:{kbExpr:J.editorTextFocus,primary:2142,weight:100},canTriggerInlineEdits:!0})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Cv.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class nqt extends rt{constructor(){super({id:"editor.action.outdentLines",label:be(1261,"Outdent Line"),precondition:J.writable,kbOpts:{kbExpr:J.editorTextFocus,primary:2140,weight:100},canTriggerInlineEdits:!0})}run(e,t){YN.Outdent.runEditorCommand(e,t,null)}}const T9=class T9 extends rt{constructor(){super({id:T9.ID,label:be(1262,"Insert Line Above"),precondition:J.writable,kbOpts:{kbExpr:J.editorTextFocus,primary:3075,weight:100},canTriggerInlineEdits:!0})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,z7.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}};T9.ID="editor.action.insertLineBefore";let T8=T9;const I9=class I9 extends rt{constructor(){super({id:I9.ID,label:be(1263,"Insert Line Below"),precondition:J.writable,kbOpts:{kbExpr:J.editorTextFocus,primary:2051,weight:100},canTriggerInlineEdits:!0})}run(e,t){const n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,z7.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}};I9.ID="editor.action.insertLineAfter";let I8=I9;class d5e extends rt{run(e,t){if(!t.hasModel())return;const n=t.getSelection(),s=this._getRangesToDelete(t),r=[];for(let l=0,c=s.length-1;lQs.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,o),t.pushUndoStop()}}class iqt extends d5e{constructor(){super({id:"deleteAllLeft",label:be(1264,"Delete All Left"),precondition:J.writable,kbOpts:{kbExpr:J.textInputFocus,primary:0,mac:{primary:2049},weight:100},canTriggerInlineEdits:!0})}_getEndCursorState(e,t){let n=null;const s=[];let r=0;return t.forEach(o=>{let a;if(o.endColumn===1&&r>0){const l=o.startLineNumber-r;a=new st(l,o.startColumn,l,o.startColumn)}else a=new st(o.startLineNumber,o.startColumn,o.startLineNumber,o.startColumn);r+=o.endLineNumber-o.startLineNumber,o.intersectRanges(e)?n=a:s.push(a)}),n&&s.unshift(n),s}_getRangesToDelete(e){const t=e.getSelections();if(t===null)return[];let n=t;const s=e.getModel();return s===null?[]:(n.sort(z.compareRangesUsingStarts),n=n.map(r=>{if(r.isEmpty())if(r.startColumn===1){const o=Math.max(1,r.startLineNumber-1),a=r.startLineNumber===1?1:s.getLineLength(o)+1;return new z(o,a,r.startLineNumber,1)}else return new z(r.startLineNumber,1,r.startLineNumber,r.startColumn);else return new z(r.startLineNumber,1,r.endLineNumber,r.endColumn)}),n)}}class sqt extends d5e{constructor(){super({id:"deleteAllRight",label:be(1265,"Delete All Right"),precondition:J.writable,kbOpts:{kbExpr:J.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100},canTriggerInlineEdits:!0})}_getEndCursorState(e,t){let n=null;const s=[];for(let r=0,o=t.length,a=0;r{if(r.isEmpty()){const o=t.getLineMaxColumn(r.startLineNumber);return r.startColumn===o?new z(r.startLineNumber,r.startColumn,r.startLineNumber+1,1):new z(r.startLineNumber,r.startColumn,r.startLineNumber,o)}return r});return s.sort(z.compareRangesUsingStarts),s}}class rqt extends rt{constructor(){super({id:"editor.action.joinLines",label:be(1266,"Join Lines"),precondition:J.writable,kbOpts:{kbExpr:J.editorTextFocus,primary:0,mac:{primary:296},weight:100},canTriggerInlineEdits:!0})}run(e,t){const n=t.getSelections();if(n===null)return;let s=t.getSelection();if(s===null)return;n.sort(z.compareRangesUsingStarts);const r=[],o=n.reduce((g,f)=>g.isEmpty()?g.endLineNumber===f.startLineNumber?(s.equalsSelection(g)&&(s=f),f):f.startLineNumber>g.endLineNumber+1?(r.push(g),f):new st(g.startLineNumber,g.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>g.endLineNumber?(r.push(g),f):new st(g.startLineNumber,g.startColumn,f.endLineNumber,f.endColumn));r.push(o);const a=t.getModel();if(a===null)return;const l=[],c=[];let u=s,h=0;for(let g=0,f=r.length;g=1){let P=!0;E===""&&(P=!1),P&&(E.charAt(E.length-1)===" "||E.charAt(E.length-1)===" ")&&(P=!1,E=E.replace(/[\s\uFEFF\xA0]+$/g," "));const j=I.substr(R-1);E+=(P?" ":"")+j,P?_=j.length+1:_=j.length}else _=0}const D=new z(x,v,w,k);if(!D.isEmpty()){let T;m.isEmpty()?(l.push(Qs.replace(D,E)),T=new st(D.startLineNumber-h,E.length-_+1,x-h,E.length-_+1)):m.startLineNumber===m.endLineNumber?(l.push(Qs.replace(D,E)),T=new st(m.startLineNumber-h,m.startColumn,m.endLineNumber-h,m.endColumn)):(l.push(Qs.replace(D,E)),T=new st(m.startLineNumber-h,m.startColumn,m.startLineNumber-h,E.length-C)),z.intersectRanges(D,s)!==null?u=T:c.push(T)}h+=D.endLineNumber-D.startLineNumber}c.unshift(u),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}}class oqt extends rt{constructor(){super({id:"editor.action.transpose",label:be(1267,"Transpose Characters around the Cursor"),precondition:J.writable,canTriggerInlineEdits:!0})}run(e,t){const n=t.getSelections();if(n===null)return;const s=t.getModel();if(s===null)return;const r=[];for(let o=0,a=n.length;o=u){if(c.lineNumber===s.getLineCount())continue;const h=new z(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),g=s.getValueInRange(h).split("").reverse().join("");r.push(new xa(new st(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),g))}else{const h=new z(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),g=s.getValueInRange(h).split("").reverse().join("");r.push(new hoe(h,g,new st(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}class xS extends rt{run(e,t){const n=t.getSelections();if(n===null)return;const s=t.getModel();if(s===null)return;const r=t.getOption(148),o=[];for(const a of n)if(a.isEmpty()){const l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;const u=new z(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),h=s.getValueInRange(u);o.push(Qs.replace(u,this._modifyText(h,r)))}else{const l=s.getValueInRange(a);o.push(Qs.replace(a,this._modifyText(l,r)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class aqt extends xS{constructor(){super({id:"editor.action.transformToUppercase",label:be(1268,"Transform to Uppercase"),precondition:J.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){return e.toLocaleUpperCase()}}class lqt extends xS{constructor(){super({id:"editor.action.transformToLowercase",label:be(1269,"Transform to Lowercase"),precondition:J.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Fh{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}const A9=class A9 extends xS{constructor(){super({id:"editor.action.transformToTitlecase",label:be(1270,"Transform to Title Case"),precondition:J.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const n=A9.titleBoundary.get();return n?e.toLocaleLowerCase().replace(n,s=>s.toLocaleUpperCase()):e}};A9.titleBoundary=new Fh("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");let A8=A9;const jN=class jN extends xS{constructor(){super({id:"editor.action.transformToSnakecase",label:be(1271,"Transform to Snake Case"),precondition:J.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const n=jN.caseBoundary.get(),s=jN.singleLetters.get();return!n||!s?e:e.replace(n,"$1_$2").replace(s,"$1_$2$3").toLocaleLowerCase()}};jN.caseBoundary=new Fh("(\\p{Ll})(\\p{Lu})","gmu"),jN.singleLetters=new Fh("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");let YA=jN;const xv=class xv extends xS{constructor(){super({id:"editor.action.transformToCamelcase",label:be(1272,"Transform to Camel Case"),precondition:J.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){var a;const n=/\r\n|\r|\n/.test(e)?xv.multiLineWordBoundary.get():xv.singleLineWordBoundary.get(),s=xv.validWordStart.get();if(!n||!s)return e;const r=e.split(n);return((a=r.shift())==null?void 0:a.replace(s,l=>l.toLocaleLowerCase()))+r.map(l=>l.substring(0,1).toLocaleUpperCase()+l.substring(1)).join("")}};xv.singleLineWordBoundary=new Fh("[_\\s-]+","gm"),xv.multiLineWordBoundary=new Fh("[_-]+","gm"),xv.validWordStart=new Fh("^(\\p{Lu}[^\\p{Lu}])","gmu");let QA=xv;const vv=class vv extends xS{constructor(){super({id:"editor.action.transformToPascalcase",label:be(1273,"Transform to Pascal Case"),precondition:J.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const n=vv.wordBoundary.get(),s=vv.wordBoundaryToMaintain.get(),r=vv.upperCaseWordMatcher.get();return!n||!s||!r?e:e.split(s).map(l=>l.split(n)).flat().map(l=>{const c=l.charAt(0).toLocaleUpperCase()+l.slice(1);return c.length>1&&r.test(c)?c.charAt(0)+c.slice(1).toLocaleLowerCase():c}).join("")}};vv.wordBoundary=new Fh("[_ \\t-]","gm"),vv.wordBoundaryToMaintain=new Fh("(?<=\\.)","gm"),vv.upperCaseWordMatcher=new Fh("^\\p{Lu}+$","mu");let R8=vv;const _v=class _v extends xS{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(t=>t.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:be(1274,"Transform to Kebab Case"),precondition:J.writable,canTriggerInlineEdits:!0})}_modifyText(e,t){const n=_v.caseBoundary.get(),s=_v.singleLetters.get(),r=_v.underscoreBoundary.get();return!n||!s||!r?e:e.replace(r,"$1-$3").replace(n,"$1-$2").replace(s,"$1-$2").toLocaleLowerCase()}};_v.caseBoundary=new Fh("(\\p{Ll})(\\p{Lu})","gmu"),_v.singleLetters=new Fh("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),_v.underscoreBoundary=new Fh("(\\S)(_)(\\S)","gm");let M8=_v;Ke($$t);Ke(q$t);Ke(K$t);Ke(G$t);Ke(Y$t);Ke(Q$t);Ke(X$t);Ke(Z$t);Ke(AJ);Ke(eqt);Ke(tqt);Ke(nqt);Ke(T8);Ke(I8);Ke(iqt);Ke(sqt);Ke(rqt);Ke(oqt);Ke(aqt);Ke(lqt);Ke(J$t);YA.caseBoundary.isSupported()&&YA.singleLetters.isSupported()&&Ke(YA);QA.singleLineWordBoundary.isSupported()&&QA.multiLineWordBoundary.isSupported()&&Ke(QA);R8.wordBoundary.isSupported()&&Ke(R8);A8.titleBoundary.isSupported()&&Ke(A8);M8.isSupported()&&Ke(M8);const zle=ln("dataChannelService");class cqt{getDataChannel(e){return{sendData:()=>{}}}}var dqt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Hye=function(i,e){return function(t,n){e(t,n,i)}};function uqt(i){var e;return i.sourceId+" @@ "+JSON.stringify({...i,modelUri:(e=i.modelUri)==null?void 0:e.toString(),sourceId:void 0})}let P8=class extends se{static cast(){return this}constructor(e,t,n){super(),this._key=e,this._contextKeyService=t,this._dataChannelService=n,this._isEnabledContextKeyValue=hqt("structuredLogger.enabled:"+this._key,this._contextKeyService).recomputeInitiallyAndOnChange(this._store),this.isEnabled=this._isEnabledContextKeyValue.map(s=>s!==void 0)}log(e){return this._isEnabledContextKeyValue.get()?(this._dataChannelService.getDataChannel("structuredLogger:"+this._key).sendData(e),!0):!1}};P8=dqt([Hye(1,Bt),Hye(2,zle)],P8);function hqt(i,e){return Gn(e.onDidChangeContext,()=>e.getContextKeyValue(i))}var gqt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Wye=function(i,e){return function(t,n){e(t,n,i)}};let RJ=class extends se{constructor(e,t,n){var o;super(),this._editor=e,this._instantiationService=t,this._loggerService=n,this._structuredLogger=this._register(this._instantiationService.createInstance(P8.cast(),"editor.inlineSuggest.logChangeReason.commandId"));const s=(o=this._loggerService)==null?void 0:o.createLogger("textModelChanges",{hidden:!1,name:"Text Model Changes Reason"}),r=Gn(this,s.onDidChangeLogLevel,()=>s.getLevel());this._register(Pt(a=>{XIe(r.read(a),ho.Trace)&&a.store.add(this._editor.onDidChangeModelContent(l=>{var c;((c=this._editor.getModel())==null?void 0:c.uri.scheme)!=="output"&&s.trace("onDidChangeModelContent: "+l.detailedReasons.map(u=>u.toKey(Number.MAX_VALUE)).join(", "))}))})),this._register(Pt(a=>{this._editor instanceof wC&&this._structuredLogger.isEnabled.read(a)&&a.store.add(this._editor.onDidChangeModelContent(l=>{const c=this._editor.getModel();if(!c)return;const u=l.detailedReasons[0],h={...u.metadata,sourceId:"TextModel.setChangeReason",source:u.metadata.source,time:Date.now(),modelUri:c.uri,modelVersion:c.getVersionId()};setTimeout(()=>{this._structuredLogger.log(h)},0)}))}))}};RJ=gqt([Wye(1,ft),Wye(2,YIe)],RJ);function Vye(i,e=Xo){return UDt(i,e)?i.charAt(0).toUpperCase()+i.slice(1):i}var fqt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},pqt=function(i,e){return function(t,n){e(t,n,i)}};class zye{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const n=t.resolve(e);if(n!==void 0)return n}}}class Uye{constructor(e,t,n,s){this._model=e,this._selection=t,this._selectionIdx=n,this._overtypingCapturer=s}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let n=this._model.getValueInRange(this._selection)||void 0,s=this._selection.startLineNumber!==this._selection.endLineNumber;if(!n&&this._overtypingCapturer){const r=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);r&&(n=r.value,s=r.multiline)}if(n&&s&&e.snippet){const r=this._model.getLineContent(this._selection.startLineNumber),o=Mi(r,0,this._selection.startColumn-1);let a=o;e.snippet.walk(c=>c===e?!1:(c instanceof jl&&(a=Mi(Xc(c.value).pop())),!0));const l=Wh(a,o);n=n.replace(/(\r\n|\r|\n)(.*)/g,(c,u,h)=>`${u}${a.substr(l)}${h}`)}return n}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const n=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return n&&n.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(t==="CURSOR_INDEX")return String(this._selectionIdx);if(t==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}class $ye{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return Eb(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const n=Eb(this._model.uri.fsPath),s=n.lastIndexOf(".");return s<=0?n:n.slice(0,s)}else{if(t==="TM_DIRECTORY")return J4(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(P7(this._model.uri));if(t==="TM_DIRECTORY_BASE")return J4(this._model.uri.fsPath)==="."?"":Eb(J4(this._model.uri.fsPath));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class qye{constructor(e,t,n,s){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=n,this._spread=s}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(t){if(this._spread){const n=t.split(/\r\n|\n|\r/).filter(s=>!eIe(s));if(n.length===this._selectionCount)return n[this._selectionIdx]}return t}}}let O8=class{constructor(e,t,n){this._model=e,this._selection=t,this._languageConfigurationService=n}resolve(e){const{name:t}=e,n=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),s=this._languageConfigurationService.getLanguageConfiguration(n).comments;if(s){if(t==="LINE_COMMENT")return s.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return s.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return s.blockCommentEndToken||void 0}}};O8=fqt([pqt(2,As)],O8);const Pf=class Pf{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return Pf.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return Pf.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return Pf.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return Pf.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(t==="CURRENT_TIMEZONE_OFFSET"){const n=this._date.getTimezoneOffset(),s=n>0?"-":"+",r=Math.trunc(Math.abs(n/60)),o=r<10?"0"+r:r,a=Math.abs(n)-r*60,l=a<10?"0"+a:a;return s+o+":"+l}}};Pf.dayNames=[S(1406,"Sunday"),S(1407,"Monday"),S(1408,"Tuesday"),S(1409,"Wednesday"),S(1410,"Thursday"),S(1411,"Friday"),S(1412,"Saturday")],Pf.dayNamesShort=[S(1413,"Sun"),S(1414,"Mon"),S(1415,"Tue"),S(1416,"Wed"),S(1417,"Thu"),S(1418,"Fri"),S(1419,"Sat")],Pf.monthNames=[S(1420,"January"),S(1421,"February"),S(1422,"March"),S(1423,"April"),S(1424,"May"),S(1425,"June"),S(1426,"July"),S(1427,"August"),S(1428,"September"),S(1429,"October"),S(1430,"November"),S(1431,"December")],Pf.monthNamesShort=[S(1432,"Jan"),S(1433,"Feb"),S(1434,"Mar"),S(1435,"Apr"),S(1436,"May"),S(1437,"Jun"),S(1438,"Jul"),S(1439,"Aug"),S(1440,"Sep"),S(1441,"Oct"),S(1442,"Nov"),S(1443,"Dec")];let j8=Pf;class Kye{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=eHt(this._workspaceService.getWorkspace());if(!Z9t(t)){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(oZ(e))return Eb(e.uri.path);let t=Eb(e.configPath.path);return t.endsWith(aZ)&&(t=t.substr(0,t.length-aZ.length-1)),t}_resoveWorkspacePath(e){if(oZ(e))return Vye(e.uri.fsPath);const t=Eb(e.configPath.path);let n=e.configPath.fsPath;return n.endsWith(t)&&(n=n.substr(0,n.length-t.length-1)),n?Vye(n):"/"}}class Gye{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return aS()}}var mqt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},bqt=function(i,e){return function(t,n){e(t,n,i)}},lg;const bh=class bh{constructor(e,t,n){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=n,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=sxe(t.placeholders,Nu.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const n of this._snippet.placeholders){const s=this._snippet.offset(n),r=this._snippet.fullLen(n),o=z.fromPositions(e.getPositionAt(this._offset+s),e.getPositionAt(this._offset+s+r)),a=n.isFinalTabstop?bh._decor.inactiveFinal:bh._decor.inactive,l=t.addDecoration(o,a);this._placeholderDecorations.set(n,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const s=[];for(const r of this._placeholderGroups[this._placeholderGroupsIdx])if(r.transform){const o=this._placeholderDecorations.get(r),a=this._editor.getModel().getDecorationRange(o),l=this._editor.getModel().getValueInRange(a),c=r.transform.resolve(l).split(/\r\n|\r|\n/);for(let u=1;u0&&this._editor.executeEdits("snippet.placeholderTransform",s)}let t=!1;e===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const n=this._editor.getModel().changeDecorations(s=>{const r=new Set,o=[];for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);o.push(new st(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),s.changeDecorationOptions(l,a.isFinalTabstop?bh._decor.activeFinal:bh._decor.active),r.add(a);for(const u of this._snippet.enclosingPlaceholders(a)){const h=this._placeholderDecorations.get(u);s.changeDecorationOptions(h,u.isFinalTabstop?bh._decor.activeFinal:bh._decor.active),r.add(u)}}for(const[a,l]of this._placeholderDecorations)r.has(a)||s.changeDecorationOptions(l,a.isFinalTabstop?bh._decor.inactiveFinal:bh._decor.inactive);return o});return t?this.move(e):n??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof Nu){const n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let n;for(const s of t){if(s.isFinalTabstop)break;n||(n=[],e.set(s.index,n));const r=this._placeholderDecorations.get(s),o=this._editor.getModel().getDecorationRange(r);if(!o){e.delete(s.index);break}n.push(o)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(e!=null&&e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const n=this._editor.getModel().getDecorationRange(t);if(n)return{range:n,choice:e.choice}}get hasChoice(){let e=!1;return this._snippet.walk(t=>(e=t instanceof VD,!e)),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(n=>{for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const r=e.shift();console.assert(r._offset!==-1),console.assert(!r._placeholderDecorations);const o=r._snippet.placeholderInfo.last.index;for(const l of r._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=s.index+(o+1)/this._nestingLevel:l.index=s.index+l.index/this._nestingLevel;this._snippet.replace(s,r._snippet.children);const a=this._placeholderDecorations.get(s);n.removeDecoration(a),this._placeholderDecorations.delete(s);for(const l of r._snippet.placeholders){const c=r._snippet.offset(l),u=r._snippet.fullLen(l),h=z.fromPositions(t.getPositionAt(r._offset+c),t.getPositionAt(r._offset+c+u)),g=n.addDecoration(h,bh._decor.inactive);this._placeholderDecorations.set(l,g)}}this._placeholderGroups=sxe(this._snippet.placeholders,Nu.compareByIndex)})}};bh._decor={active:qt.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:qt.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:qt.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:qt.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};let F8=bh;const Yye={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let B8=lg=class{static adjustWhitespace(e,t,n,s,r){const o=e.getLineContent(t.lineNumber),a=Mi(o,0,t.column-1);let l;return s.walk(c=>{if(!(c instanceof jl)||c.parent instanceof VD||r&&!r.has(c))return!0;const u=c.value.split(/\r\n|\r|\n/);if(n){const g=s.offset(c);if(g===0)u[0]=e.normalizeIndentation(u[0]);else{l=l??s.toString();const f=l.charCodeAt(g-1);(f===10||f===13)&&(u[0]=e.normalizeIndentation(a+u[0]))}for(let f=1;fC.get(tx)),m=e.invokeWithinContext(C=>new $ye(C.get(FC),g)),x=()=>a,v=g.getValueInRange(lg.adjustSelection(g,e.getSelection(),n,0)),_=g.getValueInRange(lg.adjustSelection(g,e.getSelection(),0,s)),w=g.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),k=e.getSelections().map((C,E)=>({selection:C,idx:E})).sort((C,E)=>z.compareRangesUsingStarts(C.selection,E.selection));for(const{selection:C,idx:E}of k){let D=lg.adjustSelection(g,C,n,0),T=lg.adjustSelection(g,C,0,s);v!==g.getValueInRange(D)&&(D=C),_!==g.getValueInRange(T)&&(T=C);const I=C.setStartPosition(D.startLineNumber,D.startColumn).setEndPosition(T.endLineNumber,T.endColumn),R=new DC().parse(t,!0,r),P=I.getStartPosition(),j=lg.adjustWhitespace(g,P,o||E>0&&w!==g.getLineFirstNonWhitespaceColumn(C.positionLineNumber),R);R.resolveVariables(new zye([m,new qye(x,E,k.length,e.getOption(88)==="spread"),new Uye(g,C,E,l),new O8(g,C,c),new j8,new Kye(f),new Gye])),u[E]=Qs.replace(I,R.toString()),u[E].identifier={major:E,minor:0},u[E]._isTracked=!0,h[E]=new F8(e,R,j)}return{edits:u,snippets:h}}static createEditsAndSnippetsFromEdits(e,t,n,s,r,o,a){if(!e.hasModel()||t.length===0)return{edits:[],snippets:[]};const l=[],c=e.getModel(),u=new DC,h=new lO,g=new zye([e.invokeWithinContext(m=>new $ye(m.get(FC),c)),new qye(()=>r,0,e.getSelections().length,e.getOption(88)==="spread"),new Uye(c,e.getSelection(),0,o),new O8(c,e.getSelection(),a),new j8,new Kye(e.invokeWithinContext(m=>m.get(tx))),new Gye]);t=t.sort((m,x)=>z.compareRangesUsingStarts(m.range,x.range));let f=0;for(let m=0;m0){const D=t[m-1].range,T=z.fromPositions(D.getEndPosition(),x.getStartPosition()),I=new jl(c.getValueInRange(T));h.appendChild(I),f+=I.value.length}const w=u.parseFragment(v,h);lg.adjustWhitespace(c,x.getStartPosition(),_!==void 0?!_:s,h,new Set(w)),h.resolveVariables(g);const k=h.toString(),C=k.slice(f);f=k.length;const E=Qs.replace(x,C);E.identifier={major:m,minor:0},E._isTracked=!0,l.push(E)}return u.ensureFinalTabstop(h,n,!0),{edits:l,snippets:[new F8(e,h,"")]}}constructor(e,t,n=Yye,s){this._editor=e,this._template=t,this._options=n,this._languageConfigurationService=s,this._templateMerges=[],this._snippets=[]}dispose(){ii(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(e){if(!this._editor.hasModel())return;const{edits:t,snippets:n}=typeof this._template=="string"?lg.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):lg.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=n,this._editor.executeEdits(e??Aa.snippet(),t,s=>{const r=s.filter(o=>!!o.identifier);for(let o=0;ost.fromPositions(o.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=Yye){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:n,snippets:s}=lg.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",n,r=>{const o=r.filter(l=>!!l.identifier);for(let l=0;lst.fromPositions(l.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const n of this._snippets){const s=n.move(e);t.push(...s)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{r.push(...s.get(o))})}e.sort(z.compareRangesUsingStarts);for(const[n,s]of t){if(s.length!==e.length){t.delete(n);continue}s.sort(z.compareRangesUsingStarts);for(let r=0;r0}};B8=lg=mqt([bqt(3,As)],B8);var xqt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},d4=function(i,e){return function(t,n){e(t,n,i)}},Qk;const Qye={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};var np;let fl=(np=class{static get(e){return e.getContribution(Qk.ID)}constructor(e,t,n,s,r){this._editor=e,this._logService=t,this._languageFeaturesService=n,this._languageConfigurationService=r,this._inSnippetObservable=Ft(this,!1),this._snippetListener=new _e,this._modelVersionId=-1,this._inSnippet=Qk.InSnippetMode.bindTo(s),this._hasNextTabstop=Qk.HasNextTabstop.bindTo(s),this._hasPrevTabstop=Qk.HasPrevTabstop.bindTo(s)}dispose(){var e;this._inSnippet.reset(),this._inSnippetObservable.set(!1,void 0),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)==null||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t>"u"?Qye:{...Qye,...t})}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var n;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof e!="string"&&this.cancel(),this._session?(Bn(typeof e=="string"),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new B8(this._editor,e,t,this._languageConfigurationService),this._session.insert(t.reason)),t.undoStopAfter&&this._editor.getModel().pushStackElement(),(n=this._session)!=null&&n.hasChoice){const s={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(u,h)=>{if(!this._session||u!==this._editor.getModel()||!te.equals(this._editor.getPosition(),h))return;const{activeChoice:g}=this._session;if(!g||g.choice.options.length===0)return;const f=u.getValueInRange(g.range),m=!!g.choice.options.find(v=>v.value===f),x=[];for(let v=0;v{o==null||o.dispose(),a=!1},c=()=>{a||(o=this._languageFeaturesService.completionProvider.register({language:r.getLanguageId(),pattern:r.uri.fsPath,scheme:r.uri.scheme,exclusive:!0},s),this._snippetListener.add(o),a=!0)};this._choiceCompletions={provider:s,enable:c,disable:l}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(s=>s.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){if(!(!this._session||!this._editor.hasModel())){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._inSnippetObservable.set(!0,void 0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var t;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:e}=this._session;if(!e||!this._choiceCompletions){(t=this._choiceCompletions)==null||t.disable(),this._currentChoice=void 0;return}this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{B$t(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._inSnippetObservable.set(!1,void 0),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(t=this._session)==null||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;(e=this._session)==null||e.prev(),this._updateState()}next(){var e;(e=this._session)==null||e.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}get isInSnippetObservable(){return this._inSnippetObservable}},Qk=np,np.ID="snippetController2",np.InSnippetMode=new Ze("inSnippetMode",!1,S(1402,"Whether the editor in current in snippet mode")),np.HasNextTabstop=new Ze("hasNextTabstop",!1,S(1403,"Whether there is a next tab stop when in snippet mode")),np.HasPrevTabstop=new Ze("hasPrevTabstop",!1,S(1404,"Whether there is a previous tab stop when in snippet mode")),np);fl=Qk=xqt([d4(1,Ji),d4(2,lt),d4(3,Bt),d4(4,As)],fl);Pn(fl.ID,fl,4);const HW=ao.bindToContribution(fl.get);Xe(new HW({id:"jumpToNextSnippetPlaceholder",precondition:Ne.and(fl.InSnippetMode,fl.HasNextTabstop),handler:i=>i.next(),kbOpts:{weight:130,kbExpr:J.textInputFocus,primary:2}}));Xe(new HW({id:"jumpToPrevSnippetPlaceholder",precondition:Ne.and(fl.InSnippetMode,fl.HasPrevTabstop),handler:i=>i.prev(),kbOpts:{weight:130,kbExpr:J.textInputFocus,primary:1026}}));Xe(new HW({id:"leaveSnippet",precondition:fl.InSnippetMode,handler:i=>i.cancel(!0),kbOpts:{weight:130,kbExpr:J.textInputFocus,primary:9,secondary:[1033]}}));Xe(new HW({id:"acceptSnippet",precondition:fl.InSnippetMode,handler:i=>i.finish()}));function xM(i){return new vqt(i)}class vqt extends W2e{constructor(e){super(),this._textModel=e}getOffset(e){return this._textModel.getOffsetAt(e)}getPosition(e){return this._textModel.getPositionAt(e)}}const _qt=[];function yqt(){return _qt}function Xye(i){return wqt(i).map(t=>t.getEndPosition())}function wqt(i){const e=TF.createSortPermutation(i,_a(s=>s.range,z.compareRangesUsingStarts)),n=new Uc(e.apply(i)).getNewRanges();return e.inverse().apply(n)}function Cqt(i,e){const t=xM(e),n=e.getValue();return i.map(o=>t.getStringReplacement(o)).map(o=>o.removeCommonSuffixPrefix(n)).map(o=>t.getTextReplacement(o))}function Sqt(i,e){const t=Ft("result",[]),n=[];return e.add(Pt(s=>{const r=i.read(s);Vi(o=>{if(r.length!==n.length){n.length=r.length;for(let a=0;aa.set(r[l],o))})})),t}class kqt{constructor(e){this._contextKeyService=e}bind(e,t){return kf(e,this._contextKeyService,t instanceof Function?t:n=>t.read(n))}}function Zye(i,e){return new Promise(t=>{let n;const s=setTimeout(()=>{n&&n.dispose(),t()},i);e&&(n=e.onCancellationRequested(()=>{clearTimeout(s),n&&n.dispose(),t()}))})}class Nqt{constructor(e,t,n,s=Eqt){this.startValue=e,this.endValue=t,this.durationMs=n,this._interpolationFunction=s,this.startTimeMs=Date.now(),e===t&&(this.durationMs=0)}isFinished(){return Date.now()>=this.startTimeMs+this.durationMs}getValue(){const e=Date.now()-this.startTimeMs;return e>=this.durationMs?this.endValue:this._interpolationFunction(e,this.startValue,this.endValue-this.startValue,this.durationMs)}}function Eqt(i,e,t,n){return i===n?e+t:t*(-Math.pow(2,-10*i/n)+1)+e}function Lqt(i,e,t,n){return t*((i=i/n-1)*i*i+1)+e}class Dqt{constructor(e){this._value=Ft(this,e)}getValue(e){const t=this._value.read(e);return t.isFinished()||H8.instance.invalidateOnNextAnimationFrame(e),t.getValue()}}const R9=class R9{constructor(){this._counter=Au(this),this._isScheduled=!1}invalidateOnNextAnimationFrame(e){this._counter.read(e),this._isScheduled||(this._isScheduled=!0,oi().requestAnimationFrame(()=>{this._isScheduled=!1,this._update()}))}_update(){this._counter.trigger(void 0)}};R9.instance=new R9;let H8=R9;class vM{constructor(e,t){this.lineNumber=e,this.parts=t,Y_(()=>RP(t,(n,s)=>n.column<=s.column))}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every((t,n)=>t.equals(e.parts[n]))}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],n=e.substr(0,t.column-1);return new Uc([...this.parts.map(r=>new Ar(z.fromPositions(new te(1,r.column)),r.lines.map(o=>o.line).join(` +`)))]).applyToString(n).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(e=>e.lines.length===0)}get lineCount(){return 1+this.parts.reduce((e,t)=>e+t.lines.length-1,0)}}class W8{constructor(e,t,n,s=[]){this.column=e,this.text=t,this.preview=n,this._inlineDecorations=s,this.lines=Xc(this.text).map((r,o)=>({line:r,lineDecorations:cl.filter(this._inlineDecorations,o+1,1,r.length+1)}))}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every((t,n)=>t.line===e.lines[n].line&&cl.equalsArr(t.lineDecorations,e.lines[n].lineDecorations))}}class MJ{constructor(e,t,n,s=0){this.lineNumber=e,this.columnRange=t,this.text=n,this.additionalReservedLineCount=s,this.parts=[new W8(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=Xc(this.text)}renderForScreenReader(e){return this.newLines.join(` +`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(e=>e.lines.length===0)}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every((t,n)=>t===e.newLines[n])&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function Jye(i,e){return bs(i,e,u5e)}function u5e(i,e){return i===e?!0:!i||!e?!1:i instanceof vM&&e instanceof vM||i instanceof MJ&&e instanceof MJ?i.equals(e):!1}function pb(i,e,t){const n=t?i.range.intersectRanges(t):i.range;if(!n)return i;const s=i.text.replaceAll(`\r +`,` +`),r=e.getValueInRange(n,1),o=Wh(r,s),a=ro.ofText(r.substring(0,o)).addToPosition(i.range.getStartPosition()),l=s.substring(o),c=z.fromPositions(a,i.range.getEndPosition());return new Ar(c,l)}function h5e(i,e){return i.text.startsWith(e.text)&&Tqt(i.range,e.range)}function Tqt(i,e){return e.getStartPosition().equals(i.getStartPosition())&&e.getEndPosition().isBeforeOrEqual(i.getEndPosition())}function e1e(i,e,t,n,s=0){let r=pb(i,e);if(r.range.endLineNumber!==r.range.startLineNumber)return;const o=e.getLineContent(r.range.startLineNumber),a=Mi(o).length;if(r.range.startColumn-1<=a){const m=Mi(r.text).length,x=o.substring(r.range.startColumn-1,a),[v,_]=[r.range.getStartPosition(),r.range.getEndPosition()],w=v.column+x.length<=_.column?v.delta(0,x.length):_,k=z.fromPositions(w,_),C=r.text.startsWith(x)?r.text.substring(x.length):r.text.substring(m);r=new Ar(k,C)}const c=e.getValueInRange(r.range),u=Iqt(c,r.text);if(!u)return;const h=r.range.startLineNumber,g=new Array;if(t==="prefix"){const m=u.filter(x=>x.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==c.length)return}const f=r.text.length-s;for(const m of u){const x=r.range.startColumn+m.originalStart+m.originalLength;if(t==="subwordSmart"&&n&&n.lineNumber===r.range.startLineNumber&&x0)return;if(m.modifiedLength===0)continue;const v=m.modifiedStart+m.modifiedLength,_=Math.max(m.modifiedStart,Math.min(v,f)),w=r.text.substring(m.modifiedStart,_),k=r.text.substring(_,Math.max(m.modifiedStart,v));w.length>0&&g.push(new W8(x,w,!1)),k.length>0&&g.push(new W8(x,k,!0))}return new vM(h,g)}let xf;function Iqt(i,e){if((xf==null?void 0:xf.originalValue)===i&&(xf==null?void 0:xf.newValue)===e)return xf==null?void 0:xf.changes;{let t=n1e(i,e,!0);if(t){const n=t1e(t);if(n>0){const s=n1e(i,e,!1);s&&t1e(s)5e3||e.length>5e3)return;function n(c){let u=0;for(let h=0,g=c.length;hu&&(u=f)}return u}const s=Math.max(n(i),n(e));function r(c){if(c<0)throw new Error("unexpected");return s+c+1}function o(c){let u=0,h=0;const g=new Int32Array(c.length);for(let f=0,m=c.length;fa},{getElements:()=>l}).ComputeDiff(!1).changes}function Aqt(i,e){let t,n=!1;const s=new kIe(new Ca(i,void 0,e.update),(r,o)=>{n||(t=e.initial instanceof Function?e.initial():e.initial,n=!0);const a=e.update(r,t,o);return t=a,a},e.changeTracker,()=>{var r;n&&((r=e.disposeFinal)==null||r.call(e,t),n=!1)},e.equalityComparer??Kd,(r,o,a)=>{if(!n)throw new Nt("Can only set when there is a listener! This is to prevent leaks.");bL(o,l=>{t=r,s.setValue(r,l,a)})},oo.ofCaller());return s}var Rqt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},i1e=function(i,e){return function(t,n){e(t,n,i)}};class Mqt{constructor(e,t){this._baseService=e,this._intercept=t}publicLog2(e,t){this._intercept(e,t),this._baseService.publicLog2(e,t)}}let PJ=class extends Mqt{constructor(e,t){super(e,(n,s)=>{let r=!0;s&&OJ in s&&(r=!!s[OJ]),r&&t.getDataChannel("editTelemetry").sendData({eventName:n,data:s??{}})})}};PJ=Rqt([i1e(0,Ua),i1e(1,zle)],PJ);const OJ=Symbol("shouldForwardToChannel");function Pqt(i){return{[OJ]:i}}function s1e(i){if(!i)return!1;const e=i.toLowerCase();return e==="github.copilot"||e==="github.copilot-chat"}function Oqt(i){const e=i.map(n=>new Ko(ht.ofStartAndLength(n.rangeOffset,n.rangeLength),n.text));return e.reverse(),new Zb(e)}function jqt(i,e){i.publicLog2("inlineCompletion.endOfLife",e)}class Nj{constructor(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n}}class g5e{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}const Fqt=3;class Bqt{computeDiff(e,t,n){var l;const r=new Vqt(e,t,{maxComputationTime:n.maxComputationTimeMs,shouldIgnoreTrimWhitespace:n.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let a=null;for(const c of r.changes){let u;c.originalEndLineNumber===0?u=new jt(c.originalStartLineNumber+1,c.originalStartLineNumber+1):u=new jt(c.originalStartLineNumber,c.originalEndLineNumber+1);let h;c.modifiedEndLineNumber===0?h=new jt(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):h=new jt(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let g=new $d(u,h,(l=c.charChanges)==null?void 0:l.map(f=>new Ml(new z(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn),new z(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===g.modified.startLineNumber||a.original.endLineNumberExclusive===g.original.startLineNumber)&&(g=new $d(a.original.join(g.original),a.modified.join(g.modified),a.innerChanges&&g.innerChanges?a.innerChanges.concat(g.innerChanges):void 0),o.pop()),o.push(g),a=g}return Y_(()=>RP(o,(c,u)=>u.original.startLineNumber-c.original.endLineNumberExclusive===u.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class uE{constructor(e,t,n,s,r,o,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=s,this.modifiedStartLineNumber=r,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,n){const s=t.getStartLineNumber(e.originalStart),r=t.getStartColumn(e.originalStart),o=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1),l=n.getStartLineNumber(e.modifiedStart),c=n.getStartColumn(e.modifiedStart),u=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=n.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new uE(s,r,o,a,l,c,u,h)}}function Wqt(i){if(i.length<=1)return i;const e=[i[0]];let t=e[0];for(let n=1,s=i.length;n0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&r()){const f=n.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),m=s.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(f.getElements().length>0&&m.getElements().length>0){let x=f5e(f,m,r,!0).changes;a&&(x=Wqt(x)),g=[];for(let v=0,_=x.length;v<_;v++)g.push(uE.createFromDiffChange(x[v],f,m))}}return new XA(l,c,u,h,g)}}class Vqt{constructor(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new r1e(e),this.modified=new r1e(t),this.continueLineDiff=o1e(n.maxComputationTime),this.continueCharDiff=o1e(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const e=f5e(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,n=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const a=[];for(let l=0,c=t.length;l1&&x>1;){const v=g.charCodeAt(m-2),_=f.charCodeAt(x-2);if(v!==_)break;m--,x--}(m>1||x>1)&&this._pushTrimWhitespaceCharChange(s,r+1,1,m,o+1,1,x)}{let m=FJ(g,1),x=FJ(f,1);const v=g.length+1,_=f.length+1;for(;m!0;const e=Date.now();return()=>Date.now()-e0&&x>0&&o.get(m-1,x-1)===3&&(w+=a.get(m-1,x-1)),w+=s?s(m,x):1):w=-1;const k=Math.max(v,_,w);if(k===w){const C=m>0&&x>0?a.get(m-1,x-1):0;a.set(m,x,C+1),o.set(m,x,3)}else k===v?(a.set(m,x,0),o.set(m,x,1)):k===_&&(a.set(m,x,0),o.set(m,x,2));r.set(m,x,k)}const l=[];let c=e.length,u=t.length;function h(m,x){(m+1!==c||x+1!==u)&&l.push(new uo(new ht(m+1,c),new ht(x+1,u))),c=m,u=x}let g=e.length-1,f=t.length-1;for(;g>=0&&f>=0;)o.get(g,f)===3?(h(g,f),g--,f--):o.get(g,f)===1?g--:f--;return h(-1,-1),l.reverse(),new Ab(l,!1)}}class p5e{compute(e,t,n=GR.instance){if(e.length===0||t.length===0)return Ab.trivial(e,t);const s=e,r=t;function o(x,v){for(;xs.length||C>r.length)continue;const E=o(k,C);l.set(u,E);const D=k===_?c.get(u+1):c.get(u-1);if(c.set(u,E!==k?new a1e(D,k,C,E-k):D),l.get(u)===s.length&&l.get(u)-u===r.length)break e}}let h=c.get(u);const g=[];let f=s.length,m=r.length;for(;;){const x=h?h.x+h.length:0,v=h?h.y+h.length:0;if((x!==f||v!==m)&&g.push(new uo(new ht(x,f),new ht(v,m))),!h)break;f=h.x,m=h.y,h=h.prev}return g.reverse(),new Ab(g,!1)}}class a1e{constructor(e,t,n,s){this.prev=e,this.x=t,this.y=n,this.length=s}}class Uqt{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}}}class $qt{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}class V8{constructor(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let s=this.range.startLineNumber;s<=this.range.endLineNumber;s++){let r=e[s-1],o=0;s===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,r=r.substring(o)),this.lineStartOffsets.push(o);let a=0;if(!n){const c=r.trimStart();a=r.length-c.length,r=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);const l=s===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-a,r.length):r.length;for(let c=0;cString.fromCharCode(t)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=d1e(e>0?this.elements[e-1]:-1),n=d1e(er<=e),s=e-this.firstElementOffsetByLineIdx[n];return new te(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+s+(s===0&&t==="left"?0:this.trimmedWsLengthsByLineIdx[n]))}translateRange(e){const t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?z.fromPositions(n,n):z.fromPositions(t,n)}findWordContaining(e){if(e<0||e>=this.elements.length||!Rk(this.elements[e]))return;let t=e;for(;t>0&&Rk(this.elements[t-1]);)t--;let n=e;for(;n=this.elements.length||!Rk(this.elements[e]))return;let t=e;for(;t>0&&Rk(this.elements[t-1])&&!l1e(this.elements[t]);)t--;let n=e;for(;ns<=e.start)??0,n=MPt(this.firstElementOffsetByLineIdx,s=>e.endExclusive<=s)??this.elements.length;return new ht(t,n)}}function Rk(i){return i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57}function l1e(i){return i>=65&&i<=90}const qqt={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function c1e(i){return qqt[i]}function d1e(i){return i===10?8:i===13?7:jX(i)?6:i>=97&&i<=122?0:i>=65&&i<=90?1:i>=48&&i<=57?2:i===-1?3:i===44||i===59?5:4}function Kqt(i,e,t,n,s,r){let{moves:o,excludedChanges:a}=Yqt(i,e,t,r);if(!r.isValid())return[];const l=i.filter(u=>!a.has(u)),c=Qqt(l,n,s,e,t,r);return zY(o,c),o=Xqt(o),o=o.filter(u=>{const h=u.original.toOffsetRange().slice(e).map(f=>f.trim());return h.join(` +`).length>=15&&Gqt(h,f=>f.length>=2)>=2}),o=Zqt(i,o),o}function Gqt(i,e){let t=0;for(const n of i)e(n)&&t++;return t}function Yqt(i,e,t,n){const s=[],r=i.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new R6(l.original,e,l)),o=new Set(i.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new R6(l.modified,t,l))),a=new Set;for(const l of r){let c=-1,u;for(const h of o){const g=l.computeSimilarity(h);g>c&&(c=g,u=h)}if(c>.9&&u&&(o.delete(u),s.push(new al(l.range,u.range)),a.add(l.source),a.add(u.source)),!n.isValid())return{moves:s,excludedChanges:a}}return{moves:s,excludedChanges:a}}function Qqt(i,e,t,n,s,r){const o=[],a=new $Ie;for(const g of i)for(let f=g.original.startLineNumber;fg.modified.startLineNumber,$c));for(const g of i){let f=[];for(let m=g.modified.startLineNumber;m{for(const C of f)if(C.originalLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive&&C.modifiedLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive){C.originalLineRange=new jt(C.originalLineRange.startLineNumber,w.endLineNumberExclusive),C.modifiedLineRange=new jt(C.modifiedLineRange.startLineNumber,v.endLineNumberExclusive),_.push(C);return}const k={modifiedLineRange:v,originalLineRange:w};l.push(k),_.push(k)}),f=_}if(!r.isValid())return[]}l.sort(yIe(_a(g=>g.modifiedLineRange.length,$c)));const c=new Iu,u=new Iu;for(const g of l){const f=g.modifiedLineRange.startLineNumber-g.originalLineRange.startLineNumber,m=c.subtractFrom(g.modifiedLineRange),x=u.subtractFrom(g.originalLineRange).getWithDelta(f),v=m.getIntersection(x);for(const _ of v.ranges){if(_.length<3)continue;const w=_,k=_.delta(-f);o.push(new al(k,w)),c.addRange(w),u.addRange(k)}}o.sort(_a(g=>g.original.startLineNumber,$c));const h=new o6(i);for(let g=0;gD.original.startLineNumber<=f.original.startLineNumber),x=LL(i,D=>D.modified.startLineNumber<=f.modified.startLineNumber),v=Math.max(f.original.startLineNumber-m.original.startLineNumber,f.modified.startLineNumber-x.modified.startLineNumber),_=h.findLastMonotonous(D=>D.original.startLineNumberD.modified.startLineNumbern.length||T>s.length||c.contains(T)||u.contains(D)||!u1e(n[D-1],s[T-1],r))break}C>0&&(u.addRange(new jt(f.original.startLineNumber-C,f.original.startLineNumber)),c.addRange(new jt(f.modified.startLineNumber-C,f.modified.startLineNumber)));let E;for(E=0;En.length||T>s.length||c.contains(T)||u.contains(D)||!u1e(n[D-1],s[T-1],r))break}E>0&&(u.addRange(new jt(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+E)),c.addRange(new jt(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+E))),(C>0||E>0)&&(o[g]=new al(new jt(f.original.startLineNumber-C,f.original.endLineNumberExclusive+E),new jt(f.modified.startLineNumber-C,f.modified.endLineNumberExclusive+E)))}return o}function u1e(i,e,t){if(i.trim()===e.trim())return!0;if(i.length>300&&e.length>300)return!1;const s=new p5e().compute(new V8([i],new z(1,1,1,i.length),!1),new V8([e],new z(1,1,1,e.length),!1),t);let r=0;const o=uo.invert(s.diffs,i.length);for(const u of o)u.seq1Range.forEach(h=>{jX(i.charCodeAt(h))||r++});function a(u){let h=0;for(let g=0;ge.length?i:e);return r/l>.6&&l>10}function Xqt(i){if(i.length===0)return i;i.sort(_a(t=>t.original.startLineNumber,$c));const e=[i[0]];for(let t=1;t=0&&o>=0&&r+o<=2){e[e.length-1]=n.join(s);continue}e.push(s)}return e}function Zqt(i,e){const t=new o6(i);return e=e.filter(n=>{const s=t.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(c))}s.push(a)}return n.length>0&&s.push(n[n.length-1]),s}function Jqt(i,e,t){if(!i.getBoundaryScore||!e.getBoundaryScore)return t;for(let n=0;n0?t[n-1]:void 0,r=t[n],o=n+1=n.start&&i.seq2Range.start-o>=s.start&&t.isStronglyEqual(i.seq2Range.start-o,i.seq2Range.endExclusive-o)&&o<100;)o++;o--;let a=0;for(;i.seq1Range.start+ac&&(c=m,l=u)}return i.delta(l)}function eKt(i,e,t){const n=[];for(const s of t){const r=n[n.length-1];if(!r){n.push(s);continue}s.seq1Range.start-r.seq1Range.endExclusive<=2||s.seq2Range.start-r.seq2Range.endExclusive<=2?n[n.length-1]=new uo(r.seq1Range.join(s.seq1Range),r.seq2Range.join(s.seq2Range)):n.push(s)}return n}function p1e(i,e,t,n,s=!1){const r=uo.invert(t,i.length),o=[];let a=new fb(0,0);function l(u,h){if(u.offset10;){const w=r[0];if(!(w.seq1Range.intersects(m.seq1Range)||w.seq2Range.intersects(m.seq2Range)))break;const C=n(i,w.seq1Range.start),E=n(e,w.seq2Range.start),D=new uo(C,E),T=D.intersect(w);if(v+=T.seq1Range.length,_+=T.seq2Range.length,m=m.join(D),m.seq1Range.endExclusive>=w.seq1Range.endExclusive)r.shift();else break}(s&&v+_0;){const u=r.shift();u.seq1Range.isEmpty||(l(u.getStarts(),u),l(u.getEndExclusives().delta(-1),u))}return tKt(t,o)}function tKt(i,e){const t=[];for(;i.length>0||e.length>0;){const n=i[0],s=e[0];let r;n&&(!s||n.seq1Range.start0&&t[t.length-1].seq1Range.endExclusive>=r.seq1Range.start?t[t.length-1]=t[t.length-1].join(r):t.push(r)}return t}function nKt(i,e,t){let n=t;if(n.length===0)return n;let s=0,r;do{r=!1;const o=[n[0]];for(let a=1;a5||f.seq1Range.length+f.seq2Range.length>5)};const l=n[a],c=o[o.length-1];u(c,l)?(r=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}n=o}while(s++<10&&r);return n}function iKt(i,e,t){let n=t;if(n.length===0)return n;let s=0,r;do{r=!1;const a=[n[0]];for(let l=1;l5||x.length>500)return!1;const _=i.getText(x).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;const w=i.countLinesIn(f.seq1Range),k=f.seq1Range.length,C=e.countLinesIn(f.seq2Range),E=f.seq2Range.length,D=i.countLinesIn(m.seq1Range),T=m.seq1Range.length,I=e.countLinesIn(m.seq2Range),R=m.seq2Range.length,P=130;function j(B){return Math.min(B,P)}return Math.pow(Math.pow(j(w*40+k),1.5)+Math.pow(j(C*40+E),1.5),1.5)+Math.pow(Math.pow(j(D*40+T),1.5)+Math.pow(j(I*40+R),1.5),1.5)>(P**1.5)**1.5*1.3};const c=n[l],u=a[a.length-1];h(u,c)?(r=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(s++<10&&r);const o=[];return _Lt(n,(a,l,c)=>{let u=l;function h(_){return _.length>0&&_.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}const g=i.extendToFullLines(l.seq1Range),f=i.getText(new ht(g.start,l.seq1Range.start));h(f)&&(u=u.deltaStart(-f.length));const m=i.getText(new ht(l.seq1Range.endExclusive,g.endExclusive));h(m)&&(u=u.deltaEnd(m.length));const x=uo.fromOffsetPairs(a?a.getEndExclusives():fb.zero,c?c.getStarts():fb.max),v=u.intersect(x);o.length>0&&v.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(v):o.push(v)}),o}class m1e{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const t=e===0?0:b1e(this.lines[e-1]),n=e===this.lines.length?0:b1e(this.lines[e]);return 1e3-(t+n)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function b1e(i){let e=0;for(;eT===I))return new Nj([],[],!1);if(e.length===1&&e[0].length===0||t.length===1&&t[0].length===0)return new Nj([new $d(new jt(1,e.length+1),new jt(1,t.length+1),[new Ml(new z(1,1,e.length,e[e.length-1].length+1),new z(1,1,t.length,t[t.length-1].length+1))])],[],!1);const s=n.maxComputationTimeMs===0?GR.instance:new iBt(n.maxComputationTimeMs),r=!n.ignoreTrimWhitespace,o=new Map;function a(T){let I=o.get(T);return I===void 0&&(I=o.size,o.set(T,I)),I}const l=e.map(T=>a(T.trim())),c=t.map(T=>a(T.trim())),u=new m1e(l,e),h=new m1e(c,t),g=u.length+h.length<1700?this.dynamicProgrammingDiffing.compute(u,h,s,(T,I)=>e[T]===t[I]?t[I].length===0?.1:1+Math.log(1+t[I].length):.99):this.myersDiffingAlgorithm.compute(u,h,s);let f=g.diffs,m=g.hitTimeout;f=h1e(u,h,f),f=nKt(u,h,f);const x=[],v=T=>{if(r)for(let I=0;IT.seq1Range.start-_===T.seq2Range.start-w);const I=T.seq1Range.start-_;v(I),_=T.seq1Range.endExclusive,w=T.seq2Range.endExclusive;const R=this.refineDiff(e,t,T,s,r,n);R.hitTimeout&&(m=!0);for(const P of R.mappings)x.push(P)}v(e.length-_);const k=new w3(e),C=new w3(t),E=A6(x,k,C);let D=[];return n.computeMoves&&(D=this.computeMoves(E,e,t,l,c,s,r,n)),Y_(()=>{function T(R,P){if(R.lineNumber<1||R.lineNumber>P.length)return!1;const j=P[R.lineNumber-1];return!(R.column<1||R.column>j.length+1)}function I(R,P){return!(R.startLineNumber<1||R.startLineNumber>P.length+1||R.endLineNumberExclusive<1||R.endLineNumberExclusive>P.length+1)}for(const R of E){if(!R.innerChanges)return!1;for(const P of R.innerChanges)if(!(T(P.modifiedRange.getStartPosition(),t)&&T(P.modifiedRange.getEndPosition(),t)&&T(P.originalRange.getStartPosition(),e)&&T(P.originalRange.getEndPosition(),e)))return!1;if(!I(R.modified,t)||!I(R.original,e))return!1}return!0}),new Nj(E,D,m)}computeMoves(e,t,n,s,r,o,a,l){return Kqt(e,t,n,s,r,o).map(h=>{const g=this.refineDiff(t,n,new uo(h.original.toOffsetRange(),h.modified.toOffsetRange()),o,a,l),f=A6(g.mappings,new w3(t),new w3(n),!0);return new g5e(h,f)})}refineDiff(e,t,n,s,r,o){const l=rKt(n).toRangeMapping2(e,t),c=new V8(e,l.originalRange,r),u=new V8(t,l.modifiedRange,r),h=c.length+u.length<500?this.dynamicProgrammingDiffing.compute(c,u,s):this.myersDiffingAlgorithm.compute(c,u,s);let g=h.diffs;return g=h1e(c,u,g),g=p1e(c,u,g,(m,x)=>m.findWordContaining(x)),o.extendToSubwords&&(g=p1e(c,u,g,(m,x)=>m.findSubWordContaining(x),!0)),g=eKt(c,u,g),g=iKt(c,u,g),{mappings:g.map(m=>new Ml(c.translateRange(m.seq1Range),u.translateRange(m.seq2Range))),hitTimeout:h.hitTimeout}}}function rKt(i){return new al(new jt(i.seq1Range.start+1,i.seq1Range.endExclusive+1),new jt(i.seq2Range.start+1,i.seq2Range.endExclusive+1))}const BJ={getLegacy:()=>new Bqt,getDefault:()=>new sKt};var HJ;(function(i){function e(t,n){return!t.isInlineEdit&&!t.uri?ZA.create(t,n):hE.create(t,n)}i.create=e})(HJ||(HJ={}));class m5e{constructor(e,t,n){this._data=e,this.identity=t,this.hint=n}get source(){return this._data.source}get isFromExplicitRequest(){return this._data.context.triggerKind===lc.Explicit}get forwardStable(){return this.source.inlineSuggestions.enableForwardStability??!1}get editRange(){return this.getSingleTextEdit().range}get targetRange(){var e,t;return(e=this.hint)!=null&&e.range&&!this.hint.jumpToEdit?(t=this.hint)==null?void 0:t.range:this.editRange}get insertText(){return this.getSingleTextEdit().text}get semanticId(){return this.hash}get action(){return this._sourceInlineCompletion.gutterMenuLinkAction}get command(){return this._sourceInlineCompletion.command}get warning(){return this._sourceInlineCompletion.warning}get showInlineEditMenu(){return!!this._sourceInlineCompletion.showInlineEditMenu}get hash(){return JSON.stringify([this.getSingleTextEdit().text,this.getSingleTextEdit().range.getStartPosition().toString()])}get requestUuid(){return this._data.context.requestUuid}get partialAccepts(){return this._data.partialAccepts}get _sourceInlineCompletion(){return this._data.sourceInlineCompletion}addRef(){this.identity.addRef(),this.source.addRef()}removeRef(){this.identity.removeRef(),this.source.removeRef()}reportInlineEditShown(e,t,n){this._data.reportInlineEditShown(e,this.insertText,t,n)}reportPartialAccept(e,t,n){this._data.reportPartialAccept(e,t,n)}reportEndOfLife(e){this._data.reportEndOfLife(e)}setEndOfLifeReason(e){this._data.setEndOfLifeReason(e)}setIsPreceeded(e){this._data.setIsPreceeded(e.partialAccepts)}setNotShownReasonIfNotSet(e){this._data.setNotShownReason(e)}getSourceCompletion(){return this._sourceInlineCompletion}}const M9=class M9{constructor(){this._onDispose=Au(this),this._jumpedTo=Ft(this,!1),this._refCount=1,this.id="InlineCompletionIdentity"+M9.idCounter++}get jumpedTo(){return this._jumpedTo}addRef(){this._refCount++}removeRef(){this._refCount--,this._refCount===0&&this._onDispose.trigger(void 0)}setJumpTo(e){this._jumpedTo.set(!0,e)}};M9.idCounter=0;let z8=M9;class _M{static create(e){return new _M(z.lift(e.range),e.content,e.style,e.jumpToEdit)}constructor(e,t,n,s){this.range=e,this.content=t,this.style=n,this.jumpToEdit=s}withEdit(e,t){const n=new ht(t.getOffset(this.range.getStartPosition()),t.getOffset(this.range.getEndPosition())),s=H2e([n],e)[0];if(!s)return;const r=t.getRange(s);return new _M(r,this.content,this.style,this.jumpToEdit)}}class ZA extends m5e{static create(e,t){const n=new z8,s=xM(t),r=e.insertText.replace(/\r\n|\r|\n/g,t.getEOL()),o=aKt(new Ko(s.getOffsetRange(e.range),r),t),a=o.removeCommonSuffixAndPrefix(t.getValue()),l=s.getTextReplacement(o),c=e.hint?_M.create(e.hint):void 0;return new ZA(o,a,l,l.range,e.snippetInfo,e.additionalTextEdits,e,n,c)}constructor(e,t,n,s,r,o,a,l,c){super(a,l,c),this._edit=e,this._trimmedEdit=t,this._textEdit=n,this._originalRange=s,this.snippetInfo=r,this.additionalTextEdits=o,this.isInlineEdit=!1}get hash(){return JSON.stringify(this._trimmedEdit.toJson())}getSingleTextEdit(){return this._textEdit}withIdentity(e){return new ZA(this._edit,this._trimmedEdit,this._textEdit,this._originalRange,this.snippetInfo,this.additionalTextEdits,this._data,e,this.hint)}withEdit(e,t){const n=H2e([this._edit.replaceRange],e);if(n.length===0)return;const s=new Ko(n[0],this._textEdit.text),r=xM(t),o=r.getTextReplacement(s);let a=this.hint;if(a&&(a=a.withEdit(e,r),!a))return;const l=s.removeCommonSuffixAndPrefix(t.getValue());return new ZA(s,l,o,this._originalRange,this.snippetInfo,this.additionalTextEdits,this._data,this.identity,a)}canBeReused(e,t){const n=this._textEdit.range;return!!n&&n.containsPosition(t)&&this.isVisible(e,t)&&ro.ofRange(n).isGreaterThanOrEqualTo(ro.ofRange(this._originalRange))}isVisible(e,t){const n=this.getSingleTextEdit();return b5e(n,this._originalRange,e,t)}}function b5e(i,e,t,n){const s=pb(i,t),r=i.range;if(!r||e&&!e.getStartPosition().equals(r.getStartPosition())||n.lineNumber!==s.range.startLineNumber||s.isEmpty)return!1;const o=t.getValueInRange(s.range,1),a=s.text,l=Math.max(0,n.column-s.range.startColumn);let c=a.substring(0,l),u=a.substring(l),h=o.substring(0,l),g=o.substring(l);const f=t.getLineIndentColumn(s.range.startLineNumber);return s.range.startColumn<=f&&(h=h.trimStart(),h.length===0&&(g=g.trimStart()),c=c.trimStart(),c.length===0&&(u=u.trimStart())),c.startsWith(h)&&!!kRe(g,u)}class hE extends m5e{static create(e,t){const n=oKt(t,e.range,e.insertText),s=new NC(t),r=Uc.fromStringEdit(n,s),o=n.isEmpty()?new Ar(new z(1,1,1,1),""):r.toReplacement(s),a=new z8,l=n.replacements.map(u=>{const h=z.fromPositions(t.getPositionAt(u.replaceRange.start),t.getPositionAt(u.replaceRange.endExclusive)),g=t.getValueInRange(h);return U8.create(u,g)}),c=e.hint?_M.create(e.hint):void 0;return new hE(n,o,e.uri,e,a,l,c,!1,t.getVersionId())}constructor(e,t,n,s,r,o,a,l=!1,c){super(s,r,a),this._edit=e,this._textEdit=t,this.uri=n,this._edits=o,this._lastChangePartOfInlineEdit=l,this._inlineEditModelVersion=c,this.snippetInfo=void 0,this.additionalTextEdits=[],this.isInlineEdit=!0}get updatedEditModelVersion(){return this._inlineEditModelVersion}get updatedEdit(){return this._edit}getSingleTextEdit(){return this._textEdit}withIdentity(e){return new hE(this._edit,this._textEdit,this.uri,this._data,e,this._edits,this.hint,this._lastChangePartOfInlineEdit,this._inlineEditModelVersion)}canBeReused(e,t){return this._lastChangePartOfInlineEdit&&this.updatedEditModelVersion===e.getVersionId()}withEdit(e,t){return this._applyTextModelChanges(e,this._edits,t)}_applyTextModelChanges(e,t,n){if(t=t.map(h=>h.applyTextModelChanges(e)),t.some(h=>h.edit===void 0))return;const s=n.getVersionId();let r=this._inlineEditModelVersion;const o=t.some(h=>h.lastChangeUpdatedEdit);if(o&&(r=s??-1),s===null||r+20!h.edit.isEmpty),t.length===0))return;const a=new Zb(t.map(h=>h.edit)),l=xM(n),c=l.getTextEdit(a).toReplacement(new NC(n));let u=this.hint;if(!(u&&(u=u.withEdit(e,l),!u)))return new hE(a,c,this.uri,this._data,this.identity,t,u,o,r)}}function oKt(i,e,t){const n=i.getEOL(),s=i.getValueInRange(e),r=t.replace(/\r\n|\r|\n/g,n),l=BJ.getDefault().computeDiff(Xc(s),Xc(r),{ignoreTrimWhitespace:!1,computeMoves:!1,extendToSubwords:!0,maxComputationTimeMs:500}).changes.flatMap(g=>g.innerChanges??[]);function c(g,f){const m=ro.fromPosition(f.getStartPosition());return ro.ofRange(f).createRange(m.addToPosition(g))}const u=new Xv(r);return new Zb(l.map(g=>{const f=c(e.getStartPosition(),g.originalRange),m=xM(i).getOffsetRange(f),x=u.getValueOfRange(g.modifiedRange),v=new Ko(m,x),_=i.getValueInRange(f);return lKt(v,_,l.length,i)}))}class U8{static create(e,t){const n=Wh(e.newText,t),s=Ub(e.newText,t),r=e.newText.substring(n,e.newText.length-s);return new U8(e,r,n,s)}get edit(){return this._edit}get lastChangeUpdatedEdit(){return this._lastChangeUpdatedEdit}constructor(e,t,n,s,r=!1){this._edit=e,this._trimmedNewText=t,this._prefixLength=n,this._suffixLength=s,this._lastChangeUpdatedEdit=r}applyTextModelChanges(e){const t=this._clone();return t._applyTextModelChanges(e),t}_clone(){return new U8(this._edit,this._trimmedNewText,this._prefixLength,this._suffixLength,this._lastChangeUpdatedEdit)}_applyTextModelChanges(e){if(this._lastChangeUpdatedEdit=!1,!this._edit)throw new Nt("UpdatedInnerEdits: No edit to apply changes to");const t=this._applyChanges(this._edit,e);if(!t){this._edit=void 0;return}this._edit=t.edit,this._lastChangeUpdatedEdit=t.editHasChanged}_applyChanges(e,t){let n=e.replaceRange.start,s=e.replaceRange.endExclusive,r=e.newText,o=!1;const a=this._prefixLength>0||this._suffixLength>0;for(let l=t.replacements.length-1;l>=0;l--){const c=t.replacements[l],u=c.newText.length>0&&c.replaceRange.isEmpty;if(u&&!a&&c.replaceRange.start===n&&r.startsWith(c.newText)){n+=c.newText.length,r=r.substring(c.newText.length),s=Math.max(n,s),o=!0;continue}if(u&&a&&c.replaceRange.start===n+this._prefixLength&&this._trimmedNewText.startsWith(c.newText)){s+=c.newText.length,o=!0,this._prefixLength+=c.newText.length,this._trimmedNewText=this._trimmedNewText.substring(c.newText.length);continue}if(c.newText.length===0&&c.replaceRange.length>0&&c.replaceRange.start>=n+this._prefixLength&&c.replaceRange.endExclusive<=s-this._suffixLength){s-=c.replaceRange.length,o=!0;continue}if(c.equals(e)){o=!0,n=c.replaceRange.endExclusive,r="";continue}if(!(c.replaceRange.start>s)){if(c.replaceRange.endExclusive1&&i.newText.endsWith(t)&&!i.newText.startsWith(t)?new Ko(i.replaceRange.delta(-1),t+i.newText.slice(0,-t.length)):i}function cKt(i,e){const t=new K2e,n=new Y2e(t,c=>e.getLanguageConfiguration(c)),s=new G2e(new dKt([i]),n),r=ZQ(s,[],void 0,!0);let o="";const a=i.getLineContent();function l(c,u){if(c.kind===2)if(l(c.openingBracket,u),u=Xs(u,c.openingBracket.length),c.child&&(l(c.child,u),u=Xs(u,c.child.length)),c.closingBracket)l(c.closingBracket,u),u=Xs(u,c.closingBracket.length);else{const g=n.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);o+=g}else if(c.kind!==3){if(c.kind===0||c.kind===1)o+=a.substring(u,Xs(u,c.length));else if(c.kind===4)for(const h of c.children)l(h,u),u=Xs(u,h.length)}}return l(r,Bl),o}class dKt{constructor(e){this.lines=e,this.tokenization={getLineTokens:t=>this.lines[t-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}class Ule{constructor(){this._nodes=new Set,this._outgoingEdges=new Map}static from(e,t){const n=new Ule;for(const s of e)n._nodes.add(s);for(const s of e){const r=t(s);if(r.length>0){const o=new Set;for(const a of r)o.add(a);n._outgoingEdges.set(s,o)}}return n}removeCycles(){const e=[],t=new Set,n=new Set,s=[],r=o=>{t.add(o),n.add(o);const a=this._outgoingEdges.get(o);if(a)for(const l of a)t.has(l)?n.has(l)&&(e.push(l),s.push({from:o,to:l})):r(l);n.delete(o)};for(const o of this._nodes)t.has(o)||r(o);for(const{from:o,to:a}of s){const l=this._outgoingEdges.get(o);l&&l.delete(a)}return{foundCycles:e}}getOutgoing(e){const t=this._outgoingEdges.get(e);return t?Array.from(t):[]}}var Pa;(function(i){i.Jump="jump",i.Accept="accept",i.Inactive="inactive"})(Pa||(Pa={}));var $n;(function(i){i.GhostText="ghostText",i.Custom="custom",i.SideBySide="sideBySide",i.Deletion="deletion",i.InsertionInline="insertionInline",i.InsertionMultiLine="insertionMultiLine",i.WordReplacements="wordReplacements",i.LineReplacement="lineReplacement",i.Collapsed="collapsed"})($n||($n={}));function uKt(i,e,t,n,s,r){const o=l2e("icr"),a=new vs;let l;const c={...n,requestUuid:o},u=pKt(e,t),h=l4t(i,_=>_.groupId),g=Ule.from(i,_=>{var w;return((w=_.yieldsToGroupIds)==null?void 0:w.flatMap(k=>h.get(k)??[]))??[]}),{foundCycles:f}=g.removeCycles();f.length>0&&Pr(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${f.map(_=>_.toString?_.toString():""+_).join(" -> ")}`));let m=0;const x=new MY(async _=>{try{if(m++,a.token.isCancellationRequested)return;const w=g.getOutgoing(_);for(const I of w){const R=await x.get(I);if(R)for(const P of R.inlineSuggestions.items){if(P.isInlineEdit||typeof P.insertText!="string"&&P.insertText!==void 0)return;if(P.insertText!==void 0){const j=new Ar(z.lift(P.range)??u,P.insertText);if(b5e(j,void 0,t,e))return}}}let k;const C=Date.now();try{k=await _.provideInlineCompletions(t,e,c,a.token)}catch(I){Pr(I);return}const E=Date.now();if(!k)return;const D=[],T=new fKt(k,D,_);if(T.addRef(),v5e(a.token,()=>T.removeRef(l)),a.token.isCancellationRequested)return;for(const I of k.items)D.push(hKt(I,T,u,t,r,c,s,{startTime:C,endTime:E}));return T}finally{m--}}),v=Fu.fromPromisesResolveOrder(i.map(_=>x.get(_))).filter(Ao);return{contextWithUuid:c,get didAllProvidersReturn(){return m===0},lists:v,cancelAndDispose:_=>{l===void 0&&(l=_,a.dispose(!0))}}}function v5e(i,e){if(i.isCancellationRequested)return e(),se.None;{const t=i.onCancellationRequested(()=>{t.dispose(),e()});return{dispose:()=>t.dispose()}}}function hKt(i,e,t,n,s,r,o,a){let l,c,u=i.range?z.lift(i.range):t;if(typeof i.insertText=="string"){if(l=i.insertText,s&&i.completeBracketPairs){l=x1e(l,u.getStartPosition(),n,s);const h=l.length-i.insertText.length;h!==0&&(u=new z(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn+h))}c=void 0}else if(i.insertText===void 0)l="",c=void 0,u=new z(1,1,1,1);else if("snippet"in i.insertText){const h=i.insertText.snippet.length;if(s&&i.completeBracketPairs){i.insertText.snippet=x1e(i.insertText.snippet,u.getStartPosition(),n,s);const f=i.insertText.snippet.length-h;f!==0&&(u=new z(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn+f))}const g=new DC().parse(i.insertText.snippet);g.children.length===1&&g.children[0]instanceof jl?(l=g.children[0].value,c=void 0):(l=g.toString(),c={snippet:i.insertText.snippet,range:u})}else AP(i.insertText);return new gKt(u,l,c,kt.revive(i.uri),i.hint,i.additionalTextEdits||yqt(),i,e,r,i.isInlineEdit??!1,o,a,i.correlationId)}class gKt{constructor(e,t,n,s,r,o,a,l,c,u,h,g,f){this.range=e,this.insertText=t,this.snippetInfo=n,this.uri=s,this.hint=r,this.additionalTextEdits=o,this.sourceInlineCompletion=a,this.source=l,this.context=c,this.isInlineEdit=u,this._requestInfo=h,this._providerRequestInfo=g,this._correlationId=f,this._didShow=!1,this._timeUntilShown=void 0,this._showStartTime=void 0,this._shownDuration=0,this._showUncollapsedStartTime=void 0,this._showUncollapsedDuration=0,this._notShownReason=void 0,this._didReportEndOfLife=!1,this._lastSetEndOfLifeReason=void 0,this._isPreceeded=!1,this._partiallyAcceptedCount=0,this._partiallyAcceptedSinceOriginal={characters:0,ratio:0,count:0},this._viewData={editorType:h.editorType}}get showInlineEditMenu(){return this.sourceInlineCompletion.showInlineEditMenu??!1}get partialAccepts(){return this._partiallyAcceptedSinceOriginal}async reportInlineEditShown(e,t,n,s){var o,a;if(this.updateShownDuration(n),this._didShow)return;this._didShow=!0,this._viewData.viewKind=n,this._viewData.renderData=s,this._timeUntilShown=Date.now()-this._requestInfo.startTime;const r=new HR(s.lineCountModified,s.lineCountOriginal,s.characterCountModified,s.characterCountOriginal);(a=(o=this.source.provider).handleItemDidShow)==null||a.call(o,this.source.inlineSuggestions,this.sourceInlineCompletion,t,r),this.sourceInlineCompletion.shownCommand&&await e.executeCommand(this.sourceInlineCompletion.shownCommand.id,...this.sourceInlineCompletion.shownCommand.arguments||[])}reportPartialAccept(e,t,n){var s,r;this._partiallyAcceptedCount++,this._partiallyAcceptedSinceOriginal.characters+=n.characters,this._partiallyAcceptedSinceOriginal.ratio=Math.min(this._partiallyAcceptedSinceOriginal.ratio+(1-this._partiallyAcceptedSinceOriginal.ratio)*n.ratio,1),this._partiallyAcceptedSinceOriginal.count+=n.count,(r=(s=this.source.provider).handlePartialAccept)==null||r.call(s,this.source.inlineSuggestions,this.sourceInlineCompletion,e,t)}reportEndOfLife(e){if(!this._didReportEndOfLife&&(this._didReportEndOfLife=!0,this.reportInlineEditHidden(),e||(e=this._lastSetEndOfLifeReason??{kind:xC.Ignored,userTypingDisagreed:!1,supersededBy:void 0}),e.kind===xC.Rejected&&this.source.provider.handleRejection&&this.source.provider.handleRejection(this.source.inlineSuggestions,this.sourceInlineCompletion),this.source.provider.handleEndOfLifetime)){const t={requestUuid:this.context.requestUuid,correlationId:this._correlationId,selectedSuggestionInfo:!!this.context.selectedSuggestionInfo,partiallyAccepted:this._partiallyAcceptedCount,partiallyAcceptedCountSinceOriginal:this._partiallyAcceptedSinceOriginal.count,partiallyAcceptedRatioSinceOriginal:this._partiallyAcceptedSinceOriginal.ratio,partiallyAcceptedCharactersSinceOriginal:this._partiallyAcceptedSinceOriginal.characters,shown:this._didShow,shownDuration:this._shownDuration,shownDurationUncollapsed:this._showUncollapsedDuration,preceeded:this._isPreceeded,timeUntilShown:this._timeUntilShown,timeUntilProviderRequest:this._providerRequestInfo.startTime-this._requestInfo.startTime,timeUntilProviderResponse:this._providerRequestInfo.endTime-this._requestInfo.startTime,editorType:this._viewData.editorType,languageId:this._requestInfo.languageId,requestReason:this._requestInfo.reason,viewKind:this._viewData.viewKind,notShownReason:this._notShownReason,typingInterval:this._requestInfo.typingInterval,typingIntervalCharacterCount:this._requestInfo.typingIntervalCharacterCount,availableProviders:this._requestInfo.availableProviders.map(n=>n.toString()).join(","),...this._viewData.renderData};this.source.provider.handleEndOfLifetime(this.source.inlineSuggestions,this.sourceInlineCompletion,e,t)}}setIsPreceeded(e){this._isPreceeded=!0,(this._partiallyAcceptedSinceOriginal.characters!==0||this._partiallyAcceptedSinceOriginal.ratio!==0||this._partiallyAcceptedSinceOriginal.count!==0)&&console.warn("Expected partiallyAcceptedCountSinceOriginal to be { characters: 0, rate: 0, partialAcceptances: 0 } before setIsPreceeded."),this._partiallyAcceptedSinceOriginal=e}setNotShownReason(e){this._notShownReason??(this._notShownReason=e)}setEndOfLifeReason(e){this.reportInlineEditHidden(),this._lastSetEndOfLifeReason=e}updateShownDuration(e){const t=Date.now();this._showStartTime||(this._showStartTime=t);const n=e===$n.Collapsed;!n&&this._showUncollapsedStartTime===void 0&&(this._showUncollapsedStartTime=t),n&&this._showUncollapsedStartTime!==void 0&&(this._showUncollapsedDuration+=t-this._showUncollapsedStartTime)}reportInlineEditHidden(){if(this._showStartTime===void 0)return;const e=Date.now();this._shownDuration+=e-this._showStartTime,this._showStartTime=void 0,this._showUncollapsedStartTime!==void 0&&(this._showUncollapsedDuration+=e-this._showUncollapsedStartTime,this._showUncollapsedStartTime=void 0)}}var JA;(function(i){i.TextEditor="textEditor",i.DiffEditor="diffEditor",i.Notebook="notebook"})(JA||(JA={}));class fKt{constructor(e,t,n){this.inlineSuggestions=e,this.inlineSuggestionsData=t,this.provider=n,this.refCount=0}addRef(){this.refCount++}removeRef(e={kind:"other"}){if(this.refCount--,this.refCount===0){for(const t of this.inlineSuggestionsData)t.reportEndOfLife();this.provider.disposeInlineCompletions(this.inlineSuggestions,e)}}}function pKt(i,e){const t=e.getWordAtPosition(i),n=e.getLineMaxColumn(i.lineNumber);return t?new z(i.lineNumber,t.startColumn,i.lineNumber,n):z.fromPositions(i,i.with(void 0,n))}function x1e(i,e,t,n){const s=t.getLineContent(e.lineNumber),r=Ko.replace(new ht(e.column-1,s.length),i),o=t.tokenization.tokenizeLinesAt(e.lineNumber,[r.replace(s)]),a=o==null?void 0:o[0].sliceZeroCopy(r.getRangeAfterReplace());return a?cKt(a,n):i}var mKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},kI=function(i,e){return function(t,n){e(t,n,i)}},WJ,Tw;let VJ=(Tw=class extends se{constructor(e,t,n,s,r,o,a,l,c){var h;super(),this._textModel=e,this._versionId=t,this._debounceValue=n,this._cursorPosition=s,this._languageConfigurationService=r,this._logService=o,this._configurationService=a,this._instantiationService=l,this._contextKeyService=c,this._updateOperation=this._register(new Zn),this._state=Aqt(this,{initial:()=>({inlineCompletions:Sh.createEmpty(),suggestWidgetInlineCompletions:Sh.createEmpty()}),disposeFinal:g=>{g.inlineCompletions.dispose(),g.suggestWidgetInlineCompletions.dispose()},changeTracker:J3t(()=>({versionId:this._versionId})),update:(g,f,m)=>{const x=Zb.compose(m.changes.map(v=>v.change?Oqt(v.change.changes):Zb.empty).filter(Ao));if(x.isEmpty())return f;try{return{inlineCompletions:f.inlineCompletions.createStateWithAppliedEdit(x,this._textModel),suggestWidgetInlineCompletions:f.suggestWidgetInlineCompletions.createStateWithAppliedEdit(x,this._textModel)}}finally{f.inlineCompletions.dispose(),f.suggestWidgetInlineCompletions.dispose()}}}),this.inlineCompletions=this._state.map(this,g=>g.inlineCompletions),this.suggestWidgetInlineCompletions=this._state.map(this,g=>g.suggestWidgetInlineCompletions),this._completionsEnabled=void 0,this.clearOperationOnTextModelChange=we(this,g=>{this._versionId.read(g),this._updateOperation.clear()}),this._loadingCount=Ft(this,0),this._loggingEnabled=L_e("editor.inlineSuggest.logFetch",!1,this._configurationService).recomputeInitiallyAndOnChange(this._store),this._sendRequestData=L_e("editor.inlineSuggest.emptyResponseInformation",!0,this._configurationService).recomputeInitiallyAndOnChange(this._store),this._structuredFetchLogger=this._register(this._instantiationService.createInstance(P8.cast(),"editor.inlineSuggest.logFetch.commandId")),this.clearOperationOnTextModelChange.recomputeInitiallyAndOnChange(this._store);const u=((h=rj.defaultChatAgent)==null?void 0:h.completionsEnablementSetting)??void 0;u&&(this._updateCompletionsEnablement(u),this._register(this._configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration(u)&&this._updateCompletionsEnablement(u)}))),this._state.recomputeInitiallyAndOnChange(this._store)}_updateCompletionsEnablement(e){const t=this._configurationService.getValue(e);no(t)?this._completionsEnabled=t:this._completionsEnabled=void 0}_log(e){this._loggingEnabled.get()&&this._logService.info(uqt(e)),this._structuredFetchLogger.log(e)}fetch(e,t,n,s,r,o,a){var x,v;const l=this._cursorPosition.get(),c=new bKt(l,n,this._textModel.getVersionId(),new Set(e)),u=n.selectedSuggestionInfo?this.suggestWidgetInlineCompletions.get():this.inlineCompletions.get();if((x=this._updateOperation.value)!=null&&x.request.satisfies(c))return this._updateOperation.value.promise;if((v=u==null?void 0:u.request)!=null&&v.satisfies(c))return Promise.resolve(!0);const h=!!this._updateOperation.value;this._updateOperation.clear();const g=new vs,f=(async()=>{const _=new _e;this._loadingCount.set(this._loadingCount.get()+1,void 0);let w=!1;const k=()=>{w||(w=!0,this._loadingCount.set(this._loadingCount.get()-1,void 0))};_.add(new pi(()=>k(),10*1e3)).schedule();const E=e.filter(T=>T.providerId),D=new xKt(n,a,E);try{const T=this._debounceValue.get(this._textModel),I=N2e(e.map(ne=>ne.debounceDelayMs),SLt($c))??T;if((h||r&&n.triggerKind===lc.Automatic)&&await Zye(I,g.token),g.token.isCancellationRequested||this._store.isDisposed||this._textModel.getVersionId()!==c.versionId)return D.setNoSuggestionReasonIfNotSet("canceled:beforeFetch"),!1;const P=WJ._requestId++;(this._loggingEnabled.get()||this._structuredFetchLogger.isEnabled.get())&&this._log({sourceId:"InlineCompletions.fetch",kind:"start",requestId:P,modelUri:this._textModel.uri,modelVersion:this._textModel.getVersionId(),context:{triggerKind:n.triggerKind,suggestInfo:n.selectedSuggestionInfo?!0:void 0},time:Date.now(),provider:t});const j=new Date,B=uKt(e,this._cursorPosition.get(),this._textModel,n,a,this._languageConfigurationService);v5e(g.token,()=>B.cancelAndDispose({kind:"tokenCancellation"}));let H=!1,$=!1;const q=[];for await(const ne of B.lists)if(ne){ne.addRef(),_.add(dt(()=>ne.removeRef(ne.inlineSuggestionsData.length===0?{kind:"empty"}:{kind:"notTaken"})));for(const W of ne.inlineSuggestionsData){if($=!0,!n.includeInlineEdits&&(W.isInlineEdit||W.showInlineEditMenu)){W.setNotShownReason("notInlineEditRequested");continue}if(!n.includeInlineCompletions&&!(W.isInlineEdit||W.showInlineEditMenu)){W.setNotShownReason("notInlineCompletionRequested");continue}const Y=HJ.create(W,this._textModel);q.push(Y),!Y.isInlineEdit&&!Y.showInlineEditMenu&&n.triggerKind===lc.Automatic&&Y.isVisible(this._textModel,this._cursorPosition.get())&&(H=!0)}if(H)break}if(B.cancelAndDispose({kind:"lostRace"}),this._loggingEnabled.get()||this._structuredFetchLogger.isEnabled.get()){const ne=B.didAllProvidersReturn;let W;(g.token.isCancellationRequested||this._store.isDisposed||this._textModel.getVersionId()!==c.versionId)&&(W="canceled");const Y=q.map(G=>{var U;return{range:G.editRange.toString(),text:G.insertText,hint:G.hint,isInlineEdit:G.isInlineEdit,showInlineEditMenu:G.showInlineEditMenu,providerId:(U=G.source.provider.providerId)==null?void 0:U.toString()}});this._log({sourceId:"InlineCompletions.fetch",kind:"end",requestId:P,durationMs:Date.now()-j.getTime(),error:W,result:Y,time:Date.now(),didAllProvidersReturn:ne})}if(D.setRequestUuid(B.contextWithUuid.requestUuid),$)D.setHasProducedSuggestion(),q.length>0&&g.token.isCancellationRequested&&q.forEach(ne=>ne.setNotShownReasonIfNotSet("canceled:whileAwaitingOtherProviders"));else if(g.token.isCancellationRequested)D.setNoSuggestionReasonIfNotSet("canceled:whileFetching");else{const ne=this._contextKeyService.getContextKeyValue("completionsQuotaExceeded");D.setNoSuggestionReasonIfNotSet(ne?"completionsQuotaExceeded":"noSuggestion")}const V=n.earliestShownDateTime-Date.now();if(V>0&&await Zye(V,g.token),g.token.isCancellationRequested||this._store.isDisposed||this._textModel.getVersionId()!==c.versionId||o.get()){const ne=g.token.isCancellationRequested?"canceled:afterMinShowDelay":this._store.isDisposed?"canceled:disposed":this._textModel.getVersionId()!==c.versionId?"canceled:documentChanged":o.get()?"canceled:userJumped":"unknown";return q.forEach(W=>W.setNotShownReasonIfNotSet(ne)),!1}const X=new Date;this._debounceValue.update(this._textModel,X.getTime()-j.getTime());const ae=this._cursorPosition.get();this._updateOperation.clear(),Vi(ne=>{const W=this._state.get();n.selectedSuggestionInfo?this._state.set({inlineCompletions:Sh.createEmpty(),suggestWidgetInlineCompletions:W.suggestWidgetInlineCompletions.createStateWithAppliedResults(q,c,this._textModel,ae,s)},ne):this._state.set({inlineCompletions:W.inlineCompletions.createStateWithAppliedResults(q,c,this._textModel,ae,s),suggestWidgetInlineCompletions:Sh.createEmpty()},ne),W.inlineCompletions.dispose(),W.suggestWidgetInlineCompletions.dispose()})}finally{_.dispose(),k(),this.sendInlineCompletionsRequestTelemetry(D)}return!0})(),m=new yKt(c,g,f);return this._updateOperation.value=m,f}clear(e){this._updateOperation.clear();const t=this._state.get();this._state.set({inlineCompletions:Sh.createEmpty(),suggestWidgetInlineCompletions:Sh.createEmpty()},e),t.inlineCompletions.dispose(),t.suggestWidgetInlineCompletions.dispose()}seedInlineCompletionsWithSuggestWidget(){const e=this.inlineCompletions.get(),t=this.suggestWidgetInlineCompletions.get();t&&Vi(n=>{var s,r;if(!e||(((s=t.request)==null?void 0:s.versionId)??-1)>(((r=e.request)==null?void 0:r.versionId)??-1)){e==null||e.dispose();const o=this._state.get();this._state.set({inlineCompletions:t.clone(),suggestWidgetInlineCompletions:Sh.createEmpty()},n),o.inlineCompletions.dispose(),o.suggestWidgetInlineCompletions.dispose()}this.clearSuggestWidgetInlineCompletions(n)})}sendInlineCompletionsRequestTelemetry(e){if(!this._sendRequestData.get()&&!this._contextKeyService.getContextKeyValue("isRunningUnificationExperiment")||e.requestUuid===void 0||e.hasProducedSuggestion||!_Kt(this._completionsEnabled,this._textModel.getLanguageId())||!e.providers.some(s=>{var r;return s1e((r=s.providerId)==null?void 0:r.extensionId)}))return;const t={opportunityId:e.requestUuid,noSuggestionReason:e.noSuggestionReason??"unknown",extensionId:"vscode-core",extensionVersion:"0.0.0",groupId:"empty",shown:!1,editorType:e.requestInfo.editorType,requestReason:e.requestInfo.reason,typingInterval:e.requestInfo.typingInterval,typingIntervalCharacterCount:e.requestInfo.typingIntervalCharacterCount,languageId:e.requestInfo.languageId,selectedSuggestionInfo:!!e.context.selectedSuggestionInfo,availableProviders:e.providers.map(s=>{var r;return(r=s.providerId)==null?void 0:r.toString()}).filter(Ao).join(","),...Pqt(e.providers.some(s=>{var r;return s1e((r=s.providerId)==null?void 0:r.extensionId)})),timeUntilProviderRequest:void 0,timeUntilProviderResponse:void 0,viewKind:void 0,preceeded:void 0,superseded:void 0,reason:void 0,correlationId:void 0,shownDuration:void 0,shownDurationUncollapsed:void 0,timeUntilShown:void 0,partiallyAccepted:void 0,partiallyAcceptedCountSinceOriginal:void 0,partiallyAcceptedRatioSinceOriginal:void 0,partiallyAcceptedCharactersSinceOriginal:void 0,cursorColumnDistance:void 0,cursorLineDistance:void 0,lineCountOriginal:void 0,lineCountModified:void 0,characterCountOriginal:void 0,characterCountModified:void 0,disjointReplacements:void 0,sameShapeReplacements:void 0,notShownReason:void 0},n=this._instantiationService.createInstance(PJ);jqt(n,t)}clearSuggestWidgetInlineCompletions(e){var t;(t=this._updateOperation.value)!=null&&t.request.context.selectedSuggestionInfo&&this._updateOperation.clear()}cancelUpdate(){this._updateOperation.clear()}},WJ=Tw,Tw._requestId=0,Tw);VJ=WJ=mKt([kI(4,As),kI(5,Ji),kI(6,Zt),kI(7,ft),kI(8,Bt)],VJ);class bKt{constructor(e,t,n,s){this.position=e,this.context=t,this.versionId=n,this.providers=s}satisfies(e){return this.position.equals(e.position)&&g1(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,eoe())&&(e.context.triggerKind===lc.Automatic||this.context.triggerKind===lc.Explicit)&&this.versionId===e.versionId&&vKt(e.providers,this.providers)}}class xKt{constructor(e,t,n){this.context=e,this.requestInfo=t,this.providers=n,this.hasProducedSuggestion=!1}setRequestUuid(e){this.requestUuid=e}setNoSuggestionReasonIfNotSet(e){this.noSuggestionReason??(this.noSuggestionReason=e)}setHasProducedSuggestion(){this.hasProducedSuggestion=!0}}function vKt(i,e){return[...i].every(t=>e.has(t))}function _Kt(i,e="*"){return i===void 0?!1:typeof i[e]<"u"?!!i[e]:!!i["*"]}class yKt{constructor(e,t,n){this.request=e,this.cancellationTokenSource=t,this.promise=n}dispose(){this.cancellationTokenSource.cancel()}}class Sh extends se{static createEmpty(){return new Sh([],void 0)}constructor(e,t){for(const n of e)n.addRef();super(),this.inlineCompletions=e,this.request=t,this._register({dispose:()=>{for(const n of this.inlineCompletions)n.removeRef()}})}_findById(e){return this.inlineCompletions.find(t=>t.identity===e)}_findByHash(e){return this.inlineCompletions.find(t=>t.hash===e)}createStateWithAppliedEdit(e,t){const n=this.inlineCompletions.map(s=>s.withEdit(e,t)).filter(Ao);return new Sh(n,this.request)}createStateWithAppliedResults(e,t,n,s,r){let o;if(r){const c=this._findById(r);if(c&&c.canBeReused(n,t.position)){o=c;const u=e.find(h=>h.hash===c.hash);u?e=CKt(u,e):e=[c,...e]}}const a=o?!o.isInlineEdit:e.some(c=>!c.isInlineEdit&&c.isVisible(n,s));let l=[];for(const c of e){const u=this._findByHash(c.hash);let h;u&&u!==c?(h=c.withIdentity(u.identity),c.setIsPreceeded(u),u.setEndOfLifeReason({kind:xC.Ignored,userTypingDisagreed:!1,supersededBy:c.getSourceCompletion()})):h=c,a!==h.isInlineEdit&&l.push(h)}return l.sort(_a(c=>c.showInlineEditMenu,_Ie)),l=wKt(l,c=>c.semanticId),new Sh(l,t)}clone(){return new Sh(this.inlineCompletions,this.request)}}function wKt(i,e){const t=new Set;return i.filter(n=>{const s=e(n);return t.has(s)?!1:(t.add(s),!0)})}function CKt(i,e){const t=e.indexOf(i);return t>-1?[i,...e.slice(0,t),...e.slice(t+1)]:e}class SKt{constructor(e,t,n){this.edit=e,this.commands=t,this.inlineCompletion=n}equals(e){return this.edit.equals(e.edit)&&this.inlineCompletion===e.inlineCompletion}}var kKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},v1e=function(i,e){return function(t,n){e(t,n,i)}};const WW=ln("IInlineCompletionsService"),_5e=new Ze("inlineCompletions.snoozed",!1,S(79,"Whether inline completions are currently snoozed"));let zJ=class extends se{get snoozeTimeLeft(){return this._snoozeTimeEnd===void 0?0:Math.max(0,this._snoozeTimeEnd-Date.now())}constructor(e,t){super(),this._contextKeyService=e,this._telemetryService=t,this._onDidChangeIsSnoozing=this._register(new ie),this.onDidChangeIsSnoozing=this._onDidChangeIsSnoozing.event,this._snoozeTimeEnd=void 0,this._recentCompletionIds=[],this._timer=this._register(new Yc);const n=_5e.bindTo(this._contextKeyService);this._register(this.onDidChangeIsSnoozing(()=>n.set(this.isSnoozing())))}setSnoozeDuration(e){if(e<0)throw new Nt(`Invalid snooze duration: ${e}. Duration must be non-negative.`);if(e===0){this.cancelSnooze();return}const t=this.isSnoozing(),n=this.snoozeTimeLeft;this._snoozeTimeEnd=Date.now()+e,t||this._onDidChangeIsSnoozing.fire(!0),this._timer.cancelAndSet(()=>{if(!this.isSnoozing())this._onDidChangeIsSnoozing.fire(!1);else throw new Nt("Snooze timer did not fire as expected")},this.snoozeTimeLeft+1),this._reportSnooze(e-n,e)}isSnoozing(){return this.snoozeTimeLeft>0}cancelSnooze(){this.isSnoozing()&&(this._reportSnooze(-this.snoozeTimeLeft,0),this._snoozeTimeEnd=void 0,this._timer.cancel(),this._onDidChangeIsSnoozing.fire(!1))}reportNewCompletion(e){this._lastCompletionId=e,this._recentCompletionIds.unshift(e),this._recentCompletionIds.length>5&&this._recentCompletionIds.pop()}_reportSnooze(e,t){const n=Math.round(e/1e3),s=Math.round(t/1e3);this._telemetryService.publicLog2("inlineCompletions.snooze",{deltaSeconds:n,totalSeconds:s,lastCompletionId:this._lastCompletionId,recentCompletionIds:this._recentCompletionIds})}};zJ=kKt([v1e(0,Bt),v1e(1,Ua)],zJ);wn(WW,zJ,1);const NKt="editor.action.inlineSuggest.snooze",EKt="editor.action.inlineSuggest.cancelSnooze",_1e="inlineCompletions.lastSnoozeDuration",P9=class P9 extends Fo{constructor(){super({id:P9.ID,title:be(81,"Snooze Inline Suggestions"),precondition:Ne.true(),f1:!0})}async run(e,...t){const n=e.get(Wa),s=e.get(WW),r=e.get(xl);let o;t.length>0&&typeof t[0]=="number"&&(o=t[0]*6e4),o||(o=await this.getDurationFromUser(n,r)),o&&s.setSnoozeDuration(o)}async getDurationFromUser(e,t){const n=t.getNumber(_1e,0,3e5),s=[{label:"1 minute",id:"1",value:6e4},{label:"5 minutes",id:"5",value:3e5},{label:"10 minutes",id:"10",value:6e5},{label:"15 minutes",id:"15",value:9e5},{label:"30 minutes",id:"30",value:18e5},{label:"60 minutes",id:"60",value:36e5}],r=await e.pick(s,{placeHolder:S(80,"Select snooze duration for Inline Suggestions"),activeItem:s.find(o=>o.value===n)});if(r)return t.store(_1e,r.value,0,0),r.value}};P9.ID=NKt;let UJ=P9;const O9=class O9 extends Fo{constructor(){super({id:O9.ID,title:be(82,"Cancel Snooze Inline Suggestions"),precondition:_5e,f1:!0})}async run(e){e.get(WW).cancelSnooze()}};O9.ID=EKt;let $J=O9;const xu=class xu extends se{getTypingInterval(){return(this._cacheInvalidated||this._cachedTypingIntervalResult===null)&&(this._cachedTypingIntervalResult=this._calculateTypingInterval(),this._cacheInvalidated=!1),this._cachedTypingIntervalResult}constructor(e){super(),this._textModel=e,this._typingSessions=[],this._currentSession=null,this._lastChangeTime=0,this._cachedTypingIntervalResult=null,this._cacheInvalidated=!0,this._register(this._textModel.onDidChangeContent(t=>this._updateTypingSpeed(t)))}_updateTypingSpeed(e){const t=Date.now();if(!this._isUserTyping(e)){this._finalizeCurrentSession();return}this._currentSession&&t-this._lastChangeTime>xu.MAX_SESSION_GAP_MS&&this._finalizeCurrentSession(),this._currentSession||(this._currentSession={startTime:t,endTime:t,characterCount:0}),this._currentSession.endTime=t,this._currentSession.characterCount+=this._getActualCharacterCount(e),this._lastChangeTime=t,this._cacheInvalidated=!0}_getActualCharacterCount(e){let t=0;for(const n of e.changes)t+=Math.max(n.text.length,n.rangeLength);return t}_isUserTyping(e){if(!e.detailedReasons||e.detailedReasons.length===0)return!1;for(const t of e.detailedReasons)if(this._isUserTypingReason(t))return!0;return!1}_isUserTypingReason(e){if(e.metadata.isUndoing||e.metadata.isRedoing)return!1;switch(e.metadata.source){case"cursor":{const t=e.metadata.kind;return t==="type"||t==="compositionType"||t==="compositionEnd"}default:return!1}}_finalizeCurrentSession(){if(!this._currentSession)return;this._currentSession.endTime-this._currentSession.startTime>=xu.MIN_SESSION_DURATION_MS&&this._currentSession.characterCount>0&&(this._typingSessions.push(this._currentSession),this._typingSessions.length>xu.SESSION_HISTORY_LIMIT&&this._typingSessions.shift()),this._currentSession=null}_calculateTypingInterval(){if(this._currentSession){const e={...this._currentSession};if(e.endTime-e.startTime>=xu.MIN_SESSION_DURATION_MS&&e.characterCount>0){const n=[...this._typingSessions,e];return this._calculateSpeedFromSessions(n)}}return this._calculateSpeedFromSessions(this._typingSessions)}_calculateSpeedFromSessions(e){if(e.length===0)return{averageInterval:0,characterCount:0};const t=[...e].sort((u,h)=>h.endTime-u.endTime),n=Date.now()-xu.TYPING_SPEED_WINDOW_MS,s=t.filter(u=>u.endTime>n),r=t.splice(s.length);let o=IF(s.map(u=>u.characterCount));for(let u=0;uu.endTime-u.startTime));if(a===0||o<=1)return{averageInterval:0,characterCount:o};const l=Math.max(1,o-1),c=a/l;return{averageInterval:Math.round(c),characterCount:o}}dispose(){this._finalizeCurrentSession(),super.dispose()}};xu.MAX_SESSION_GAP_MS=3e3,xu.MIN_SESSION_DURATION_MS=1e3,xu.SESSION_HISTORY_LIMIT=50,xu.TYPING_SPEED_WINDOW_MS=3e5,xu.MIN_CHARS_FOR_RELIABLE_SPEED=20;let qJ=xu;var LKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},by=function(i,e){return function(t,n){e(t,n,i)}};let KJ=class extends se{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,n,s,r,o,a,l,c,u,h,g,f,m){super(),this.textModel=e,this._selectedSuggestItem=t,this._textModelVersionId=n,this._positions=s,this._debounceValue=r,this._enabled=o,this._editor=a,this._instantiationService=l,this._commandService=c,this._languageConfigurationService=u,this._accessibilityService=h,this._languageFeaturesService=g,this._codeEditorService=f,this._inlineCompletionsService=m,this._isActive=Ft(this,!1),this._onlyRequestInlineEditsSignal=Au(this),this._forceUpdateExplicitlySignal=Au(this),this._noDelaySignal=Au(this),this._fetchSpecificProviderSignal=Au(this),this._selectedInlineCompletionId=Ft(this,void 0),this.primaryPosition=we(this,C=>this._positions.read(C)[0]??new te(1,1)),this.allPositions=we(this,C=>this._positions.read(C)),this._isAcceptingPartially=!1,this._appearedInsideViewport=we(this,C=>{const E=this.state.read(C);return!E||!E.inlineCompletion?!1:TKt(this._editor,E.inlineCompletion)}),this._onDidAccept=new ie,this.onDidAccept=this._onDidAccept.event,this._lastShownInlineCompletionInfo=void 0,this._lastAcceptedInlineCompletionInfo=void 0,this._didUndoInlineEdits=dxe({owner:this,changeTracker:{createChangeSummary:()=>({didUndo:!1}),handleChange:(C,E)=>{var D;return E.didUndo=C.didChange(this._textModelVersionId)&&!!((D=C.change)!=null&&D.isUndoing),!0}}},(C,E)=>{const D=this._textModelVersionId.read(C);return D!==null&&this._lastAcceptedInlineCompletionInfo&&this._lastAcceptedInlineCompletionInfo.textModelVersionIdAfter===D-1&&this._lastAcceptedInlineCompletionInfo.inlineCompletion.isInlineEdit&&E.didUndo?(this._lastAcceptedInlineCompletionInfo=void 0,!0):!1}),this._preserveCurrentCompletionReasons=new Set([Bm.Redo,Bm.Undo,Bm.AcceptWord]),this.dontRefetchSignal=Au(this),this._fetchInlineCompletionsPromise=dxe({owner:this,changeTracker:{createChangeSummary:()=>({dontRefetch:!1,preserveCurrentCompletion:!1,inlineCompletionTriggerKind:lc.Automatic,onlyRequestInlineEdits:!1,shouldDebounce:!0,provider:void 0,textChange:!1,changeReason:""}),handleChange:(C,E)=>{var D;if(C.didChange(this._textModelVersionId)){this._preserveCurrentCompletionReasons.has(this._getReason(C.change))&&(E.preserveCurrentCompletion=!0);const T=((D=C.change)==null?void 0:D.detailedReasons)??[];E.changeReason=T.length>0?T[0].getType():"",E.textChange=!0}else C.didChange(this._forceUpdateExplicitlySignal)?(E.preserveCurrentCompletion=!0,E.inlineCompletionTriggerKind=lc.Explicit):C.didChange(this.dontRefetchSignal)?E.dontRefetch=!0:C.didChange(this._onlyRequestInlineEditsSignal)?E.onlyRequestInlineEdits=!0:C.didChange(this._fetchSpecificProviderSignal)&&(E.provider=C.change);return!0}}},(C,E)=>{var ae,ne,W;if(this._source.clearOperationOnTextModelChange.read(C),this._noDelaySignal.read(C),this.dontRefetchSignal.read(C),this._onlyRequestInlineEditsSignal.read(C),this._forceUpdateExplicitlySignal.read(C),this._fetchSpecificProviderSignal.read(C),!((this._enabled.read(C)&&this._selectedSuggestItem.read(C)||this._isActive.read(C))&&(!this._inlineCompletionsService.isSnoozing()||E.inlineCompletionTriggerKind===lc.Explicit))){this._source.cancelUpdate();return}this._textModelVersionId.read(C);const T=this._source.suggestWidgetInlineCompletions.read(void 0);let I=this._selectedSuggestItem.read(C);if(this._shouldShowOnSuggestConflict.read(void 0)&&(I=void 0),T&&!I&&this._source.seedInlineCompletionsWithSuggestWidget(),E.dontRefetch)return Promise.resolve(!0);if(this._didUndoInlineEdits.read(C)&&E.inlineCompletionTriggerKind!==lc.Explicit){Vi(Y=>{this._source.clear(Y)});return}let R="";E.provider?R+="providerOnDidChange":E.inlineCompletionTriggerKind===lc.Explicit&&(R+="explicit"),E.changeReason&&(R+=R.length>0?`:${E.changeReason}`:E.changeReason);const P=this._typing.getTypingInterval(),j={editorType:this.editorType,startTime:Date.now(),languageId:this.textModel.getLanguageId(),reason:R,typingInterval:P.averageInterval,typingIntervalCharacterCount:P.characterCount,availableProviders:[]};let B={triggerKind:E.inlineCompletionTriggerKind,selectedSuggestionInfo:I==null?void 0:I.toSelectedSuggestionInfo(),includeInlineCompletions:!E.onlyRequestInlineEdits,includeInlineEdits:this._inlineEditsEnabled.read(C),requestIssuedDateTime:j.startTime,earliestShownDateTime:j.startTime+(E.inlineCompletionTriggerKind===lc.Explicit||this.inAcceptFlow.read(void 0)?0:this._minShowDelay.read(void 0))};B.triggerKind===lc.Automatic&&E.textChange&&this.textModel.getAlternativeVersionId()===((ae=this._lastShownInlineCompletionInfo)==null?void 0:ae.alternateTextModelVersionId)&&(B={...B,includeInlineCompletions:!this._lastShownInlineCompletionInfo.inlineCompletion.isInlineEdit,includeInlineEdits:this._lastShownInlineCompletionInfo.inlineCompletion.isInlineEdit});const H=this.selectedInlineCompletion.read(void 0)??((ne=this._inlineCompletionItems.read(void 0))==null?void 0:ne.inlineEdit),$=E.preserveCurrentCompletion||H!=null&&H.forwardStable?H:void 0,q=this._jumpedToId.map(Y=>{var G,U;return!!Y&&Y===((U=(G=this._inlineCompletionItems.read(void 0))==null?void 0:G.inlineEdit)==null?void 0:U.semanticId)}),V=E.provider?{providers:[E.provider],label:"single:"+((W=E.provider.providerId)==null?void 0:W.toString())}:{providers:this._languageFeaturesService.inlineCompletionsProvider.all(this.textModel),label:void 0},X=this.getAvailableProviders(V.providers);return j.availableProviders=X.map(Y=>Y.providerId).filter(Ao),this._source.fetch(X,V.label,B,$==null?void 0:$.identity,E.shouldDebounce,q,j)}),this._inlineCompletionItems=ma({owner:this},C=>{const E=this._source.inlineCompletions.read(C);if(!E)return;const D=this.primaryPosition.read(C);let T;const I=[];for(const R of E.inlineCompletions)R.isInlineEdit?T=R:R.isVisible(this.textModel,D)&&I.push(R);return I.length!==0&&(T=void 0),{inlineCompletions:I,inlineEdit:T}}),this._filteredInlineCompletionItems=ma({owner:this,equalsFn:oR()},C=>{const E=this._inlineCompletionItems.read(C);return(E==null?void 0:E.inlineCompletions)??[]}),this.selectedInlineCompletionIndex=we(this,C=>{const E=this._selectedInlineCompletionId.read(C),D=this._filteredInlineCompletionItems.read(C),T=this._selectedInlineCompletionId===void 0?-1:D.findIndex(I=>I.semanticId===E);return T===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):T}),this.selectedInlineCompletion=we(this,C=>{const E=this._filteredInlineCompletionItems.read(C),D=this.selectedInlineCompletionIndex.read(C);return E[D]}),this.activeCommands=ma({owner:this,equalsFn:oR()},C=>{var E;return((E=this.selectedInlineCompletion.read(C))==null?void 0:E.source.inlineSuggestions.commands)??[]}),this.inlineCompletionsCount=we(this,C=>{if(this.lastTriggerKind.read(C)===lc.Explicit)return this._filteredInlineCompletionItems.read(C).length}),this._hasVisiblePeekWidgets=we(this,C=>this._editorObs.openedPeekWidgets.read(C)>0),this._shouldShowOnSuggestConflict=we(this,C=>{const E=this._showOnSuggestConflict.read(C);if(E!=="never"&&!!this.selectedInlineCompletion.read(C)){const T=this._selectedSuggestItem.read(C);return T?E==="whenSuggestListIsIncomplete"?T.listIncomplete:!0:!1}return!1}),this.state=ma({owner:this,equalsFn:(C,E)=>!C||!E?C===E:C.kind==="ghostText"&&E.kind==="ghostText"?Jye(C.ghostTexts,E.ghostTexts)&&C.inlineCompletion===E.inlineCompletion&&C.suggestItem===E.suggestItem:C.kind==="inlineEdit"&&E.kind==="inlineEdit"?C.inlineEdit.equals(E.inlineEdit):!1},C=>{var R,P,j,B,H,$,q;const E=this.textModel;if(this._suppressInSnippetMode.read(C)&&this._isInSnippetMode.read(C))return;const D=this._inlineCompletionItems.read(C),T=D==null?void 0:D.inlineEdit;if(T){if(this._hasVisiblePeekWidgets.read(C))return;let V=T.getSingleTextEdit();V=pb(V,E);const X=this.primaryPosition.map(U=>jt.fromRangeInclusive(T.targetRange).addMargin(1,1).contains(U.lineNumber)),ae=T.source.inlineSuggestions.commands,ne=new SKt(V,ae??[],T),W=T.updatedEdit,Y=W?Uc.fromStringEdit(W,new NC(this.textModel)).replacements:[V],G=(((P=(R=D.inlineEdit)==null?void 0:R.command)==null?void 0:P.id)==="vscode.open"||((B=(j=D.inlineEdit)==null?void 0:j.command)==null?void 0:B.id)==="_workbench.open")&&(($=(H=D.inlineEdit)==null?void 0:H.command.arguments)!=null&&$.length)?kt.from((q=D.inlineEdit)==null?void 0:q.command.arguments[0]):void 0;return{kind:"inlineEdit",inlineEdit:ne,inlineCompletion:T,edits:Y,cursorAtInlineEdit:X,nextEditUri:G}}const I=this._selectedSuggestItem.read(C);if(!this._shouldShowOnSuggestConflict.read(C)&&I){const V=pb(I.getSingleTextEdit(),E),X=this._computeAugmentation(V,C);if(!this._suggestPreviewEnabled.read(C)&&!X)return;const ne=(X==null?void 0:X.edit)??V,W=X?X.edit.text.length-V.text.length:0,Y=this._suggestPreviewMode.read(C),G=this._positions.read(C),ue=[ne,...rK(this.textModel,G,ne)].map((ge,he)=>({edit:ge,ghostText:ge?e1e(ge,E,Y,G[he],W):void 0})).filter(({edit:ge,ghostText:he})=>ge!==void 0&&he!==void 0),fe=ue.map(({edit:ge})=>ge),Le=ue.map(({ghostText:ge})=>ge),tt=Le[0]??new vM(ne.range.endLineNumber,[]);return{kind:"ghostText",edits:fe,primaryGhostText:tt,ghostTexts:Le,inlineCompletion:X==null?void 0:X.completion,suggestItem:I}}else{if(!this._isActive.read(C))return;const V=this.selectedInlineCompletion.read(C);if(!V)return;const X=V.getSingleTextEdit(),ae=this._inlineSuggestMode.read(C),ne=this._positions.read(C),Y=[X,...rK(this.textModel,ne,X)].map((ue,fe)=>({edit:ue,ghostText:ue?e1e(ue,E,ae,ne[fe],0):void 0})).filter(({edit:ue,ghostText:fe})=>ue!==void 0&&fe!==void 0),G=Y.map(({edit:ue})=>ue),U=Y.map(({ghostText:ue})=>ue);return U[0]?{kind:"ghostText",edits:G,primaryGhostText:U[0],ghostTexts:U,inlineCompletion:V,suggestItem:void 0}:void 0}}),this.inlineCompletionState=we(this,C=>{const E=this.state.read(C);if(!(!E||E.kind!=="ghostText")&&!this._editorObs.inComposition.read(C))return E}),this.inlineEditState=we(this,C=>{const E=this.state.read(C);if(!(!E||E.kind!=="inlineEdit"))return E}),this.inlineEditAvailable=we(this,C=>!!this.inlineEditState.read(C)),this.warning=we(this,C=>{var E,D;return(D=(E=this.inlineCompletionState.read(C))==null?void 0:E.inlineCompletion)==null?void 0:D.warning}),this.ghostTexts=ma({owner:this,equalsFn:Jye},C=>{const E=this.inlineCompletionState.read(C);if(E)return E.ghostTexts}),this.primaryGhostText=ma({owner:this,equalsFn:u5e},C=>{const E=this.inlineCompletionState.read(C);if(E)return E==null?void 0:E.primaryGhostText}),this.showCollapsed=we(this,C=>{const E=this.state.read(C);if(!E||E.kind!=="inlineEdit"||E.inlineCompletion.hint)return!1;const D=E.inlineCompletion.updatedEditModelVersion===this._textModelVersionId.read(C);return(this._inlineEditsShowCollapsedEnabled.read(C)||!D)&&this._jumpedToId.read(C)!==E.inlineCompletion.semanticId&&!this._inAcceptFlow.read(C)}),this._tabShouldIndent=we(this,C=>{if(this._inAcceptFlow.read(C))return!1;function E(I){return I.startLineNumber!==I.endLineNumber}function D(I,R){const P=I.getLineIndentColumn(R),j=I.getLineLastNonWhitespaceColumn(R),B=Math.max(j,P);return new z(R,P,R,B)}const T=this._editorObs.selections.read(C);return T==null?void 0:T.some(I=>I.isEmpty()?this.textModel.getLineLength(I.startLineNumber)===0:E(I)||I.containsRange(D(this.textModel,I.startLineNumber)))}),this.tabShouldJumpToInlineEdit=we(this,C=>{var D;if(this._tabShouldIndent.read(C))return!1;const E=this.inlineEditState.read(C);return E?this.showCollapsed.read(C)?!0:this._inAcceptFlow.read(C)&&this._appearedInsideViewport.read(C)&&!((D=E.inlineCompletion.hint)!=null&&D.jumpToEdit)?!1:!E.cursorAtInlineEdit.read(C):!1}),this.tabShouldAcceptInlineEdit=we(this,C=>{var D;const E=this.inlineEditState.read(C);return!E||this.showCollapsed.read(C)||this._tabShouldIndent.read(C)?!1:this._inAcceptFlow.read(C)&&this._appearedInsideViewport.read(C)&&!((D=E.inlineCompletion.hint)!=null&&D.jumpToEdit)||E.inlineCompletion.targetRange.startLineNumber===this._editorObs.cursorLineNumber.read(C)||this._jumpedToId.read(C)===E.inlineCompletion.semanticId?!0:E.cursorAtInlineEdit.read(C)}),this._jumpedToId=Ft(this,void 0),this._inAcceptFlow=Ft(this,!1),this.inAcceptFlow=this._inAcceptFlow,this._source=this._register(this._instantiationService.createInstance(VJ,this.textModel,this._textModelVersionId,this._debounceValue,this.primaryPosition)),this.lastTriggerKind=this._source.inlineCompletions.map(this,C=>{var E;return(E=C==null?void 0:C.request)==null?void 0:E.context.triggerKind}),this._editorObs=Ts(this._editor);const x=this._editorObs.getOption(134);this._suggestPreviewEnabled=x.map(C=>C.preview),this._suggestPreviewMode=x.map(C=>C.previewMode);const v=this._editorObs.getOption(71);this._inlineSuggestMode=v.map(C=>C.mode),this._suppressedInlineCompletionGroupIds=v.map(C=>new Set(C.experimental.suppressInlineSuggestions.split(","))),this._inlineEditsEnabled=v.map(C=>!!C.edits.enabled),this._inlineEditsShowCollapsedEnabled=v.map(C=>C.edits.showCollapsed),this._triggerCommandOnProviderChange=v.map(C=>C.triggerCommandOnProviderChange),this._minShowDelay=v.map(C=>C.minShowDelay),this._showOnSuggestConflict=v.map(C=>C.experimental.showOnSuggestConflict),this._suppressInSnippetMode=v.map(C=>C.suppressInSnippetMode);const _=fl.get(this._editor);this._isInSnippetMode=(_==null?void 0:_.isInSnippetObservable)??zi(!1),this._typing=this._register(new qJ(this.textModel)),this._register(this._inlineCompletionsService.onDidChangeIsSnoozing(C=>{C&&this.stop()}));{const C=this.textModel.uri.scheme==="vscode-notebook-cell",[E]=this._codeEditorService.listDiffEditors().filter(D=>D.getOriginalEditor().getId()===this._editor.getId()||D.getModifiedEditor().getId()===this._editor.getId());this.isInDiffEditor=!!E,this.editorType=C?JA.Notebook:this.isInDiffEditor?JA.DiffEditor:JA.TextEditor}this._register(xL(this.state,C=>{C&&C.inlineCompletion&&this._inlineCompletionsService.reportNewCompletion(C.inlineCompletion.requestUuid)})),this._register(xL(this._fetchInlineCompletionsPromise)),this._register(Pt(C=>{this._editorObs.versionId.read(C),this._inAcceptFlow.set(!1,void 0)})),this._register(Pt(C=>{this.state.map((D,T)=>!D||D.kind==="inlineEdit"&&!D.cursorAtInlineEdit.read(T)).read(C)&&this._jumpedToId.set(void 0,void 0)}));const w=this.inlineEditState.map(C=>C==null?void 0:C.inlineCompletion.semanticId);this._register(Pt(C=>{w.read(C)&&(this._editor.pushUndoStop(),this._lastShownInlineCompletionInfo={alternateTextModelVersionId:this.textModel.getAlternativeVersionId(),inlineCompletion:this.state.get().inlineCompletion})}));const k=Gn(this._languageFeaturesService.inlineCompletionsProvider.onDidChange,()=>this._languageFeaturesService.inlineCompletionsProvider.all(e));ioe(this,k,(C,E)=>{C.onDidChangeInlineCompletions&&E.add(C.onDidChangeInlineCompletions(()=>{var I;if(!this._enabled.get()||(this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor())!==this._editor)return;if(this._triggerCommandOnProviderChange.get()){this.trigger(void 0,{onlyFetchInlineEdits:!0});return}const T=this.state.get();T&&(T.inlineCompletion||T.edits)&&((I=T.inlineCompletion)==null?void 0:I.source.provider)!==C||Vi(R=>{this._fetchSpecificProviderSignal.trigger(R,C),this.trigger(R)})}))}).recomputeInitiallyAndOnChange(this._store),this._didUndoInlineEdits.recomputeInitiallyAndOnChange(this._store)}getIndentationInfo(e){let t=!1,n=!0;const s=this==null?void 0:this.primaryGhostText.read(e);if(this!=null&&this._selectedSuggestItem&&s&&s.parts.length>0){const{column:r,lines:o}=s.parts[0],a=o[0].line,l=this.textModel.getLineIndentColumn(s.lineNumber);if(r<=l){let u=dl(a);u===-1&&(u=a.length-1),t=u>0;const h=this.textModel.getOptions().tabSize;n=js.visibleColumnFromColumn(a,u+1,h)!(a.groupId&&t.has(a.groupId))),s=new Set;for(const a of n)(o=a.excludesGroupIds)==null||o.forEach(l=>s.add(l));const r=[];for(const a of n)a.groupId&&s.has(a.groupId)||r.push(a);return r}async trigger(e,t={}){bL(e,n=>{t.onlyFetchInlineEdits&&this._onlyRequestInlineEditsSignal.trigger(n),t.noDelay&&this._noDelaySignal.trigger(n),this._isActive.set(!0,n),t.explicit&&(this._inAcceptFlow.set(!0,n),this._forceUpdateExplicitlySignal.trigger(n)),t.provider&&this._fetchSpecificProviderSignal.trigger(n,t.provider)}),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e,t=!1){return this.trigger(e,{onlyFetchInlineEdits:t,explicit:!0})}stop(e="automatic",t){bL(t,n=>{var s;if(e==="explicitCancel"){const r=(s=this.state.get())==null?void 0:s.inlineCompletion;r&&r.reportEndOfLife({kind:xC.Rejected})}this._isActive.set(!1,n),this._source.clear(n)})}_computeAugmentation(e,t){const n=this.textModel,s=this._source.suggestWidgetInlineCompletions.read(t),r=s?s.inlineCompletions.filter(a=>!a.isInlineEdit):[this.selectedInlineCompletion.read(t)].filter(Ao);return OPt(r,a=>{let l=a.getSingleTextEdit();return l=pb(l,n,z.fromPositions(l.range.getStartPosition(),e.range.getEndPosition())),h5e(l,e)?{completion:a,edit:l}:void 0})}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const n=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[n].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}_getMetadata(e,t,n=void 0){return n?Aa.inlineCompletionPartialAccept({nes:e.isInlineEdit,requestUuid:e.requestUuid,providerId:e.source.provider.providerId,languageId:t,type:n}):Aa.inlineCompletionAccept({nes:e.isInlineEdit,requestUuid:e.requestUuid,providerId:e.source.provider.providerId,languageId:t})}async accept(e=this._editor){var r;if(e.getModel()!==this.textModel)throw new Nt;let t,n=!1;const s=this.state.get();if((s==null?void 0:s.kind)==="ghostText"){if(!s||s.primaryGhostText.isEmpty()||!s.inlineCompletion)return;t=s.inlineCompletion}else if((s==null?void 0:s.kind)==="inlineEdit")t=s.inlineCompletion,n=!!s.nextEditUri;else return;t.addRef();try{if(e.pushUndoStop(),!n)if(t.snippetInfo){const o=Ar.delete(t.editRange),a=t.additionalTextEdits.map(c=>new Ar(z.lift(c.range),c.text??"")),l=Uc.fromParallelReplacementsUnsorted([o,...a]);e.edit(l,this._getMetadata(t,this.textModel.getLanguageId())),e.setPosition(t.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),(r=fl.get(e))==null||r.insert(t.snippetInfo.snippet,{undoStopBefore:!1})}else{const o=s.edits;let a=o;s.kind==="ghostText"&&(a=Cqt(o,this.textModel));const l=Xye(a).map(h=>st.fromPositions(h)),c=t.additionalTextEdits.map(h=>new Ar(z.lift(h.range),h.text??"")),u=Uc.fromParallelReplacementsUnsorted([...o,...c]);if(e.edit(u,this._getMetadata(t,this.textModel.getLanguageId())),t.hint===void 0&&e.setSelections(s.kind==="inlineEdit"?l.slice(-1):l,"inlineCompletionAccept"),s.kind==="inlineEdit"&&!this._accessibilityService.isMotionReduced()){const h=u.getNewRanges(),g=this._store.add(new DKt(e,h,()=>{this._store.delete(g)}))}}this._onDidAccept.fire(),this.stop(),t.command&&await this._commandService.executeCommand(t.command.id,...t.command.arguments||[]).then(void 0,Pr),t.reportEndOfLife({kind:xC.Accepted})}finally{t.removeRef(),this._inAcceptFlow.set(!0,void 0),this._lastAcceptedInlineCompletionInfo={textModelVersionIdAfter:this.textModel.getVersionId(),inlineCompletion:t}}}async acceptNextWord(){await this._acceptNext(this._editor,"word",(e,t)=>{const n=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),s=this._languageConfigurationService.getLanguageConfiguration(n),r=new RegExp(s.wordDefinition.source,s.wordDefinition.flags.replace("g","")),o=t.match(r);let a=0;o&&o.index!==void 0?o.index===0?a=o[0].length:a=o.index:a=t.length;const c=/\s+/g.exec(t);return c&&c.index!==void 0&&c.index+c[0].length{const n=t.match(/\n/);return n&&n.index!==void 0?n.index+1:t.length},1)}async _acceptNext(e,t,n,s){if(e.getModel()!==this.textModel)throw new Nt;const r=this.inlineCompletionState.get();if(!r||r.primaryGhostText.isEmpty()||!r.inlineCompletion)return;const o=r.primaryGhostText,a=r.inlineCompletion;if(a.snippetInfo){await this.accept(e);return}const l=o.parts[0],c=new te(o.lineNumber,l.column),u=l.text,h=n(c,u);if(h===u.length&&o.parts.length===1){this.accept(e);return}const g=u.substring(0,h),f=this._positions.get(),m=f[0];a.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const w=z.fromPositions(m,c),k=e.getModel().getValueInRange(w)+g,C=new Ar(w,k),E=[C,...rK(this.textModel,f,C)].filter(Ao),D=Xye(E).map(T=>st.fromPositions(T));e.edit(Uc.fromParallelReplacementsUnsorted(E),this._getMetadata(a,t)),e.setSelections(D,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}const x=z.fromPositions(a.editRange.getStartPosition(),ro.ofText(g).addToPosition(c)),_=e.getModel().getValueInRange(x,1).length;a.reportPartialAccept(_,{kind:s,acceptedLength:_},{characters:h,ratio:h/u.length,count:1})}finally{a.removeRef()}}handleSuggestAccepted(e){const t=pb(e.getSingleTextEdit(),this.textModel),n=this._computeAugmentation(t,void 0);if(!n)return;const r=this.textModel.getValueInRange(n.completion.editRange,1).length+t.text.length;n.completion.reportPartialAccept(t.text.length,{kind:2,acceptedLength:r},{characters:t.text.length,count:1,ratio:1})}extractReproSample(){var n;const e=this.textModel.getValue(),t=(n=this.state.get())==null?void 0:n.inlineCompletion;return{documentValue:e,inlineCompletion:t==null?void 0:t.getSourceCompletion()}}jump(){const e=this.inlineEditState.get();e&&Vi(t=>{this._jumpedToId.set(e.inlineCompletion.semanticId,t),this.dontRefetchSignal.trigger(t);const n=e.inlineCompletion.targetRange,s=n.getStartPosition();if(this._editor.setPosition(s,"inlineCompletions.jump"),n.isSingleLine()&&(e.inlineCompletion.hint||!e.inlineCompletion.insertText.includes(` +`)))this._editor.revealPosition(s);else{const o=new z(n.startLineNumber-1,1,n.endLineNumber+1,1);this._editor.revealRange(o,1)}e.inlineCompletion.identity.setJumpTo(t),this._editor.focus()})}async handleInlineSuggestionShown(e,t,n){await e.reportInlineEditShown(this._commandService,t,n)}};KJ=LKt([by(7,ft),by(8,es),by(9,As),by(10,Zo),by(11,lt),by(12,Hn),by(13,WW)],KJ);var Bm;(function(i){i[i.Undo=0]="Undo",i[i.Redo=1]="Redo",i[i.AcceptWord=2]="AcceptWord",i[i.Other=3]="Other"})(Bm||(Bm={}));function rK(i,e,t){if(e.length===1)return[];const n=new NC(i),s=n.getTransformer(),r=s.getOffset(e[0]),o=e.slice(1).map(g=>s.getOffset(g));t=t.removeCommonPrefixAndSuffix(n);const a=s.getStringReplacement(t),l=a.replaceRange.start-r,c=a.replaceRange.join(ht.emptyAt(r)),u=n.getValueOfOffsetRange(c);return o.map(g=>{const f=g+l,m=f+a.replaceRange.length,x=new ht(f,m),v=x.join(ht.emptyAt(g));if(n.getValueOfOffsetRange(v)!==u)return;const w=new Ko(x,a.newText);return s.getTextReplacement(w)}).filter(Ao)}class DKt extends se{constructor(e,t,n){super(),n&&this._register({dispose:()=>n()}),this._register(Ts(e).setDecorations(zi(t.map(o=>({range:o,options:{description:"animation",className:"edits-fadeout-decoration",zIndex:1}})))));const s=new Nqt(1,0,1e3,Lqt),r=new Dqt(s);this._register(Pt(o=>{const a=r.getValue(o);e.getContainerDomNode().style.setProperty("--animation-opacity",a.toString()),s.isFinished()&&this.dispose()}))}}function TKt(i,e){const t=e.targetRange,n=i.getVisibleRanges();return n.length<1?!1:new z(n[0].startLineNumber,n[0].startColumn,n[n.length-1].endLineNumber,n[n.length-1].endColumn).containsRange(t)}var IKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},y1e=function(i,e){return function(t,n){e(t,n,i)}},ZI;class $le{constructor(e){this.name=e}select(e,t,n){if(n.length===0)return 0;const s=n[0].score[0];for(let r=0;rl&&h.type===n[c].completion.kind&&h.insertText===n[c].completion.insertText&&(l=h.touch,a=c),n[c].completion.preselect&&o===-1)return o=c}return a!==-1?a:o!==-1?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();const t=0;for(const[n,s]of e)s.touch=t,s.type=typeof s.type=="number"?s.type:TL.fromString(s.type),this._cache.set(n,s);this._seq=this._cache.size}}class RKt extends $le{constructor(){super("recentlyUsedByPrefix"),this._trie=lE.forStrings(),this._seq=0}memorize(e,t,n){const{word:s}=e.getWordUntilPosition(t),r=`${e.getLanguageId()}/${s}`;this._trie.set(r,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}select(e,t,n){const{word:s}=e.getWordUntilPosition(t);if(!s)return super.select(e,t,n);const r=`${e.getLanguageId()}/${s}`;let o=this._trie.get(r);if(o||(o=this._trie.findSubstr(r)),o)for(let a=0;ae.push([n,t])),e.sort((t,n)=>-(t[1].touch-n[1].touch)).forEach((t,n)=>t[1].touch=n),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,n]of e)n.type=typeof n.type=="number"?n.type:TL.fromString(n.type),this._trie.set(t,n)}}}var O_;let GJ=(O_=class{constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new _e,this._persistSoon=new pi(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===__.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}select(e,t,n){return this._withStrategy(e,t).select(e,t,n)}_withStrategy(e,t){var s;const n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(((s=this._strategy)==null?void 0:s.name)!==n){this._saveState();const r=ZI._strategyCtors.get(n)||w1e;this._strategy=new r;try{const a=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get(`${ZI._storagePrefix}/${n}`,a);l&&this._strategy.fromJSON(JSON.parse(l))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${ZI._storagePrefix}/${this._strategy.name}`,n,t,1)}}},ZI=O_,O_._strategyCtors=new Map([["recentlyUsedByPrefix",RKt],["recentlyUsed",AKt],["first",w1e]]),O_._storagePrefix="suggest/memories",O_);GJ=ZI=IKt([y1e(0,xl),y1e(1,Zt)],GJ);const VW=ln("ISuggestMemories");wn(VW,GJ,1);var MKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},PKt=function(i,e){return function(t,n){e(t,n,i)}},YJ,Iw;let $8=(Iw=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=YJ.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(n=>n.hasChanged(139)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)==null||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(139)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const n=this._editor.getModel(),s=this._editor.getSelection(),r=n.getWordAtPosition(s.getStartPosition());if(!r){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(r.endColumn===s.getStartPosition().column&&s.getStartPosition().lineNumber===s.getEndPosition().lineNumber)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}},YJ=Iw,Iw.AtEnd=new Ze("atEndOfWord",!1,{type:"boolean",description:S(1494,"A context key that is true when at the end of a word. Note that this is only defined when tab-completions are enabled")}),Iw);$8=YJ=MKt([PKt(1,Bt)],$8);var OKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},jKt=function(i,e){return function(t,n){e(t,n,i)}},JI,Aw;let $L=(Aw=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=JI.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)==null||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},n){if(e.items.length===0){this.reset();return}if(JI._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=n,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,n){let s=n;for(let r=t.items.length;r>0&&(s=(s+t.items.length+(e?1:-1))%t.items.length,!(s===n||!t.items[s].completion.additionalTextEdits));r--);return s}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=JI._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}},JI=Aw,Aw.OtherSuggestions=new Ze("hasOtherSuggestions",!1),Aw);$L=JI=OKt([jKt(1,Bt)],$L);class FKt{constructor(e,t,n,s){this._disposables=new _e,this._disposables.add(n.onDidSuggest(r=>{r.completionModel.items.length===0&&this.reset()})),this._disposables.add(n.onDidCancel(r=>{this.reset()})),this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(r=>{if(this._active&&!t.isFrozen()&&n.state!==0){const o=r.charCodeAt(r.length-1);this._active.acceptCharacters.has(o)&&e.getOption(0)&&s(this._active.item)}}))}_onItem(e){if(!e||!ul(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new FF;for(const n of e.item.completion.commitCharacters)n.length>0&&t.add(n.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}const vu=class vu{async provideSelectionRanges(e,t){const n=[];for(const s of t){const r=[];n.push(r);const o=new Map;await new Promise(a=>vu._bracketsRightYield(a,0,e,s,o)),await new Promise(a=>vu._bracketsLeftYield(a,0,e,s,o,r))}return n}static _bracketsRightYield(e,t,n,s,r){const o=new Map,a=Date.now();for(;;){if(t>=vu._maxRounds){e();break}if(!s){e();break}const l=n.bracketPairs.findNextBracket(s);if(!l){e();break}if(Date.now()-a>vu._maxDuration){setTimeout(()=>vu._bracketsRightYield(e,t+1,n,s,r));break}if(l.bracketInfo.isOpeningBracket){const u=l.bracketInfo.bracketText,h=o.has(u)?o.get(u):0;o.set(u,h+1)}else{const u=l.bracketInfo.getOpeningBrackets()[0].bracketText;let h=o.has(u)?o.get(u):0;if(h-=1,o.set(u,Math.max(0,h)),h<0){let g=r.get(u);g||(g=new ll,r.set(u,g)),g.push(l.range)}}s=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,n,s,r,o){const a=new Map,l=Date.now();for(;;){if(t>=vu._maxRounds&&r.size===0){e();break}if(!s){e();break}const c=n.bracketPairs.findPrevBracket(s);if(!c){e();break}if(Date.now()-l>vu._maxDuration){setTimeout(()=>vu._bracketsLeftYield(e,t+1,n,s,r,o));break}if(c.bracketInfo.isOpeningBracket){const h=c.bracketInfo.bracketText;let g=a.has(h)?a.get(h):0;if(g-=1,a.set(h,Math.max(0,g)),g<0){const f=r.get(h);if(f){const m=f.shift();f.size===0&&r.delete(h);const x=z.fromPositions(c.range.getEndPosition(),m.getStartPosition()),v=z.fromPositions(c.range.getStartPosition(),m.getEndPosition());o.push({range:x}),o.push({range:v}),vu._addBracketLeading(n,v,o)}}}else{const h=c.bracketInfo.getOpeningBrackets()[0].bracketText,g=a.has(h)?a.get(h):0;a.set(h,g+1)}s=c.range.getStartPosition()}}static _addBracketLeading(e,t,n){if(t.startLineNumber===t.endLineNumber)return;const s=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(s);r!==0&&r!==t.startColumn&&(n.push({range:z.fromPositions(new te(s,r),t.getEndPosition())}),n.push({range:z.fromPositions(new te(s,1),t.getEndPosition())}));const o=s-1;if(o>0){const a=e.getLineFirstNonWhitespaceColumn(o);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(o)&&(n.push({range:z.fromPositions(new te(o,a),t.getEndPosition())}),n.push({range:z.fromPositions(new te(o,1),t.getEndPosition())}))}}};vu._maxDuration=30,vu._maxRounds=2;let q8=vu;const Of=class Of{static async create(e,t){if(!t.getOption(134).localityBonus||!t.hasModel())return Of.None;const n=t.getModel(),s=t.getPosition();if(!e.canComputeWordRanges(n.uri))return Of.None;const[r]=await new q8().provideSelectionRanges(n,[s]);if(r.length===0)return Of.None;const o=await e.computeWordRanges(n.uri,r[0].range);if(!o)return Of.None;const a=n.getWordUntilPosition(s);return delete o[a.word],new class extends Of{distance(l,c){if(!s.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;const u=typeof c.label=="string"?c.label:c.label.label,h=o[u];if(xIe(h))return 2<<20;const g=LF(h,z.fromPositions(l),z.compareRangesUsingStarts),f=g>=0?h[g]:h[Math.max(0,~g-1)];let m=r.length;for(const x of r){if(!z.containsRange(x.range,f))break;m-=1}return m}}}};Of.None=new class extends Of{distance(){return 0}};let K8=Of,C1e=class{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}};class Ev{constructor(e,t,n,s,r,o,a=zR.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=Ev._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=s,this._options=r,this._refilterKind=1,this._lineContext=n,this._fuzzyScoreOptions=a,o==="top"?this._snippetCompareFn=Ev._compareCompletionItemsSnippetsUp:o==="bottom"&&(this._snippetCompareFn=Ev._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&n[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:n}=this._lineContext;let s="",r="";const o=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||o.length>2e3?SC:iFt;for(let c=0;c=f)u.score=jh.Default;else if(typeof u.completion.filterText=="string"){const x=l(s,r,m,u.completion.filterText,u.filterTextLow,0,this._fuzzyScoreOptions);if(!x)continue;PY(u.completion.filterText,u.textLabel)===0?u.score=x:(u.score=Jjt(s,r,m,u.textLabel,u.labelLow,0),u.score[0]=x[0])}else{const x=l(s,r,m,u.textLabel,u.labelLow,0,this._fuzzyScoreOptions);if(!x)continue;u.score=x}}u.idx=c,u.distance=this._wordDistance.distance(u.position,u.completion),a.push(u),e.push(u.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?VY(e.length-.85,e,(c,u)=>c-u):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===28)return 1;if(t.completion.kind===28)return-1}return Ev._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===28)return-1;if(t.completion.kind===28)return 1}return Ev._compareCompletionItems(e,t)}}var BKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Xx=function(i,e){return function(t,n){e(t,n,i)}},QJ;class xy{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),n=e.getPosition();t.tokenization.tokenizeIfCheap(n.lineNumber);const s=t.getWordAtPosition(n);return!(!s||s.endColumn!==n.column&&s.startColumn+1!==n.column||!isNaN(Number(s.word)))}constructor(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=n}}function HKt(i,e,t){if(!e.getContextKeyValue(Si.inlineSuggestionVisible.key))return!0;const n=e.getContextKeyValue(Si.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(71).suppressSuggestions}function WKt(i,e,t){if(!e.getContextKeyValue("inlineSuggestionVisible"))return!0;const n=e.getContextKeyValue(Si.suppressSuggestions.key);return n!==void 0?!n:!i.getOption(71).suppressSuggestions}let G8=QJ=class{constructor(e,t,n,s,r,o,a,l,c){this._editor=e,this._editorWorkerService=t,this._clipboardService=n,this._telemetryService=s,this._logService=r,this._contextKeyService=o,this._configurationService=a,this._languageFeaturesService=l,this._envService=c,this._toDispose=new _e,this._triggerCharacterListener=new _e,this._triggerQuickSuggest=new Yc,this._triggerState=void 0,this._completionDisposables=new _e,this._onDidCancel=new ie,this._onDidTrigger=new ie,this._onDidSuggest=new ie,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._currentSelection=this._editor.getSelection()||new st(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let u=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{u=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{u=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(h=>{u||this._onCursorChange(h)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!u&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){ii(this._triggerCharacterListener),ii([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(104)||!this._editor.hasModel()||!this._editor.getOption(137))return;const e=new Map;for(const n of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const s of n.triggerCharacters||[]){let r=e.get(s);r||(r=new Set,e.set(s,r)),r.add(n)}const t=n=>{var o;if(!WKt(this._editor,this._contextKeyService,this._configurationService)||xy.shouldAutoTrigger(this._editor))return;if(!n){const a=this._editor.getPosition();n=this._editor.getModel().getLineContent(a.lineNumber).substr(0,a.column-1)}let s="";Q_(n.charCodeAt(n.length-1))?eo(n.charCodeAt(n.length-2))&&(s=n.substr(n.length-2)):s=n.charAt(n.length-1);const r=e.get(s);if(r){const a=new Map;if(this._completionModel)for(const[l,c]of this._completionModel.getItemsByProvider())r.has(l)||a.set(l,c);this.trigger({auto:!0,triggerKind:1,triggerCharacter:s,retrigger:!!this._completionModel,clipboardText:(o=this._completionModel)==null?void 0:o.clipboardText,completionOptions:{providerFilter:r,providerItemsToReuse:a}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>t()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)==null||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&e.reason===0?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&e.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;mN.isAllOff(this._editor.getOption(102))||this._editor.getOption(134).snippetsPreventQuickSuggestions&&((e=fl.get(this._editor))!=null&&e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!xy.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const t=this._editor.getModel(),n=this._editor.getPosition(),s=this._editor.getOption(102);if(!mN.isAllOff(s)){if(!mN.isAllOn(s)){t.tokenization.tokenizeIfCheap(n.lineNumber);const r=t.tokenization.getLineTokens(n.lineNumber),o=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(mN.valueFor(s,o)!=="on")return}HKt(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(t)&&this.trigger({auto:!0})}},this._editor.getOption(103)))}_refilterCompletionItems(){Bn(this._editor.hasModel()),Bn(this._triggerState!==void 0);const e=this._editor.getModel(),t=this._editor.getPosition(),n=new xy(e,t,{...this._triggerState,refilter:!0});this._onNewContext(n)}trigger(e){var g,f,m;if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=new xy(t,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=n;let s={triggerKind:e.triggerKind??0};e.triggerCharacter&&(s={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new vs;const r=this._editor.getOption(128);let o=1;switch(r){case"top":o=0;break;case"bottom":o=2;break}const{itemKind:a,showDeprecated:l}=QJ.createSuggestFilter(this._editor),c=new mM(o,((g=e.completionOptions)==null?void 0:g.kindFilter)??a,(f=e.completionOptions)==null?void 0:f.providerFilter,(m=e.completionOptions)==null?void 0:m.providerItemsToReuse,l),u=K8.create(this._editorWorkerService,this._editor),h=Wle(this._languageFeaturesService.completionProvider,t,this._editor.getPosition(),c,s,this._requestToken.token);Promise.all([h,u]).then(async([x,v])=>{var E;if((E=this._requestToken)==null||E.dispose(),!this._editor.hasModel()){x.disposable.dispose();return}let _=e==null?void 0:e.clipboardText;if(!_&&x.needsClipboard&&(_=await this._clipboardService.readText()),this._triggerState===void 0){x.disposable.dispose();return}const w=this._editor.getModel(),k=new xy(w,this._editor.getPosition(),e),C={...zR.default,firstMatchCanBeWeak:!this._editor.getOption(134).matchOnWordStartOnly};if(this._completionModel=new Ev(x.items,this._context.column,{leadingLineContent:k.leadingLineContent,characterCountDelta:k.column-this._context.column},v,this._editor.getOption(134),this._editor.getOption(128),C,_),this._completionDisposables.add(x.disposable),this._onNewContext(k),this._reportDurationsTelemetry(x.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const D of x.items)D.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${D.provider._debugDisplayName}`,D.completion)}).catch(zt)}_reportDurationsTelemetry(e){Math.random()>1e-4||setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static createSuggestFilter(e){const t=new Set;e.getOption(128)==="none"&&t.add(28);const s=e.getOption(134);return s.showMethods||t.add(0),s.showFunctions||t.add(1),s.showConstructors||t.add(2),s.showFields||t.add(3),s.showVariables||t.add(4),s.showClasses||t.add(5),s.showStructs||t.add(6),s.showInterfaces||t.add(7),s.showModules||t.add(8),s.showProperties||t.add(9),s.showEvents||t.add(10),s.showOperators||t.add(11),s.showUnits||t.add(12),s.showValues||t.add(13),s.showConstants||t.add(14),s.showEnums||t.add(15),s.showEnumMembers||t.add(16),s.showKeywords||t.add(17),s.showWords||t.add(18),s.showColors||t.add(19),s.showFiles||t.add(20),s.showReferences||t.add(21),s.showColors||t.add(22),s.showFolders||t.add(23),s.showTypeParameters||t.add(24),s.showSnippets||t.add(28),s.showUsers||t.add(25),s.showIssues||t.add(26),{itemKind:t,showDeprecated:s.showDeprecated}}_onNewContext(e){if(this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Mi(e.leadingLineContent)!==Mi(this._context.leadingLineContent)){this.cancel();return}if(e.columnthis._context.leadingWord.startColumn){if(xy.shouldAutoTrigger(this._editor)&&this._context){const n=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:n}})}return}if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&e.leadingWord.word.length!==0){const t=new Map,n=new Set;for(const[s,r]of this._completionModel.getItemsByProvider())r.length>0&&r[0].container.incomplete?n.add(s):t.set(s,r);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:t}})}else{const t=this._completionModel.lineContext;let n=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){const s=xy.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(s&&this._context.leadingWord.endColumn0,n&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:n})}}}}};G8=QJ=BKt([Xx(1,Nc),Xx(2,ed),Xx(3,Ua),Xx(4,Ji),Xx(5,Bt),Xx(6,Zt),Xx(7,lt),Xx(8,ele)],G8);const j9=class j9{constructor(e,t){this._disposables=new _e,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType(()=>{if(this._locked||!e.hasModel())return;const n=e.getSelections(),s=n.length;let r=!1;for(let a=0;aj9._maxSelectionLength)return;this._lastOvertyped[a]={value:o.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}})),this._disposables.add(t.onDidTrigger(n=>{this._locked=!0})),this._disposables.add(t.onDidCancel(n=>{this._locked=!1}))}getLastOvertypedInfo(e){if(e>=0&&e=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},oK=function(i,e){return function(t,n){e(t,n,i)}};let ZJ=class{constructor(e,t,n,s,r){this._menuId=t,this._menuService=s,this._contextKeyService=r,this._menuDisposables=new _e,this.element=De(e,Oe(".suggest-status-bar"));const o=(a=>a instanceof Vd?n.createInstance(Wae,a,{useComma:!1}):void 0);this._leftActions=new mc(this.element,{actionViewItemProvider:o}),this._rightActions=new mc(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const n=[],s=[];for(const[r,o]of e.getActions())r==="left"?n.push(...o):s.push(...o);this._leftActions.clear(),this._leftActions.push(n),this._rightActions.clear(),this._rightActions.push(s)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};ZJ=VKt([oK(2,ft),oK(3,Qu),oK(4,Bt)],ZJ);var zKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},S1e=function(i,e){return function(t,n){e(t,n,i)}};function qle(i){return!!i&&!!(i.completion.documentation||i.completion.detail&&i.completion.detail!==i.completion.label)}let JJ=class{constructor(e,t,n){this._editor=e,this._themeService=t,this._markdownRendererService=n,this._onDidClose=new ie,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new ie,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new _e,this._renderDisposeable=new _e,this._size=new ni(330,0),this.domNode=Oe(".suggest-details"),this.domNode.classList.add("no-docs"),this._body=Oe(".body"),this._scrollbar=new GP(this._body,{alwaysConsumeMouseWheel:!0}),De(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=De(this._body,Oe(".header")),this._close=De(this._header,Oe("span"+Tt.asCSSSelector(Ee.close))),this._close.title=S(1490,"Close"),this._close.role="button",this._close.tabIndex=-1,this._type=De(this._header,Oe("p.type")),this._docs=De(this._body,Oe("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(59)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(59),n=t.getMassagedFontFamily(),s=e.get(135)||t.fontSize,r=e.get(136)||t.lineHeight,o=t.fontWeight,a=`${s}px`,l=`${r}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=`${r/s}`,this.domNode.style.fontWeight=o,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){const e=this._editor.getOption(136)||this._editor.getOption(59).lineHeight,t=Fg(this._themeService.getColorTheme().type)?2:1,n=t*2;return{lineHeight:e,borderWidth:t,borderHeight:n,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=S(1491,"Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var r;this._renderDisposeable.clear();let{detail:n,documentation:s}=e.completion;if(t){let o="";o+=`score: ${e.score[0]} +`,o+=`prefix: ${e.word??"(no prefix)"} +`,o+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} +`,o+=`distance: ${e.distance} (localityBonus-setting) +`,o+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} +`,o+=`commit_chars: ${(r=e.completion.commitCharacters)==null?void 0:r.join("")} +`,s=new Ma().appendCodeblock("empty",o),n=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!qle(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),n){const o=n.length>1e5?`${n.substr(0,1e5)}…`:n;this._type.textContent=o,this._type.title=o,Bc(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(o))}else Qo(this._type),this._type.title="",Al(this._type),this.domNode.classList.add("no-type");if(Qo(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),Qo(this._docs);const o=this._markdownRendererService.render(s,{context:this._editor,asyncRenderCallback:()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}});this._docs.appendChild(o.element),this._renderDisposeable.add(o)}this.domNode.classList.toggle("detail-and-doc",!!n&&!!s),this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=o=>{o.preventDefault(),o.stopPropagation()},this._close.onclick=o=>{o.preventDefault(),o.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){const n=new ni(e,t);ni.equals(n,this._size)||(this._size=n,JLt(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}focus(){this.domNode.focus()}};JJ=zKt([S1e(1,Ws),S1e(2,Zh)],JJ);class UKt{constructor(e,t){this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new _e,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new ile,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let n,s,r=0,o=0;this._disposables.add(this._resizable.onDidWillResize(()=>{n=this._topLeft,s=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(n&&s){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(o=s.width-a.dimension.width,l=!0),a.north&&(r=s.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:n.top+r,left:n.left+o})}a.done&&(n=void 0,s=void 0,r=0,o=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,n){const s=X_(this.getDomNode().ownerDocument.body),r=this.widget.getLayoutInfo(),o=new ni(220,2*r.lineHeight),a=e.top,l=(function(){const E=s.width-(e.left+e.width+r.borderWidth+r.horizontalPadding),D=-r.borderWidth+e.left+e.width,T=new ni(E,s.height-e.top-r.borderHeight-r.verticalPadding),I=T.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:a,left:D,fit:E-t.width,maxSizeTop:T,maxSizeBottom:I,minSize:o.with(Math.min(E,o.width))}})(),c=(function(){const E=e.left-r.borderWidth-r.horizontalPadding,D=Math.max(r.horizontalPadding,e.left-t.width-r.borderWidth),T=new ni(E,s.height-e.top-r.borderHeight-r.verticalPadding),I=T.with(void 0,e.top+e.height-r.borderHeight-r.verticalPadding);return{top:a,left:D,fit:E-t.width,maxSizeTop:T,maxSizeBottom:I,minSize:o.with(Math.min(E,o.width))}})(),u=(function(){const E=e.left,D=-r.borderWidth+e.top+e.height,T=new ni(e.width-r.borderHeight,s.height-e.top-e.height-r.verticalPadding);return{top:D,left:E,fit:T.height-t.height,maxSizeBottom:T,maxSizeTop:T,minSize:o.with(T.width)}})(),h=[l,c,u],g=h.find(E=>E.fit>=0)??h.sort((E,D)=>D.fit-E.fit)[0],f=e.top+e.height-r.borderHeight;let m,x=t.height;const v=Math.max(g.maxSizeTop.height,g.maxSizeBottom.height);x>v&&(x=v);let _;n?x<=g.maxSizeTop.height?(m=!0,_=g.maxSizeTop):(m=!1,_=g.maxSizeBottom):x<=g.maxSizeBottom.height?(m=!1,_=g.maxSizeBottom):(m=!0,_=g.maxSizeTop);let{top:w,left:k}=g;!m&&x>e.height&&(w=f-x);const C=this._editor.getDomNode();if(C){const E=C.getBoundingClientRect();w-=E.top,k-=E.left}this._applyTopLeft({left:k,top:w}),this._resizable.enableSashes(!m,g===l,m,g!==l),this._resizable.minSize=g.minSize,this._resizable.maxSize=_,this._resizable.layout(x,Math.min(_.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}const k1e=ln("fileService");var dp;(function(i){i[i.FILE=0]="FILE",i[i.FOLDER=1]="FOLDER",i[i.ROOT_FOLDER=2]="ROOT_FOLDER"})(dp||(dp={}));const $Kt=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function u4(i,e,t,n,s){if(Tt.isThemeIcon(s))return[`codicon-${s.id}`,"predefined-file-icon"];if(kt.isUri(s))return[];const r=n===dp.ROOT_FOLDER?["rootfolder-icon"]:n===dp.FOLDER?["folder-icon"]:["file-icon"];if(t){let o;if(t.scheme===Ot.data)o=e0.parseMetaData(t).get(e0.META_DATA_LABEL);else{const a=t.path.match($Kt);a?(o=h4(a[2].toLowerCase()),a[1]&&r.push(`${h4(a[1].toLowerCase())}-name-dir-icon`)):o=h4(t.authority.toLowerCase())}if(n===dp.ROOT_FOLDER)r.push(`${o}-root-name-folder-icon`);else if(n===dp.FOLDER)r.push(`${o}-name-folder-icon`);else{if(o){if(r.push(`${o}-name-file-icon`),r.push("name-file-icon"),o.length<=255){const l=o.split(".");for(let c=1;c=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},aK=function(i,e){return function(t,n){e(t,n,i)}};const GKt=ls("suggest-more-info",Ee.chevronRight,S(1492,"Icon for more information in the suggest widget."));var kg;const YKt=new(kg=class{extract(e,t){if(e.textLabel.match(kg._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(kg._regexStrict))return t[0]=e.completion.detail,!0;if(e.completion.documentation){const n=typeof e.completion.documentation=="string"?e.completion.documentation:e.completion.documentation.value,s=kg._regexRelaxed.exec(n);if(s&&(s.index===0||s.index+s[0].length===n.length))return t[0]=s[0],!0}return!1}},kg._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,kg._regexStrict=new RegExp(`^${kg._regexRelaxed.source}$`,"i"),kg);let eee=class{constructor(e,t,n,s){this._editor=e,this._modelService=t,this._languageService=n,this._themeService=s,this._onDidToggleDetails=new ie,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new _e,n=e;n.classList.add("show-file-icons");const s=De(e,Oe(".icon")),r=De(s,Oe("span.colorspan")),o=De(e,Oe(".contents")),a=De(o,Oe(".main")),l=De(a,Oe(".icon-label.codicon")),c=De(a,Oe("span.left")),u=De(a,Oe("span.right")),h=new uM(c,{supportHighlights:!0,supportIcons:!0});t.add(h);const g=De(c,Oe("span.signature-label")),f=De(c,Oe("span.qualifier-label")),m=De(u,Oe("span.details-label")),x=De(u,Oe("span.readMore"+Tt.asCSSSelector(GKt)));return x.title=S(1493,"Read More"),{root:n,left:c,right:u,icon:s,colorspan:r,iconLabel:h,iconContainer:l,parametersLabel:g,qualifierLabel:f,detailsLabel:m,readMore:x,disposables:t,configureFont:()=>{const _=this._editor.getOptions(),w=_.get(59),k=w.getMassagedFontFamily(),C=w.fontFeatureSettings,E=w.fontVariationSettings,D=_.get(135)||w.fontSize,T=_.get(136)||w.lineHeight,I=w.fontWeight,R=w.letterSpacing,P=`${D}px`,j=`${T}px`,B=`${R}px`;n.style.fontSize=P,n.style.fontWeight=I,n.style.letterSpacing=B,a.style.fontFamily=k,a.style.fontFeatureSettings=C,a.style.fontVariationSettings=E,a.style.lineHeight=j,s.style.height=j,s.style.width=j,x.style.height=j,x.style.width=j}}}renderElement(e,t,n){n.configureFont();const{completion:s}=e;n.colorspan.style.backgroundColor="";const r={labelEscapeNewLines:!0,matches:ZP(e.score)},o=[];if(s.kind===19&&YKt.extract(e,o))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=o[0];else if(s.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";const a=u4(this._modelService,this._languageService,kt.from({scheme:"fake",path:e.textLabel}),dp.FILE),l=u4(this._modelService,this._languageService,kt.from({scheme:"fake",path:s.detail}),dp.FILE);r.extraClasses=a.length>l.length?a:l}else s.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(n.icon.className="icon hide",n.iconContainer.className="icon hide",r.extraClasses=[u4(this._modelService,this._languageService,kt.from({scheme:"fake",path:e.textLabel}),dp.FOLDER),u4(this._modelService,this._languageService,kt.from({scheme:"fake",path:s.detail}),dp.FOLDER)].flat()):(n.icon.className="icon hide",n.iconContainer.className="",n.iconContainer.classList.add("suggest-icon",...Tt.asClassNameArray(TL.toIcon(s.kind))));s.tags&&s.tags.indexOf(1)>=0&&(r.extraClasses=(r.extraClasses||[]).concat(["deprecated"]),r.matches=[]),n.iconLabel.setLabel(e.textLabel,void 0,r),typeof s.label=="string"?(n.parametersLabel.textContent="",n.detailsLabel.textContent=lK(s.detail||""),n.root.classList.add("string-label")):(n.parametersLabel.textContent=lK(s.label.detail||""),n.detailsLabel.textContent=lK(s.label.description||""),n.root.classList.remove("string-label")),this._editor.getOption(134).showInlineDetails?Bc(n.detailsLabel):Al(n.detailsLabel),qle(e)?(n.right.classList.add("can-expand-details"),Bc(n.readMore),n.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},n.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),Al(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};eee=KKt([aK(1,Is),aK(2,tr),aK(3,Ws)],eee);function lK(i){return i.replace(/\r\n|\r|\n/g,"")}var QKt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},g4=function(i,e){return function(t,n){e(t,n,i)}},Xk;Z("editorSuggestWidget.background",Fd,S(1473,"Background color of the suggest widget."));Z("editorSuggestWidget.border",Eoe,S(1474,"Border color of the suggest widget."));const XKt=Z("editorSuggestWidget.foreground",zp,S(1475,"Foreground color of the suggest widget."));Z("editorSuggestWidget.selectedForeground",CR,S(1476,"Foreground color of the selected entry in the suggest widget."));Z("editorSuggestWidget.selectedIconForeground",Foe,S(1477,"Icon foreground color of the selected entry in the suggest widget."));const ZKt=Z("editorSuggestWidget.selectedBackground",SR,S(1478,"Background color of the selected entry in the suggest widget."));Z("editorSuggestWidget.highlightForeground",oN,S(1479,"Color of the match highlights in the suggest widget."));Z("editorSuggestWidget.focusHighlightForeground",dRt,S(1480,"Color of the match highlights in the suggest widget when an item is focused."));Z("editorSuggestWidgetStatus.foreground",Kt(XKt,.5),S(1481,"Foreground color of the suggest widget status."));class JKt{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof ix}`}restore(){const e=this._service.get(this._key,0)??"";try{const t=JSON.parse(e);if(ni.is(t))return ni.lift(t)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}var j_;let tee=(j_=class{constructor(e,t,n,s,r){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new Zn,this._pendingShowDetails=new Zn,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new Yc,this._disposables=new _e,this._onDidSelect=new hC,this._onDidFocus=new hC,this._onDidHide=new ie,this._onDidShow=new ie,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new ie,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ile,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new eGt(this,e),this._persistedSize=new JKt(t,e);class o{constructor(f,m,x=!1,v=!1){this.persistedSize=f,this.currentSize=m,this.persistHeight=x,this.persistWidth=v}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new o(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(g=>{var f,m;if(this._resize(g.dimension.width,g.dimension.height),a&&(a.persistHeight=a.persistHeight||!!g.north||!!g.south,a.persistWidth=a.persistWidth||!!g.east||!!g.west),!!g.done){if(a){const{itemHeight:x,defaultSize:v}=this.getLayoutInfo(),_=Math.round(x/2);let{width:w,height:k}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-k)<=_)&&(k=((f=a.persistedSize)==null?void 0:f.height)??v.height),(!a.persistWidth||Math.abs(a.currentSize.width-w)<=_)&&(w=((m=a.persistedSize)==null?void 0:m.width)??v.width),this._persistedSize.store(new ni(w,k))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=De(this.element.domNode,Oe(".message")),this._listElement=De(this.element.domNode,Oe(".tree"));const l=this._disposables.add(r.createInstance(JJ,this.editor));l.onDidClose(()=>this.toggleDetails(),this,this._disposables),this._details=new UKt(l,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(134).showIcons);c();const u=r.createInstance(eee,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails(()=>this.toggleDetails())),this._list=new Jd("SuggestWidget",this._listElement,{getHeight:g=>this.getLayoutInfo().itemHeight,getTemplateId:g=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>Xo?"listitem":"option",getWidgetAriaLabel:()=>S(1484,"Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:g=>{let f=g.textLabel;const m=TL.toLabel(g.completion.kind);if(typeof g.completion.label!="string"){const{detail:w,description:k}=g.completion.label;w&&k?f=S(1485,"{0} {1}, {2}, {3}",f,w,k,m):w?f=S(1486,"{0} {1}, {2}",f,w,m):k&&(f=S(1487,"{0}, {1}, {2}",f,k,m))}else f=S(1488,"{0}, {1}",f,m);if(!g.isResolved||!this._isDetailsVisible())return f;const{documentation:x,detail:v}=g.completion,_=gC("{0}{1}",v||"",x?typeof x=="string"?x:x.value:"");return S(1489,"{0}, docs: {1}",f,_)}}}),this._list.style(uS({listInactiveFocusBackground:ZKt,listInactiveFocusOutline:ys})),this._status=r.createInstance(ZJ,this.element.domNode,C_);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(134).showStatusBar);h(),this._disposables.add(this._list.onMouseDown(g=>this._onListMouseDownOrTap(g))),this._disposables.add(this._list.onTap(g=>this._onListMouseDownOrTap(g))),this._disposables.add(this._list.onDidChangeSelection(g=>this._onListSelection(g))),this._disposables.add(this._list.onDidChangeFocus(g=>this._onListFocus(g))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(g=>{g.hasChanged(134)&&(h(),c()),this._completionModel&&(g.hasChanged(59)||g.hasChanged(135)||g.hasChanged(136))&&this._list.splice(0,this._list.length,this._completionModel.items)})),this._ctxSuggestWidgetVisible=dn.Visible.bindTo(n),this._ctxSuggestWidgetDetailsVisible=dn.DetailsVisible.bindTo(n),this._ctxSuggestWidgetMultipleSuggestions=dn.MultipleSuggestions.bindTo(n),this._ctxSuggestWidgetHasFocusedSuggestion=dn.HasFocusedSuggestion.bindTo(n),this._disposables.add(yr(this._details.widget.domNode,"keydown",g=>{this._onDetailsKeydown.fire(g)})),this._disposables.add(this.editor.onMouseDown(g=>this._onEditorMouseDown(g)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)==null||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element>"u"||typeof e.index>"u"||(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}_onListFocus(e){var s;if(this._ignoreFocusEvents)return;if(this._state===5&&this._setState(3),!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const t=e.elements[0],n=e.indexes[0];t!==this._focusedItem&&((s=this._currentSuggestionDetails)==null||s.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=t,this._list.reveal(n),this._currentSuggestionDetails=io(async r=>{const o=zb(()=>{this._isDetailsVisible()&&this._showDetails(!0,!1)},250),a=r.onCancellationRequested(()=>o.dispose());try{return await t.resolve(r)}finally{o.dispose(),a.dispose()}}),this._currentSuggestionDetails.then(()=>{n>=this._list.length||t!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[t]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this._showDetails(!1,!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:this._list.getElementID(n)}))}).catch(zt)),this._onDidFocus.fire({item:t,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",e===4),this.element.domNode.classList.remove("message"),e){case 0:Al(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=Xk.LOADING_MESSAGE,Al(this._listElement,this._status.element),Bc(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,zg(Xk.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=Xk.NO_SUGGESTIONS_MESSAGE,Al(this._listElement,this._status.element),Bc(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,zg(Xk.NO_SUGGESTIONS_MESSAGE);break;case 3:Al(this._messageElement),Bc(this._listElement,this._status.element),this._show();break;case 4:Al(this._messageElement),Bc(this._listElement,this._status.element),this._show();break;case 5:Al(this._messageElement),Bc(this._listElement,this._status.element),this._details.show(),this._show(),this._details.widget.focus();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=zb(()=>this._setState(1),t)))}showSuggestions(e,t,n,s,r){var l,c;if(this._contentWidget.setPosition(this.editor.getPosition()),(l=this._loadingTimeout)==null||l.dispose(),(c=this._currentSuggestionDetails)==null||c.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&this._state!==2&&this._state!==0){this._setState(4);return}const o=this._completionModel.items.length,a=o===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(o>1),a){this._setState(s?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0,t===0?0:this.getLayoutInfo().itemHeight*.33),this._list.setFocus(r?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=AF(xt(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._list.setFocus(this._list.getFocus()),this._setState(3)):this._state===3&&(this._setState(5),this._isDetailsVisible()?this._details.widget.focus():this.toggleDetails(!0))}toggleDetails(e=!1){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(qle(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this._showDetails(!1,e))}_showDetails(e,t){this._pendingShowDetails.value=AF(xt(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show();let n=!1;e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details"),t&&(this._details.widget.focus(),n=!0)),n||this.editor.focus()})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this._showDetails(!1,!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var n;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(n=this._loadingTimeout)==null||n.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const e=this._persistedSize.restore(),t=Math.ceil(this.getLayoutInfo().itemHeight*4.3);e&&e.heightl&&(r=l);const c=this._completionModel?this._completionModel.stats.pLabelLen*n.typicalHalfwidthCharacterWidth:r,u=n.statusBarHeight+this._list.contentHeight+n.borderHeight,h=n.itemHeight+n.statusBarHeight,g=Zs(this.editor.getDomNode()),f=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),m=g.top+f.top+f.height,x=Math.min(t.height-m-n.verticalPadding,u),v=g.top+f.top-n.verticalPadding,_=Math.min(v,u);let w=Math.min(Math.max(_,x)+n.borderHeight,u);s===((o=this._cappedHeight)==null?void 0:o.capped)&&(s=this._cappedHeight.wanted),sw&&(s=w),s>x&&_>x||this._forceRenderingAbove&&v>150?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),w=_):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),w=x),this.element.preferredSize=new ni(c,n.defaultSize.height),this.element.maxSize=new ni(l,w),this.element.minSize=new ni(220,h),this._cappedHeight=s===u?{wanted:((a=this._cappedHeight)==null?void 0:a.wanted)??e.height,capped:s}:void 0}this._resize(r,s)}_resize(e,t){const{width:n,height:s}=this.element.maxSize;e=Math.min(n,e),t=Math.min(s,t);const{statusBarHeight:r}=this.getLayoutInfo();this._list.layout(t-r,e),this._listElement.style.height=`${t-r}px`,this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((e=this._contentWidget.getPosition())==null?void 0:e.preference[0])===2)}getLayoutInfo(){const e=this.editor.getOption(59),t=Il(this.editor.getOption(136)||e.lineHeight,8,1e3),n=!this.editor.getOption(134).showStatusBar||this._state===2||this._state===1?0:t,s=this._details.widget.getLayoutInfo().borderWidth,r=2*s;return{itemHeight:t,statusBarHeight:n,borderWidth:s,borderHeight:r,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new ni(430,n+12*t)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}},Xk=j_,j_.LOADING_MESSAGE=S(1482,"Loading..."),j_.NO_SUGGESTIONS_MESSAGE=S(1483,"No suggestions."),j_);tee=Xk=QKt([g4(1,xl),g4(2,Bt),g4(3,Ws),g4(4,ft)],tee);class eGt{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:n,horizontalPadding:s}=this._widget.getLayoutInfo();return new ni(t+2*n+s,e+2*n)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var tGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Mk=function(i,e){return function(t,n){e(t,n,i)}},nee;class nGt{constructor(e,t){if(this._model=e,this._position=t,this._decorationOptions=qt.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(t.lineNumber)!==t.column){const s=e.getOffsetAt(t),r=e.getPositionAt(s+1);e.changeDecorations(o=>{this._marker&&o.removeDecoration(this._marker),this._marker=o.addDecoration(z.fromPositions(t,r),this._decorationOptions)})}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations(e=>{e.removeDecoration(this._marker),this._marker=void 0})}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}var Rw;let Rg=(Rw=class{static get(e){return e.getContribution(nee.ID)}get onWillInsertSuggestItem(){return this._onWillInsertSuggestItem.event}constructor(e,t,n,s,r,o,a){this._memoryService=t,this._commandService=n,this._contextKeyService=s,this._instantiationService=r,this._logService=o,this._telemetryService=a,this._lineSuffix=new Zn,this._toDispose=new _e,this._selectors=new iGt(h=>h.priority),this._onWillInsertSuggestItem=new ie,this._wantsForceRenderingAbove=!1,this.editor=e,this.model=r.createInstance(G8,this.editor),this._selectors.register({priority:0,select:(h,g,f)=>this._memoryService.select(h,g,f)});const l=dn.InsertMode.bindTo(s);l.set(e.getOption(134).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>l.set(e.getOption(134).insertMode))),this.widget=this._toDispose.add(new D$(xt(e.getDomNode()),()=>{const h=this._instantiationService.createInstance(tee,this.editor);this._toDispose.add(h),this._toDispose.add(h.onDidSelect(v=>this._insertSuggestion(v,0),this));const g=new FKt(this.editor,h,this.model,v=>this._insertSuggestion(v,2));this._toDispose.add(g);const f=dn.MakesTextEdit.bindTo(this._contextKeyService),m=dn.HasInsertAndReplaceRange.bindTo(this._contextKeyService),x=dn.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(dt(()=>{f.reset(),m.reset(),x.reset()})),this._toDispose.add(h.onDidFocus(({item:v})=>{const _=this.editor.getPosition(),w=v.editStart.column,k=_.column;let C=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!v.completion.additionalTextEdits&&!(v.completion.insertTextRules&4)&&k-w===v.completion.insertText.length&&(C=this.editor.getModel().getValueInRange({startLineNumber:_.lineNumber,startColumn:w,endLineNumber:_.lineNumber,endColumn:k})!==v.completion.insertText),f.set(C),m.set(!te.equals(v.editInsertEnd,v.editReplaceEnd)),x.set(!!v.provider.resolveCompletionItem||!!v.completion.documentation||v.completion.detail!==v.completion.label)})),this._toDispose.add(h.onDetailsKeyDown(v=>{if(v.toKeyCodeChord().equals(new Vb(!0,!1,!1,!1,33))||bn&&v.toKeyCodeChord().equals(new Vb(!1,!1,!1,!0,33))){v.stopPropagation();return}v.toKeyCodeChord().isModifierKey()||this.editor.focus()})),this._wantsForceRenderingAbove&&h.forceRenderingAbove(),h})),this._overtypingCapturer=this._toDispose.add(new D$(xt(e.getDomNode()),()=>this._toDispose.add(new XJ(this.editor,this.model)))),this._alternatives=this._toDispose.add(new D$(xt(e.getDomNode()),()=>this._toDispose.add(new $L(this.editor,this._contextKeyService)))),this._toDispose.add(r.createInstance($8,e)),this._toDispose.add(this.model.onDidTrigger(h=>{this.widget.value.showTriggered(h.auto,h.shy?250:50),this._lineSuffix.value=new nGt(this.editor.getModel(),h.position)})),this._toDispose.add(this.model.onDidSuggest(h=>{if(h.triggerOptions.shy)return;let g=-1;for(const m of this._selectors.itemsOrderedByPriorityDesc)if(g=m.select(this.editor.getModel(),this.editor.getPosition(),h.completionModel.items),g!==-1)break;if(g===-1&&(g=0),this.model.state===0)return;let f=!1;if(h.triggerOptions.auto){const m=this.editor.getOption(134);m.selectionMode==="never"||m.selectionMode==="always"?f=m.selectionMode==="never":m.selectionMode==="whenTriggerCharacter"?f=h.triggerOptions.triggerKind!==1:m.selectionMode==="whenQuickSuggestion"&&(f=h.triggerOptions.triggerKind===1&&!h.triggerOptions.refilter)}this.widget.value.showSuggestions(h.completionModel,g,h.isFrozen,h.triggerOptions.auto,f)})),this._toDispose.add(this.model.onDidCancel(h=>{h.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));const c=dn.AcceptSuggestionsOnEnter.bindTo(s),u=()=>{const h=this.editor.getOption(1);c.set(h==="on"||h==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>u())),u()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){var m;if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const n=fl.get(this.editor);if(!n)return;this._onWillInsertSuggestItem.fire({item:e.item});const s=this.editor.getModel(),r=s.getAlternativeVersionId(),{item:o}=e,a=[],l=new vs;t&1||this.editor.pushUndoStop();const c=this.getOverwriteInfo(o,!!(t&8));this._memoryService.memorize(s,this.editor.getPosition(),o);const u=o.isResolved;let h=-1,g=-1;if(Array.isArray(o.completion.additionalTextEdits)){this.model.cancel();const x=Kg.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map(v=>{let _=z.lift(v.range);if(_.startLineNumber===o.position.lineNumber&&_.startColumn>o.position.column){const w=this.editor.getPosition().column-o.position.column,k=w,C=z.spansMultipleLines(_)?0:w;_=new z(_.startLineNumber,_.startColumn+k,_.endLineNumber,_.endColumn+C)}return Qs.replaceMove(_,v.text)})),x.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!u){const x=new _o;let v;const _=s.onDidChangeContent(E=>{if(E.isFlush){l.cancel(),_.dispose();return}for(const D of E.changes){const T=z.getEndPosition(D.range);(!v||te.isBefore(T,v))&&(v=T)}}),w=t;t|=2;let k=!1;const C=this.editor.onWillType(()=>{C.dispose(),k=!0,w&2||this.editor.pushUndoStop()});a.push(o.resolve(l.token).then(()=>{if(!o.completion.additionalTextEdits||l.token.isCancellationRequested)return;if(v&&o.completion.additionalTextEdits.some(D=>te.isBefore(v,z.getStartPosition(D.range))))return!1;k&&this.editor.pushUndoStop();const E=Kg.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map(D=>Qs.replaceMove(z.lift(D.range),D.text))),E.restoreRelativeVerticalPositionOfCursor(this.editor),(k||!(w&2))&&this.editor.pushUndoStop(),!0}).then(E=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",x.elapsed(),E),g=E===!0?1:E===!1?0:-2}).finally(()=>{_.dispose(),C.dispose()}))}let{insertText:f}=o.completion;if(o.completion.insertTextRules&4||(f=DC.escape(f)),this.model.cancel(),n.insert(f,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(o.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value,reason:Aa.suggest({providerId:aW.fromExtensionId((m=o.extensionId)==null?void 0:m.value)})}),t&2||this.editor.pushUndoStop(),o.completion.command)if(o.completion.command.id===Y8.id)this.model.trigger({auto:!0,retrigger:!0});else{const x=new _o;a.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch(v=>{o.completion.extensionId?Pr(v):zt(v)}).finally(()=>{h=x.elapsed()}))}t&4&&this._alternatives.value.set(e,x=>{for(l.cancel();s.canUndo();){r!==s.getAlternativeVersionId()&&s.undo(),this._insertSuggestion(x,3|(t&8?8:0));break}}),this._alertCompletionItem(o),Promise.all(a).finally(()=>{this._reportSuggestionAcceptedTelemetry(o,s,u,h,g,e.index,e.model.items),this.model.clear(),l.dispose()})}_reportSuggestionAcceptedTelemetry(e,t,n,s,r,o,a){var g;if(Math.random()>1e-4)return;const l=new Map;for(let f=0;f1?c[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:((g=e.extensionId)==null?void 0:g.value)??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:BP(qu(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:KDt(t.uri),resolveInfo:e.provider.resolveCompletionItem?n?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:s,additionalEditsAsync:r,index:o,firstIndex:h})}getOverwriteInfo(e,t){Bn(this.editor.hasModel());let n=this.editor.getOption(134).insertMode==="replace";t&&(n=!n);const s=e.position.column-e.editStart.column,r=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,o=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:s+o,overwriteAfter:r+a}}_alertCompletionItem(e){if(ul(e.completion.additionalTextEdits)){const t=S(1463,"Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);$l(t)}}triggerSuggest(e,t,n){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:n?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),n=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},s=r=>{if(r.completion.insertTextRules&4||r.completion.additionalTextEdits)return!0;const o=this.editor.getPosition(),a=r.editStart.column,l=o.column;return l-a!==r.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:o.lineNumber,startColumn:a,endLineNumber:o.lineNumber,endColumn:l})!==r.completion.insertText};He.once(this.model.onDidTrigger)(r=>{const o=[];He.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{ii(o),n()},void 0,o),this.model.onDidSuggest(({completionModel:a})=>{if(ii(o),a.items.length===0){n();return}const l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!s(c)){n();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,o)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const n=this.widget.value.getFocusedItem();let s=0;e&&(s|=4),t&&(s|=8),this._insertSuggestion(n,s)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.isInitialized?this.widget.value.forceRenderingAbove():this._wantsForceRenderingAbove=!0}stopForceRenderingAbove(){this.widget.isInitialized?this.widget.value.stopForceRenderingAbove():this._wantsForceRenderingAbove=!1}registerSelector(e){return this._selectors.register(e)}},nee=Rw,Rw.ID="editor.contrib.suggestController",Rw);Rg=nee=tGt([Mk(1,VW),Mk(2,es),Mk(3,Bt),Mk(4,ft),Mk(5,Ji),Mk(6,Ua)],Rg);class iGt{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,n)=>this.prioritySelector(n)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}const F9=class F9 extends rt{constructor(){super({id:F9.id,label:be(1471,"Trigger Suggest"),precondition:Ne.and(J.writable,J.hasCompletionItemProvider,dn.Visible.toNegated()),kbOpts:{kbExpr:J.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,n){const s=Rg.get(t);if(!s)return;let r;n&&typeof n=="object"&&n.auto===!0&&(r=!0),s.triggerSuggest(void 0,r,void 0)}};F9.id="editor.action.triggerSuggest";let Y8=F9;Pn(Rg.ID,Rg,2);Ke(Y8);const Yd=190,Jl=ao.bindToContribution(Rg.get);Xe(new Jl({id:"acceptSelectedSuggestion",precondition:Ne.and(dn.Visible,dn.HasFocusedSuggestion),handler(i){i.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:Ne.and(dn.Visible,J.textInputFocus),weight:Yd},{primary:3,kbExpr:Ne.and(dn.Visible,J.textInputFocus,dn.AcceptSuggestionsOnEnter,dn.MakesTextEdit),weight:Yd}],menuOpts:[{menuId:C_,title:S(1464,"Insert"),group:"left",order:1,when:dn.HasInsertAndReplaceRange.toNegated()},{menuId:C_,title:S(1465,"Insert"),group:"left",order:1,when:Ne.and(dn.HasInsertAndReplaceRange,dn.InsertMode.isEqualTo("insert"))},{menuId:C_,title:S(1466,"Replace"),group:"left",order:1,when:Ne.and(dn.HasInsertAndReplaceRange,dn.InsertMode.isEqualTo("replace"))}]}));Xe(new Jl({id:"acceptAlternativeSelectedSuggestion",precondition:Ne.and(dn.Visible,J.textInputFocus,dn.HasFocusedSuggestion),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:1027,secondary:[1026]},handler(i){i.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:C_,group:"left",order:2,when:Ne.and(dn.HasInsertAndReplaceRange,dn.InsertMode.isEqualTo("insert")),title:S(1467,"Replace")},{menuId:C_,group:"left",order:2,when:Ne.and(dn.HasInsertAndReplaceRange,dn.InsertMode.isEqualTo("replace")),title:S(1468,"Insert")}]}));Rn.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");Xe(new Jl({id:"hideSuggestWidget",precondition:dn.Visible,handler:i=>i.cancelSuggestWidget(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:9,secondary:[1033]}}));Xe(new Jl({id:"selectNextSuggestion",precondition:Ne.and(dn.Visible,Ne.or(dn.MultipleSuggestions,dn.HasFocusedSuggestion.negate())),handler:i=>i.selectNextSuggestion(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));Xe(new Jl({id:"selectNextPageSuggestion",precondition:Ne.and(dn.Visible,Ne.or(dn.MultipleSuggestions,dn.HasFocusedSuggestion.negate())),handler:i=>i.selectNextPageSuggestion(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:12,secondary:[2060]}}));Xe(new Jl({id:"selectLastSuggestion",precondition:Ne.and(dn.Visible,Ne.or(dn.MultipleSuggestions,dn.HasFocusedSuggestion.negate())),handler:i=>i.selectLastSuggestion()}));Xe(new Jl({id:"selectPrevSuggestion",precondition:Ne.and(dn.Visible,Ne.or(dn.MultipleSuggestions,dn.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevSuggestion(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));Xe(new Jl({id:"selectPrevPageSuggestion",precondition:Ne.and(dn.Visible,Ne.or(dn.MultipleSuggestions,dn.HasFocusedSuggestion.negate())),handler:i=>i.selectPrevPageSuggestion(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:11,secondary:[2059]}}));Xe(new Jl({id:"selectFirstSuggestion",precondition:Ne.and(dn.Visible,Ne.or(dn.MultipleSuggestions,dn.HasFocusedSuggestion.negate())),handler:i=>i.selectFirstSuggestion()}));Xe(new Jl({id:"focusSuggestion",precondition:Ne.and(dn.Visible,dn.HasFocusedSuggestion.negate()),handler:i=>i.focusSuggestion(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}}));Xe(new Jl({id:"focusAndAcceptSuggestion",precondition:Ne.and(dn.Visible,dn.HasFocusedSuggestion.negate()),handler:i=>{i.focusSuggestion(),i.acceptSelectedSuggestion(!0,!1)}}));Xe(new Jl({id:"toggleSuggestionDetails",precondition:Ne.and(dn.Visible,dn.HasFocusedSuggestion),handler:i=>i.toggleSuggestionDetails(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:C_,group:"right",order:1,when:Ne.and(dn.DetailsVisible,dn.CanResolve),title:S(1469,"Show Less")},{menuId:C_,group:"right",order:1,when:Ne.and(dn.DetailsVisible.toNegated(),dn.CanResolve),title:S(1470,"Show More")}]}));Xe(new Jl({id:"toggleExplainMode",precondition:dn.Visible,handler:i=>i.toggleExplainMode(),kbOpts:{weight:100,primary:2138}}));Xe(new Jl({id:"toggleSuggestionFocus",precondition:dn.Visible,handler:i=>i.toggleSuggestionFocus(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:2570,mac:{primary:778}}}));Xe(new Jl({id:"insertBestCompletion",precondition:Ne.and(J.textInputFocus,Ne.equals("config.editor.tabCompletion","on"),$8.AtEnd,dn.Visible.toNegated(),$L.OtherSuggestions.toNegated(),fl.InSnippetMode.toNegated()),handler:(i,e)=>{i.triggerSuggestAndAcceptBest(no(e)?{fallback:"tab",...e}:{fallback:"tab"})},kbOpts:{weight:Yd,primary:2}}));Xe(new Jl({id:"insertNextSuggestion",precondition:Ne.and(J.textInputFocus,Ne.equals("config.editor.tabCompletion","on"),$L.OtherSuggestions,dn.Visible.toNegated(),fl.InSnippetMode.toNegated()),handler:i=>i.acceptNextSuggestion(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:2}}));Xe(new Jl({id:"insertPrevSuggestion",precondition:Ne.and(J.textInputFocus,Ne.equals("config.editor.tabCompletion","on"),$L.OtherSuggestions,dn.Visible.toNegated(),fl.InSnippetMode.toNegated()),handler:i=>i.acceptPrevSuggestion(),kbOpts:{weight:Yd,kbExpr:J.textInputFocus,primary:1026}}));Ke(class extends rt{constructor(){super({id:"editor.action.resetSuggestSize",label:be(1472,"Reset Suggest Widget Size"),precondition:void 0})}run(i,e){var t;(t=Rg.get(e))==null||t.resetWidgetSize()}});class sGt extends se{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,t,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new ie),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown(r=>{r.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(r=>{r.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const s=Rg.get(this.editor);if(s){this._register(s.registerSelector({priority:100,select:(a,l,c)=>{const u=this.editor.getModel();if(!u)return-1;const h=this.suggestControllerPreselector(),g=h?pb(h,u):void 0;if(!g)return-1;const f=te.lift(l),m=c.map((v,_)=>{const w=e2.fromSuggestion(s,u,f,v,this.isShiftKeyPressed),k=pb(w.getSingleTextEdit(),u),C=h5e(g,k);return{index:_,valid:C,prefixLength:k.text.length,suggestItem:v}}).filter(v=>v&&v.valid&&v.prefixLength>0),x=zoe(m,_a(v=>v.prefixLength,$c));return x?x.index:-1}}));let r=!1;const o=()=>{r||(r=!0,this._register(s.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(s.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(s.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(He.once(s.model.onDidTrigger)(a=>{o()})),this._register(s.onWillInsertSuggestItem(a=>{const l=this.editor.getPosition(),c=this.editor.getModel();if(!l||!c)return;const u=e2.fromSuggestion(s,c,l,a.item,this.isShiftKeyPressed);this.onWillAccept(u)}))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();(this._isActive!==e||!rGt(this._currentSuggestItemInfo,t))&&(this._isActive=e,this._currentSuggestItemInfo=t,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){const e=Rg.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),n=this.editor.getPosition(),s=this.editor.getModel();if(!(!t||!n||!s))return e2.fromSuggestion(e,s,n,t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=Rg.get(this.editor);e==null||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=Rg.get(this.editor);e==null||e.forceRenderingAbove()}}class e2{static fromSuggestion(e,t,n,s,r){let{insertText:o}=s.completion,a=!1;if(s.completion.insertTextRules&4){const c=new DC().parse(o);c.children.length<100&&B8.adjustWhitespace(t,n,!0,c),o=c.toString(),a=!0}const l=e.getOverwriteInfo(s,r);return new e2(z.fromPositions(n.delta(0,-l.overwriteBefore),n.delta(0,Math.max(l.overwriteAfter,0))),o,s.completion.kind,a,s.container.incomplete??!1)}constructor(e,t,n,s,r){this.range=e,this.insertText=t,this.completionItemKind=n,this.isSnippetText=s,this.listIncomplete=r}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new T2e(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}getSingleTextEdit(){return new Ar(this.range,this.insertText)}}function rGt(i,e){return i===e?!0:!i||!e?!1:i.equals(e)}class oGt extends se{constructor(e,t,n){super(),this._editorObs=e,this._handleSuggestAccepted=t,this._suggestControllerPreselector=n,this._suggestWidgetAdaptor=this._register(new sGt(this._editorObs.editor,()=>(this._editorObs.forceUpdate(),this._suggestControllerPreselector()),s=>this._editorObs.forceUpdate(r=>{this._handleSuggestAccepted(s)}))),this.selectedItem=Gn(this,s=>this._suggestWidgetAdaptor.onDidSelectedItemChange(()=>{this._editorObs.forceUpdate(r=>s(void 0))}),()=>this._suggestWidgetAdaptor.selectedItem)}stopForceRenderingAbove(){this._suggestWidgetAdaptor.stopForceRenderingAbove()}forceRenderingAbove(){this._suggestWidgetAdaptor.forceRenderingAbove()}}class aGt{constructor(e,t){this.lineNumber=e,this.columnRange=t}}class N1e{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new Nt(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new z(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}toZeroBasedOffsetRange(){return new ht(this.startColumn-1,this.endColumnExclusive-1)}}class N1{static fromLineTokens(e){const t=[];for(let n=0;n({text:n.text,metadata:n.metadata})),e)}map(e){const t=[];let n=0;for(const s of this._tokenInfo){const r=new ht(n,n+s.text.length);t.push(e(r,s)),n+=s.text.length}return t}slice(e){const t=[];let n=0;for(const s of this._tokenInfo){const r=n,o=r+s.text.length;if(o>e.start){if(r>=e.endExclusive)break;const a=Math.max(0,e.start-r),l=Math.max(0,o-e.endExclusive);t.push(new E1e(s.text.slice(a,s.text.length-l),s.metadata))}n+=s.text.length}return N1.create(t)}append(e){const t=this._tokenInfo.concat(e._tokenInfo);return N1.create(t)}}class E1e{constructor(e,t){this.text=e,this.metadata=t}}var lGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},cGt=function(i,e){return function(t,n){e(t,n,i)}};const y5e="ghost-text";var Mw;let yM=(Mw=class extends se{constructor(e,t,n,s,r,o){super(),this._editor=e,this._model=t,this._options=n,this._shouldKeepCursorStable=s,this._isClickable=r,this._languageService=o,this._isDisposed=Ft(this,!1),this._editorObs=Ts(this._editor),this._warningState=we(a=>{const l=this._model.ghostText.read(a);if(!l)return;const c=this._model.warning.read(a);if(c)return{lineNumber:l.lineNumber,position:new te(l.lineNumber,l.parts[0].column),icon:c.icon}}),this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this._useSyntaxHighlighting=this._options.map(a=>a.syntaxHighlightingEnabled),this._extraClassNames=we(this,a=>{const l=[...this._options.read(a).extraClasses??[]];return this._useSyntaxHighlighting.read(a)&&l.push("syntax-highlighted"),this._warningState.read(a)&&l.push("warning"),l.map(u=>` ${u}`).join("")}),this.uiState=we(this,a=>{var j,B;if(this._isDisposed.read(a))return;const l=this._editorObs.model.read(a);if(l!==this._model.targetTextModel.read(a))return;const c=this._model.ghostText.read(a);if(!c)return;const u=c instanceof MJ?c.columnRange:void 0,h=this._useSyntaxHighlighting.read(a),g=this._extraClassNames.read(a),{inlineTexts:f,additionalLines:m,hiddenRange:x,additionalLinesOriginalSuffix:v}=dGt(c,l,y5e+g),_=l.getLineContent(c.lineNumber),w=new Zb(f.map(H=>Ko.insert(H.column-1,H.text))),k=h?l.tokenization.tokenizeLinesAt(c.lineNumber,[w.apply(_),...m.map(H=>H.content)]):void 0,C=w.getNewRanges(),E=f.map((H,$)=>{var q;return{...H,tokens:(q=k==null?void 0:k[0])==null?void 0:q.getTokensInRange(C[$])}}),D=m.map((H,$)=>{let q=(k==null?void 0:k[$+1])??hr.createEmpty(H.content,this._languageService.languageIdCodec);if($===m.length-1&&v){const X=N1.fromLineTokens(l.tokenization.getLineTokens(v.lineNumber)).slice(v.columnRange.toZeroBasedOffsetRange());q=N1.fromLineTokens(q).append(X).toLineTokens(q.languageIdCodec)}return{content:q,decorations:H.decorations}}),T=(j=this._editor.getSelection())==null?void 0:j.getStartPosition().column,I=E.filter(H=>H.text!==""),R=I.length!==0,P={cursorColumnDistance:(R?I[0].column:1)-T,cursorLineDistance:R?0:m.findIndex(H=>H.content!=="")+1,lineCountOriginal:R?1:0,lineCountModified:m.length+(R?1:0),characterCountOriginal:0,characterCountModified:IF(I.map(H=>H.text.length))+IF(D.map(H=>H.content.getTextLength())),disjointReplacements:I.length+(m.length>0?1:0),sameShapeReplacements:I.length>1&&D.length===0?I.every(H=>H.text===I[0].text):void 0};return(B=this._model.handleInlineCompletionShown.read(a))==null||B(P),{replacedRange:u,inlineTexts:E,additionalLines:D,hiddenRange:x,lineNumber:c.lineNumber,additionalReservedLineCount:this._model.minReservedLineCount.read(a),targetTextModel:l,syntaxHighlightingEnabled:h}}),this.decorations=we(this,a=>{const l=this.uiState.read(a);if(!l)return[];const c=[],u=this._extraClassNames.read(a);l.replacedRange&&c.push({range:l.replacedRange.toRange(l.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace"+u,description:"GhostTextReplacement"}}),l.hiddenRange&&c.push({range:l.hiddenRange.toRange(l.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const h of l.inlineTexts)c.push({range:z.fromPositions(new te(l.lineNumber,h.column)),options:{description:"ghost-text-decoration",after:{content:h.text,tokens:h.tokens,inlineClassName:(h.preview?"ghost-text-decoration-preview":"ghost-text-decoration")+(this._isClickable?" clickable":"")+u+h.lineDecorations.map(g=>" "+g.className).join(" "),cursorStops:Du.Left,attachedData:new cK(this)},showIfCollapsed:!0}});return c}),this._additionalLinesWidget=this._register(new uGt(this._editor,we(a=>{const l=this.uiState.read(a);return l?{lineNumber:l.lineNumber,additionalLines:l.additionalLines,minReservedLineCount:l.additionalReservedLineCount,targetTextModel:l.targetTextModel}:void 0}),this._shouldKeepCursorStable,this._isClickable)),this._isInlineTextHovered=this._editorObs.isTargetHovered(a=>{var l;return a.target.type===6&&((l=a.target.detail.injectedText)==null?void 0:l.options.attachedData)instanceof cK&&a.target.detail.injectedText.options.attachedData.owner===this},this._store),this.isHovered=we(this,a=>this._isDisposed.read(a)?!1:this._isInlineTextHovered.read(a)||this._additionalLinesWidget.isHovered.read(a)),this.height=we(this,a=>this._editorObs.getOption(75).read(a)+(this._additionalLinesWidget.viewZoneHeight.read(a)??0)),this._register(dt(()=>{this._isDisposed.set(!0,void 0)})),this._register(this._editorObs.setDecorations(this.decorations)),this._isClickable&&(this._register(this._additionalLinesWidget.onDidClick(a=>this._onDidClick.fire(a))),this._register(this._editor.onMouseUp(a=>{var c;if(a.target.type!==6)return;const l=(c=a.target.detail.injectedText)==null?void 0:c.options.attachedData;l instanceof cK&&l.owner===this&&this._onDidClick.fire(a.event)}))),this._register(Fa((a,l)=>{}))}static getWarningWidgetContext(e){const t=e.ghostTextViewWarningWidgetData;if(t)return t;if(e.parentElement)return this.getWarningWidgetContext(e.parentElement)}ownsViewZone(e){return this._additionalLinesWidget.viewZoneId===e}},Mw.hot=uW(Mw),Mw);yM=lGt([cGt(5,tr)],yM);class cK{constructor(e){this.owner=e}}function dGt(i,e,t){const n=[],s=[];function r(h,g){if(s.length>0){const f=s[s.length-1];g&&f.decorations.push(new cl(f.content.length+1,f.content.length+1+h[0].line.length,g,0)),f.content+=h[0].line,h=h.slice(1)}for(const f of h)s.push({content:f.line,decorations:g?[new cl(1,f.line.length+1,g,0),...f.lineDecorations]:[...f.lineDecorations]})}const o=e.getLineContent(i.lineNumber);let a,l=0;for(const h of i.parts){let g=h.lines;a===void 0?(n.push({column:h.column,text:g[0].line,preview:h.preview,lineDecorations:g[0].lineDecorations}),g=g.slice(1)):r([{line:o.substring(l,h.column-1),lineDecorations:[]}],void 0),g.length>0&&(r(g,t),a===void 0&&h.column<=o.length&&(a=h.column)),l=h.column-1}let c;a!==void 0&&(c=new aGt(i.lineNumber,new N1e(l+1,o.length+1)));const u=a!==void 0?new N1e(a,o.length+1):void 0;return{inlineTexts:n,additionalLines:s,hiddenRange:u,additionalLinesOriginalSuffix:c}}class uGt extends se{get viewZoneId(){var e;return(e=this._viewZoneInfo)==null?void 0:e.viewZoneId}get viewZoneHeight(){return this._viewZoneHeight}constructor(e,t,n,s){super(),this._editor=e,this._lines=t,this._shouldKeepCursorStable=n,this._isClickable=s,this._viewZoneHeight=Ft("viewZoneHeight",void 0),this.editorOptionsChanged=Wc("editorOptionChanged",He.filter(this._editor.onDidChangeConfiguration,r=>r.hasChanged(40)||r.hasChanged(133)||r.hasChanged(113)||r.hasChanged(108)||r.hasChanged(60)||r.hasChanged(59)||r.hasChanged(75))),this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this._viewZoneListener=this._register(new Zn),this.isHovered=Ts(this._editor).isTargetHovered(r=>L1e(r.target.element),this._store),this.hasBeenAccepted=!1,this._editor instanceof wC&&this._shouldKeepCursorStable&&this._register(this._editor.onBeforeExecuteEdit(r=>this.hasBeenAccepted=r.source==="inlineSuggestion.accept")),this._register(Pt(r=>{const o=this._lines.read(r);this.editorOptionsChanged.read(r),o?(this.hasBeenAccepted=!1,this.updateLines(o.lineNumber,o.additionalLines,o.minReservedLineCount)):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this._viewZoneListener.clear(),this._editor.changeViewZones(e=>{this.removeActiveViewZone(e)})}updateLines(e,t,n){const s=this._editor.getModel();if(!s)return;const{tabSize:r}=s.getOptions();this._editor.changeViewZones(o=>{const a=new _e;this.removeActiveViewZone(o);const l=Math.max(t.length,n);if(l>0){const c=document.createElement("div");hGt(c,r,t,this._editor.getOptions(),this._isClickable),this._isClickable&&(a.add(de(c,"mousedown",u=>{u.preventDefault()})),a.add(de(c,"click",u=>{L1e(u.target)&&this._onDidClick.fire(new va(xt(u),u))}))),this.addViewZone(o,e,l,c)}this._viewZoneListener.value=a})}addViewZone(e,t,n,s){const r=e.addZone({afterLineNumber:t,heightInLines:n,domNode:s,afterColumnAffinity:1,onComputedHeight:o=>{this._viewZoneHeight.set(o,void 0)}});this.keepCursorStable(t,n),this._viewZoneInfo={viewZoneId:r,heightInLines:n,lineNumber:t}}removeActiveViewZone(e){this._viewZoneInfo&&(e.removeZone(this._viewZoneInfo.viewZoneId),this.hasBeenAccepted||this.keepCursorStable(this._viewZoneInfo.lineNumber,-this._viewZoneInfo.heightInLines),this._viewZoneInfo=void 0,this._viewZoneHeight.set(void 0,void 0))}keepCursorStable(e,t){var s,r;if(!this._shouldKeepCursorStable)return;const n=(r=(s=this._editor.getSelection())==null?void 0:s.getStartPosition())==null?void 0:r.lineNumber;n!==void 0&&e`);for(let v=0,_=t.length;v<_;v++){const w=t[v],k=w.content;f.appendString('
    ');const C=k.getLineContent(),E=FP(C),D=mL(C);PD(new ux(u.isMonospace&&!r,u.canUseHalfwidthRightwardsArrow,C,!1,E,D,0,k,w.decorations,e,0,u.spaceWidth,u.middotWidth,u.wsmiddotWidth,o,a,l,c!==Gb.OFF,null,null,0),f),f.appendString("
    ")}f.appendString(""),Po(i,u);const m=f.build(),x=D1e?D1e.createHTML(m):m;i.innerHTML=x}const D1e=Up("editorGhostText",{createHTML:i=>i}),B9=class B9{constructor(e){this.replacements=e,eR(RP(e,(t,n)=>t.lineRange.endLineNumberExclusive<=n.lineRange.startLineNumber))}toString(){return this.replacements.map(e=>e.toString()).join(",")}getNewLineRanges(){const e=[];let t=0;for(const n of this.replacements)e.push(jt.ofLength(n.lineRange.startLineNumber+t,n.newLines.length)),t+=n.newLines.length-n.lineRange.length;return e}};B9.empty=new B9([]);let iee=B9;class Q8{static fromSingleTextEdit(e,t){const n=Xc(e.text);let s=e.range.startLineNumber;const r=t.getValueOfRange(z.fromPositions(new te(e.range.startLineNumber,1),e.range.getStartPosition()));n[0]=r+n[0];let o=e.range.endLineNumber+1;const a=t.getTransformer().getLineLength(e.range.endLineNumber)+1,l=t.getValueOfRange(z.fromPositions(e.range.getEndPosition(),new te(e.range.endLineNumber,a)));n[n.length-1]=n[n.length-1]+l;const c=e.range.startColumn===t.getTransformer().getLineLength(e.range.startLineNumber)+1,u=e.range.endColumn===1;return c&&n[0].length===r.length&&(s++,n.shift()),n.length>0&&s${JSON.stringify(this.newLines)}`}toLineEdit(){return new iee([this])}}class w5e{get lineEdit(){return this.edit.replacements.length===0?new Q8(new jt(1,1),[]):Q8.fromSingleTextEdit(this.edit.toReplacement(this.originalText),this.originalText)}get originalLineRange(){return this.lineEdit.lineRange}get modifiedLineRange(){return this.lineEdit.toLineEdit().getNewLineRanges()[0]}get displayRange(){return this.originalText.lineRange.intersect(this.originalLineRange.join(jt.ofLength(this.originalLineRange.startLineNumber,this.lineEdit.newLines.length)))}constructor(e,t,n,s,r,o){this.originalText=e,this.edit=t,this.cursorPosition=n,this.multiCursorPositions=s,this.commands=r,this.inlineCompletion=o}}class C5e{constructor(e,t,n){this._model=e,this.inlineEdit=t,this.tabAction=n,this.action=this.inlineEdit.inlineCompletion.action,this.displayName=this.inlineEdit.inlineCompletion.source.provider.displayName??S(1219,"Inline Edit"),this.extensionCommands=this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands??[],this.isInDiffEditor=this._model.isInDiffEditor,this.displayLocation=this.inlineEdit.inlineCompletion.hint,this.showCollapsed=this._model.showCollapsed}accept(){this._model.accept()}jump(){this._model.jump()}handleInlineEditShown(e,t){this._model.handleInlineSuggestionShown(this.inlineEdit.inlineCompletion,e,t)}}class gGt{constructor(e){this._model=e,this.onDidAccept=this._model.onDidAccept,this.inAcceptFlow=this._model.inAcceptFlow}}class fGt{constructor(e,t,n,s){this.lineRange=n;const r=Ts(e),o=we(this,a=>r.isFocused.read(a)&&s.showInlineEditMenu?Pa.Accept:Pa.Inactive);this.model=new C5e(t,new w5e(new Xv(""),new Uc([s.getSingleTextEdit()]),t.primaryPosition.get(),t.allPositions.get(),s.source.inlineSuggestions.commands??[],s),o)}}class Di{static fromPoints(e,t){return new Di(e.x,e.y,t.x,t.y)}static fromPointSize(e,t){return new Di(e.x,e.y,e.x+t.x,e.y+t.y)}static fromLeftTopRightBottom(e,t,n,s){return new Di(e,t,n,s)}static fromLeftTopWidthHeight(e,t,n,s){return new Di(e,t,e+n,t+s)}static fromRanges(e,t){return new Di(e.start,t.start,e.endExclusive,t.endExclusive)}static hull(e){let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;for(const o of e)t=Math.min(t,o.left),n=Math.min(n,o.top),s=Math.max(s,o.right),r=Math.max(r,o.bottom);return new Di(t,n,s,r)}get width(){return this.right-this.left}get height(){return this.bottom-this.top}constructor(e,t,n,s){if(this.left=e,this.top=t,this.right=n,this.bottom=s,e>n)throw new Nt("Invalid arguments: Horizontally offset by "+(e-n));if(t>s)throw new Nt("Invalid arguments: Vertically offset by "+(t-s))}withMargin(e,t,n,s){let r,o,a,l;return t===void 0&&n===void 0&&s===void 0?r=o=a=l=e:n===void 0&&s===void 0?(r=o=t,a=l=e):(r=s,o=t,a=e,l=n),new Di(this.left-r,this.top-a,this.right+o,this.bottom+l)}intersectVertical(e){const t=Math.max(this.top,e.start),n=Math.min(this.bottom,e.endExclusive);return new Di(this.left,t,this.right,Math.max(t,n))}intersectHorizontal(e){const t=Math.max(this.left,e.start),n=Math.min(this.right,e.endExclusive);return new Di(t,this.top,Math.max(t,n),this.bottom)}toString(){return`Rect{(${this.left},${this.top}), (${this.right},${this.bottom})}`}intersect(e){const t=Math.max(this.left,e.left),n=Math.min(this.right,e.right),s=Math.max(this.top,e.top),r=Math.min(this.bottom,e.bottom);if(!(t>n||s>r))return new Di(t,s,n,r)}containsRect(e){return this.left<=e.left&&this.top<=e.top&&this.right>=e.right&&this.bottom>=e.bottom}containsPoint(e){return this.left<=e.x&&this.top<=e.y&&this.right>=e.x&&this.bottom>=e.y}moveToBeContainedIn(e){const t=this.width,n=this.height;let s=this.left,r=this.top;return se.right&&(s=e.right-t),re.bottom&&(r=e.bottom-n),new Di(s,r,s+t,r+n)}withWidth(e){return new Di(this.left,this.top,this.left+e,this.bottom)}withHeight(e){return new Di(this.left,this.top,this.right,this.top+e)}withTop(e){return new Di(this.left,e,this.right,this.bottom)}withLeft(e){return new Di(e,this.top,this.right,this.bottom)}translateX(e){return new Di(this.left+e,this.top,this.right+e,this.bottom)}translateY(e){return new Di(this.left,this.top+e,this.right,this.bottom+e)}getLeftBottom(){return new fo(this.left,this.bottom)}getRightBottom(){return new fo(this.right,this.bottom)}getRightTop(){return new fo(this.right,this.top)}toStyles(){return{position:"absolute",left:`${this.left}px`,top:`${this.top}px`,width:`${this.width}px`,height:`${this.height}px`}}}class t2{constructor(e,t,n,s=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=n,this.showEndForLine=s}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&bs(this.startLineNumbers,e.startLineNumbers)&&bs(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new t2([],[],0)}}const T1e=Up("stickyScrollViewLayer",{createHTML:i=>i}),dK="data-sticky-line-index",I1e="data-sticky-is-line",pGt="data-sticky-is-line-number",A1e="data-sticky-is-folding-icon";class mGt extends se{get height(){return this._height}constructor(e){super(),this._foldingIconStore=this._register(new _e),this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._height=-1,this._onDidChangeStickyScrollHeight=this._register(new ie),this.onDidChangeStickyScrollHeight=this._onDidChangeStickyScrollHeight.event,this._editor=e,this._lineHeight=e.getOption(75),this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof ix),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable),this._setHeight(0);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(131).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(131)&&t(),n.hasChanged(75)&&(this._lineHeight=this._editor.getOption(75))})),this._register(this._editor.onDidScrollChange(n=>{n.scrollLeftChanged&&t(),n.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{t(),this._updateWidgetWidth()})),t(),this._register(this._editor.onDidLayoutChange(n=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find(t=>t.lineNumber===e)}getCurrentLines(){return this._lineNumbers}setState(e,t,n){const s=!this._state&&!e,r=this._state&&this._state.equals(e);if(n===void 0&&(s||r))return;const o=this._findRenderingData(e),a=this._lineNumbers;this._lineNumbers=o.lineNumbers,this._lastLineRelativePosition=o.lastLineRelativePosition;const l=this._findIndexToRebuildFrom(a,this._lineNumbers,n);this._renderRootNode(this._lineNumbers,this._lastLineRelativePosition,t,l),this._state=e}_findRenderingData(e){if(!e)return{lineNumbers:[],lastLineRelativePosition:0};const t=[...e.startLineNumbers];e.showEndForLine!==null&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]);let n=0;for(let s=0;s!e.includes(r));return s===-1?0:s}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-e.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${e.width-e.verticalScrollbarWidth}px`}_useFoldingOpacityTransition(e){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${e?.5:0}s`)}_setFoldingIconsVisibility(e){for(const t of this._renderedStickyLines){const n=t.foldingIcon;n&&n.setVisible(e?!0:n.isCollapsed)}}async _renderRootNode(e,t,n,s){const r=this._editor._getViewModel();if(!r){this._clearWidget();return}if(e.length===0){this._clearWidget();return}const o=[],a=e[e.length-1];let l=0;for(let u=0;uu.scrollWidth))+c.verticalScrollbarWidth,this._renderedStickyLines=o,this._setHeight(l+t),this._editor.layoutOverlayWidget(this)}_clearWidget(){for(let e=0;e{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(de(this._lineNumbersDomNode,Fe.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(e,t,n,s,r,o,a){const l=e.coordinatesConverter.convertModelPositionToViewPosition(new te(n,1)).lineNumber,c=e.getViewLineRenderingData(l),u=this._editor.getOption(76),h=this._editor.getOption(117).verticalScrollbarSize;let g;try{g=cl.filter(c.inlineDecorations,l,c.minColumn,c.maxColumn)}catch{g=[]}const f=this._editor.getLineHeightForPosition(new te(n,1)),m=e.getTextDirection(n),x=new ux(!0,!0,c.content,c.continuesWithWrappedLine,c.isBasicASCII,c.containsRTL,0,c.tokens,g,c.tabSize,c.startVisibleColumn,1,1,1,500,"none",!0,!0,null,m,h),v=new S0(2e3),_=PD(x,v);let w;T1e?w=T1e.createHTML(v.build()):w=v.build();const k=document.createElement("span");k.setAttribute(dK,String(t)),k.setAttribute(I1e,""),k.setAttribute("role","listitem"),k.tabIndex=0,k.className="sticky-line-content",k.classList.add(`stickyLine${n}`),k.style.lineHeight=`${f}px`,k.innerHTML=w;const C=document.createElement("span");C.setAttribute(dK,String(t)),C.setAttribute(pGt,""),C.className="sticky-line-number",C.style.lineHeight=`${f}px`;const E=a.contentLeft;C.style.width=`${E}px`;const D=document.createElement("span");u.renderType===1||u.renderType===3&&n%10===0?D.innerText=n.toString():u.renderType===2&&(D.innerText=Math.abs(n-this._editor.getPosition().lineNumber).toString()),D.className="sticky-line-number-inner",D.style.width=`${a.lineNumbersWidth}px`,D.style.paddingLeft=`${a.lineNumbersLeft}px`,C.appendChild(D);const T=this._renderFoldingIconForLine(o,n);T&&(C.appendChild(T.domNode),T.domNode.style.left=`${a.lineNumbersWidth+a.lineNumbersLeft}px`,T.domNode.style.lineHeight=`${f}px`),this._editor.applyFontInfo(k),this._editor.applyFontInfo(C),C.style.lineHeight=`${f}px`,k.style.lineHeight=`${f}px`,C.style.height=`${f}px`,k.style.height=`${f}px`;const I=new bGt(t,n,k,C,T,_.characterMapping,k.scrollWidth,f);return this._updatePosition(I,s,r)}_updatePosition(e,t,n){var o;const s=e.lineDomNode,r=e.lineNumberDomNode;if(n){s.style.zIndex="0",r.style.zIndex="0";const l=`${t+this._lastLineRelativePosition+((o=e.foldingIcon)!=null&&o.isCollapsed?1:0)}px`;s.style.top=l,r.style.top=l}else s.style.zIndex="1",r.style.zIndex="1",s.style.top=`${t}px`,r.style.top=`${t}px`;return e}_renderFoldingIconForLine(e,t){const n=this._editor.getOption(126);if(!e||n==="never")return;const s=e.regions,r=s.findRange(t),o=s.getStartLineNumber(r);if(!(t===o))return;const l=s.isCollapsed(r),c=new xGt(l,o,s.getEndLineNumber(r),this._lineHeight);return c.setVisible(this._isOnGlyphMargin?!0:l||n==="always"),c.domNode.setAttribute(A1e,""),c}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const n=SL(t.characterMapping,e,0);return new te(t.lineNumber,n)}getLineNumberFromChildDomNode(e){var t;return((t=this._getRenderedStickyLineFromChildDomNode(e))==null?void 0:t.lineNumber)??null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return t===null||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,dK);return t?parseInt(t,10):null}isInStickyLine(e){return this._getAttributeValue(e,I1e)!==void 0}isInFoldingIconDomNode(e){return this._getAttributeValue(e,A1e)!==void 0}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const n=e.getAttribute(t);if(n!==null)return n;e=e.parentElement}}}class bGt{constructor(e,t,n,s,r,o,a,l){this.index=e,this.lineNumber=t,this.lineDomNode=n,this.lineNumberDomNode=s,this.foldingIcon=r,this.characterMapping=o,this.scrollWidth=a,this.height=l}}class xGt{constructor(e,t,n,s){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=n,this.dimension=s,this.domNode=document.createElement("div"),this.domNode.style.width="26px",this.domNode.style.height=`${s}px`,this.domNode.style.lineHeight=`${s}px`,this.domNode.className=Tt.asClassName(e?N8:k8)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class n2{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class X8{constructor(e,t,n){this.range=e,this.children=t,this.parent=n}}class S5e{constructor(e,t,n,s){this.uri=e,this.version=t,this.element=n,this.outlineProviderId=s}}var zW=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},wM=function(i,e){return function(t,n){e(t,n,i)}},i2;(function(i){i.OUTLINE_MODEL="outlineModel",i.FOLDING_PROVIDER_MODEL="foldingProviderModel",i.INDENTATION_MODEL="indentationModel"})(i2||(i2={}));var r_;(function(i){i[i.VALID=0]="VALID",i[i.INVALID=1]="INVALID",i[i.CANCELED=2]="CANCELED"})(r_||(r_={}));let see=class extends se{constructor(e,t,n,s){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new Uu(300)),this._updateOperation=this._register(new _e),this._editor.getOption(131).defaultModel){case i2.OUTLINE_MODEL:this._modelProviders.push(new ree(this._editor,s));case i2.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new aee(this._editor,t,s));case i2.INDENTATION_MODEL:this._modelProviders.push(new oee(this._editor,n));break}}dispose(){this._modelProviders.forEach(e=>e.dispose()),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const t of this._modelProviders){const{statusPromise:n,modelPromise:s}=t.computeStickyModel(e);this._modelPromise=s;const r=await n;if(this._modelPromise!==s)return null;switch(r){case r_.CANCELED:return this._updateOperation.clear(),null;case r_.VALID:return t.stickyModel}}return null}).catch(t=>(zt(t),null))}};see=zW([wM(2,ft),wM(3,lt)],see);class k5e extends se{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,r_.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=io(n=>this.createModelFromProvider(n));return{statusPromise:t.then(n=>this.isModelValid(n)?e.isCancellationRequested?r_.CANCELED:(this._stickyModel=this.createStickyModel(e,n),r_.VALID):this._invalid()).then(void 0,n=>(zt(n),r_.CANCELED)),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let ree=class extends k5e{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return Ym.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){var o;const{stickyOutlineElement:n,providerID:s}=this._stickyModelFromOutlineModel(t,(o=this._stickyModel)==null?void 0:o.outlineProviderId),r=this._editor.getModel();return new S5e(r.uri,r.getVersionId(),n,s)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let n;if(En.first(e.children.values())instanceof n5e){const a=En.find(e.children.values(),l=>l.id===t);if(a)n=a.children;else{let l="",c=-1,u;for(const[h,g]of e.children.entries()){const f=this._findSumOfRangesOfGroup(g);f>c&&(u=g,c=f,l=g.id)}t=l,n=u.children}}else n=e.children;const s=[],r=Array.from(n.values()).sort((a,l)=>{const c=new n2(a.symbol.range.startLineNumber,a.symbol.range.endLineNumber),u=new n2(l.symbol.range.startLineNumber,l.symbol.range.endLineNumber);return this._comparator(c,u)});for(const a of r)s.push(this._stickyModelFromOutlineElement(a,a.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new X8(void 0,s,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const n=[];for(const r of e.children.values())if(r.symbol.selectionRange.startLineNumber!==r.symbol.range.endLineNumber)if(r.symbol.selectionRange.startLineNumber!==t)n.push(this._stickyModelFromOutlineElement(r,r.symbol.selectionRange.startLineNumber));else for(const o of r.children.values())n.push(this._stickyModelFromOutlineElement(o,r.symbol.selectionRange.startLineNumber));n.sort((r,o)=>this._comparator(r.range,o.range));const s=new n2(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new X8(s,n,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const n of e.children.values())t+=this._findSumOfRangesOfGroup(n);return e instanceof LJ?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};ree=zW([wM(1,lt)],ree);class N5e extends k5e{constructor(e){super(e),this._foldingLimitReporter=this._register(new QOe(e))}createStickyModel(e,t){const n=this._fromFoldingRegions(t),s=this._editor.getModel();return new S5e(s.uri,s.getVersionId(),n,void 0)}isModelValid(e){return e!==null}_fromFoldingRegions(e){const t=e.length,n=[],s=new X8(void 0,[],void 0);for(let r=0;r{this._updateProvider(e,t)})),this._updateProvider(e,t)}_updateProvider(e,t){const n=c0.getFoldingRangeProviders(this._languageFeaturesService,e.getModel());n.length!==0&&(this.provider.value=new Hle(e.getModel(),n,t,this._foldingLimitReporter,void 0))}isProviderValid(){return this.provider!==void 0}async createModelFromProvider(e){var t;return((t=this.provider.value)==null?void 0:t.compute(e))??null}};aee=zW([wM(2,lt)],aee);var vGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},R1e=function(i,e){return function(t,n){e(t,n,i)}};class _Gt{constructor(e,t,n,s){this.startLineNumber=e,this.endLineNumber=t,this.top=n,this.height=s}}let lee=class extends se{constructor(e,t,n){super(),this._languageFeaturesService=t,this._languageConfigurationService=n,this._onDidChangeStickyScroll=this._register(new ie),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new _e),this._updateSoon=this._register(new pi(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(131)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(131).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this._sessionStore.add(dt(()=>{var t;(t=this._stickyModelProvider)==null||t.dispose(),this._stickyModelProvider=null})),this.updateStickyModelProvider(),this.update())}getVersionId(){var e;return(e=this._model)==null?void 0:e.version}updateStickyModelProvider(){var e;(e=this._stickyModelProvider)==null||e.dispose(),this._stickyModelProvider=null,this._editor.hasModel()&&(this._stickyModelProvider=new see(this._editor,()=>this._updateSoon.schedule(),this._languageConfigurationService,this._languageFeaturesService))}async update(){var e;(e=this._cts)==null||e.dispose(!0),this._cts=new vs,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}getCandidateStickyLinesIntersecting(e){var n;if(!((n=this._model)!=null&&n.element))return[];const t=[];return this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,0,-1),this.filterHiddenRanges(t)}getCandidateStickyLinesIntersectingFromStickyModel(e,t,n,s,r,o){const a=this._editor.getModel();if(!a||t.children.length===0)return;let l=o;const c=[];for(let g=0;gg-f)),h=this.updateIndex(LF(c,e.endLineNumber,(g,f)=>g-f));for(let g=u;g<=h;g++){const f=t.children[g];if(!f||!f.range)continue;const{startLineNumber:m,endLineNumber:x}=f.range;if(x>m+1&&e.startLineNumber<=x+1&&m-1<=e.endLineNumber&&m!==l&&a.isValidRange(new z(m,1,x,1))){l=m;const v=this._editor.getLineHeightForPosition(new te(m,1));n.push(new _Gt(m,x-1,r,v)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,f,n,s+1,r+v,m)}}}filterHiddenRanges(e){var n;const t=(n=this._editor._getViewModel())==null?void 0:n.getHiddenAreas();return t?e.filter(s=>!t.some(r=>s.startLineNumber>=r.startLineNumber&&s.endLineNumber<=r.endLineNumber+1)):e}updateIndex(e){return e===-1?0:e<0?-e-2:e}};lee=vGt([R1e(1,lt),R1e(2,As)],lee);var yGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Pk=function(i,e){return function(t,n){e(t,n,i)}},cee,Pw;let Uh=(Pw=class extends se{constructor(e,t,n,s,r,o,a){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=n,this._instaService=s,this._contextKeyService=a,this._sessionStore=new _e,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._mouseTarget=null,this._onDidChangeStickyScrollHeight=this._register(new ie),this.onDidChangeStickyScrollHeight=this._onDidChangeStickyScrollHeight.event,this._stickyScrollWidget=new mGt(this._editor),this._stickyLineCandidateProvider=new lee(this._editor,n,r),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=t2.Empty;const l=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeLineHeight(u=>{u.changes.forEach(h=>{const g=h.lineNumber;this._widgetState.startLineNumbers.includes(g)&&this._renderStickyScroll(g)})})),this._register(this._editor.onDidChangeFont(u=>{u.changes.forEach(h=>{const g=h.lineNumber;this._widgetState.startLineNumbers.includes(g)&&this._renderStickyScroll(g)})})),this._register(this._editor.onDidChangeConfiguration(u=>{this._readConfigurationChange(u)})),this._register(de(l,Fe.CONTEXT_MENU,async u=>{this._onContextMenu(xt(l),u)})),this._stickyScrollFocusedContextKey=J.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=J.stickyScrollVisible.bindTo(this._contextKeyService);const c=this._register($u(l));this._register(c.onDidBlur(u=>{this._positionRevealed===!1&&l.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(c.onDidFocus(u=>{this.focus()})),this._registerMouseListeners(),this._register(de(l,Fe.MOUSE_DOWN,u=>{this._onMouseDown=!0})),this._register(this._stickyScrollWidget.onDidChangeStickyScrollHeight(u=>{this._onDidChangeStickyScrollHeight.fire(u)})),this._onDidResize(),this._readConfiguration()}get stickyScrollWidgetHeight(){return this._stickyScrollWidget.height}static get(e){return e.getContribution(cee.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),(e=this._focusDisposableStore)==null||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}isFocused(){return this._focused}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new _e,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,()=>this._editor.revealPosition(e))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(z.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new _e),t=this._register(new NW(this._editor,{extractLineNumberFromMouseEvent:r=>{const o=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);return o?o.lineNumber:0}})),n=r=>{if(!this._editor.hasModel()||r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return null;const o=r.target.element;if(!o||o.innerText!==o.innerHTML)return null;const a=this._stickyScrollWidget.getEditorPositionFromNode(o);return a?{range:new z(a.lineNumber,a.column,a.lineNumber,a.column+o.innerText.length),textElement:o}:null},s=this._stickyScrollWidget.getDomNode();this._register(yr(s,Fe.CLICK,r=>{if(r.ctrlKey||r.altKey||r.metaKey||!r.leftButton)return;if(r.shiftKey){const c=this._stickyScrollWidget.getLineIndexFromChildDomNode(r.target);if(c===null)return;const u=new te(this._endLineNumbers[c],1);this._revealLineInCenterIfOutsideViewport(u);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(r.target)){const c=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);this._toggleFoldingRegionForLine(c);return}if(!this._stickyScrollWidget.isInStickyLine(r.target))return;let l=this._stickyScrollWidget.getEditorPositionFromNode(r.target);if(!l){const c=this._stickyScrollWidget.getLineNumberFromChildDomNode(r.target);if(c===null)return;l=new te(c,1)}this._revealPosition(l)})),this._register(de(fi,Fe.MOUSE_MOVE,r=>{this._mouseTarget=r.target,this._onMouseMoveOrKeyDown(r)})),this._register(de(fi,Fe.KEY_DOWN,r=>{this._onMouseMoveOrKeyDown(r)})),this._register(de(fi,Fe.KEY_UP,()=>{this._showEndForLine!==void 0&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._register(t.onMouseMoveOrRelevantKeyDown(([r,o])=>{const a=n(r);if(!a||!r.hasTriggerModifier||!this._editor.hasModel()){e.clear();return}const{range:l,textElement:c}=a;if(!l.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=l,e.clear();else if(c.style.textDecoration==="underline")return;const u=new vs;e.add(dt(()=>u.dispose(!0)));let h;fO(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new te(l.startLineNumber,l.startColumn+1),!1,u.token).then((g=>{if(!u.token.isCancellationRequested)if(g.length!==0){this._candidateDefinitionsLength=g.length;const f=c;h!==f?(e.clear(),h=f,h.style.textDecoration="underline",e.add(dt(()=>{h.style.textDecoration="none"}))):h||(h=f,h.style.textDecoration="underline",e.add(dt(()=>{h.style.textDecoration="none"})))}else e.clear()}))})),this._register(t.onCancel(()=>{e.clear()})),this._register(t.onExecute(async r=>{if(r.target.type!==12||r.target.detail!==this._stickyScrollWidget.getId())return;const o=this._stickyScrollWidget.getEditorPositionFromNode(r.target.element);o&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:o.lineNumber,column:1})),this._instaService.invokeFunction(POe,r,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})))}))}_onContextMenu(e,t){const n=new va(e,t);this._contextMenuService.showContextMenu({menuId:ct.StickyScrollContext,getAnchor:()=>n})}_onMouseMoveOrKeyDown(e){if(!e.shiftKey||!this._mouseTarget||!er(this._mouseTarget))return;const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(this._mouseTarget);t===null||this._showEndForLine===t||(this._showEndForLine=t,this._renderStickyScroll())}_toggleFoldingRegionForLine(e){if(!this._foldingModel||e===null)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),n=t==null?void 0:t.foldingIcon;if(!n)return;Ole(this._foldingModel,1,[e]),n.isCollapsed=!n.isCollapsed;const s=(n.isCollapsed?this._editor.getTopForLineNumber(n.foldingEndLine):this._editor.getTopForLineNumber(n.foldingStartLine))-this._editor.getOption(75)*t.index+1;this._editor.setScrollTop(s),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(131);if(e.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._resetState(),this._sessionStore.clear(),this._enabled=!1;return}else e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(n=>this._onTokensChange(n))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=void 0,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(76).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)}))}_readConfigurationChange(e){(e.hasChanged(131)||e.hasChanged(81)||e.hasChanged(75)||e.hasChanged(126)||e.hasChanged(76))&&this._readConfiguration(),(e.hasChanged(76)||e.hasChanged(52)||e.hasChanged(126))&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const n of t)for(const s of e.ranges)if(n>=s.fromLineNumber&&n<=s.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const t=this._editor.getLayoutInfo().height/this._editor.getOption(75);this._maxStickyLines=Math.round(t*.25),this._renderStickyScroll(0)}async _renderStickyScroll(e){const t=this._editor.getModel();if(!t||t.isTooLargeForTokenization()){this._resetState();return}const n=this._updateAndGetMinRebuildFromLine(e),s=this._stickyLineCandidateProvider.getVersionId();if(s===void 0||s===t.getVersionId())if(!this._focused)await this._updateState(n);else if(this._focusedStickyElementIndex===-1)await this._updateState(n),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const o=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(n),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(o)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}_updateAndGetMinRebuildFromLine(e){if(e!==void 0){const t=this._minRebuildFromLine!==void 0?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){var n;this._minRebuildFromLine=void 0,this._foldingModel=await((n=c0.get(this._editor))==null?void 0:n.getFoldingModel())??void 0,this._widgetState=this.findScrollWidgetState();const t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=t2.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=Math.min(this._maxStickyLines,this._editor.getOption(131).maxLineCount),t=this._editor.getScrollTop();let n=0;const s=[],r=[],o=this._editor.getVisibleRanges();if(o.length!==0){const a=new n2(o[0].startLineNumber,o[o.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const c of l){const u=c.startLineNumber,h=c.endLineNumber,g=c.top,f=g+c.height,m=this._editor.getTopForLineNumber(u)-t,x=this._editor.getBottomForLineNumber(h)-t;if(g>m&&g<=x&&(s.push(u),r.push(h+1),f>x&&(n=x-f)),s.length===e)break}}return this._endLineNumbers=r,new t2(s,r,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}},cee=Pw,Pw.ID="store.contrib.stickyScrollController",Pw);Uh=cee=yGt([Pk(1,eu),Pk(2,lt),Pk(3,ft),Pk(4,As),Pk(5,Ju),Pk(6,Bt)],Uh);const s2=Z("inlineEdit.originalBackground",Kt(Yv,.2),S(1220,"Background color for the original text in inline edits."),!0),E5e=Z("inlineEdit.modifiedBackground",Kt(b1,.3),S(1221,"Background color for the modified text in inline edits."),!0);Z("inlineEdit.originalChangedLineBackground",Kt(Yv,.8),S(1222,"Background color for the changed lines in the original text of inline edits."),!0);const wGt=Z("inlineEdit.originalChangedTextBackground",Kt(Yv,.8),S(1223,"Overlay color for the changed text in the original text of inline edits."),!0),CGt=Z("inlineEdit.modifiedChangedLineBackground",{light:Kt(v3,.7),dark:Kt(v3,.7),hcDark:v3,hcLight:v3},S(1224,"Background color for the changed lines in the modified text of inline edits."),!0),SGt=Z("inlineEdit.modifiedChangedTextBackground",Kt(b1,.7),S(1225,"Overlay color for the changed text in the modified text of inline edits."),!0),kGt=Z("inlineEdit.gutterIndicator.primaryForeground",Z7,S(1226,"Foreground color for the primary inline edit gutter indicator.")),bN=Z("inlineEdit.gutterIndicator.primaryBorder",x1,S(1227,"Border color for the primary inline edit gutter indicator.")),L5e=Z("inlineEdit.gutterIndicator.primaryBackground",{light:Kt(bN,.5),dark:Kt(bN,.4),hcDark:Kt(bN,.4),hcLight:Kt(bN,.5)},S(1228,"Background color for the primary inline edit gutter indicator.")),NGt=Z("inlineEdit.gutterIndicator.secondaryForeground",zAe,S(1229,"Foreground color for the secondary inline edit gutter indicator.")),D5e=Z("inlineEdit.gutterIndicator.secondaryBorder",JF,S(1230,"Border color for the secondary inline edit gutter indicator.")),T5e=Z("inlineEdit.gutterIndicator.secondaryBackground",D5e,S(1231,"Background color for the secondary inline edit gutter indicator.")),EGt=Z("inlineEdit.gutterIndicator.successfulForeground",Z7,S(1232,"Foreground color for the successful inline edit gutter indicator.")),I5e=Z("inlineEdit.gutterIndicator.successfulBorder",x1,S(1233,"Border color for the successful inline edit gutter indicator.")),A5e=Z("inlineEdit.gutterIndicator.successfulBackground",I5e,S(1234,"Background color for the successful inline edit gutter indicator.")),LGt=Z("inlineEdit.gutterIndicator.background",{hcDark:Kt("tab.inactiveBackground",.5),hcLight:Kt("tab.inactiveBackground",.5),dark:Kt("tab.inactiveBackground",.5),light:"#5f5f5f18"},S(1235,"Background color for the inline edit gutter indicator.")),eA=Z("inlineEdit.originalBorder",{light:Yv,dark:Yv,hcDark:Yv,hcLight:Yv},S(1236,"Border color for the original text in inline edits.")),tA=Z("inlineEdit.modifiedBorder",{light:fc(b1,.6),dark:b1,hcDark:b1,hcLight:b1},S(1237,"Border color for the modified text in inline edits.")),DGt=Z("inlineEdit.tabWillAcceptModifiedBorder",{light:fc(tA,0),dark:fc(tA,0),hcDark:fc(tA,0),hcLight:fc(tA,0)},S(1238,"Modified border color for the inline edits widget when tab will accept it.")),TGt=Z("inlineEdit.tabWillAcceptOriginalBorder",{light:fc(eA,0),dark:fc(eA,0),hcDark:fc(eA,0),hcLight:fc(eA,0)},S(1239,"Original border color for the inline edits widget over the original text when tab will accept it."));function CM(i){return i.map(e=>e===Pa.Accept?DGt:tA)}function UW(i){return i.map(e=>e===Pa.Accept?TGt:eA)}function yu(i,e){let t;typeof i=="string"?t=uK(i,e):t=i.map((s,r)=>uK(s,e).read(r));const n=uK(wr,e);return t.map((s,r)=>s.makeOpaque(n.read(r)))}function uK(i,e){return NIe({owner:{observeColor:i},equalsFn:(t,n)=>t.equals(n),debugName:()=>`observeColor(${i})`},e.onDidColorThemeChange,()=>{const t=e.getColorTheme().getColor(i);if(!t)throw new Nt(`Missing color: ${i}`);return t})}function o_(i,e,t){i.layoutInfo.read(t),i.value.read(t);const n=i.model.read(t);if(!n)return 0;let s=0;i.scrollTop.read(t);for(let o=e.startLineNumber;on.getLineContent(o));return s<5&&r.some(o=>o.length>0)&&n.uri.scheme!=="file"&&console.error("unexpected width"),s}function IGt(i,e,t){return i.layoutInfo.read(t),i.value.read(t),i.model.read(t)?(i.scrollTop.read(t),i.editor.getOffsetForColumn(e.lineNumber,e.column)):0}function Kle(i,e,t,n,s=void 0){const r=n.getModel();if(!r)return{prefixTrim:0,prefixLeftOffset:0};const o=i.map(g=>g.isSingleLine()?g.startColumn-1:0),a=e.mapToLineArray(g=>dX(r.getLineContent(g))),l=t.filter(g=>g!=="").map(g=>dX(g)),c=Math.min(...o,...a,...l);let u;if(r.getLineIndentColumn(e.startLineNumber)>=c+1)Ts(n).scrollTop.read(s),u=n.getOffsetForColumn(e.startLineNumber,c+1);else if(t.length>0)u=Gle(t[0].slice(0,c),n,r);else return{prefixTrim:0,prefixLeftOffset:0};return{prefixTrim:c,prefixLeftOffset:u}}function Gle(i,e,t){const n=e.getOption(59).typicalHalfwidthCharacterWidth,s=t.getOptions().tabSize*n,r=i.split(" ").length-1;return(i.length-r)*n+r*s}function Yle(i){const e=i.layoutInfoContentLeft,t=we({name:"editor.validOverlay.width"},s=>{const r=i.layoutInfoMinimap.read(s).minimapLeft!==0,o=i.layoutInfoWidth.read(s)-e.read(s);if(r){const a=i.layoutInfoMinimap.read(s).minimapWidth+i.layoutInfoVerticalScrollbarWidth.read(s);return o-a}return o}),n=we({name:"editor.validOverlay.height"},s=>i.layoutInfoHeight.read(s)+i.contentHeight.read(s));return we({name:"editor.validOverlay"},s=>Di.fromLeftTopWidthHeight(e.read(s),0,t.read(s),n.read(s)))}function AGt(i,e){const t=[];for(const n of i){const s=e.mapRange(n.modifiedRange);t.push(new Ml(n.originalRange,s))}return t}function hK(...i){return i.filter(e=>typeof e=="string").join(" ")}function RGt(i,e){return new z(e.lineNumber,e.column+i.start,e.lineNumber,e.column+i.endExclusive)}function MGt(i,e){let t=0;e:for(let n=0,s=i.length;nMGt(n[o-1],t)),$c);return e.forEach(o=>{const a=PGt(n[o-1],r,t);s.push(new Ar(RGt(new ht(0,a),new te(o,1)),""))}),new Uc(s)}class dee{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}build(){return this._data}}function Mp(i){const e=dx(void 0,(t,n)=>i.read(t)||n);return ma({debugName:()=>`${i.debugName}.mapOutFalsy`},t=>{if(e.read(t),!!i.read(t))return e})}function Ru(i,e=oo.ofCaller()){return{left:we({name:"editor.validOverlay.left"},t=>i(t).left,e),top:we({name:"editor.validOverlay.top"},t=>i(t).top,e),width:we({name:"editor.validOverlay.width"},t=>i(t).right-i(t).left,e),height:we({name:"editor.validOverlay.height"},t=>i(t).bottom-i(t).top,e)}}var jGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},gK=function(i,e){return function(t,n){e(t,n,i)}};let uee=class{constructor(e,t,n,s,r,o){this._model=e,this._close=t,this._editorObs=n,this._contextKeyService=s,this._keybindingService=r,this._commandService=o,this._inlineEditsShowCollapsed=this._editorObs.getOption(71).map(a=>a.edits.showCollapsed)}toDisposableLiveElement(){return this._createHoverContent().toDisposableLiveElement()}_createHoverContent(){const e=Ft("active",void 0),t=g=>({title:g.title,icon:g.icon,keybinding:typeof g.commandId=="string"?this._getKeybinding(g.commandArgs?void 0:g.commandId):we(this,f=>typeof g.commandId=="string"?void 0:this._getKeybinding(g.commandArgs?void 0:g.commandId.read(f)).read(f)),isActive:e.map(f=>f===g.id),onHoverChange:f=>e.set(f?g.id:void 0,void 0),onAction:()=>(this._close(!0),this._commandService.executeCommand(typeof g.commandId=="string"?g.commandId:g.commandId.get(),...g.commandArgs??[]))}),n=BGt(this._model.displayName),s=vy(t({id:"gotoAndAccept",title:`${S(1212,"Go To")} / ${S(1213,"Accept")}`,icon:Ee.check,commandId:rM})),r=vy(t({id:"reject",title:S(1214,"Reject"),icon:Ee.close,commandId:NPe})),o=this._model.extensionCommands.map((g,f)=>vy(t({id:g.command.id+"_"+f,title:g.command.title,icon:g.icon??Ee.symbolEvent,commandId:g.command.id,commandArgs:g.command.arguments}))),a=this._inlineEditsShowCollapsed.map(g=>vy(t(g?{id:"showExpanded",title:S(1215,"Show Expanded"),icon:Ee.expandAll,commandId:NZ}:{id:"showCollapsed",title:S(1216,"Show Collapsed"),icon:Ee.collapseAll,commandId:NZ}))),l=vy(t({id:"snooze",title:S(1217,"Snooze"),icon:Ee.bellSlash,commandId:"editor.action.inlineSuggest.snooze"})),c=vy(t({id:"settings",title:S(1218,"Settings"),icon:Ee.gear,commandId:"workbench.action.openSettings",commandArgs:["@tag:nextEditSuggestions"]})),u=this._model.action?[this._model.action]:[],h=u.length>0?HGt(u.map(g=>({id:g.id,label:g.title+"...",enabled:!0,run:()=>this._commandService.executeCommand(g.id,...g.arguments??[]),class:void 0,tooltip:g.tooltip??g.title})),{hoverDelegate:t9t}):void 0;return FGt([n,s,r,a,o.length?M1e():void 0,l,c,...o,h?M1e():void 0,h])}_getKeybinding(e){return e?Gn(this._contextKeyService.onDidChangeContext,()=>this._keybindingService.lookupKeybinding(e)):zi(void 0)}};uee=jGt([gK(3,Bt),gK(4,zn),gK(5,es)],uee);function FGt(i){return en.div({class:"content",style:{margin:4,minWidth:180}},i)}function BGt(i){return en.div({class:"header",style:{color:Pe(MAe),fontSize:"13px",fontWeight:"600",padding:"0 4px",lineHeight:28}},[i])}function vy(i){return we({name:"inlineEdits.option"},e=>{var t;return en.div({class:["monaco-menu-option",(t=i.isActive)==null?void 0:t.map(n=>n&&"active")],onmouseenter:()=>{var n;return(n=i.onHoverChange)==null?void 0:n.call(i,!0)},onmouseleave:()=>{var n;return(n=i.onHoverChange)==null?void 0:n.call(i,!1)},onclick:i.onAction,onkeydown:n=>{var s;n.key==="Enter"&&((s=i.onAction)==null||s.call(i))},tabIndex:0,style:{borderRadius:3}},[en.elem("span",{style:{fontSize:16,display:"flex"}},[Tt.isThemeIcon(i.icon)?Gg(i.icon):i.icon.map(n=>Gg(n))]),en.elem("span",{},[i.title]),en.div({style:{marginLeft:"auto"},ref:n=>{const s=e.store.add(new zD(n,Vc,{disableTitle:!0,...kMe,keybindingLabelShadow:void 0,keybindingLabelForeground:Pe(MAe),keybindingLabelBackground:"transparent",keybindingLabelBorder:"transparent",keybindingLabelBottomBorder:void 0}));e.store.add(Pt(r=>{s.set(i.keybinding.read(r))}))}})])})}function HGt(i,e){return we({name:"inlineEdits.actionBar"},t=>en.div({class:["action-widget-action-bar"],style:{padding:"3px 24px"}},[en.div({ref:n=>{t.store.add(new mc(n,e)).push(i,{icon:!1,label:!0})}})]))}function M1e(){return en.div({id:"inline-edit-gutter-indicator-menu-separator",class:"menu-separator",style:{color:Pe(xRt),padding:"2px 0"}},en.div({style:{borderBottom:`1px solid ${Pe(Doe)}`}}))}var WGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},f4=function(i,e){return function(t,n){e(t,n,i)}};let hee=class extends se{get model(){const e=this._model.get();if(!e)throw new Nt("Inline Edit Model not available");return e}constructor(e,t,n,s,r,o,a,l,c,u){super(),this._editorObs=e,this._originalRange=t,this._verticalOffset=n,this._model=s,this._isHoveringOverInlineEdit=r,this._focusIsInMenu=o,this._hoverService=a,this._instantiationService=l,this._accessibilityService=c,this._tabAction=we(this,h=>{const g=this._model.read(h);return g?g.tabAction.read(h):Pa.Inactive}),this._hoverVisible=Ft(this,!1),this.isHoverVisible=this._hoverVisible,this._isHoveredOverIcon=Ft(this,!1),this._isHoveredOverIconDebounced=hxe(this._isHoveredOverIcon,100),this.isHoveredOverIcon=this._isHoveredOverIconDebounced,this._isHoveredOverInlineEditDebounced=hxe(this._isHoveringOverInlineEdit,100),this._gutterIndicatorStyles=this._tabAction.map(this,(h,g)=>{switch(h){case Pa.Inactive:return{background:yu(T5e,u).read(g).toString(),foreground:yu(NGt,u).read(g).toString(),border:yu(D5e,u).read(g).toString()};case Pa.Jump:return{background:yu(L5e,u).read(g).toString(),foreground:yu(kGt,u).read(g).toString(),border:yu(bN,u).read(g).toString()};case Pa.Accept:return{background:yu(A5e,u).read(g).toString(),foreground:yu(EGt,u).read(g).toString(),border:yu(I5e,u).read(g).toString()};default:AP()}}),this._originalRangeObs=Mp(this._originalRange),this._state=we(this,h=>{const g=this._originalRangeObs.read(h);if(g)return{range:g,lineOffsetRange:this._editorObs.observeLineOffsetRange(g,h.store)}}),this._stickyScrollController=Uh.get(this._editorObs.editor),this._stickyScrollHeight=this._stickyScrollController?Gn(this._stickyScrollController.onDidChangeStickyScrollHeight,()=>this._stickyScrollController.stickyScrollWidgetHeight):zi(0),this._lineNumberToRender=we(this,h=>{var m;if(this._verticalOffset.read(h)!==0)return"";const g=(m=this._originalRange.read(h))==null?void 0:m.startLineNumber,f=this._editorObs.getOption(76).read(h);if(g===void 0||f.renderType===0)return"";if(f.renderType===3){const x=this._editorObs.cursorPosition.read(h);return g%10===0||x&&x.lineNumber===g?g.toString():""}if(f.renderType===2){const x=this._editorObs.cursorPosition.read(h);if(!x)return"";const v=Math.abs(g-x.lineNumber);return v===0?g.toString():v.toString()}return f.renderType===4?f.renderFn?f.renderFn(g):"":g.toString()}),this._availableWidthForIcon=we(this,h=>{const g=this._editorObs.editor.getModel(),f=this._editorObs.editor,m=this._editorObs.layoutInfo.read(h),x=m.decorationsLeft+m.decorationsWidth-m.glyphMarginLeft;if(!g||x<=0)return()=>0;if(m.lineNumbersLeft===0)return()=>x;const v=this._editorObs.getOption(76).read(h);if(v.renderType===2||v.renderType===0)return()=>x;const _=f.getOption(59).typicalHalfwidthCharacterWidth,w=m.lineNumbersLeft+m.lineNumbersWidth,C=(g.getLineCount()+1).toString().length,E=[];for(let D=1;D<=C;D++){const T=10**(D-1),I=f.getTopForLineNumber(T),R=D*_,P=Math.min(x,Math.max(0,w-R-m.glyphMarginLeft));E.push({firstLineNumberWithDigitCount:T,topOfLineNumber:I,usableWidthLeftOfLineNumber:P})}return D=>{for(let T=E.length-1;T>=0;T--)if(D>=E[T].topOfLineNumber)return E[T].usableWidthLeftOfLineNumber;throw new Nt("Could not find avilable width for icon")}}),this._layout=we(this,h=>{const g=this._state.read(h);if(!g)return;const f=this._editorObs.layoutInfo.read(h),m=this._editorObs.observeLineHeightForLine(g.range.map(G=>G.startLineNumber)).read(h),x=2,v=f.decorationsLeft+f.decorationsWidth-f.glyphMarginLeft-2*x,_=f.height-2*x,w=Di.fromLeftTopWidthHeight(x,x,v,_),k=w.withTop(this._stickyScrollHeight.read(h)),C=w.withTop(k.top+x),E=g.lineOffsetRange.read(h),D=Di.fromRanges(ht.fromTo(C.left,C.right),E),T=m,I=this._verticalOffset.read(h),R=D.withHeight(T).translateY(I),P=k.containsRect(R),j=this._tabAction.map(G=>G===Pa.Accept?Ee.keyboardTab:Ee.arrowRight),B=we(this,G=>{if(this._isHoveredOverIconDebounced.read(G)||this._isHoveredOverInlineEditDebounced.read(G))return Ee.check;if(this._tabAction.read(G)===Pa.Accept)return Ee.keyboardTab;const U=this._editorObs.cursorLineNumber.read(G)??0,ue=g.range.read(G).startLineNumber;return U<=ue?Ee.keyboardTabAbove:Ee.keyboardTabBelow}),H=22,$=16,q=G=>{const U=this._availableWidthForIcon.read(void 0)(G.bottom+this._editorObs.editor.getScrollTop())-x;return Math.max(Math.min(U,H),$)};if(P){const G=R;let U;f.lineNumbersWidth===0?U=Math.min(Math.max(f.lineNumbersLeft-w.left,0),G.width-H):U=Math.max(f.lineNumbersLeft+f.lineNumbersWidth-w.left,0);const ue=G.withWidth(U),fe=Math.max(Math.min(f.decorationsWidth,H),$),Le=G.withWidth(fe).translateX(U);return{gutterEditArea:D,icon:B,iconDirection:"right",iconRect:Le,pillRect:G,lineNumberRect:ue}}const V=w.intersect(D);if(V&&V.height>=T){const G=R.moveToBeContainedIn(C).moveToBeContainedIn(V),U=G.withWidth(q(G));return{gutterEditArea:D,icon:B,iconDirection:"right",iconRect:U,pillRect:U}}const ae=R.moveToBeContainedIn(w),ne=ae.withWidth(q(ae)),W=ne,Y=ne.top!!h),this._indicator=en.div({class:"inline-edits-view-gutter-indicator",onclick:()=>{const h=this._layout.get(),g=(h==null?void 0:h.icon.get())===Ee.check;this._editorObs.editor.focus(),g?this.model.accept():this.model.jump()},tabIndex:0,style:{position:"absolute",overflow:"visible"}},Mp(this._layout).map(h=>h?[en.div({style:{position:"absolute",background:Pe(LGt),borderRadius:"4px",...Ru(g=>h.read(g).gutterEditArea)}}),en.div({class:"icon",ref:this._iconRef,onmouseenter:()=>{this._showHover()},style:{cursor:"pointer",zIndex:"20",position:"absolute",backgroundColor:this._gutterIndicatorStyles.map(g=>g.background),"--vscodeIconForeground":this._gutterIndicatorStyles.map(g=>g.foreground),border:this._gutterIndicatorStyles.map(g=>`1px solid ${g.border}`),boxSizing:"border-box",borderRadius:"4px",display:"flex",justifyContent:"flex-end",transition:"background-color 0.2s ease-in-out, width 0.2s ease-in-out",...Ru(g=>h.read(g).pillRect)}},[en.div({className:"line-number",style:{lineHeight:h.map(g=>g.lineNumberRect?g.lineNumberRect.height:0),display:h.map(g=>g.lineNumberRect?"flex":"none"),alignItems:"center",justifyContent:"flex-end",width:h.map(g=>g.lineNumberRect?g.lineNumberRect.width:0),height:"100%",color:this._gutterIndicatorStyles.map(g=>g.foreground)}},this._lineNumberToRender),en.div({style:{rotate:h.map(g=>`${VGt(g.iconDirection)}deg`),transition:"rotate 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",marginRight:h.map(g=>{var f;return g.pillRect.width-g.iconRect.width-(((f=g.lineNumberRect)==null?void 0:f.width)??0)}),width:h.map(g=>g.iconRect.width)}},[h.map((g,f)=>Gg(g.icon.read(f)))])])]:[])).keepUpdated(this._store),this._register(this._editorObs.createOverlayWidget({domNode:this._indicator.element,position:zi(null),allowEditorOverflow:!1,minContentWidthInPx:zi(0)})),this._register(this._editorObs.editor.onMouseMove(h=>{if(this._state.get()===void 0)return;const m=this._iconRef.element.getBoundingClientRect(),x=Di.fromLeftTopWidthHeight(m.left,m.top,m.width,m.height),v=new fo(h.event.posx,h.event.posy);this._isHoveredOverIcon.set(x.containsPoint(v),void 0)})),this._register(this._editorObs.editor.onDidScrollChange(()=>{this._isHoveredOverIcon.set(!1,void 0)})),this._register(Bg(this._isHoveredOverInlineEditDebounced,h=>{h&&this.triggerAnimation()})),this._register(Pt(h=>{this._indicator.readEffect(h),this._indicator.element&&this._editorObs.editor.applyFontInfo(this._indicator.element)}))}triggerAnimation(){return this._accessibilityService.isMotionReduced()?new Animation(null,null).finished:this._iconRef.element.animate([{outline:`2px solid ${this._gutterIndicatorStyles.map(t=>t.border).get()}`,outlineOffset:"-1px",offset:0},{outline:"2px solid transparent",outlineOffset:"10px",offset:1}],{duration:500}).finished}_showHover(){if(this._hoverVisible.get())return;const e=new _e,t=e.add(this._instantiationService.createInstance(uee,this.model,r=>{r&&this._editorObs.editor.focus(),s==null||s.dispose()},this._editorObs).toDisposableLiveElement()),n=e.add($u(t.element));e.add(n.onDidBlur(()=>this._focusIsInMenu.set(!1,void 0))),e.add(n.onDidFocus(()=>this._focusIsInMenu.set(!0,void 0))),e.add(dt(()=>this._focusIsInMenu.set(!1,void 0)));const s=this._hoverService.showInstantHover({target:this._iconRef.element,content:t.element});s?(this._hoverVisible.set(!0,void 0),e.add(this._editorObs.editor.onDidScrollChange(()=>s.dispose())),e.add(s.onDispose(()=>{this._hoverVisible.set(!1,void 0),e.dispose()}))):e.dispose()}};hee=WGt([f4(6,Zl),f4(7,ft),f4(8,Zo),f4(9,Ws)],hee);function VGt(i){switch(i){case"top":return 90;case"bottom":return-90;case"right":return 0}}var zGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},P1e=function(i,e){return function(t,n){e(t,n,i)}},vd;(function(i){i.FirstTime="firstTime",i.SecondTime="secondTime",i.Active="active"})(vd||(vd={}));let gee=class extends se{constructor(e,t,n,s,r,o){super(),this._host=e,this._model=t,this._indicator=n,this._collapsedView=s,this._storageService=r,this._configurationService=o,this._disposables=this._register(new Zn),this._setupDone=Ft({name:"setupDone"},!1),this._activeCompletionId=we(a=>{const l=this._model.read(a);if(!l||!this._setupDone.read(a))return;const c=this._indicator.read(a);if(!(!c||!c.isVisible.read(a)))return l.inlineEdit.inlineCompletion.identity.id}),this._register(this._initializeDebugSetting()),this._disposables.value=this.setupNewUserExperience(),this._setupDone.set(!0,void 0)}setupNewUserExperience(){if(this.getNewUserType()===vd.Active)return;const e=new _e;let t=!1,n=!1,s=0,r=0;return e.add(HOt(this._activeCompletionId,async(o,a,l,c)=>{var h,g;if(o===void 0)return;let u=this.getNewUserType();switch(u){case vd.FirstTime:{(s++>=5||t)&&(u=vd.SecondTime,this.setNewUserType(u));break}case vd.SecondTime:{r++>=3&&n&&(u=vd.Active,this.setNewUserType(u));break}}switch(u){case vd.FirstTime:{for(let f=0;f<3&&!c.isCancellationRequested;f++)await((h=this._indicator.get())==null?void 0:h.triggerAnimation()),await kp(500);break}case vd.SecondTime:{(g=this._indicator.get())==null||g.triggerAnimation();break}}})),e.add(Pt(o=>{this._collapsedView.isVisible.read(o)&&this.getNewUserType()!==vd.Active&&this._collapsedView.triggerAnimation()})),e.add(Fa((o,a)=>{const l=this._indicator.read(o);l&&a.add(Bg(l.isHoveredOverIcon,async c=>{c&&(t=!0)}))})),e.add(Fa((o,a)=>{const l=this._host.read(o);l&&a.add(l.onDidAccept(()=>{n=!0}))})),e}getNewUserType(){return this._storageService.get("inlineEditsGutterIndicatorUserKind",-1,vd.FirstTime)}setNewUserType(e){switch(e){case vd.FirstTime:throw new Nt("UserKind should not be set to first time");case vd.SecondTime:break;case vd.Active:this._disposables.clear();break}this._storageService.store("inlineEditsGutterIndicatorUserKind",e,-1,0)}_initializeDebugSetting(){const e="editor.inlineSuggest.edits.resetNewUserExperience";return this._configurationService.getValue(e)&&this._storageService.remove("inlineEditsGutterIndicatorUserKind",-1),this._configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration(e)&&this._configurationService.getValue(e)&&(this._storageService.remove("inlineEditsGutterIndicatorUserKind",-1),this._disposables.value=this.setupNewUserExperience())})}};gee=zGt([P1e(4,xl),P1e(5,Zt)],gee);var UGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},$Gt=function(i,e){return function(t,n){e(t,n,i)}};let fee=class extends se{constructor(e,t,n){super(),this._editor=e,this._edit=t,this._accessibilityService=n,this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this._iconRef=en.ref(),this.isHovered=zi(!1),this._editorObs=Ts(this._editor);const r=this._edit.map(c=>(c==null?void 0:c.edit.replacements[0])??null).map(c=>c?pb(c,this._editor.getModel()).range.getStartPosition():null),o=this._editorObs.observePosition(r,this._store),a=we(c=>{const u=o.read(c);if(!u)return null;const h=this._editorObs.layoutInfoContentLeft.read(c),g=this._editorObs.scrollLeft.read(c);return new fo(h+u.x-g,u.y)}),l=en.div({class:"inline-edits-collapsed-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:"block"}},[[this.getCollapsedIndicator(a)]]).keepUpdated(this._store).element;this._register(this._editorObs.createOverlayWidget({domNode:l,position:zi(null),allowEditorOverflow:!1,minContentWidthInPx:zi(0)})),this.isVisible=this._edit.map((c,u)=>!!c&&a.read(u)!==null)}triggerAnimation(){return this._accessibilityService.isMotionReduced()?new Animation(null,null).finished:this._iconRef.element.animate([{offset:0,transform:"translateY(-3px)"},{offset:.2,transform:"translateY(1px)"},{offset:.36,transform:"translateY(-1px)"},{offset:.52,transform:"translateY(1px)"},{offset:.68,transform:"translateY(-1px)"},{offset:.84,transform:"translateY(1px)"},{offset:1,transform:"translateY(0px)"}],{duration:2e3}).finished}getCollapsedIndicator(e){const t=this._editorObs.layoutInfoContentLeft,n=e.map((r,o)=>r?r.deltaX(-t.read(o)):null),s=this.createIconPath(n);return en.svg({class:"collapsedView",ref:this._iconRef,style:{position:"absolute",...Ru(r=>Yle(this._editorObs).read(r)),overflow:"hidden",pointerEvents:"none"}},[en.svgElem("path",{class:"collapsedViewPath",d:s,fill:Pe(bN)})])}createIconPath(e){return e.map(r=>{if(!r)return new dee().build();const o=r.deltaX(-6/2).deltaY(-1),a=o.deltaX(6),l=o.deltaY(1),c=a.deltaY(1),u=l.deltaX(6/2).deltaY(3);return new dee().moveTo(o).lineTo(a).lineTo(c).lineTo(u).lineTo(l).lineTo(o).build()})}};fee=UGt([$Gt(2,Zo)],fee);var qGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},O1e=function(i,e){return function(t,n){e(t,n,i)}};const p4=14,fK=0,ym=4,m4=4,j1e=2;let pee=class extends se{constructor(e,t,n,s,r){super(),this._editor=e,this._languageService=r,this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this._isHovered=Ft(this,!1),this.isHovered=this._isHovered,this._viewRef=en.ref(),this._editorObs=Ts(this._editor);const o=n.map((u,h)=>{let g;switch(u){case Pa.Inactive:g=T5e;break;case Pa.Jump:g=L5e;break;case Pa.Accept:g=A5e;break}return{border:yu(g,s).read(h).toString(),background:Pe(wr)}}),a=t.map(u=>u?this.getState(u):void 0),l=a.map(u=>u?this.getRendering(u,o):void 0);this.minEditorScrollHeight=we(this,u=>{const h=a.read(u);return h?h.rect.read(u).bottom+this._editor.getScrollTop():0});const c=en.div({class:"inline-edits-custom-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:"block"}},[l]).keepUpdated(this._store);this._register(this._editorObs.createOverlayWidget({domNode:c.element,position:zi(null),allowEditorOverflow:!1,minContentWidthInPx:dx(this,(u,h)=>{const g=a.read(u);if(!g)return h??0;const f=g.rect.map(m=>m.right).read(u)+this._editorObs.layoutInfoVerticalScrollbarWidth.read(u)+ym-this._editorObs.layoutInfoContentLeft.read(u);return Math.max(h??0,f)}).recomputeInitiallyAndOnChange(this._store)})),this._register(Pt(u=>{if(!l.read(u)){this._isHovered.set(!1,void 0);return}this._isHovered.set(c.isHovered.read(u),void 0)}))}fitsInsideViewport(e,t,n){const s=this._editorObs.layoutInfoWidth.read(n),r=this._editorObs.layoutInfoContentLeft.read(n),o=this._editor.getLayoutInfo().verticalScrollbarWidth,a=this._editorObs.layoutInfoMinimap.read(n).minimapLeft!==0?this._editorObs.layoutInfoMinimap.read(n).minimapWidth:0,l=o_(this._editorObs,e,void 0),c=Gle(t,this._editor,this._editor.getModel()),u=ym+p4;return l+c+u{var w;const l=e.range.startLineNumber,c=e.range.endLineNumber,u=e.range.startColumn,h=e.range.endColumn,g=((w=this._editor.getModel())==null?void 0:w.getLineCount())??0,f=o_(this._editorObs,new jt(l,l+1),a),m=l+1<=g?o_(this._editorObs,new jt(l+1,l+2),a):void 0,x=l-1>=1?o_(this._editorObs,new jt(l-1,l),a):void 0,v=this._editor.getOffsetForColumn(l,u),_=this._editor.getOffsetForColumn(c,h);return{lineWidth:f,lineWidthBelow:m,lineWidthAbove:x,startContentLeftOffset:v,endContentLeftOffset:_}}),n=e.range.startLineNumber,s=e.range.endLineNumber,r=this.fitsInsideViewport(new jt(n,s+1),e.content,void 0);return{rect:we(this,a=>{const l=this._editorObs.getOption(59).read(a).typicalHalfwidthCharacterWidth,{lineWidth:c,lineWidthBelow:u,lineWidthAbove:h,startContentLeftOffset:g,endContentLeftOffset:f}=t.read(a),m=this._editorObs.layoutInfoContentLeft.read(a),x=this._editorObs.observeLineHeightForLine(n).recomputeInitiallyAndOnChange(a.store).read(a),v=this._editorObs.scrollTop.read(a),_=this._editorObs.scrollLeft.read(a);let w;n===s&&f+5*l>=c&&r?w="end":u!==void 0&&u+p4-m4-ymc.withMargin(0,ym));return en.div({class:"collapsedView",ref:this._viewRef,style:{position:"absolute",...Ru(c=>a.read(c)),overflow:"hidden",boxSizing:"border-box",cursor:"pointer",border:t.map(c=>`1px solid ${c.border}`),borderRadius:"4px",backgroundColor:t.map(c=>c.background),display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap"},onmousedown:c=>{c.preventDefault()},onclick:c=>{this._onDidClick.fire(new va(xt(c),c))}},[n])}};pee=qGt([O1e(3,Ws),O1e(4,tr)],pee);const KGt=0,GGt=0,pK=1,YGt=1,QGt=3,mK=4;class XGt extends se{constructor(e,t,n,s){super(),this._editor=e,this._edit=t,this._uiState=n,this._tabAction=s,this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this._display=we(this,a=>this._uiState.read(a)?"block":"none"),this._editorMaxContentWidthInRange=we(this,a=>{const l=this._originalDisplayRange.read(a);return l?(this._editorObs.versionId.read(a),dx(this,(c,u)=>{const h=o_(this._editorObs,l,c);return Math.max(h,u??0)})):zi(0)}).map((a,l)=>a.read(l)),this._maxPrefixTrim=we(this,a=>{const l=this._uiState.read(a);return l?Kle(l.deletions,l.originalRange,[],this._editor):{prefixTrim:0,prefixLeftOffset:0}}),this._editorLayoutInfo=we(this,a=>{const l=this._edit.read(a);if(!l||!this._uiState.read(a))return null;const u=this._editorObs.layoutInfo.read(a),h=this._editorObs.scrollLeft.read(a),g=this._editorObs.getOption(59).map(k=>k.typicalHalfwidthCharacterWidth).read(a),f=u.contentLeft+Math.max(this._editorMaxContentWidthInRange.read(a),g)-h,m=l.originalLineRange,x=this._originalVerticalStartPosition.read(a)??this._editor.getTopForLineNumber(m.startLineNumber)-this._editorObs.scrollTop.read(a),v=this._originalVerticalEndPosition.read(a)??this._editor.getTopForLineNumber(m.endLineNumberExclusive)-this._editorObs.scrollTop.read(a),_=u.contentLeft+this._maxPrefixTrim.read(a).prefixLeftOffset-h;return f<=_?null:{codeRect:Di.fromLeftTopRightBottom(_,x,f,v).withMargin(GGt,KGt),contentLeft:u.contentLeft}}).recomputeInitiallyAndOnChange(this._store),this._originalOverlay=en.div({style:{pointerEvents:"none"}},we(this,a=>{const l=Mp(this._editorLayoutInfo).read(a);if(!l)return;const c=l.map(f=>Di.fromLeftTopRightBottom(f.contentLeft-mK-pK,f.codeRect.top,f.contentLeft,f.codeRect.bottom)),u=we(this,f=>{const m=l.read(f).codeRect,x=c.read(f);return m.intersectHorizontal(new ht(x.left,Number.MAX_SAFE_INTEGER))}),h=this._uiState.map(f=>f!=null&&f.inDiffEditor?QGt:YGt).read(a),g=u.map(f=>f.withMargin(h,h));return[en.div({class:"originalSeparatorDeletion",style:{...g.read(a).toStyles(),borderRadius:`${mK}px`,border:`${pK+h}px solid ${Pe(wr)}`,boxSizing:"border-box"}}),en.div({class:"originalOverlayDeletion",style:{...u.read(a).toStyles(),borderRadius:`${mK}px`,border:UW(this._tabAction).map(f=>`${pK}px solid ${Pe(f)}`),boxSizing:"border-box",backgroundColor:Pe(s2)}}),en.div({class:"originalOverlayHiderDeletion",style:{...c.read(a).toStyles(),backgroundColor:Pe(wr)}})]})).keepUpdated(this._store),this._nonOverflowView=en.div({class:"inline-edits-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:this._display}},[[this._originalOverlay]]).keepUpdated(this._store),this.isHovered=zi(!1),this._editorObs=Ts(this._editor);const r=we(this,a=>{const l=this._edit.read(a);return l?new te(l.originalLineRange.startLineNumber,1):null}),o=we(this,a=>{const l=this._edit.read(a);return l?new te(l.originalLineRange.endLineNumberExclusive,1):null});this._originalDisplayRange=this._uiState.map(a=>a==null?void 0:a.originalRange),this._originalVerticalStartPosition=this._editorObs.observePosition(r,this._store).map(a=>a==null?void 0:a.y),this._originalVerticalEndPosition=this._editorObs.observePosition(o,this._store).map(a=>a==null?void 0:a.y),this._register(this._editorObs.createOverlayWidget({domNode:this._nonOverflowView.element,position:zi(null),allowEditorOverflow:!1,minContentWidthInPx:we(this,a=>{const l=this._editorLayoutInfo.read(a);return l===null?0:l.codeRect.width})}))}}var ZGt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},F1e=function(i,e){return function(t,n){e(t,n,i)}};const NI=1,JGt=1,eYt=3,bK=4;let mee=class extends se{constructor(e,t,n,s,r){super(),this._editor=e,this._input=t,this._tabAction=n,this._languageService=r,this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this._state=we(this,o=>{const a=this._input.read(o);if(!a)return;const l=this._editor.getModel(),c=l.getEOL();if(a.startColumn===1&&a.lineNumber>1&&l.getLineLength(a.lineNumber)!==0&&a.text.endsWith(c)&&!a.text.startsWith(c)){const u=l.getLineLength(a.lineNumber-1)+1;return{lineNumber:a.lineNumber-1,column:u,text:c+a.text.slice(0,-c.length)}}return{lineNumber:a.lineNumber,column:a.startColumn,text:a.text}}),this._trimVertically=we(this,o=>{const a=this._state.read(o),l=a==null?void 0:a.text;if(!l||l.trim()==="")return{topOffset:0,bottomOffset:0,linesTop:0,linesBottom:0};const c=this._editor.getLineHeightForPosition(new te(a.lineNumber,1)),u=this._editor.getModel().getEOL();let h=0,g=0,f=0;for(;ff&&l.endsWith(u,m);m-=u.length)g+=1;return{topOffset:h*c,bottomOffset:g*c,linesTop:h,linesBottom:g}}),this._maxPrefixTrim=we(this,o=>{const a=this._state.read(o);if(!a)return{prefixLeftOffset:0,prefixTrim:0};const l=this._editor.getModel(),c=l.getEOL(),u=this._trimVertically.read(o),h=a.text.split(c),g=h.slice(u.linesTop,h.length-u.linesBottom);u.linesTop===0&&(g[0]=l.getLineContent(a.lineNumber)+g[0]);const f=new jt(a.lineNumber,a.lineNumber+(u.linesTop>0?0:1));return Kle([],f,g,this._editor)}),this._ghostText=we(o=>{const a=this._state.read(o),l=this._maxPrefixTrim.read(o);if(!a)return;const u=this._editor.getModel().getEOL(),g=a.text.split(u).map((f,m)=>new Q1(new z(m+1,m===0?1:l.prefixTrim+1,m+1,f.length+1),"modified-background",0));return new vM(a.lineNumber,[new W8(a.column,a.text,!1,g)])}),this._display=we(this,o=>this._state.read(o)?"block":"none"),this._editorMaxContentWidthInRange=we(this,o=>{const a=this._state.read(o);if(!a)return 0;this._editorObs.versionId.read(o);const l=this._editor.getModel(),c=l.getEOL(),u=a.text.startsWith(c)?"":l.getValueInRange(new z(a.lineNumber,1,a.lineNumber,a.column)),h=l.getValueInRange(new z(a.lineNumber,a.column,a.lineNumber,l.getLineLength(a.lineNumber)+1)),f=(u+a.text+h).split(c),m=Rb.fromEditor(this._editor).withSetWidth(!1).withScrollBeyondLastColumn(0),x=f.map(v=>{var k;const _=(k=l.tokenization.tokenizeLinesAt(a.lineNumber,[v]))==null?void 0:k[0];let w;return _?w=Lb.fromLineTokens(_).toLineTokens(v,this._languageService.languageIdCodec):w=hr.createEmpty(v,this._languageService.languageIdCodec),sO(new rO([w]),m,[],Oe("div"),!0).minWidthInPx});return Math.max(...x)}),this.startLineOffset=this._trimVertically.map(o=>o.topOffset),this.originalLines=this._state.map(o=>o?new jt(o.lineNumber,Math.min(o.lineNumber+2,this._editor.getModel().getLineCount()+1)):void 0),this._overlayLayout=we(this,o=>{this._ghostText.read(o);const a=this._state.read(o);if(!a)return null;this._editorObs.observePosition(Ft(this,new te(a.lineNumber,a.column)),o.store).read(o);const l=this._editorObs.layoutInfo.read(o),c=this._editorObs.scrollLeft.read(o),u=this._editorObs.layoutInfoVerticalScrollbarWidth.read(o),h=l.contentLeft+this._editorMaxContentWidthInRange.read(o)-c,g=this._maxPrefixTrim.read(o).prefixLeftOffset??0,f=l.contentLeft+g-c;if(h<=f)return null;const{topOffset:m,bottomOffset:x}=this._trimVertically.read(o),v=this._editorObs.scrollTop.read(o),_=this._ghostTextView.height.read(o)-m-x,w=this._editor.getTopForLineNumber(a.lineNumber)-v+m,k=w+_,C=new Di(f,w,h,k);return{overlay:C,startsAtContentLeft:g===0,contentLeft:l.contentLeft,minContentWidthRequired:g+C.width+u}}).recomputeInitiallyAndOnChange(this._store),this._modifiedOverlay=en.div({style:{pointerEvents:"none"}},we(this,o=>{const a=Mp(this._overlayLayout).read(o);if(!a)return;const l=a.map(g=>Di.fromLeftTopRightBottom(g.contentLeft-bK-NI,g.overlay.top,g.contentLeft,g.overlay.bottom)).read(o),c=this._input.map(g=>g!=null&&g.inDiffEditor?eYt:JGt).read(o),u=a.map(g=>g.overlay.withMargin(0,NI,0,g.startsAtContentLeft?0:NI).intersectHorizontal(new ht(l.left,Number.MAX_SAFE_INTEGER))),h=u.map(g=>g.withMargin(c,c));return[en.div({class:"originalUnderlayInsertion",style:{...h.read(o).toStyles(),borderRadius:bK,border:`${NI+c}px solid ${Pe(wr)}`,boxSizing:"border-box"}}),en.div({class:"originalOverlayInsertion",style:{...u.read(o).toStyles(),borderRadius:bK,border:CM(this._tabAction).map(g=>`${NI}px solid ${Pe(g)}`),boxSizing:"border-box",backgroundColor:Pe(E5e)}}),en.div({class:"originalOverlayHiderInsertion",style:{...l.toStyles(),backgroundColor:Pe(wr)}})]})).keepUpdated(this._store),this._view=en.div({class:"inline-edits-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:this._display}},[[this._modifiedOverlay]]).keepUpdated(this._store),this._editorObs=Ts(this._editor),this._ghostTextView=this._register(s.createInstance(yM,this._editor,{ghostText:this._ghostText,minReservedLineCount:zi(0),targetTextModel:this._editorObs.model.map(o=>o??void 0),warning:zi(void 0),handleInlineCompletionShown:zi(()=>{})},Ft(this,{syntaxHighlightingEnabled:!0,extraClasses:["inline-edit"]}),!0,!0)),this.isHovered=this._ghostTextView.isHovered,this._register(this._ghostTextView.onDidClick(o=>{this._onDidClick.fire(o)})),this._register(this._editorObs.createOverlayWidget({domNode:this._view.element,position:zi(null),allowEditorOverflow:!1,minContentWidthInPx:we(this,o=>{const a=this._overlayLayout.read(o);return a===null?0:a.minContentWidthRequired})}))}};mee=ZGt([F1e(3,ft),F1e(4,tr)],mee);var tYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},B1e=function(i,e){return function(t,n){e(t,n,i)}};let bee=class extends se{constructor(e,t,n,s,r,o){super(),this._editor=e,this._edit=t,this._isInDiffEditor=n,this._tabAction=s,this._languageService=r,this._themeService=o,this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this._maxPrefixTrim=this._edit.map((a,l)=>a?Kle(a.replacements.flatMap(c=>[c.originalRange,c.modifiedRange]),a.originalRange,a.modifiedLines,this._editor.editor,l):void 0),this._modifiedLineElements=we(this,a=>{var v;const l=[];let c=0;const u=this._maxPrefixTrim.read(a),h=this._edit.read(a);if(!h||!u)return;const g=u.prefixTrim,f=nYt(h.replacements.map(_=>_.modifiedRange)).map(_=>new z(_.startLineNumber,_.startColumn-g,_.endLineNumber,_.endColumn-g)),m=this._editor.model.get(),x=h.modifiedRange.startLineNumber;for(let _=0;_P.startLineNumber===k)){const P=Math.min(R.endColumn,C.length+1);T.push(new Q1(new z(1,R.startColumn,1,P),"inlineCompletions-modified-bubble",0))}const I=sO(new rO([D]),Rb.fromEditor(this._editor.editor).withSetWidth(!1).withScrollBeyondLastColumn(0),T,w,!0);this._editor.getOption(59).read(a),c=Math.max(c,I.minWidthInPx),l.push(w)}return{lines:l,requiredWidth:c}}),this._layout=we(this,a=>{const l=this._modifiedLineElements.read(a),c=this._maxPrefixTrim.read(a),u=this._edit.read(a);if(!l||!c||!u)return;const{prefixLeftOffset:h}=c,{requiredWidth:g}=l,f=this._editor.observeLineHeightsForLineRange(u.originalRange).read(a),m=(()=>{const V=f.slice(0,u.modifiedRange.length);for(;V.lengththis._editor.editor.getOffsetForColumn(V,C.getLineMaxColumn(V))-h),D=Math.max(...E,g),T=u.originalRange.startLineNumber,I=u.originalRange.endLineNumberExclusive-1,R=this._editor.editor.getTopForLineNumber(T)-w,P=this._editor.editor.getBottomForLineNumber(I)-w,j=Di.fromLeftTopWidthHeight(k+h,R,D,P-R),B=Di.fromLeftTopWidthHeight(j.left,j.bottom,j.width,m.reduce((V,X)=>V+X,0)),H=Di.hull([j,B]),$=H.intersectVertical(new ht(j.bottom,Number.MAX_SAFE_INTEGER)),q=new Di($.left,$.top,$.right,$.bottom);return{originalLinesOverlay:j,modifiedLinesOverlay:B,background:H,lowerBackground:$,lowerText:q,modifiedLineHeights:m,minContentWidthRequired:h+D+v}}),this._viewZoneInfo=we(a=>{if(!this._editor.getOption(71).map(f=>f.edits.allowCodeShifting==="always").read(a))return;const c=this._layout.read(a),u=this._edit.read(a);if(!c||!u)return;const h=c.lowerBackground.height,g=u.originalRange.endLineNumberExclusive;return{height:h,lineNumber:g}}),this.minEditorScrollHeight=we(this,a=>{const l=Mp(this._layout).read(a);return!l||this._viewZoneInfo.read(a)!==void 0?0:l.read(a).lowerText.bottom+this._editor.editor.getScrollTop()}),this._div=en.div({class:"line-replacement"},[we(this,a=>{const l=Mp(this._layout).read(a),c=this._modifiedLineElements.read(a);if(!l||!c)return[];const u=l.read(a),h=this._editor.layoutInfoContentLeft.read(a),g=this._isInDiffEditor.read(a)?3:1;c.lines.forEach((x,v)=>{x.style.width=`${u.lowerText.width}px`,x.style.height=`${u.modifiedLineHeights[v]}px`,x.style.position="relative"});const f=CM(this._tabAction).read(a),m=UW(this._tabAction).read(a);return[en.div({style:{position:"absolute",...Ru(x=>Yle(this._editor).read(x)),overflow:"hidden",pointerEvents:"none"}},[en.div({class:"borderAroundLineReplacement",style:{position:"absolute",...Ru(x=>l.read(x).background.translateX(-h).withMargin(g)),borderRadius:"4px",border:`${g+1}px solid ${Pe(wr)}`,boxSizing:"border-box",pointerEvents:"none"}}),en.div({class:"originalOverlayLineReplacement",style:{position:"absolute",...Ru(x=>l.read(x).background.translateX(-h)),borderRadius:"4px",border:yu(m,this._themeService).map(x=>`1px solid ${x.toString()}`),pointerEvents:"none",boxSizing:"border-box",background:Pe(s2)}}),en.div({class:"modifiedOverlayLineReplacement",style:{position:"absolute",...Ru(x=>l.read(x).lowerBackground.translateX(-h)),borderRadius:"0 0 4px 4px",background:Pe(wr),boxShadow:`${Pe(K7)} 0 6px 6px -6px`,border:`1px solid ${Pe(f)}`,boxSizing:"border-box",overflow:"hidden",cursor:"pointer",pointerEvents:"auto"},onmousedown:x=>{x.preventDefault()},onclick:x=>this._onDidClick.fire(new va(xt(x),x))},[en.div({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:Pe(CGt)}})]),en.div({class:"modifiedLinesLineReplacement",style:{position:"absolute",boxSizing:"border-box",...Ru(x=>l.read(x).lowerText.translateX(-h)),fontFamily:this._editor.getOption(58),fontSize:this._editor.getOption(61),fontWeight:this._editor.getOption(62),pointerEvents:"none",whiteSpace:"nowrap",borderRadius:"0 0 4px 4px",overflow:"hidden"}},[...c.lines])])]})]).keepUpdated(this._store),this.isHovered=this._editor.isTargetHovered(a=>this._isMouseOverWidget(a),this._store),this._previousViewZoneInfo=void 0,this._register(dt(()=>this._editor.editor.changeViewZones(a=>this.removePreviousViewZone(a)))),this._register(OLt(this._viewZoneInfo,({lastValue:a,newValue:l})=>{a===l||(a==null?void 0:a.height)===(l==null?void 0:l.height)&&(a==null?void 0:a.lineNumber)===(l==null?void 0:l.lineNumber)||this._editor.editor.changeViewZones(c=>{this.removePreviousViewZone(c),l&&this.addViewZone(l,c)})})),this._register(this._editor.createOverlayWidget({domNode:this._div.element,minContentWidthInPx:we(this,a=>{var l;return((l=this._layout.read(a))==null?void 0:l.minContentWidthRequired)??0}),position:zi({preference:{top:0,left:0}}),allowEditorOverflow:!1}))}_isMouseOverWidget(e){const t=this._layout.get();return!t||!(e.event instanceof Qb)?!1:t.lowerBackground.containsPoint(new fo(e.event.relativePos.x,e.event.relativePos.y))}removePreviousViewZone(e){if(!this._previousViewZoneInfo)return;e.removeZone(this._previousViewZoneInfo.id);const t=this._editor.cursorLineNumber.get();t!==null&&t>=this._previousViewZoneInfo.lineNumber&&this._editor.editor.setScrollTop(this._editor.scrollTop.get()-this._previousViewZoneInfo.height),this._previousViewZoneInfo=void 0}addViewZone(e,t){const n=t.addZone({afterLineNumber:e.lineNumber-1,heightInPx:e.height,domNode:Oe("div")});this._previousViewZoneInfo={height:e.height,lineNumber:e.lineNumber,id:n};const s=this._editor.cursorLineNumber.get();s!==null&&s>=e.lineNumber&&this._editor.editor.setScrollTop(this._editor.scrollTop.get()+e.height)}};bee=tYt([B1e(4,tr),B1e(5,Ws)],bee);function nYt(i){const e=[];for(;i.length;){let t=i.shift();t.startLineNumber!==t.endLineNumber&&(i.push(new z(t.startLineNumber+1,1,t.endLineNumber,t.endColumn)),t=new z(t.startLineNumber,t.startColumn,t.startLineNumber,Number.MAX_SAFE_INTEGER)),e.push(t)}return e}var iYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},H1e=function(i,e){return function(t,n){e(t,n,i)}};const Ok=0,EI=0,rg=1,sYt=1,rYt=3,wm=4,xK=20,W1e=12;let Z8=class extends se{static fitsInsideViewport(e,t,n,s){const r=Ts(e),o=r.layoutInfoWidth.read(s),a=r.layoutInfoContentLeft.read(s),l=e.getLayoutInfo().verticalScrollbarWidth,c=r.layoutInfoMinimap.read(s).minimapLeft!==0?r.layoutInfoMinimap.read(s).minimapWidth:0,u=o_(r,n.displayRange,void 0),h=n.lineEdit.newLines.reduce((m,x)=>Math.max(m,Gle(x,e,t)),0),g=xK,f=W1e+2*rg;return u+h+g+fthis._uiState.read(c)?"block":"none"),this.previewRef=en.ref();const l=this._uiState.map(c=>c!=null&&c.isInDiffEditor?rYt:sYt);this._editorContainer=en.div({class:["editorContainer"],style:{position:"absolute",overflow:"hidden",cursor:"pointer"},onmousedown:c=>{c.preventDefault()},onclick:c=>{this._onDidClick.fire(new va(xt(c),c))}},[en.div({class:"preview",style:{pointerEvents:"none"},ref:this.previewRef})]).keepUpdated(this._store),this.isHovered=this._editorContainer.didMouseMoveDuringHover,this.previewEditor=this._register(this._instantiationService.createInstance(ix,this.previewRef.element,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},rulers:[],padding:{top:0,bottom:0},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,revealHorizontalRightPadding:0,bracketPairColorization:{enabled:!0,independentColorPoolPerBracketType:!1},scrollBeyondLastLine:!1,scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off"},{contextKeyValues:{[Si.inInlineEditsPreviewEditor.key]:!0},contributions:[]},this._editor)),this._previewEditorObs=Ts(this.previewEditor),this._activeViewZones=[],this._updatePreviewEditor=we(this,c=>{this._editorContainer.readEffect(c),this._previewEditorObs.model.read(c),this._display.read(c),this._nonOverflowView&&(this._nonOverflowView.element.style.display=this._display.read(c));const u=this._uiState.read(c),h=this._edit.read(c);if(!u||!h)return;const g=h.originalLineRange,f=[];g.startLineNumber>1&&f.push(new z(1,1,g.startLineNumber-1,1)),g.startLineNumber+u.newTextLineCount{m.forEach(_=>v.removeZone(_)),x>0&&this._activeViewZones.push(v.addZone({afterLineNumber:g.startLineNumber+u.newTextLineCount-1,heightInLines:x,showInHiddenAreas:!0,domNode:Oe("div.diagonal-fill.inline-edits-view-zone")}))})}),this._previewEditorWidth=we(this,c=>{const u=this._edit.read(c);return u?(this._updatePreviewEditor.read(c),o_(this._previewEditorObs,u.modifiedLineRange,c)):0}),this._cursorPosIfTouchesEdit=we(this,c=>{const u=this._editorObs.cursorPosition.read(c),h=this._edit.read(c);if(!(!h||!u))return h.modifiedLineRange.contains(u.lineNumber)?u:void 0}),this._originalStartPosition=we(this,c=>{const u=this._edit.read(c);return u?new te(u.originalLineRange.startLineNumber,1):null}),this._originalEndPosition=we(this,c=>{const u=this._edit.read(c);return u?new te(u.originalLineRange.endLineNumberExclusive,1):null}),this._originalVerticalStartPosition=this._editorObs.observePosition(this._originalStartPosition,this._store).map(c=>c==null?void 0:c.y),this._originalVerticalEndPosition=this._editorObs.observePosition(this._originalEndPosition,this._store).map(c=>c==null?void 0:c.y),this._originalDisplayRange=this._edit.map(c=>c==null?void 0:c.displayRange),this._editorMaxContentWidthInRange=we(this,c=>{const u=this._originalDisplayRange.read(c);return u?(this._editorObs.versionId.read(c),dx(this,(h,g)=>{const f=o_(this._editorObs,u,h);return Math.max(f,g??0)})):zi(0)}).map((c,u)=>c.read(u)),this._previewEditorLayoutInfo=we(this,c=>{const u=this._edit.read(c);if(!u||!this._uiState.read(c))return null;const g=u.originalLineRange,f=this._editorObs.scrollLeft.read(c),m=this._editorMaxContentWidthInRange.read(c),x=this._editorObs.layoutInfo.read(c),v=this._previewEditorWidth.read(c),_=x.contentWidth-x.verticalScrollbarWidth,w=this._editor.getContainerDomNode().getBoundingClientRect(),k=x.contentLeft+x.contentWidth+w.left,C=xt(this._editor.getContainerDomNode()).innerWidth-k,E=xt(this._editor.getContainerDomNode()).innerWidth-w.right,D=Math.min(x.contentWidth*.3,v,100),T=0,I=T+C,R=this._cursorPosIfTouchesEdit.read(c),P=Math.max(_+f-T-Math.max(0,D-I),Math.min(R?IGt(this._editorObs,R,c)+50:0,_+f)),j=Math.min(m+xK,P),B=m+xK+v+70,H=P-j;let $,q;j>f?($=0,q=x.contentLeft+j-f):($=f-j,q=x.contentLeft);const V=this._originalVerticalStartPosition.read(c)??this._editor.getTopForLineNumber(g.startLineNumber)-this._editorObs.scrollTop.read(c),X=this._originalVerticalEndPosition.read(c)??this._editor.getBottomForLineNumber(g.endLineNumberExclusive-1)-this._editorObs.scrollTop.read(c),ae=x.contentLeft-f;let ne=Di.fromLeftTopRightBottom(ae,V,q,X);const W=ne.height===0;W||(ne=ne.withMargin(EI,Ok));const G=this._previewEditorObs.observeLineHeightsForLineRange(u.modifiedLineRange).read(c).reduce((he,We)=>he+We,0),U=X-V,ue=Math.max(U,G),fe=H===0,Le=0,tt=Math.min(v+W1e,E+x.width-x.contentLeft-Le);let ge=Di.fromLeftTopWidthHeight(ne.right+Le,V,tt,ue);return W?ge=ge.withMargin(EI,Ok).translateY(EI):ge=ge.withMargin(EI,Ok).translateX(Ok+rg),{codeRect:ne,editRect:ge,codeScrollLeft:f,contentLeft:x.contentLeft,isInsertion:W,maxContentWidth:B,shouldShowShadow:fe,desiredPreviewEditorScrollLeft:$,previewEditorWidth:tt}}),this._stickyScrollController=Uh.get(this._editorObs.editor),this._stickyScrollHeight=this._stickyScrollController?Gn(this._stickyScrollController.onDidChangeStickyScrollHeight,()=>this._stickyScrollController.stickyScrollWidgetHeight):zi(0),this._shouldOverflow=we(this,c=>!1),this._originalBackgroundColor=Gn(this,this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme().getColor(s2)??ye.transparent),this._backgroundSvg=en.svg({transform:"translate(-0.5 -0.5)",style:{overflow:"visible",pointerEvents:"none",position:"absolute"}},[en.svgElem("path",{class:"rightOfModifiedBackgroundCoverUp",d:we(this,c=>{const u=this._previewEditorLayoutInfo.read(c);if(!(!u||this._originalBackgroundColor.read(c).isTransparent()))return new dee().moveTo(u.codeRect.getRightTop()).lineTo(u.codeRect.getRightTop().deltaX(1e3)).lineTo(u.codeRect.getRightBottom().deltaX(1e3)).lineTo(u.codeRect.getRightBottom()).build()}),style:{fill:TAe(wr,"transparent")}})]).keepUpdated(this._store),this._originalOverlay=en.div({style:{pointerEvents:"none",display:this._previewEditorLayoutInfo.map(c=>c!=null&&c.isInsertion?"none":"block")}},we(this,c=>{const u=Mp(this._previewEditorLayoutInfo).read(c);if(!u)return;const h=l.read(c),g=UW(this._tabAction).map(D=>`${rg}px solid ${Pe(D)}`),f=`${rg+h}px solid ${Pe(wr)}`,m=u.read(c).codeScrollLeft!==0,x=u.map(D=>D.codeRect.bottomDi.fromLeftTopRightBottom(D.contentLeft-wm-rg,D.codeRect.top,D.contentLeft,D.codeRect.bottom+v)).read(c),w=new ht(_.left,Number.MAX_SAFE_INTEGER),k=u.map(D=>D.codeRect.intersectHorizontal(w)),C=k.map(D=>D.withMargin(h,0,h,h).intersectHorizontal(w)),E=k.map(D=>Di.fromLeftTopWidthHeight(D.right-v+rg,D.bottom-rg,v,v).intersectHorizontal(w));return[en.div({class:"originalSeparatorSideBySide",style:{...C.read(c).toStyles(),boxSizing:"border-box",borderRadius:`${wm}px 0 0 ${wm}px`,borderTop:f,borderBottom:f,borderLeft:m?"none":f}}),en.div({class:"originalOverlaySideBySide",style:{...k.read(c).toStyles(),boxSizing:"border-box",borderRadius:`${wm}px 0 0 ${wm}px`,borderTop:g,borderBottom:g,borderLeft:m?"none":g,backgroundColor:Pe(s2)}}),en.div({class:"originalCornerCutoutSideBySide",style:{pointerEvents:"none",display:x.map(D=>D?"block":"none"),...E.read(c).toStyles()}},[en.div({class:"originalCornerCutoutBackground",style:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",backgroundColor:yu(s2,this._themeService).map(D=>D.toString())}}),en.div({class:"originalCornerCutoutBorder",style:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",boxSizing:"border-box",borderTop:g,borderRight:g,borderRadius:"0 100% 0 0",backgroundColor:Pe(wr)}})]),en.div({class:"originalOverlaySideBySideHider",style:{..._.toStyles(),backgroundColor:Pe(wr)}})]})).keepUpdated(this._store),this._modifiedOverlay=en.div({style:{pointerEvents:"none"}},we(this,c=>{const u=Mp(this._previewEditorLayoutInfo).read(c);if(!u)return;const h=u.map(k=>k.codeRect.bottom`0 ${wm}px ${wm}px ${k?wm:0}px`),m=yu(CM(this._tabAction),this._themeService).map(k=>`1px solid ${k.toString()}`),x=`${rg+g}px solid ${Pe(wr)}`,v=u.map(k=>k.editRect.withMargin(0,rg)),_=v.map(k=>k.withMargin(g,g,g,0)),w=we(this,k=>{const C=v.read(k),E=u.read(k);return!E.isInsertion||E.contentLeft>=C.left?Di.fromLeftTopWidthHeight(C.left,C.top,0,0):new Di(E.contentLeft,C.top,C.left,C.top+rg*2)});return[en.div({class:"modifiedInsertionSideBySide",style:{...w.read(c).toStyles(),backgroundColor:CM(this._tabAction).map(k=>Pe(k))}}),en.div({class:"modifiedSeparatorSideBySide",style:{..._.read(c).toStyles(),borderRadius:f,borderTop:x,borderBottom:x,borderRight:x,boxSizing:"border-box"}}),en.div({class:"modifiedOverlaySideBySide",style:{...v.read(c).toStyles(),borderRadius:f,border:m,boxSizing:"border-box",backgroundColor:Pe(E5e)}})]})).keepUpdated(this._store),this._nonOverflowView=en.div({class:"inline-edits-view",style:{position:"absolute",overflow:"visible",top:"0px",left:"0px",display:this._display}},[this._backgroundSvg,we(this,c=>this._shouldOverflow.read(c)?[]:[this._editorContainer,this._originalOverlay,this._modifiedOverlay])]).keepUpdated(this._store),this._register(this._editorObs.createOverlayWidget({domNode:this._nonOverflowView.element,position:zi(null),allowEditorOverflow:!1,minContentWidthInPx:we(this,c=>{var h;const u=(h=this._previewEditorLayoutInfo.read(c))==null?void 0:h.maxContentWidth;return u===void 0?0:u})})),this.previewEditor.setModel(this._previewTextModel),this._register(Pt(c=>{const u=this._previewEditorLayoutInfo.read(c);if(!u)return;const h=u.editRect.withMargin(-EI,-Ok);this.previewEditor.layout({height:h.height,width:u.previewEditorWidth+15}),this._editorContainer.element.style.top=`${h.top}px`,this._editorContainer.element.style.left=`${h.left}px`,this._editorContainer.element.style.width=`${u.previewEditorWidth+Ok}px`})),this._register(Pt(c=>{const u=this._previewEditorLayoutInfo.read(c);u&&this._previewEditorObs.editor.setScrollLeft(u.desiredPreviewEditorScrollLeft)})),this._updatePreviewEditor.recomputeInitiallyAndOnChange(this._store)}};Z8=iYt([H1e(5,ft),H1e(6,Ws)],Z8);var oYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},aYt=function(i,e){return function(t,n){e(t,n,i)}};const Cm=1;var KE;let xN=(KE=class extends se{constructor(e,t,n,s){super(),this._editor=e,this._edit=t,this._tabAction=n,this._languageService=s,this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this._start=this._editor.observePosition(zi(this._edit.range.getStartPosition()),this._store),this._end=this._editor.observePosition(zi(this._edit.range.getEndPosition()),this._store),this._line=document.createElement("div"),this._hoverableElement=Ft(this,null),this.isHovered=this._hoverableElement.map((o,a)=>(o==null?void 0:o.didMouseMoveDuringHover.read(a))??!1),this._renderTextEffect=we(this,o=>{var m;const a=this._editor.model.get(),l=a.getLineContent(this._edit.range.startLineNumber),c=Ko.replace(new ht(this._edit.range.startColumn-1,this._edit.range.endColumn-1),this._edit.text),u=c.replace(l),h=(m=a.tokenization.tokenizeLinesAt(this._edit.range.startLineNumber,[u]))==null?void 0:m[0];let g;h?g=Lb.fromLineTokens(h).slice(c.getRangeAfterReplace()).toLineTokens(this._edit.text,this._languageService.languageIdCodec):g=hr.createEmpty(this._edit.text,this._languageService.languageIdCodec);const f=sO(new rO([g]),Rb.fromEditor(this._editor.editor).withSetWidth(!1).withScrollBeyondLastColumn(0),[],this._line,!0);this._line.style.width=`${f.minWidthInPx}px`});const r=this._editor.observeLineHeightForPosition(this._edit.range.getStartPosition());this._layout=we(this,o=>{this._renderTextEffect.read(o);const a=this._start.read(o),l=this._end.read(o);if(!a||!l||a.x>l.x||a.y>l.y)return;const c=r.read(o),u=this._editor.scrollLeft.read(o),h=this._editor.getOption(59).read(o).typicalHalfwidthCharacterWidth,g=3*h,f=4,m=new fo(g,f),x=Di.fromPoints(a,l).withHeight(c).translateX(-u),v=Di.fromPointSize(x.getLeftBottom().add(m),new fo(this._edit.text.length*h,x.height)),_=v.withLeft(x.left);return{originalLine:x,modifiedLine:v,lowerBackground:_,lineHeight:c}}),this.minEditorScrollHeight=we(this,o=>{const a=Mp(this._layout).read(o);return a?a.read(o).modifiedLine.bottom+Cm+this._editor.editor.getScrollTop():0}),this._root=en.div({class:"word-replacement"},[we(this,o=>{const a=Mp(this._layout).read(o);if(!a)return[];const l=UW(this._tabAction).map(u=>Pe(u)).read(o),c=CM(this._tabAction).map(u=>Pe(u)).read(o);return[en.div({style:{position:"absolute",...Ru(u=>Yle(this._editor).read(u)),overflow:"hidden",pointerEvents:"none"}},[en.div({style:{position:"absolute",...Ru(u=>a.read(u).lowerBackground.withMargin(Cm,2*Cm,Cm,0)),background:Pe(wr),cursor:"pointer",pointerEvents:"auto"},onmousedown:u=>{u.preventDefault()},onmouseup:u=>this._onDidClick.fire(new va(xt(u),u)),obsRef:u=>{this._hoverableElement.set(u,void 0)}}),en.div({style:{position:"absolute",...Ru(u=>a.read(u).modifiedLine.withMargin(Cm,2*Cm)),fontFamily:this._editor.getOption(58),fontSize:this._editor.getOption(61),fontWeight:this._editor.getOption(62),pointerEvents:"none",boxSizing:"border-box",borderRadius:"4px",border:`${Cm}px solid ${c}`,background:Pe(SGt),display:"flex",justifyContent:"center",alignItems:"center",outline:`2px solid ${Pe(wr)}`}},[this._line]),en.div({style:{position:"absolute",...Ru(u=>a.read(u).originalLine.withMargin(Cm)),boxSizing:"border-box",borderRadius:"4px",border:`${Cm}px solid ${l}`,background:Pe(wGt),pointerEvents:"none"}},[]),en.svg({width:11,height:14,viewBox:"0 0 11 14",fill:"none",style:{position:"absolute",left:a.map(u=>u.modifiedLine.left-16),top:a.map(u=>u.modifiedLine.top+Math.round((u.lineHeight-14-5)/2))}},[en.svgElem("path",{d:"M1 0C1 2.98966 1 5.92087 1 8.49952C1 9.60409 1.89543 10.5 3 10.5H10.5",stroke:Pe(eve)}),en.svgElem("path",{d:"M6 7.5L9.99999 10.49998L6 13.5",stroke:Pe(eve)})])])]})]).keepUpdated(this._store),this._register(this._editor.createOverlayWidget({domNode:this._root.element,minContentWidthInPx:zi(0),position:zi({preference:{top:0,left:0}}),allowEditorOverflow:!1}))}},KE.MAX_LENGTH=100,KE);xN=oYt([aYt(3,tr)],xN);class lYt extends se{constructor(e,t,n){super(),this._originalEditor=e,this._state=t,this._modifiedTextModel=n,this._onDidClick=this._register(new ie),this.onDidClick=this._onDidClick.event,this.isHovered=Ts(this._originalEditor).isTargetHovered(r=>{var o;return r.target.type===6&&((o=r.target.detail.injectedText)==null?void 0:o.options.attachedData)instanceof vK&&r.target.detail.injectedText.options.attachedData.owner===this},this._store),this._tokenizationFinished=uYt(this._modifiedTextModel),this._decorations=we(this,r=>{var D,T;const o=this._state.read(r);if(!o)return;const a=o.modifiedText,l=o.mode==="insertionInline",c=o.diff.length===1&&((D=o.diff[0].innerChanges)==null?void 0:D.length)===1,u=!0,h=[],g=[],f=qt.register({className:"inlineCompletions-line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),m=qt.register({className:"inlineCompletions-line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),x=qt.register({className:"inlineCompletions-char-delete",description:"char-delete",isWholeLine:!1,zIndex:1}),v=qt.register({className:"inlineCompletions-char-insert",description:"char-insert",isWholeLine:!0}),_=qt.register({className:"inlineCompletions-char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),w=qt.register({className:"inlineCompletions-char-insert diff-range-empty",description:"char-insert diff-range-empty"}),k=qt.register({className:"inlineCompletions-original-lines",description:"inlineCompletions-original-lines",isWholeLine:!1,shouldFillLineOnLineBreak:!0}),C=o.mode!=="sideBySide"&&o.mode!=="deletion"&&o.mode!=="insertionInline"&&o.mode!=="lineReplacement",E=o.mode==="lineReplacement";for(const I of o.diff)if(C&&(I.original.isEmpty||h.push({range:I.original.toInclusiveRange(),options:m}),I.modified.isEmpty||g.push({range:I.modified.toInclusiveRange(),options:f})),I.modified.isEmpty||I.original.isEmpty)I.original.isEmpty||h.push({range:I.original.toInclusiveRange(),options:x}),I.modified.isEmpty||g.push({range:I.modified.toInclusiveRange(),options:v});else{const R=l&&cYt(I);for(const P of I.innerChanges||[]){if(I.original.contains(P.originalRange.startLineNumber)&&!(E&&P.originalRange.isEmpty())){const j=(T=this._originalEditor.getModel())==null?void 0:T.getValueInRange(P.originalRange,1);h.push({range:P.originalRange,options:{description:"char-delete",shouldFillLineOnLineBreak:!1,className:hK("inlineCompletions-char-delete",P.originalRange.isSingleLine()&&o.mode==="insertionInline"&&"single-line-inline",P.originalRange.isEmpty()&&"empty",(P.originalRange.isEmpty()&&c||o.mode==="deletion"&&j===` +`)&&u&&!R&&"diff-range-empty"),inlineClassName:R?hK("strike-through","inlineCompletions"):null,zIndex:1}})}if(I.modified.contains(P.modifiedRange.startLineNumber)&&g.push({range:P.modifiedRange,options:P.modifiedRange.isEmpty()&&u&&!R&&c?w:_}),R){const j=a.getValueOfRange(P.modifiedRange),B=j.length>3?[{text:j.slice(0,1),extraClasses:["start"],offsetRange:new ht(P.modifiedRange.startColumn-1,P.modifiedRange.startColumn)},{text:j.slice(1,-1),extraClasses:[],offsetRange:new ht(P.modifiedRange.startColumn,P.modifiedRange.endColumn-2)},{text:j.slice(-1),extraClasses:["end"],offsetRange:new ht(P.modifiedRange.endColumn-2,P.modifiedRange.endColumn-1)}]:[{text:j,extraClasses:["start","end"],offsetRange:new ht(P.modifiedRange.startColumn-1,P.modifiedRange.endColumn)}];this._tokenizationFinished.read(r);const H=this._modifiedTextModel.tokenization.getLineTokens(P.modifiedRange.startLineNumber);for(const{text:$,extraClasses:q,offsetRange:V}of B)h.push({range:z.fromPositions(P.originalRange.getEndPosition()),options:{description:"inserted-text",before:{tokens:H.getTokensInRange(V),content:$,inlineClassName:hK("inlineCompletions-char-insert",P.modifiedRange.isSingleLine()&&o.mode==="insertionInline"&&"single-line-inline",...q),cursorStops:Du.None,attachedData:new vK(this)},zIndex:2,showIfCollapsed:!0}})}}}if(o.isInDiffEditor)for(const I of o.diff)I.original.isEmpty||h.push({range:I.original.toExclusiveRange(),options:k});return{originalDecorations:h,modifiedDecorations:g}}),this._register(Ts(this._originalEditor).setDecorations(this._decorations.map(r=>(r==null?void 0:r.originalDecorations)??[])));const s=this._state.map(r=>r==null?void 0:r.modifiedCodeEditor);this._register(Fa((r,o)=>{const a=s.read(r);a&&o.add(Ts(a).setDecorations(this._decorations.map(l=>(l==null?void 0:l.modifiedDecorations)??[])))})),this._register(this._originalEditor.onMouseUp(r=>{var a;if(r.target.type!==6)return;const o=(a=r.target.detail.injectedText)==null?void 0:a.options.attachedData;o instanceof vK&&o.owner===this&&this._onDidClick.fire(r.event)}))}}class vK{constructor(e){this.owner=e}}function cYt(i){return i.innerChanges?i.innerChanges.every(e=>M6(e.modifiedRange)&&M6(e.originalRange)):!1}let dYt=0;function uYt(i){return Gn(i.onDidChangeTokens,()=>dYt++)}var hYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},gYt=function(i,e){return function(t,n){e(t,n,i)}};let xee=class extends se{constructor(e,t,n,s,r,o){super(),this._editor=e,this._host=t,this._model=n,this._ghostTextIndicator=s,this._focusIsInMenu=r,this._instantiationService=o,this._editorObs=Ts(this._editor),this._tabAction=we(u=>{var h;return((h=this._model.read(u))==null?void 0:h.tabAction.read(u))??Pa.Inactive}),this._constructorDone=Ft(this,!1),this._uiState=we(this,u=>{var w,k;const h=this._model.read(u);if(!h||!this._constructorDone.read(u))return;const g=h.inlineEdit;let f=Ml.fromEdit(g.edit),m=g.edit.apply(g.originalText),x=A6(f,g.originalText,new Xv(m)),v=this.determineRenderState(h,u,x,new Xv(m));if(!v){zt(new Error(`unable to determine view: tried to render ${(w=this._previousView)==null?void 0:w.view}`));return}if(v.kind===$n.SideBySide){const C=OGt(m,g.modifiedLineRange,l.getOptions().tabSize);m=C.applyToString(m),f=AGt(f,C),x=A6(f,g.originalText,new Xv(m))}return this._previewTextModel.setLanguage(this._editor.getModel().getLanguageId()),this._previewTextModel.getValue()!==m&&this._previewTextModel.setValue(m),h.showCollapsed.read(u)&&!((k=this._indicator.read(u))!=null&&k.isHoverVisible.read(u))&&(v={kind:$n.Collapsed,viewData:v.viewData}),h.handleInlineEditShown(v.kind,v.viewData),{state:v,diff:x,edit:g,newText:m,newTextLineCount:g.modifiedLineRange.length,isInDiffEditor:h.isInDiffEditor}}),this._previewTextModel=this._register(this._instantiationService.createInstance(yC,"",this._editor.getModel().getLanguageId(),{...yC.DEFAULT_CREATION_OPTIONS,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}},null)),this._indicatorCyclicDependencyCircuitBreaker=Ft(this,!1),this._indicator=we(this,u=>{if(!this._indicatorCyclicDependencyCircuitBreaker.read(u))return;const h=ma({owner:this,equalsFn:g1(eoe())},f=>{var v,_,w;const m=this._ghostTextIndicator.read(f);if(m)return m.lineRange;const x=this._uiState.read(f);if(x){if(((v=x.state)==null?void 0:v.kind)==="custom"){const k=(_=x.state.displayLocation)==null?void 0:_.range;if(!k)throw new Nt("custom view should have a range");return new jt(k.startLineNumber,k.endLineNumber)}return((w=x.state)==null?void 0:w.kind)==="insertionMultiLine"?this._insertion.originalLines.read(f):x.edit.displayRange}}),g=we(this,f=>{const m=this._model.read(f);if(m)return m;const x=this._ghostTextIndicator.read(f);return x?x.model:m});return u.store.add(this._instantiationService.createInstance(hee,this._editorObs,h,this._gutterIndicatorOffset,g,this._inlineEditsIsHovered,this._focusIsInMenu))}),this._inlineEditsIsHovered=we(this,u=>this._sideBySide.isHovered.read(u)||this._wordReplacementViews.read(u).some(h=>h.isHovered.read(u))||this._deletion.isHovered.read(u)||this._inlineDiffView.isHovered.read(u)||this._lineReplacementView.isHovered.read(u)||this._insertion.isHovered.read(u)||this._customView.isHovered.read(u)),this._gutterIndicatorOffset=we(this,u=>{var g,f;if(((f=(g=this._uiState.read(u))==null?void 0:g.state)==null?void 0:f.kind)==="insertionMultiLine")return this._insertion.startLineOffset.read(u);const h=this._ghostTextIndicator.read(u);return h?mYt(h,this._editor):0}),this._sideBySide=this._register(this._instantiationService.createInstance(Z8,this._editor,this._model.map(u=>u==null?void 0:u.inlineEdit),this._previewTextModel,this._uiState.map(u=>{var h;return u&&((h=u.state)==null?void 0:h.kind)===$n.SideBySide?{newTextLineCount:u.newTextLineCount,isInDiffEditor:u.isInDiffEditor}:void 0}),this._tabAction)),this._deletion=this._register(this._instantiationService.createInstance(XGt,this._editor,this._model.map(u=>u==null?void 0:u.inlineEdit),this._uiState.map(u=>{var h;return u&&((h=u.state)==null?void 0:h.kind)===$n.Deletion?{originalRange:u.state.originalRange,deletions:u.state.deletions,inDiffEditor:u.isInDiffEditor}:void 0}),this._tabAction)),this._insertion=this._register(this._instantiationService.createInstance(mee,this._editor,this._uiState.map(u=>{var h;return u&&((h=u.state)==null?void 0:h.kind)===$n.InsertionMultiLine?{lineNumber:u.state.lineNumber,startColumn:u.state.column,text:u.state.text,inDiffEditor:u.isInDiffEditor}:void 0}),this._tabAction)),this._inlineDiffViewState=we(this,u=>{const h=this._uiState.read(u);if(!(!h||!h.state)&&!(h.state.kind==="wordReplacements"||h.state.kind==="insertionMultiLine"||h.state.kind==="collapsed"||h.state.kind==="custom"))return{modifiedText:new Xv(h.newText),diff:h.diff,mode:h.state.kind,modifiedCodeEditor:this._sideBySide.previewEditor,isInDiffEditor:h.isInDiffEditor}}),this._inlineCollapsedView=this._register(this._instantiationService.createInstance(fee,this._editor,this._model.map((u,h)=>{var g,f;return((f=(g=this._uiState.read(h))==null?void 0:g.state)==null?void 0:f.kind)==="collapsed"?u==null?void 0:u.inlineEdit:void 0}))),this._customView=this._register(this._instantiationService.createInstance(pee,this._editor,this._model.map((u,h)=>{var g,f;return((f=(g=this._uiState.read(h))==null?void 0:g.state)==null?void 0:f.kind)==="custom"?u==null?void 0:u.displayLocation:void 0}),this._tabAction)),this._inlineDiffView=this._register(new lYt(this._editor,this._inlineDiffViewState,this._previewTextModel)),this._wordReplacementViews=ioe(this,this._uiState.map(u=>{var h;return((h=u==null?void 0:u.state)==null?void 0:h.kind)==="wordReplacements"?u.state.replacements:[]}),(u,h)=>h.add(this._instantiationService.createInstance(xN,this._editorObs,u,this._tabAction))),this._lineReplacementView=this._register(this._instantiationService.createInstance(bee,this._editorObs,this._uiState.map(u=>{var h;return((h=u==null?void 0:u.state)==null?void 0:h.kind)===$n.LineReplacement?{originalRange:u.state.originalRange,modifiedRange:u.state.modifiedRange,modifiedLines:u.state.modifiedLines,replacements:u.state.replacements}:void 0}),this._uiState.map(u=>(u==null?void 0:u.isInDiffEditor)??!1),this._tabAction)),this._useCodeShifting=this._editorObs.getOption(71).map(u=>u.edits.allowCodeShifting),this._renderSideBySide=this._editorObs.getOption(71).map(u=>u.edits.renderSideBySide),this._register(Fa((u,h)=>{const g=this._model.read(u);g&&h.add(He.any(this._sideBySide.onDidClick,this._deletion.onDidClick,this._lineReplacementView.onDidClick,this._insertion.onDidClick,...this._wordReplacementViews.read(u).map(f=>f.onDidClick),this._inlineDiffView.onDidClick,this._customView.onDidClick)(f=>{this._viewHasBeenShownLongerThan(350)&&(f.preventDefault(),g.accept())}))})),this._indicator.recomputeInitiallyAndOnChange(this._store),this._wordReplacementViews.recomputeInitiallyAndOnChange(this._store),this._indicatorCyclicDependencyCircuitBreaker.set(!0,void 0),this._register(this._instantiationService.createInstance(gee,this._host,this._model,this._indicator,this._inlineCollapsedView));const a=we(this,u=>Math.max(...this._wordReplacementViews.read(u).map(h=>h.minEditorScrollHeight.read(u)),this._lineReplacementView.minEditorScrollHeight.read(u),this._customView.minEditorScrollHeight.read(u))).recomputeInitiallyAndOnChange(this._store),l=this._editor.getModel();let c;this._register(Pt(u=>{const h=a.read(u);this._editor.changeViewZones(g=>{const f=this._editor.getScrollHeight(),m=h-f+1;m!==0&&c&&(g.removeZone(c),c=void 0),!(m<=0)&&(c=g.addZone({afterLineNumber:l.getLineCount(),heightInPx:m,domNode:Oe("div.minScrollHeightViewZone")}))})})),this._constructorDone.set(!0,void 0)}getCacheId(e){return e.inlineEdit.inlineCompletion.identity.id}determineView(e,t,n,s){var g,f,m,x,v;const r=e.inlineEdit,o=((g=this._previousView)==null?void 0:g.id)===this.getCacheId(e)&&!((f=e.displayLocation)!=null&&f.jumpToEdit),a=((m=this._previousView)==null?void 0:m.editorWidth)!==this._editorObs.layoutInfoWidth.read(t)&&(((x=this._previousView)==null?void 0:x.view)===$n.SideBySide||((v=this._previousView)==null?void 0:v.view)===$n.LineReplacement);if(o&&!a)return this._previousView.view;if(e.inlineEdit.inlineCompletion instanceof hE&&e.inlineEdit.inlineCompletion.uri||e.displayLocation&&!e.inlineEdit.inlineCompletion.identity.jumpedTo.read(t))return $n.Custom;const l=r.originalLineRange.length,c=r.modifiedLineRange.length,u=n.flatMap(_=>_.innerChanges??[]),h=u.length===1;if(!e.isInDiffEditor){if(h&&this._useCodeShifting.read(t)!=="never"&&R5e(n))return fYt(n,r.cursorPosition)?$n.InsertionInline:$n.LineReplacement;if(z1e(u,r,s))return $n.Deletion;if(V1e(n)&&this._useCodeShifting.read(t)==="always")return $n.InsertionMultiLine;if(u.every(w=>ro.ofRange(w.originalRange).columnCounts.getValueOfRange(C.modifiedRange)),k=u.map(C=>e.inlineEdit.originalText.getValueOfRange(C.originalRange));if(!w.some(C=>C.includes(" "))&&!k.some(C=>C.includes(" "))&&(!u.some(C=>C.originalRange.isEmpty())||!U1e(u.map(C=>new Ar(C.originalRange,"")),r.originalText).some(C=>C.range.isEmpty()&&ro.ofRange(C.range).columnCount0&&c>0)return l===1&&c===1&&!e.isInDiffEditor?$n.LineReplacement:this._renderSideBySide.read(t)!=="never"&&Z8.fitsInsideViewport(this._editor,this._previewTextModel,r,t)?$n.SideBySide:$n.LineReplacement;if(e.isInDiffEditor){if(z1e(u,r,s))return $n.Deletion;if(V1e(n)&&this._useCodeShifting.read(t)==="always")return $n.InsertionMultiLine}return $n.SideBySide}determineRenderState(e,t,n,s){const r=e.inlineEdit;let o=this.determineView(e,t,n,s);if(this._willRenderAboveCursor(t,r,o))switch(o){case $n.LineReplacement:case $n.WordReplacements:o=$n.SideBySide;break}this._previousView={id:this.getCacheId(e),view:o,editorWidth:this._editor.getLayoutInfo().width,timestamp:Date.now()};const a=n.flatMap(m=>m.innerChanges??[]),l=this._editor.getModel(),c=a.map(m=>({originalRange:m.originalRange,modifiedRange:m.modifiedRange,original:l.getValueInRange(m.originalRange),modified:s.getValueOfRange(m.modifiedRange)})),u=r.cursorPosition,h=c.length===0?!1:c[0].modified.startsWith(l.getEOL()),g={cursorColumnDistance:r.edit.replacements.length===0?0:r.edit.replacements[0].range.getStartPosition().column-u.column,cursorLineDistance:r.lineEdit.lineRange.startLineNumber-u.lineNumber+(h&&r.lineEdit.lineRange.startLineNumber>=u.lineNumber?1:0),lineCountOriginal:r.lineEdit.lineRange.length,lineCountModified:r.lineEdit.newLines.length,characterCountOriginal:c.reduce((m,x)=>m+x.original.length,0),characterCountModified:c.reduce((m,x)=>m+x.modified.length,0),disjointReplacements:c.length,sameShapeReplacements:c.every(m=>m.original===c[0].original&&m.modified===c[0].modified)};switch(o){case $n.InsertionInline:return{kind:$n.InsertionInline,viewData:g};case $n.SideBySide:return{kind:$n.SideBySide,viewData:g};case $n.Collapsed:return{kind:$n.Collapsed,viewData:g};case $n.Custom:return{kind:$n.Custom,displayLocation:e.displayLocation,viewData:g}}if(o===$n.Deletion)return{kind:$n.Deletion,originalRange:r.originalLineRange,deletions:a.map(m=>m.originalRange),viewData:g};if(o===$n.InsertionMultiLine){const m=a[0];return{kind:$n.InsertionMultiLine,lineNumber:m.originalRange.startLineNumber,column:m.originalRange.startColumn,text:s.getValueOfRange(m.modifiedRange),viewData:g}}const f=c.map(m=>new Ar(m.originalRange,m.modified));if(f.length!==0){if(o===$n.WordReplacements){let m=pYt(f,r.originalText);return m.some(x=>x.range.isEmpty())&&(m=U1e(f,r.originalText)),{kind:$n.WordReplacements,replacements:m,viewData:g}}if(o===$n.LineReplacement)return{kind:$n.LineReplacement,originalRange:r.originalLineRange,modifiedRange:r.modifiedLineRange,modifiedLines:r.modifiedLineRange.mapToLineArray(m=>s.getLineAt(m)),replacements:a.map(m=>({originalRange:m.originalRange,modifiedRange:m.modifiedRange})),viewData:g}}}_willRenderAboveCursor(e,t,n){if(this._useCodeShifting.read(e)==="always")return!1;for(const r of t.multiCursorPositions)if(n===$n.WordReplacements&&r.lineNumber===t.originalLineRange.startLineNumber+1||n===$n.LineReplacement&&r.lineNumber>=t.originalLineRange.endLineNumberExclusive&&r.lineNumber=e}};xee=hYt([gYt(5,ft)],xee);function R5e(i){return i.every(t=>t.innerChanges.every(n=>e(n)));function e(t){return!(!t.originalRange.isEmpty()||!(t.modifiedRange.startLineNumber===t.modifiedRange.endLineNumber))}}function fYt(i,e){if(!e||!R5e(i))return!1;const t=e;return i.every(s=>s.innerChanges.every(r=>n(r)));function n(s){const r=s.originalRange.getStartPosition();return!!(t.isBeforeOrEqual(r)||r.lineNumbern.innerChanges??[]);if(e.length!==1)return!1;const t=e[0];return!(!t.originalRange.isEmpty()||t.modifiedRange.startLineNumber===t.modifiedRange.endLineNumber)}function z1e(i,e,t){return i.map(s=>({original:e.originalText.getValueOfRange(s.originalRange),modified:t.getValueOfRange(s.modifiedRange)})).every(({original:s,modified:r})=>r.trim()===""&&s.length>0&&(s.length>r.length||s.trim()!==""))}function pYt(i,e){return M5e(i,e,t=>/^[a-zA-Z]$/.test(t))}function U1e(i,e){return M5e(i,e,t=>!/^\s$/.test(t))}function M5e(i,e,t){const n=[];i.sort((r,o)=>z.compareRangesUsingStarts(r.range,o.range));for(const r of i){let o=r.range.startColumn-1,a=r.range.endColumn-2,l="",c="";const u=e.getLineAt(r.range.startLineNumber),h=e.getLineAt(r.range.endLineNumber);if(s(u[o]))for(;s(u[o-1]);)l=u[o-1]+l,o--;if(s(h[a])||a0&&z.areIntersectingOrTouching(n[n.length-1].range,g.range)&&(g=Ar.joinReplacements([n.pop(),g],e)),n.push(g)}function s(r){return r===void 0?!1:t(r)}return n}function mYt(i,e){const t=i.model.inlineEdit.edit.replacements;if(t.length!==1)return 0;const n=e.getModel();if(!n)return 0;const s=n.getEOL(),r=t[0];if(r.range.isEmpty()&&r.text.startsWith(s)){const o=e.getLineHeightForPosition(r.range.getStartPosition());return bYt(r.text,s)*o}return 0}function bYt(i,e){if(!e.length)return 0;let t=0,n=0;for(;i.startsWith(e,n);)t++,n+=e.length;return t}var xYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},vYt=function(i,e){return function(t,n){e(t,n,i)}},Ow;let vee=(Ow=class extends se{constructor(e,t,n,s,r){super(),this._editor=e,this._edit=t,this._model=n,this._focusIsInMenu=s,this._inlineEdit=we(this,o=>{var m;const a=this._model.read(o);if(!a)return;const l=this._edit.read(o);if(!l)return;const c=this._editor.getModel();if(!c)return;const u=(m=a.inlineEditState.read(void 0))==null?void 0:m.inlineCompletion.updatedEdit;if(!u)return;const h=u.replacements.map(x=>{const v=z.fromPositions(c.getPositionAt(x.replaceRange.start),c.getPositionAt(x.replaceRange.endExclusive));return new Ar(v,x.newText)}),g=new Uc(h),f=new NC(c);return new w5e(f,g,a.primaryPosition.read(void 0),a.allPositions.read(void 0),l.commands,l.inlineCompletion)}),this._inlineEditModel=we(this,o=>{const a=this._model.read(o);if(!a)return;const l=this._inlineEdit.read(o);if(!l)return;const c=we(this,u=>{if(this._editorObs.isFocused.read(u)){if(a.tabShouldJumpToInlineEdit.read(u))return Pa.Jump;if(a.tabShouldAcceptInlineEdit.read(u))return Pa.Accept}return Pa.Inactive});return new C5e(a,l,c)}),this._inlineEditHost=we(this,o=>{const a=this._model.read(o);if(a)return new gGt(a)}),this._ghostTextIndicator=we(this,o=>{const a=this._model.read(o);if(!a)return;const l=a.inlineCompletionState.read(o);if(!l)return;const c=l.inlineCompletion;if(!c||!c.showInlineEditMenu)return;const u=jt.ofLength(l.primaryGhostText.lineNumber,1);return new fGt(this._editor,a,u,c)}),this._editorObs=Ts(this._editor),this._register(r.createInstance(xee,this._editor,this._inlineEditHost,this._inlineEditModel,this._ghostTextIndicator,this._focusIsInMenu))}},Ow.hot=uW(Ow),Ow);vee=xYt([vYt(4,ft)],vee);var _Yt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},yYt=function(i,e){return function(t,n){e(t,n,i)}};let _ee=class extends se{constructor(e,t,n,s){super(),this._editor=e,this._model=t,this._focusIsInMenu=n,this._instantiationService=s,this._ghostTexts=we(this,r=>{const o=this._model.read(r);return(o==null?void 0:o.ghostTexts.read(r))??[]}),this._stablizedGhostTexts=Sqt(this._ghostTexts,this._store),this._editorObs=Ts(this._editor),this._ghostTextWidgets=ioe(this,this._stablizedGhostTexts,(r,o)=>wu(a=>this._instantiationService.createInstance(yM.hot.read(a),this._editor,{ghostText:r,warning:this._model.map((l,c)=>{var h;const u=(h=l==null?void 0:l.warning)==null?void 0:h.read(c);return u?{icon:u.icon}:void 0}),minReservedLineCount:zi(0),targetTextModel:this._model.map(l=>l==null?void 0:l.textModel),handleInlineCompletionShown:this._model.map((l,c)=>{var h;const u=(h=l==null?void 0:l.inlineCompletionState.read(c))==null?void 0:h.inlineCompletion;return u?g=>l.handleInlineSuggestionShown(u,$n.GhostText,g):()=>{}})},this._editorObs.getOption(71).map(l=>({syntaxHighlightingEnabled:l.syntaxHighlightingEnabled})),!1,!1)).recomputeInitiallyAndOnChange(o)).recomputeInitiallyAndOnChange(this._store),this._inlineEdit=we(this,r=>{var o,a;return(a=(o=this._model.read(r))==null?void 0:o.inlineEditState.read(r))==null?void 0:a.inlineEdit}),this._everHadInlineEdit=dx(this,(r,o)=>{var a,l,c;return o||!!this._inlineEdit.read(r)||!!((c=(l=(a=this._model.read(r))==null?void 0:a.inlineCompletionState.read(r))==null?void 0:l.inlineCompletion)!=null&&c.showInlineEditMenu)}),this._inlineEditWidget=wu(r=>{if(this._everHadInlineEdit.read(r))return this._instantiationService.createInstance(vee.hot.read(r),this._editor,this._inlineEdit,this._model,this._focusIsInMenu)}).recomputeInitiallyAndOnChange(this._store),this._fontFamily=this._editorObs.getOption(71).map(r=>r.fontFamily),this._register(UAt(we(r=>` +.monaco-editor .ghost-text-decoration, +.monaco-editor .ghost-text-decoration-preview, +.monaco-editor .ghost-text { + font-family: ${this._fontFamily.read(r)}; +}`))),this._register(new EZ(this._editor,this._model,this._instantiationService))}shouldShowHoverAtViewZone(e){var t;return((t=this._ghostTextWidgets.get()[0])==null?void 0:t.get().ownsViewZone(e))??!1}};_ee=_Yt([yYt(3,ft)],_ee);var wYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Sm=function(i,e){return function(t,n){e(t,n,i)}},Nf,ip;let nd=(ip=class extends se{static getInFocusedEditorOrParent(e){const t=nOe(e);return t?Nf.get(t):null}static get(e){return w$t(e.getContribution(Nf.ID))}constructor(e,t,n,s,r,o,a,l,c,u){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=n,this._configurationService=s,this._commandService=r,this._debounceService=o,this._languageFeaturesService=a,this._accessibilitySignalService=l,this._keybindingService=c,this._accessibilityService=u,this._editorObs=Ts(this.editor),this._positions=we(this,x=>{var v;return((v=this._editorObs.selections.read(x))==null?void 0:v.map(_=>_.getEndPosition()))??[new te(1,1)]}),this._suggestWidgetAdapter=this._register(new oGt(this._editorObs,x=>{var v;return(v=this.model.get())==null?void 0:v.handleSuggestAccepted(x)},()=>{var x,v;return(v=(x=this.model.get())==null?void 0:x.selectedInlineCompletion.get())==null?void 0:v.getSingleTextEdit()})),this._enabledInConfig=Gn(this,this.editor.onDidChangeConfiguration,()=>this.editor.getOption(71).enabled),this._isScreenReaderEnabled=Gn(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this._editorDictationInProgress=Gn(this,this._contextKeyService.onDidChangeContext,()=>this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress")===!0),this._enabled=we(this,x=>this._enabledInConfig.read(x)&&(!this._isScreenReaderEnabled.read(x)||!this._editorDictationInProgress.read(x))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._focusIsInMenu=Ft(this,!1),this._focusIsInEditorOrMenu=we(this,x=>{const v=this._editorObs.isFocused.read(x),_=this._focusIsInMenu.read(x);return v||_}),this._cursorIsInIndentation=we(this,x=>{const v=this._editorObs.cursorPosition.read(x);if(v===null)return!1;const _=this._editorObs.model.read(x);if(!_)return!1;this._editorObs.versionId.read(x);const w=_.getLineIndentColumn(v.lineNumber);return v.column<=w}),this.model=wu(this,x=>{if(this._editorObs.isReadonly.read(x))return;const v=this._editorObs.model.read(x);return v?this._instantiationService.createInstance(KJ,v,this._suggestWidgetAdapter.selectedItem,this._editorObs.versionId,this._positions,this._debounceValue,this._enabled,this.editor):void 0}).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=Au(this),this._hideInlineEditOnSelectionChange=this._editorObs.getOption(71).map(x=>!0),this._view=this._register(this._instantiationService.createInstance(_ee,this.editor,this.model,this._focusIsInMenu)),Nf._instances.add(this),this._register(dt(()=>Nf._instances.delete(this))),this._register(Pt(x=>{var k,C;const v=this.model.read(x);if(!v)return;const _=v.state.read(x);if(!_||!this._focusIsInEditorOrMenu.read(void 0))return;const w=_.kind==="inlineEdit"?_.nextEditUri:void 0;for(const E of Nf._instances)E!==this&&(w&&J_(w,(k=E.editor.getModel())==null?void 0:k.uri)?(C=E.model.read(void 0))==null||C.trigger():E.reject())})),this._register(Pt(x=>{var w;const v=this.model.read(x),_=(w=this.editor.getModel())==null?void 0:w.uri;!v||!_||x.store.add(v.onDidAccept(()=>{var k,C;for(const E of Nf._instances){if(E===this)continue;const D=(k=E.model.read(void 0))==null?void 0:k.state.read(void 0);(D==null?void 0:D.kind)==="inlineEdit"&&J_(D.nextEditUri,_)&&((C=E.model.read(void 0))==null||C.stop("automatic"))}}))})),this._register(Bg(this._editorObs.onDidType,(x,v)=>{var _;this._enabled.get()&&((_=this.model.get())==null||_.trigger())})),this._register(Bg(this._editorObs.onDidPaste,(x,v)=>{var _;this._enabled.get()&&((_=this.model.get())==null||_.trigger())}));const h=new Set([YN.Tab.id,YN.DeleteLeft.id,YN.DeleteRight.id,rM,"acceptSelectedSuggestion",I8.ID,T8.ID,Xi.NextMatchFindAction,...PF.getRegisteredCommands()]);this._register(this._commandService.onDidExecuteCommand(x=>{if(h.has(x.commandId)&&e.hasTextFocus()&&this._enabled.get()){let v=!1;x.commandId===rM&&(v=!0),this._editorObs.forceUpdate(_=>{var w;(w=this.model.get())==null||w.trigger(_,{noDelay:v})})}})),this._register(Bg(this._editorObs.selections,(x,v,_)=>{var w,k,C,E;if(_.some(D=>D.reason===3||D.source==="api")){if(!this._hideInlineEditOnSelectionChange.get()&&((k=(w=this.model.get())==null?void 0:w.state.get())==null?void 0:k.kind)==="inlineEdit")return;const D=this.model.get();if(!D)return;((C=D.state.get())==null?void 0:C.kind)==="ghostText"&&((E=this.model.get())==null||E.stop())}})),this._register(Pt(x=>{var w,k;const v=this._focusIsInEditorOrMenu.read(x),_=this.model.read(void 0);if(v){const C=_==null?void 0:_.state.read(void 0);(!C||C.kind!=="inlineEdit"||!C.nextEditUri)&&Vi(E=>{var D;for(const T of Nf._instances)T!==this&&((D=T.model.read(void 0))==null||D.stop("automatic",E))});return}this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(71).keepOnBlur||FL.dropDownVisible||_&&((k=(w=_.state.read(void 0))==null?void 0:w.inlineCompletion)!=null&&k.isFromExplicitRequest&&_.inlineEditAvailable.read(void 0)||Vi(C=>{_.stop("automatic",C)}))})),this._register(Pt(x=>{var _;const v=(_=this.model.read(x))==null?void 0:_.inlineCompletionState.read(x);v!=null&&v.suggestItem?v.primaryGhostText.lineCount>=2&&this._suggestWidgetAdapter.forceRenderingAbove():this._suggestWidgetAdapter.stopForceRenderingAbove()})),this._register(dt(()=>{this._suggestWidgetAdapter.stopForceRenderingAbove()}));const g=dx(this,(x,v)=>{var k;const _=this.model.read(x),w=_==null?void 0:_.state.read(x);return this._suggestWidgetAdapter.selectedItem.get()?v:(k=w==null?void 0:w.inlineCompletion)==null?void 0:k.semanticId});this._register(P2e(we(x=>(this._playAccessibilitySignal.read(x),g.read(x),{})),async(x,v,_,w)=>{let k=this.model.get(),C=k==null?void 0:k.state.get();if(!C||!k||(await kp(50,AY(w)),await wMe(this._suggestWidgetAdapter.selectedItem,ja,()=>!1,AY(w)),k=this.model.get(),C=k==null?void 0:k.state.get(),!C||!k))return;const E=C.kind==="ghostText"?k.textModel.getLineContent(C.primaryGhostText.lineNumber):"";this._accessibilitySignalService.playSignal(C.kind==="ghostText"?Rl.inlineSuggestion:Rl.nextEditSuggestion),this.editor.getOption(12)&&(C.kind==="ghostText"?this._provideScreenReaderUpdate(C.primaryGhostText.renderForScreenReader(E)):this._provideScreenReaderUpdate(""))})),this._register(this._configurationService.onDidChangeConfiguration(x=>{x.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")});const f=new kqt(this._contextKeyService);this._register(f.bind(Si.cursorInIndentation,this._cursorIsInIndentation)),this._register(f.bind(Si.hasSelection,x=>{var v;return!((v=this._editorObs.cursorSelection.read(x))!=null&&v.isEmpty())})),this._register(f.bind(Si.cursorAtInlineEdit,this.model.map((x,v)=>{var _,w;return(w=(_=x==null?void 0:x.inlineEditState)==null?void 0:_.read(v))==null?void 0:w.cursorAtInlineEdit.read(v)}))),this._register(f.bind(Si.tabShouldAcceptInlineEdit,this.model.map((x,v)=>!!(x!=null&&x.tabShouldAcceptInlineEdit.read(v))))),this._register(f.bind(Si.tabShouldJumpToInlineEdit,this.model.map((x,v)=>!!(x!=null&&x.tabShouldJumpToInlineEdit.read(v))))),this._register(f.bind(Si.inlineEditVisible,x=>{var v;return((v=this.model.read(x))==null?void 0:v.inlineEditState.read(x))!==void 0})),this._register(f.bind(Si.inlineSuggestionHasIndentation,x=>{var v,_;return(_=(v=this.model.read(x))==null?void 0:v.getIndentationInfo(x))==null?void 0:_.startsWithIndentation})),this._register(f.bind(Si.inlineSuggestionHasIndentationLessThanTabSize,x=>{var v,_;return(_=(v=this.model.read(x))==null?void 0:v.getIndentationInfo(x))==null?void 0:_.startsWithIndentationLessThanTabSize})),this._register(f.bind(Si.suppressSuggestions,x=>{const v=this.model.read(x),_=v==null?void 0:v.inlineCompletionState.read(x);return _!=null&&_.primaryGhostText&&(_!=null&&_.inlineCompletion)?_.inlineCompletion.source.inlineSuggestions.suppressSuggestions:void 0})),this._register(f.bind(Si.inlineSuggestionVisible,x=>{const v=this.model.read(x),_=v==null?void 0:v.inlineCompletionState.read(x);return!!(_!=null&&_.inlineCompletion)&&(_==null?void 0:_.primaryGhostText)!==void 0&&!(_!=null&&_.primaryGhostText.isEmpty())}));const m=we(this,x=>{const v=this.model.read(x),_=v==null?void 0:v.inlineCompletionState.read(x),w=_==null?void 0:_.primaryGhostText;return!w||w.isEmpty()?void 0:new te(w.lineNumber,w.parts[0].column)});this._register(f.bind(Si.cursorBeforeGhostText,x=>{const v=m.read(x);if(!v)return!1;const _=this._editorObs.cursorPosition.read(x);return _?v.equals(_):!1})),this._register(this._instantiationService.createInstance(RJ,this.editor))}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),n=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let s;!t&&n&&this.editor.getOption(169)&&(s=S(1204,"Inspect this in the accessible view ({0})",n.getAriaLabel())),$l(s?e+", "+s:e)}shouldShowHoverAt(e){var n;const t=(n=this.model.get())==null?void 0:n.primaryGhostText.get();return t?t.parts.some(s=>e.containsPosition(new te(t.lineNumber,s.column))):!1}shouldShowHoverAtViewZone(e){return this._view.shouldShowHoverAtViewZone(e)}reject(){Vi(e=>{var n;const t=this.model.get();if(t&&(t.stop("explicitCancel",e),this._focusIsInEditorOrMenu.get()))for(const s of Nf._instances)s!==this&&((n=s.model.get())==null||n.stop("automatic",e))})}jump(){const e=this.model.get();e&&e.jump()}},Nf=ip,ip._instances=new Set,ip.hot=uW(ip),ip.ID="editor.contrib.inlineCompletionsController",ip);nd=Nf=wYt([Sm(1,ft),Sm(2,Bt),Sm(3,Zt),Sm(4,es),Sm(5,Ju),Sm(6,lt),Sm(7,hx),Sm(8,zn),Sm(9,Zo)],nd);const H9=class H9 extends rt{constructor(){super({id:H9.ID,label:be(1183,"Show Next Inline Suggestion"),precondition:Ne.and(J.writable,Si.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){var s;const n=nd.get(t);(s=n==null?void 0:n.model.get())==null||s.next()}};H9.ID=kPe;let yee=H9;const W9=class W9 extends rt{constructor(){super({id:W9.ID,label:be(1184,"Show Previous Inline Suggestion"),precondition:Ne.and(J.writable,Si.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){var s;const n=nd.get(t);(s=n==null?void 0:n.model.get())==null||s.previous()}};W9.ID=SPe;let wee=W9;const CYt="vscode://schemas/inlineCompletionProviderIdArgs";function SYt(i){const e=[];return i.providerId&&(e.push(i.providerId.toStringWithoutVersion()),e.push(i.providerId.extensionId+":*")),e}const $1e=I$t(D$t({showNoResultNotification:sK(Bye()),providerId:sK(R$t(CYt,k$t())),explicit:sK(Bye())}),E$t());class kYt extends rt{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:be(1185,"Trigger Inline Suggestion"),precondition:J.writable,metadata:{description:S(1172,"Triggers an inline suggestion in the editor."),args:[{name:"args",description:S(1173,"Options for triggering inline suggestions."),isOptional:!0,schema:$1e.getJSONSchema()}]}})}async run(e,t,n){var c;const s=e.get(nr),r=e.get(lt),o=nd.get(t),a=$1e.validateOrThrow(n),l=a!=null&&a.providerId?r.inlineCompletionsProvider.all(t.getModel()).find(u=>SYt(u).some(h=>h===a.providerId)):void 0;await jLt(async u=>{var h;await((h=o==null?void 0:o.model.get())==null?void 0:h.trigger(u,{provider:l,explicit:(a==null?void 0:a.explicit)??!0})),o==null||o.playAccessibilitySignal(u)}),a!=null&&a.showNoResultNotification&&((c=o==null?void 0:o.model.get())!=null&&c.state.get()||s.notify({severity:jD.Info,message:S(1174,"No inline suggestion is available.")}))}}class NYt extends rt{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:be(1186,"Accept Next Word Of Inline Suggestion"),precondition:Ne.and(J.writable,Si.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:Ne.and(J.writable,Si.inlineSuggestionVisible,Si.cursorBeforeGhostText,ID.negate())},menuOpts:[{menuId:ct.InlineSuggestionToolbar,title:S(1175,"Accept Word"),group:"primary",order:2}]})}async run(e,t){var s;const n=nd.get(t);await((s=n==null?void 0:n.model.get())==null?void 0:s.acceptNextWord())}}class EYt extends rt{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:be(1187,"Accept Next Line Of Inline Suggestion"),precondition:Ne.and(J.writable,Si.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:ct.InlineSuggestionToolbar,title:S(1176,"Accept Line"),group:"secondary",order:2}]})}async run(e,t){var s;const n=nd.get(t);await((s=n==null?void 0:n.model.get())==null?void 0:s.acceptNextLine())}}class LYt extends rt{constructor(){super({id:rM,label:be(1188,"Accept Inline Suggestion"),precondition:Ne.or(Si.inlineSuggestionVisible,Si.inlineEditVisible),menuOpts:[{menuId:ct.InlineSuggestionToolbar,title:S(1177,"Accept"),group:"primary",order:2},{menuId:ct.InlineEditsActions,title:S(1178,"Accept"),group:"primary",order:2}],kbOpts:[{primary:2,weight:200,kbExpr:Ne.or(Ne.and(Si.inlineSuggestionVisible,J.tabMovesFocus.toNegated(),dn.Visible.toNegated(),J.hoverFocused.toNegated(),Si.hasSelection.toNegated(),Si.inlineSuggestionHasIndentationLessThanTabSize),Ne.and(Si.inlineEditVisible,J.tabMovesFocus.toNegated(),dn.Visible.toNegated(),J.hoverFocused.toNegated(),Si.tabShouldAcceptInlineEdit))}]})}async run(e,t){var s;const n=nd.getInFocusedEditorOrParent(e);n&&((s=n.model.get())==null||s.accept(n.editor),n.editor.focus())}}jo.registerKeybindingRule({id:rM,weight:202,primary:2,when:Ne.and(Si.inInlineEditsPreviewEditor)});class DYt extends rt{constructor(){super({id:_7t,label:be(1189,"Jump to next inline edit"),precondition:Si.inlineEditVisible,menuOpts:[{menuId:ct.InlineEditsActions,title:S(1179,"Jump"),group:"primary",order:1,when:Si.cursorAtInlineEdit.toNegated()}],kbOpts:{primary:2,weight:201,kbExpr:Ne.and(Si.inlineEditVisible,J.tabMovesFocus.toNegated(),dn.Visible.toNegated(),J.hoverFocused.toNegated(),Si.tabShouldJumpToInlineEdit)}})}async run(e,t){const n=nd.get(t);n&&n.jump()}}const V9=class V9 extends rt{constructor(){super({id:V9.ID,label:be(1190,"Hide Inline Suggestion"),precondition:Ne.or(Si.inlineSuggestionVisible,Si.inlineEditVisible),kbOpts:{weight:190,primary:9},menuOpts:[{menuId:ct.InlineEditsActions,title:S(1180,"Reject"),group:"primary",order:3}]})}async run(e,t){const n=nd.getInFocusedEditorOrParent(e);Vi(s=>{var r;(r=n==null?void 0:n.model.get())==null||r.stop("explicitCancel",s)}),n==null||n.editor.focus()}};V9.ID=NPe;let J8=V9;const z9=class z9 extends rt{constructor(){super({id:z9.ID,label:be(1191,"Toggle Inline Suggestions Show Collapsed"),precondition:Ne.true()})}async run(e,t){const n=e.get(Zt),s=n.getValue("editor.inlineSuggest.edits.showCollapsed");n.updateValue("editor.inlineSuggest.edits.showCollapsed",!s)}};z9.ID=NZ;let Cee=z9;jo.registerKeybindingRule({id:J8.ID,weight:-1,primary:9,secondary:[1033],when:Ne.and(Si.inInlineEditsPreviewEditor)});const U9=class U9 extends Fo{constructor(){super({id:U9.ID,title:S(1181,"Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:ct.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Ne.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e){const t=e.get(Zt),s=t.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";t.updateValue("editor.inlineSuggest.showToolbar",s)}};U9.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";let See=U9;class TYt extends rt{constructor(){super({id:"editor.action.inlineSuggest.dev.extractRepro",label:S(1182,"Developer: Extract Inline Suggest State"),alias:"Developer: Inline Suggest Extract Repro",precondition:Ne.or(Si.inlineEditVisible,Si.inlineSuggestionVisible)})}async run(e,t){const n=e.get(ed),s=nd.get(t),r=s==null?void 0:s.model.get();if(!r)return;const o=r.extractReproSample(),l=Xc(JSON.stringify({inlineCompletion:o.inlineCompletion},null,4)).map(u=>"// "+u).join(` +`),c=`${o.documentValue} + +// +${l} +// +`;return await n.writeText(c),{reproCase:c}}}var IYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},b4=function(i,e){return function(t,n){e(t,n,i)}};class AYt{constructor(e,t,n){this.owner=e,this.range=t,this.controller=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let kee=class{constructor(e,t,n,s,r){this._editor=e,this.accessibilityService=t,this._instantiationService=n,this._telemetryService=s,this._markdownRendererService=r,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=nd.get(this._editor);if(!t)return null;const n=e.target;if(n.type===8){const s=n.detail;if(t.shouldShowHoverAtViewZone(s.viewZoneId))return new YI(1e3,this,z.fromPositions(this._editor.getModel().validatePosition(s.positionBefore||s.position)),e.event.posx,e.event.posy,!1)}if(n.type===7&&t.shouldShowHoverAt(n.range))return new YI(1e3,this,n.range,e.event.posx,e.event.posy,!1);if(n.type===6&&n.detail.mightBeForeignElement&&t.shouldShowHoverAt(n.range))return new YI(1e3,this,n.range,e.event.posx,e.event.posy,!1);if(n.type===9&&n.element){const s=yM.getWarningWidgetContext(n.element);if(s&&t.shouldShowHoverAt(s.range))return new YI(1e3,this,s.range,e.event.posx,e.event.posy,!1)}return null}computeSync(e,t){if(this._editor.getOption(71).showToolbar!=="onHover")return[];const n=nd.get(this._editor);return n&&n.shouldShowHoverAt(e.range)?[new AYt(this,e.range,n)]:[]}renderHoverParts(e,t){const n=new _e,s=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(12)&&n.add(this.renderScreenReaderText(e,s));const r=s.controller.model.get(),o=document.createElement("div");e.fragment.appendChild(o),n.add(Fa((l,c)=>{const u=c.add(this._instantiationService.createInstance(FL.hot.read(l),this._editor,!1,zi(null),r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands,r.warning,()=>{e.onContentsChanged()}));o.replaceChildren(u.getDomNode())})),r.triggerExplicitly();const a={hoverPart:s,hoverElement:o,dispose(){n.dispose()}};return new MC([a])}getAccessibleContent(e){return S(1205,"There are inline completions here")}renderScreenReaderText(e,t){const n=new _e,s=Oe,r=s("div.hover-row.markdown-hover"),o=De(r,s("div.hover-contents",{"aria-live":"assertive"})),a=l=>{const c=S(1206,"Suggestion:"),u=n.add(this._markdownRendererService.render(new Ma().appendText(c).appendCodeblock("text",l),{context:this._editor,asyncRenderCallback:()=>{o.className="hover-contents code-hover-contents",e.onContentsChanged()}}));o.replaceChildren(u.element)};return n.add(Pt(l=>{var u;const c=(u=t.controller.model.read(l))==null?void 0:u.primaryGhostText.read(l);if(c){const h=this._editor.getModel().getLineContent(c.lineNumber);a(c.renderForScreenReader(h))}else vo(o)})),e.fragment.appendChild(r),n}};kee=IYt([b4(1,Zo),b4(2,ft),b4(3,Ua),b4(4,Zh)],kee);class RYt{}Pn(nd.ID,C$t(nd.hot),3);Ke(kYt);Ke(yee);Ke(wee);Ke(NYt);Ke(EYt);Ke(LYt);Ke(Cee);Ke(J8);Ke(DYt);ci(See);Ke(TYt);ci(UJ);ci($J);fS.register(kee);jW.register(new RYt);var MYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},_K=function(i,e){return function(t,n){e(t,n,i)}},nA,F_;let SM=(F_=class{constructor(e,t,n,s){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=s,this.toUnhook=new _e,this.toUnhookForKeyboard=new _e,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const r=new NW(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([o,a])=>{this.startFindDefinitionFromMouse(o,a??void 0)})),this.toUnhook.add(r.onExecute(o=>{this.isEnabled(o)&&this.gotoDefinition(o.target.position,o.hasSideBySideModifier).catch(a=>{zt(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(nA.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}async startFindDefinition(e){var o;this.toUnhookForKeyboard.clear();const t=e?(o=this.editor.getModel())==null?void 0:o.getWordAtPosition(e):null;if(!t){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===t.startColumn&&this.currentWordAtPosition.endColumn===t.endColumn&&this.currentWordAtPosition.word===t.word)return;this.currentWordAtPosition=t;const n=new qMe(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=io(a=>this.findDefinition(e,a));let s;try{s=await this.previousPromise}catch(a){zt(a);return}if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}const r=s[0].originSelectionRange?z.lift(s[0].originSelectionRange):new z(e.lineNumber,t.startColumn,e.lineNumber,t.endColumn);if(s.length>1){let a=r;for(const{originSelectionRange:l}of s)l&&(a=z.plusRange(a,l));this.addDecoration(a,new Ma().appendText(S(1077,"Click to show {0} definitions.",s.length)))}else{const a=s[0];return a.uri?this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:c}}=l,{startLineNumber:u}=a.range;if(u<1||u>c.getLineCount()){l.dispose();return}const h=this.getPreviewValue(c,u,a),g=this.languageService.guessLanguageIdByFilepathOrFirstLine(c.uri);this.addDecoration(r,h?new Ma().appendCodeblock(g||"",h):void 0),l.dispose()}):void 0}}getPreviewValue(e,t,n){let s=n.range;return s.endLineNumber-s.startLineNumber>=nA.MAX_SOURCE_PREVIEW_LINES&&(s=this.getPreviewRangeBasedOnIndentation(e,t)),s=e.validateRange(s),this.stripIndentationFromPreviewRange(e,t,s)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{const s=!t&&this.editor.getOption(101)&&!this.isInPeekEditor(n);return new mO({openToSide:t,openInPeek:s,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const t=e.get(Bt);return yc.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}},nA=F_,F_.ID="editor.contrib.gotodefinitionatposition",F_.MAX_SOURCE_PREVIEW_LINES=8,F_);SM=nA=MYt([_K(1,bl),_K(2,tr),_K(3,lt)],SM);Pn(SM.ID,SM,2);class PYt extends rt{constructor(){super({id:"editor.action.debugEditorGpuRenderer",label:be(1101,"Developer: Debug Editor GPU Renderer"),precondition:Ne.true()})}async run(e,t){const n=e.get(ft),r=await e.get(Wa).pick([{label:S(1098,"Log Texture Atlas Stats"),id:"logTextureAtlasStats"},{label:S(1099,"Save Texture Atlas"),id:"saveTextureAtlas"},{label:S(1100,"Draw Glyph"),id:"drawGlyph"}],{canPickMany:!1});if(r)switch(r.id){case"logTextureAtlasStats":n.invokeFunction(o=>{const a=o.get(Ji),l=rl.atlas;if(!rl.atlas){a.error("No texture atlas found");return}const c=l.getStats();a.info(["Texture atlas stats",...c].join(` + +`))});break;case"saveTextureAtlas":n.invokeFunction(async o=>{const a=o.get(tx),l=o.get(k1e),c=a.getWorkspace().folders;if(c.length>0){const u=rl.atlas,h=[];for(const[g,f]of u.pages.entries())h.push(l.writeFile(kt.joinPath(c[0].uri,`textureAtlasPage${g}_actual.png`),p_.wrap(new Uint8Array(await(await f.source.convertToBlob()).arrayBuffer()))),l.writeFile(kt.joinPath(c[0].uri,`textureAtlasPage${g}_usage.png`),p_.wrap(new Uint8Array(await(await f.getUsagePreview()).arrayBuffer()))));await Promise.all(h)}});break;case"drawGlyph":n.invokeFunction(async o=>{var P,j,B;const a=o.get(Zt),l=o.get(k1e),c=o.get(Wa),h=o.get(tx).getWorkspace().folders;if(h.length===0)return;const g=rl.atlas,f=a.getValue("editor.fontFamily"),m=a.getValue("editor.fontSize"),x=new MR(m,f,oi().devicePixelRatio,rl.decorationStyleCache);let v=await c.input({prompt:"Enter a character to draw (prefix with 0x for code point))"});if(!v)return;const _=(j=(P=v.match(/0x(?[0-9a-f]+)/i))==null?void 0:P.groups)==null?void 0:j.codePoint;_!==void 0&&(v=String.fromCodePoint(parseInt(_,16)));const w=0,C=g.getGlyph(x,v,w,0,0);if(!C)return;const E=(B=g.pages[C.pageIndex].source.getContext("2d"))==null?void 0:B.getImageData(C.x,C.y,C.w,C.h);if(!E)return;const D=new OffscreenCanvas(E.width,E.height);vC(D.getContext("2d")).putImageData(E,0,0);const I=await D.convertToBlob({type:"image/png"}),R=kt.joinPath(h[0].uri,`glyph_${v}_${w}_${m}px_${f.replaceAll(/[,\\\/\.'\s]/g,"_")}.png`);await l.writeFile(R,p_.wrap(new Uint8Array(await I.arrayBuffer())))});break}}}Ke(PYt);var ug;(function(i){i.NoAutoFocus="noAutoFocus",i.FocusIfVisible="focusIfVisible",i.AutoFocusImmediately="autoFocusImmediately"})(ug||(ug={}));class OYt extends rt{constructor(){super({id:CPe,label:be(1107,"Show or Focus Hover"),metadata:{description:be(1108,"Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[ug.NoAutoFocus,ug.FocusIfVisible,ug.AutoFocusImmediately],enumDescriptions:[S(1104,"The hover will not automatically take focus."),S(1105,"The hover will take focus only if it is already visible."),S(1106,"The hover will automatically take focus when it appears.")],default:ug.FocusIfVisible}}}}]},precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:Or(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;const s=Va.get(t);if(!s)return;const r=n==null?void 0:n.focus;let o=ug.FocusIfVisible;Object.values(ug).includes(r)?o=r:typeof r=="boolean"&&r&&(o=ug.AutoFocusImmediately);const a=c=>{const u=t.getPosition(),h=new z(u.lineNumber,u.column,u.lineNumber,u.column);s.showContentHover(h,1,2,c)},l=t.getOption(2)===2;s.isHoverVisible?o!==ug.NoAutoFocus?s.focus():a(l):a(l||o===ug.AutoFocusImmediately)}}class jYt extends rt{constructor(){super({id:l7t,label:be(1109,"Show Definition Preview Hover"),precondition:void 0,metadata:{description:be(1110,"Show the definition preview hover in the editor.")}})}run(e,t){const n=Va.get(t);if(!n)return;const s=t.getPosition();if(!s)return;const r=new z(s.lineNumber,s.column,s.lineNumber,s.column),o=SM.get(t);if(!o)return;o.startFindDefinitionFromCursor(s).then(()=>{n.showContentHover(r,1,2,!0)})}}class FYt extends rt{constructor(){super({id:c7t,label:be(1111,"Hide Hover"),alias:"Hide Content Hover",precondition:void 0})}run(e,t){var n;(n=Va.get(t))==null||n.hideContentHover()}}class BYt extends rt{constructor(){super({id:d7t,label:be(1112,"Scroll Up Hover"),precondition:J.hoverFocused,kbOpts:{kbExpr:J.hoverFocused,primary:16,weight:100},metadata:{description:be(1113,"Scroll up the editor hover.")}})}run(e,t){const n=Va.get(t);n&&n.scrollUp()}}class HYt extends rt{constructor(){super({id:u7t,label:be(1114,"Scroll Down Hover"),precondition:J.hoverFocused,kbOpts:{kbExpr:J.hoverFocused,primary:18,weight:100},metadata:{description:be(1115,"Scroll down the editor hover.")}})}run(e,t){const n=Va.get(t);n&&n.scrollDown()}}class WYt extends rt{constructor(){super({id:h7t,label:be(1116,"Scroll Left Hover"),precondition:J.hoverFocused,kbOpts:{kbExpr:J.hoverFocused,primary:15,weight:100},metadata:{description:be(1117,"Scroll left the editor hover.")}})}run(e,t){const n=Va.get(t);n&&n.scrollLeft()}}class VYt extends rt{constructor(){super({id:g7t,label:be(1118,"Scroll Right Hover"),precondition:J.hoverFocused,kbOpts:{kbExpr:J.hoverFocused,primary:17,weight:100},metadata:{description:be(1119,"Scroll right the editor hover.")}})}run(e,t){const n=Va.get(t);n&&n.scrollRight()}}class zYt extends rt{constructor(){super({id:f7t,label:be(1120,"Page Up Hover"),precondition:J.hoverFocused,kbOpts:{kbExpr:J.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:be(1121,"Page up the editor hover.")}})}run(e,t){const n=Va.get(t);n&&n.pageUp()}}class UYt extends rt{constructor(){super({id:p7t,label:be(1122,"Page Down Hover"),precondition:J.hoverFocused,kbOpts:{kbExpr:J.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:be(1123,"Page down the editor hover.")}})}run(e,t){const n=Va.get(t);n&&n.pageDown()}}class $Yt extends rt{constructor(){super({id:m7t,label:be(1124,"Go To Top Hover"),precondition:J.hoverFocused,kbOpts:{kbExpr:J.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:be(1125,"Go to the top of the editor hover.")}})}run(e,t){const n=Va.get(t);n&&n.goToTop()}}class qYt extends rt{constructor(){super({id:b7t,label:be(1126,"Go To Bottom Hover"),precondition:J.hoverFocused,kbOpts:{kbExpr:J.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:be(1127,"Go to the bottom of the editor hover.")}})}run(e,t){const n=Va.get(t);n&&n.goToBottom()}}class KYt extends rt{constructor(){super({id:yW,label:x7t,alias:"Increase Hover Verbosity Level",precondition:J.hoverVisible})}run(e,t,n){const s=Va.get(t);if(!s)return;const r=(n==null?void 0:n.index)!==void 0?n.index:s.focusedHoverPartIndex();s.updateHoverVerbosityLevel(jc.Increase,r,n==null?void 0:n.focus)}}class GYt extends rt{constructor(){super({id:wW,label:v7t,alias:"Decrease Hover Verbosity Level",precondition:J.hoverVisible})}run(e,t,n){var o;const s=Va.get(t);if(!s)return;const r=(n==null?void 0:n.index)!==void 0?n.index:s.focusedHoverPartIndex();(o=Va.get(t))==null||o.updateHoverVerbosityLevel(jc.Decrease,r,n==null?void 0:n.focus)}}class YYt{constructor(e){this._editor=e}computeSync(e){var o;const t=a=>({value:a}),n=this._editor.getLineDecorations(e.lineNumber),s=[],r=e.laneOrLine==="lineNo";if(!n)return s;for(const a of n){const l=((o=a.options.glyphMargin)==null?void 0:o.position)??Ug.Center;if(!r&&l!==e.laneOrLine)continue;const c=r?a.options.lineNumberHoverMessage:a.options.glyphMarginHoverMessage;!c||RL(c)||s.push(...Zre(c).map(t))}return s}}var QYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},XYt=function(i,e){return function(t,n){e(t,n,i)}},Nee;const q1e=Oe;var jw;let Eee=(jw=class extends se{constructor(e,t){super(),this._markdownRendererService=t,this.allowEditorOverflow=!0,this._renderDisposeables=this._register(new _e),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new sle(!0)),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._hoverOperation=this._register(new EPe(this._editor,new YYt(this._editor))),this._register(this._hoverOperation.onResult(n=>this._withResult(n))),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(59)&&this._updateFont()})),this._register(yr(this._hover.containerDomNode,"mouseleave",n=>{this._onMouseLeave(n)})),this._editor.addOverlayWidget(this)}dispose(){this._hoverComputerOptions=void 0,this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Nee.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&this._hoverComputerOptions&&(this._hoverOperation.cancel(),this._hoverOperation.start(0,this._hoverComputerOptions))}showsOrWillShow(e){const t=e.target;return t.type===2&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):t.type===3?(this._startShowingAt(t.position.lineNumber,"lineNo"),!0):!1}_startShowingAt(e,t){this._hoverComputerOptions&&this._hoverComputerOptions.lineNumber===e&&this._hoverComputerOptions.laneOrLine===t||(this._hoverOperation.cancel(),this.hide(),this._hoverComputerOptions={lineNumber:e,laneOrLine:t},this._hoverOperation.start(0,this._hoverComputerOptions))}hide(){this._hoverComputerOptions=void 0,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e.value,this._messages.length>0?this._renderMessages(e.options.lineNumber,e.options.laneOrLine,this._messages):this.hide()}_renderMessages(e,t,n){this._renderDisposeables.clear();const s=document.createDocumentFragment();for(const r of n){const o=q1e("div.hover-row.markdown-hover"),a=De(o,q1e("div.hover-contents")),l=this._renderDisposeables.add(this._markdownRendererService.render(r.value,{context:this._editor}));a.appendChild(l.element),s.appendChild(o)}this._updateContents(s),this._showAt(e,t)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e,t){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const n=this._editor.getLayoutInfo(),s=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(75),a=this._hover.containerDomNode.clientHeight,l=s-r-(a-o)/2,c=n.glyphMarginLeft+n.glyphMarginWidth+(t==="lineNo"?n.lineNumbersWidth:0),h=n.height-a,g=Math.max(0,Math.min(Math.round(l),h));if(this._editor.getOption(51)){const m=this._editor.getDomNode();if(m){const x=Zs(m);this._hover.containerDomNode.style.position="fixed",this._hover.containerDomNode.style.left=`${x.left+c}px`,this._hover.containerDomNode.style.top=`${x.top+g}px`}}else this._hover.containerDomNode.style.position="absolute",this._hover.containerDomNode.style.left=`${c}px`,this._hover.containerDomNode.style.top=`${g}px`;this._hover.containerDomNode.style.zIndex="11"}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!CW(t,e.x,e.y))&&this.hide()}},Nee=jw,jw.ID="editor.contrib.modesGlyphHoverWidget",jw);Eee=Nee=QYt([XYt(1,Zh)],Eee);var ZYt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},JYt=function(i,e){return function(t,n){e(t,n,i)}},GE;let eB=(GE=class extends se{constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new _e,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new pi(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(69)&&(this._unhookListeners(),this._hookListeners())}))}_hookListeners(){const e=this._editor.getOption(69);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))):(this._listenersStore.add(this._editor.onMouseMove(t=>this._onEditorMouseMove(t))),this._listenersStore.add(this._editor.onKeyDown(t=>this._onKeyDown(t)))),this._listenersStore.add(this._editor.onMouseLeave(t=>this._onEditorMouseLeave(t))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this.hideGlyphHover()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(t=>this._onEditorScrollChanged(t)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this.hideGlyphHover()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,!this._isMouseOnGlyphHoverWidget(e)&&this.hideGlyphHover()}_isMouseOnGlyphHoverWidget(e){var n;const t=(n=this._glyphWidget)==null?void 0:n.getDomNode();return t?CW(t,e.event.posx,e.event.posy):!1}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._isMouseOnGlyphHoverWidget(e))||this.hideGlyphHover()}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,n=this._isMouseOnGlyphHoverWidget(e);return t&&n}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){!e||this._tryShowHoverWidget(e)||this.hideGlyphHover()}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&(e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||this.hideGlyphHover())}hideGlyphHover(){var e;(e=this._glyphWidget)==null||e.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(Eee,this._editor)),this._glyphWidget}dispose(){var e;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(e=this._glyphWidget)==null||e.dispose()}},GE.ID="editor.contrib.marginHover",GE);eB=ZYt([JYt(1,ft)],eB);class eQt{}class tQt{}class nQt{}Pn(Va.ID,Va,2);Pn(eB.ID,eB,2);Ke(OYt);Ke(jYt);Ke(FYt);Ke(BYt);Ke(HYt);Ke(WYt);Ke(VYt);Ke(zYt);Ke(UYt);Ke($Yt);Ke(qYt);Ke(KYt);Ke(GYt);fS.register(aM);fS.register(cJ);Zu((i,e)=>{const t=i.getColor(Doe);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});jW.register(new eQt);jW.register(new tQt);jW.register(new nQt);function P5e(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return[];const s=e.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;if(!s)return[];const r=new xoe(i,s,e);for(n=Math.min(n,i.getLineCount());t<=n&&r.shouldIgnore(t);)t++;if(t>n-1)return[];const{tabSize:o,indentSize:a,insertSpaces:l}=i.getOptions(),c=(x,v)=>(v=v||1,Gu.shiftIndent(x,x.length+v,o,a,l)),u=(x,v)=>(v=v||1,Gu.unshiftIndent(x,x.length+v,o,a,l)),h=[],g=i.getLineContent(t);let f=Mi(g),m=f;r.shouldIncrease(t)?(m=c(m),f=c(f)):r.shouldIndentNextLine(t)&&(m=c(m)),t++;for(let x=t;x<=n;x++){if(iQt(i,x))continue;const v=i.getLineContent(x),_=Mi(v),w=m;r.shouldDecrease(x,w)&&(m=u(m),f=u(f)),_!==m&&h.push(Qs.replaceMove(new st(x,1,x,_.length+1),uoe(m,a,l))),!r.shouldIgnore(x)&&(r.shouldIncrease(x,w)?(f=c(f),m=f):r.shouldIndentNextLine(x,w)?m=c(m):m=f)}return h}function iQt(i,e){return i.tokenization.isCheapToTokenize(e)?i.tokenization.getLineTokens(e).getStandardTokenType(0)===2:!1}var sQt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},rQt=function(i,e){return function(t,n){e(t,n,i)}};const $9=class $9 extends rt{constructor(){super({id:$9.ID,label:be(1148,"Convert Indentation to Spaces"),precondition:J.writable,metadata:{description:be(1149,"Convert the tab indentation to spaces.")}})}run(e,t){const n=t.getModel();if(!n)return;const s=n.getOptions(),r=t.getSelection();if(!r)return;const o=new dQt(r,s.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}};$9.ID="editor.action.indentationToSpaces";let Lee=$9;const q9=class q9 extends rt{constructor(){super({id:q9.ID,label:be(1150,"Convert Indentation to Tabs"),precondition:J.writable,metadata:{description:be(1151,"Convert the spaces indentation to tabs.")}})}run(e,t){const n=t.getModel();if(!n)return;const s=n.getOptions(),r=t.getSelection();if(!r)return;const o=new uQt(r,s.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}};q9.ID="editor.action.indentationToTabs";let Dee=q9;class Qle extends rt{constructor(e,t,n){super(n),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const n=e.get(Wa),s=e.get(Is),r=t.getModel();if(!r)return;const o=s.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget),a=r.getOptions(),l=[1,2,3,4,5,6,7,8].map(u=>({id:u.toString(),label:u.toString(),description:u===o.tabSize&&u===a.tabSize?S(1144,"Configured Tab Size"):u===o.tabSize?S(1145,"Default Tab Size"):u===a.tabSize?S(1146,"Current Tab Size"):void 0})),c=Math.min(r.getOptions().tabSize-1,7);setTimeout(()=>{n.pick(l,{placeHolder:S(1147,"Select Tab Size for Current File"),activeItem:l[c]}).then(u=>{if(u&&r&&!r.isDisposed()){const h=parseInt(u.label,10);this.displaySizeOnly?r.updateOptions({tabSize:h}):r.updateOptions({tabSize:h,indentSize:h,insertSpaces:this.insertSpaces})}})},50)}}const K9=class K9 extends Qle{constructor(){super(!1,!1,{id:K9.ID,label:be(1152,"Indent Using Tabs"),precondition:void 0,metadata:{description:be(1153,"Use indentation with tabs.")}})}};K9.ID="editor.action.indentUsingTabs";let Tee=K9;const G9=class G9 extends Qle{constructor(){super(!0,!1,{id:G9.ID,label:be(1154,"Indent Using Spaces"),precondition:void 0,metadata:{description:be(1155,"Use indentation with spaces.")}})}};G9.ID="editor.action.indentUsingSpaces";let Iee=G9;const Y9=class Y9 extends Qle{constructor(){super(!0,!0,{id:Y9.ID,label:be(1156,"Change Tab Display Size"),precondition:void 0,metadata:{description:be(1157,"Change the space size equivalent of the tab.")}})}};Y9.ID="editor.action.changeTabDisplaySize";let Aee=Y9;const Q9=class Q9 extends rt{constructor(){super({id:Q9.ID,label:be(1158,"Detect Indentation from Content"),precondition:void 0,metadata:{description:be(1159,"Detect the indentation from content.")}})}run(e,t){const n=e.get(Is),s=t.getModel();if(!s)return;const r=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget);s.detectIndentation(r.insertSpaces,r.tabSize)}};Q9.ID="editor.action.detectIndentation";let Ree=Q9;class oQt extends rt{constructor(){super({id:"editor.action.reindentlines",label:be(1160,"Reindent Lines"),precondition:J.writable,metadata:{description:be(1161,"Reindent the lines of the editor.")},canTriggerInlineEdits:!0})}run(e,t){const n=e.get(As),s=t.getModel();if(!s)return;const r=P5e(s,n,1,s.getLineCount());r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class aQt extends rt{constructor(){super({id:"editor.action.reindentselectedlines",label:be(1162,"Reindent Selected Lines"),precondition:J.writable,metadata:{description:be(1163,"Reindent the selected lines of the editor.")},canTriggerInlineEdits:!0})}run(e,t){const n=e.get(As),s=t.getModel();if(!s)return;const r=t.getSelections();if(r===null)return;const o=[];for(const a of r){let l=a.startLineNumber,c=a.endLineNumber;if(l!==c&&a.endColumn===1&&c--,l===1){if(l===c)continue}else l--;const u=P5e(s,n,l,c);o.push(...u)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class lQt{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const n of e)n.range&&typeof n.text=="string"&&this._edits.push(n)}getEditOperations(e,t){for(const s of this._edits)t.addEditOperation(z.lift(s.range),s.text);let n=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}var YE;let tB=(YE=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new _e,this.callOnModel=new _e,this.callOnDispose.add(e.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(e.onDidChangeModel(()=>this.update())),this.callOnDispose.add(e.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(!this.editor.getOption(17)||this.editor.getOption(16)<4)&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)}))}trigger(e){const t=this.editor.getSelections();if(t===null||t.length>1)return;const n=this.editor.getModel();if(!n||this.rangeContainsOnlyWhitespaceCharacters(n,e)||!this.editor.getOption(18)&&cQt(n,e)||!n.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const r=this.editor.getOption(16),{tabSize:o,indentSize:a,insertSpaces:l}=n.getOptions(),c=[],u={shiftIndent:m=>Gu.shiftIndent(m,m.length+1,o,a,l),unshiftIndent:m=>Gu.unshiftIndent(m,m.length+1,o,a,l)};let h=e.startLineNumber,g=n.getLineContent(h);if(!/\S/.test(g.substring(0,e.startColumn-1))){const m=CA(r,n,n.getLanguageId(),h,u,this._languageConfigurationService);if(m!==null){const x=Mi(g),v=Mc(m,o),_=Mc(x,o);if(v!==_){const w=GA(v,o,l);c.push({range:new z(h,1,h,x.length+1),text:w}),g=w+g.substring(x.length)}else{const w=_Ae(n,h,this._languageConfigurationService);if(w===0||w===8)return}}}const f=h;for(;hn.tokenization.getLineTokens(v),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(v,_)=>n.getLanguageIdAtPosition(v,_)},getLineContent:v=>v===f?g:n.getLineContent(v)},n.getLanguageId(),h+1,u,this._languageConfigurationService);if(x!==null){const v=Mc(x,o),_=Mc(Mi(n.getLineContent(h+1)),o);if(v!==_){const w=v-_;for(let k=h+1;k<=e.endLineNumber;k++){const C=n.getLineContent(k),E=Mi(C),T=Mc(E,o)+w,I=GA(T,o,l);I!==E&&c.push({range:new z(k,1,k,E.length+1),text:I})}}}}if(c.length>0){this.editor.pushUndoStop();const m=new lQt(c,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",m),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){const n=r=>r.trim().length===0;let s=!0;if(t.startLineNumber===t.endLineNumber){const o=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);s=n(o)}else for(let r=t.startLineNumber;r<=t.endLineNumber;r++){const o=e.getLineContent(r);if(r===t.startLineNumber){const a=o.substring(t.startColumn-1);s=n(a)}else if(r===t.endLineNumber){const a=o.substring(0,t.endColumn-1);s=n(a)}else s=e.getLineFirstNonWhitespaceColumn(r)===0;if(!s)break}return s}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}},YE.ID="editor.contrib.autoIndentOnPaste",YE);tB=sQt([rQt(1,As)],tB);function cQt(i,e){const t=n=>nIt(i,n)===2;return t(e.getStartPosition())||t(e.getEndPosition())}function O5e(i,e,t,n){if(i.getLineCount()===1&&i.getLineMaxColumn(1)===1)return;let s="";for(let o=0;o=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},fQt=function(i,e){return function(t,n){e(t,n,i)}},Ej,B_;let qL=(B_=class{static get(e){return e.getContribution(Ej.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var l;(l=this.currentRequest)==null||l.cancel();const n=this.editor.getSelection(),s=this.editor.getModel();if(!s||!n)return;let r=n;if(r.startLineNumber!==r.endLineNumber)return;const o=new qMe(this.editor,5),a=s.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=io(c=>this.editorWorkerService.navigateValueSet(a,r,t)),this.currentRequest.then(c=>{var m;if(!c||!c.range||!c.value||!o.validate(this.editor))return;const u=z.lift(c.range);let h=c.range;const g=c.value.length-(r.endColumn-r.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+c.value.length},g>1&&(r=new st(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn+g-1));const f=new hQt(u,r,c.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,f),this.editor.pushUndoStop(),this.decorations.set([{range:h,options:Ej.DECORATION}]),(m=this.decorationRemover)==null||m.cancel(),this.decorationRemover=kp(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(zt)}).catch(zt)):Promise.resolve(void 0)}},Ej=B_,B_.ID="editor.contrib.inPlaceReplaceController",B_.DECORATION=qt.register({description:"in-place-replace",className:"valueSetReplacement"}),B_);qL=Ej=gQt([fQt(1,Nc)],qL);class pQt extends rt{constructor(){super({id:"editor.action.inPlaceReplace.up",label:be(1240,"Replace with Previous Value"),precondition:J.writable,kbOpts:{kbExpr:J.editorTextFocus,primary:3159,weight:100}})}run(e,t){const n=qL.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}}class mQt extends rt{constructor(){super({id:"editor.action.inPlaceReplace.down",label:be(1241,"Replace with Next Value"),precondition:J.writable,kbOpts:{kbExpr:J.editorTextFocus,primary:3161,weight:100}})}run(e,t){const n=qL.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}}Pn(qL.ID,qL,4);Ke(pQt);Ke(mQt);class bQt{constructor(e){this._selection=e,this._selectionId=null}getEditOperations(e,t){const n=xQt(e);n&&t.addEditOperation(n.range,n.text),this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function xQt(i){const e=i.getLineCount(),t=i.getLineContent(e),n=Oh(t)===-1;if(!(!e||n))return Qs.insert(new te(e,i.getLineMaxColumn(e)),i.getEOL())}const X9=class X9 extends rt{constructor(){super({id:X9.ID,label:be(1242,"Insert Final New Line"),precondition:J.writable})}run(e,t,n){const s=t.getSelection();if(s===null)return;const r=new bQt(s);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()}};X9.ID="editor.action.insertFinalNewLine";let Mee=X9;Ke(Mee);class vQt extends rt{constructor(){super({id:"expandLineSelection",label:be(1243,"Expand Line Selection"),precondition:void 0,kbOpts:{weight:0,kbExpr:J.textInputFocus,primary:2090}})}run(e,t,n){if(n=n||{},!t.hasModel())return;const s=t._getViewModel();s.model.pushStackElement(),s.setCursorStates(n.source,3,zo.expandLineSelection(s,s.getCursorStates())),s.revealAllCursors(n.source,!0)}}Ke(vQt);var _Qt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},x4=function(i,e){return function(t,n){e(t,n,i)}},Lj;const j5e=new Ze("LinkedEditingInputVisible",!1),yQt="linked-editing-decoration";var H_;let KL=(H_=class extends se{static get(e){return e.getContribution(Lj.ID)}constructor(e,t,n,s,r){super(),this.languageConfigurationService=s,this._syncRangesToken=0,this._localToDispose=this._register(new _e),this._editor=e,this._providers=n.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=j5e.bindTo(t),this._debounceInformation=r.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new _e),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(o=>{(o.hasChanged(78)||o.hasChanged(106))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),n=t!==null&&(this._editor.getOption(78)||this._editor.getOption(106))&&this._providers.has(t);if(n===this._enabled&&!e||(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||t===null))return;this._localToDispose.add(He.runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const s=new Uu(this._debounceInformation.get(t)),r=()=>{this._rangeUpdateTriggerPromise=s.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(t))},o=new Uu(0),a=l=>{this._rangeSyncTriggerPromise=o.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{r()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const c=this._currentDecorations.getRange(0);if(c&&l.changes.every(u=>c.intersectRanges(u.range))){a(this._syncRangesToken);return}}r()})),this._localToDispose.add({dispose:()=>{s.dispose(),o.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||this._currentDecorations.length===0)return;const t=this._editor.getModel(),n=this._currentDecorations.getRange(0);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();const s=t.getValueInRange(n);if(this._currentWordPattern){const o=s.match(this._currentWordPattern);if((o?o[0].length:0)!==s.length)return this.clearRanges()}const r=[];for(let o=1,a=this._currentDecorations.length;o1){this.clearRanges();return}const n=this._editor.getModel(),s=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const a=this._currentDecorations.getRange(0);if(a&&a.containsPosition(t))return}}if(!((o=this._currentRequestPosition)!=null&&o.equals(t))){const a=this._currentDecorations.getRange(0);a!=null&&a.containsPosition(t)||this.clearRanges()}this._currentRequestPosition=t,this._currentRequestModelVersion=s;const r=this._currentRequestCts=new vs;try{const a=new _o(!1),l=await F5e(this._providers,n,t,r.token);if(this._debounceInformation.update(n,a.elapsed()),r!==this._currentRequestCts||(this._currentRequestCts=null,s!==n.getVersionId()))return;let c=[];l!=null&&l.ranges&&(c=l.ranges),this._currentWordPattern=(l==null?void 0:l.wordPattern)||this._languageWordPattern;let u=!1;for(let g=0,f=c.length;g({range:g,options:Lj.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(h),this._syncRangesToken++}catch(a){Zd(a)||zt(a),(this._currentRequestCts===r||!this._currentRequestCts)&&this.clearRanges()}}},Lj=H_,H_.ID="editor.contrib.linkedEditing",H_.DECORATION=qt.register({description:"linked-editing",stickiness:0,className:yQt}),H_);KL=Lj=_Qt([x4(1,Bt),x4(2,lt),x4(3,As),x4(4,Ju)],KL);class wQt extends rt{constructor(){super({id:"editor.action.linkedEditing",label:be(1276,"Start Linked Editing"),precondition:Ne.and(J.writable,J.hasRenameProvider),kbOpts:{kbExpr:J.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const n=e.get(Hn),[s,r]=Array.isArray(t)&&t||[void 0,void 0];return kt.isUri(s)&&te.isIPosition(r)?n.openCodeEditor({resource:s},n.getActiveCodeEditor()).then(o=>{o&&(o.setPosition(r),o.invokeWithinContext(a=>(this.reportTelemetry(a,o),this.run(a,o))))},zt):super.runCommand(e,t)}run(e,t){const n=KL.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}}const CQt=ao.bindToContribution(KL.get);Xe(new CQt({id:"cancelLinkedEditingInput",precondition:j5e,handler:i=>i.clearRanges(),kbOpts:{kbExpr:J.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));function F5e(i,e,t,n){const s=i.ordered(e);return Bre(s.map(r=>async()=>{try{return await r.provideLinkedEditingRanges(e,t,n)}catch(o){Pr(o);return}}),r=>!!r&&ul(r==null?void 0:r.ranges))}Z("editor.linkedEditingBackground",{dark:ye.fromHex("#f00").transparent(.3),light:ye.fromHex("#f00").transparent(.3),hcDark:ye.fromHex("#f00").transparent(.3),hcLight:ye.white},S(1275,"Background color when the editor auto renames on type."));kc("_executeLinkedEditingProvider",(i,e,t)=>{const{linkedEditingRangeProvider:n}=i.get(lt);return F5e(n,e,t,pn.None)});Pn(KL.ID,KL,1);Ke(wQt);let SQt=class{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}};const k2=class k2{constructor(e){this._disposables=new _e;let t=[];for(const[n,s]of e){const r=n.links.map(o=>new SQt(o,s));t=k2._union(t,r),JC(n)&&(this._disposables??(this._disposables=new _e),this._disposables.add(n))}this.links=t}dispose(){var e;(e=this._disposables)==null||e.dispose(),this.links.length=0}static _union(e,t){const n=[];let s,r,o,a;for(s=0,o=0,r=e.length,a=t.length;s{try{const l=await o.provideLinks(e,t);l&&(n[a]=[l,o])}catch(l){Pr(l)}});await Promise.all(s);let r=new nB(ef(n));return t.isCancellationRequested&&(r.dispose(),r=nB.Empty),r}Rn.registerCommand("_executeLinkProvider",async(i,...e)=>{let[t,n]=e;Bn(t instanceof kt),typeof n!="number"&&(n=0);const{linkProvider:s}=i.get(lt),r=i.get(Is).getModel(t);if(!r)return[];const o=await B5e(s,r,pn.None);if(!o)return[];for(let l=0;l=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},v4=function(i,e){return function(t,n){e(t,n,i)}},Pee,Fw;let kM=(Fw=class extends se{static get(e){return e.getContribution(Pee.ID)}constructor(e,t,n,s,r){super(),this.editor=e,this.openerService=t,this.notificationService=n,this.languageFeaturesService=s,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=r.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new pi(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const o=this._register(new NW(e));this._register(o.onMouseMoveOrRelevantKeyDown(([a,l])=>{this._onEditorMouseMove(a,l)})),this._register(o.onExecute(a=>{this.onEditorMouseUp(a)})),this._register(o.onCancel(a=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(a=>{a.hasChanged(79)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(a=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(a=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(a=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(a=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(79))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=io(t=>B5e(this.providers,e,t));try{const t=new _o(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){zt(t)}finally{this.computePromise=null}}}updateDecorations(e){const t=this.editor.getOption(86)==="altKey",n=[],s=Object.keys(this.currentOccurrences);for(const o of s){const a=this.currentOccurrences[o];n.push(a.decorationId)}const r=[];if(e)for(const o of e)r.push(gE.decoration(o,t));this.editor.changeDecorations(o=>{const a=o.deltaDecorations(n,r);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let l=0,c=a.length;l{s.activate(r,n),this.activeLinkDecorationId=s.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(86)==="altKey";if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(n=>{t.deactivate(n,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,n=!1){if(!this.openerService)return;const{link:s}=e;s.resolve(pn.None).then(r=>{if(typeof r=="string"&&this.editor.hasModel()){const o=this.editor.getModel().uri;if(o.scheme===Ot.file&&r.startsWith(`${Ot.file}:`)){const a=kt.parse(r);if(a.scheme===Ot.file){const l=wf(a);let c=null;l.startsWith("/./")||l.startsWith("\\.\\")?c=`.${l.substr(1)}`:(l.startsWith("//./")||l.startsWith("\\\\.\\"))&&(c=`.${l.substr(2)}`),c&&(r=GIe(o,c))}}}return this.openerService.open(r,{openToSide:t,fromUserGesture:n,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},r=>{const o=r instanceof Error?r.message:r;o==="invalid"?this.notificationService.warn(S(1277,"Failed to open this link because it is not well-formed: {0}",s.url.toString())):o==="missing"?this.notificationService.warn(S(1278,"Failed to open this link because its target is missing.")):zt(r)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const n of t){const s=this.currentOccurrences[n.id];if(s)return s}return null}isEnabled(e,t){return!!(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey||e.isMiddleClick&&e.mouseMiddleClickAction==="openLink"))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&((e=this.activeLinksList)==null||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}},Pee=Fw,Fw.ID="editor.linkDetector",Fw);kM=Pee=kQt([v4(1,px),v4(2,nr),v4(3,lt),v4(4,Ju)],kM);const K1e={general:qt.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:qt.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class gE{static decoration(e,t){return{range:e.range,options:gE._getOptions(e,t,!1)}}static _getOptions(e,t,n){const s={...n?K1e.active:K1e.general};return s.hoverMessage=NQt(e,t),s}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,gE._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,gE._getOptions(this.link,t,!1))}}function NQt(i,e){const t=i.url&&/^command:/i.test(i.url.toString()),n=i.tooltip?i.tooltip:t?S(1279,"Execute command"):S(1280,"Follow link"),s=e?bn?S(1281,"cmd + click"):S(1282,"ctrl + click"):bn?S(1283,"option + click"):S(1284,"alt + click");if(i.url){let r="";if(/^command:/i.test(i.url.toString())){const a=i.url.toString().match(/^command:([^?#]+)/);if(a){const l=a[1];r=S(1285,"Execute command {0}",l)}}return new Ma("",!0).appendLink(i.url.toString(!0).replace(/ /g,"%20"),n,r).appendMarkdown(` (${s})`)}else return new Ma().appendText(`${n} (${s})`)}class EQt extends rt{constructor(){super({id:"editor.action.openLink",label:be(1286,"Open Link"),precondition:void 0})}run(e,t){const n=kM.get(t);if(!n||!t.hasModel())return;const s=t.getSelections();for(const r of s){const o=n.getLinkOccurrence(r.getEndPosition());o&&n.openLinkOccurrence(o,!1)}}}Pn(kM.ID,kM,1);Ke(EQt);const jce=class jce extends se{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown(t=>{const n=this._editor.getOption(133);n>=0&&t.target.type===6&&t.target.position.column>=n&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}};jce.ID="editor.contrib.longLinesHelper";let iB=jce;Pn(iB.ID,iB,2);const Fce=class Fce extends se{constructor(e){super(),this._editor=e;const t=Ts(this._editor),n=t.getOption(171);this._register(Pt(s=>{if(!n.read(s))return;const r=t.domNode.read(s);if(!r)return;const o=s.store.add(roe("scrollingSession",void 0));s.store.add(this._editor.onMouseDown(l=>{if(o.read(void 0)){o.set(void 0,void 0);return}if(!l.event.middleButton)return;l.event.stopPropagation(),l.event.preventDefault();const u=new _e,h=new fo(l.event.posx,l.event.posy),f=LQt(xt(r),h,u).map(v=>v.subtract(h).withThreshold(5)),m=r.getBoundingClientRect(),x=new fo(h.x-m.left,h.y-m.top);o.set({mouseDeltaAfterThreshold:f,initialMousePosInEditor:x,didScroll:!1,dispose:()=>u.dispose()},void 0),u.add(this._editor.onMouseUp(v=>{const _=o.read(void 0);_&&_.didScroll&&o.set(void 0,void 0)})),u.add(this._editor.onKeyDown(v=>{o.set(void 0,void 0)}))})),s.store.add(Pt(l=>{const c=o.read(l);if(!c)return;let u=Date.now();l.store.add(Pt(g=>{H8.instance.invalidateOnNextAnimationFrame(g);const f=Date.now(),m=f-u;u=f;const x=c.mouseDeltaAfterThreshold.read(void 0),v=m/32,_=x.scale(v),w=new fo(this._editor.getScrollLeft(),this._editor.getScrollTop());this._editor.setScrollPosition(DQt(w.add(_))),_.isZero()||(c.didScroll=!0)}));const h=we(g=>{const f=c.mouseDeltaAfterThreshold.read(g);let m="";return m+=f.y<0?"n":f.y>0?"s":"",m+=f.x<0?"w":f.x>0?"e":"",m});l.store.add(Pt(g=>{r.setAttribute("data-scroll-direction",h.read(g))}))}));const a=s.store.add(en.div({class:["scroll-editor-on-middle-click-dot",o.map(l=>l?"":"hidden")],style:{left:o.map(l=>l?l.initialMousePosInEditor.x:0),top:o.map(l=>l?l.initialMousePosInEditor.y:0)}}).toDisposableLiveElement());s.store.add(hN(r,a.element)),s.store.add(Pt(l=>{const c=o.read(l);r.classList.toggle("scroll-editor-on-middle-click-editor",!!c)}))}))}};Fce.ID="editor.contrib.middleScroll";let sB=Fce;function LQt(i,e,t){const n=Ft("pos",e);return t.add(de(i,"mousemove",s=>{n.set(new fo(s.pageX,s.pageY),void 0)})),n}function DQt(i){return{scrollLeft:i.x,scrollTop:i.y}}Pn(sB.ID,sB,2);const TQt=Z("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},S(1563,"Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Z("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},S(1564,"Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Z("editor.wordHighlightTextBackground",TQt,S(1565,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const IQt=Z("editor.wordHighlightBorder",{light:null,dark:null,hcDark:ys,hcLight:ys},S(1566,"Border color of a symbol during read-access, like reading a variable."));Z("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:ys,hcLight:ys},S(1567,"Border color of a symbol during write-access, like writing to a variable."));Z("editor.wordHighlightTextBorder",IQt,S(1568,"Border color of a textual occurrence for a symbol."));const AQt=Z("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",S(1569,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),RQt=Z("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",S(1570,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),MQt=Z("editorOverviewRuler.wordHighlightTextForeground",HAe,S(1571,"Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),PQt=qt.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Ks(RQt),position:zd.Center},minimap:{color:Ks(Q7),position:1}}),OQt=qt.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Ks(MQt),position:zd.Center},minimap:{color:Ks(Q7),position:1}}),jQt=qt.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Ks(HAe),position:zd.Center},minimap:{color:Ks(Q7),position:1}}),FQt=qt.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),BQt=qt.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Ks(AQt),position:zd.Center},minimap:{color:Ks(Q7),position:1}});function HQt(i){return i===IL.Write?PQt:i===IL.Text?OQt:BQt}function WQt(i){return i?FQt:jQt}Zu((i,e)=>{const t=i.getColor(Loe);t&&e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`)});var VQt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},zQt=function(i,e){return function(t,n){e(t,n,i)}},Oee;function T0(i,e){const t=e.filter(n=>!i.find(s=>s.equals(n)));if(t.length>=1){const n=t.map(r=>`line ${r.viewState.position.lineNumber} column ${r.viewState.position.column}`).join(", "),s=t.length===1?S(1288,"Cursor added: {0}",n):S(1289,"Cursors added: {0}",n);zg(s)}}class UQt extends rt{constructor(){super({id:"editor.action.insertCursorAbove",label:be(1298,"Add Cursor Above"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:ct.MenubarSelectionMenu,group:"3_multi",title:S(1290,"&&Add Cursor Above"),order:2}})}run(e,t,n){if(!t.hasModel())return;let s=!0;n&&n.logicalLine===!1&&(s=!1);const r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();const o=r.getCursorStates();r.setCursorStates(n.source,3,zo.addCursorUp(r,o,s)),r.revealTopMostCursor(n.source),T0(o,r.getCursorStates())}}class $Qt extends rt{constructor(){super({id:"editor.action.insertCursorBelow",label:be(1299,"Add Cursor Below"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:ct.MenubarSelectionMenu,group:"3_multi",title:S(1291,"A&&dd Cursor Below"),order:3}})}run(e,t,n){if(!t.hasModel())return;let s=!0;n&&n.logicalLine===!1&&(s=!1);const r=t._getViewModel();if(r.cursorConfig.readOnly)return;r.model.pushStackElement();const o=r.getCursorStates();r.setCursorStates(n.source,3,zo.addCursorDown(r,o,s)),r.revealBottomMostCursor(n.source),T0(o,r.getCursorStates())}}class qQt extends rt{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:be(1300,"Add Cursors to Line Ends"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:ct.MenubarSelectionMenu,group:"3_multi",title:S(1292,"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,n){if(!e.isEmpty()){for(let s=e.startLineNumber;s1&&n.push(new st(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const n=t.getModel(),s=t.getSelections(),r=t._getViewModel(),o=r.getCursorStates(),a=[];s.forEach(l=>this.getCursorsForSelection(l,n,a)),a.length>0&&t.setSelections(a),T0(o,r.getCursorStates())}}class KQt extends rt{constructor(){super({id:"editor.action.addCursorsToBottom",label:be(1301,"Add Cursors to Bottom"),precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections(),s=t.getModel().getLineCount(),r=[];for(let l=n[0].startLineNumber;l<=s;l++)r.push(new st(l,n[0].startColumn,l,n[0].endColumn));const o=t._getViewModel(),a=o.getCursorStates();r.length>0&&t.setSelections(r),T0(a,o.getCursorStates())}}class GQt extends rt{constructor(){super({id:"editor.action.addCursorsToTop",label:be(1302,"Add Cursors to Top"),precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getSelections(),s=[];for(let a=n[0].startLineNumber;a>=1;a--)s.push(new st(a,n[0].startColumn,a,n[0].endColumn));const r=t._getViewModel(),o=r.getCursorStates();s.length>0&&t.setSelections(s),T0(o,r.getCursorStates())}}class _4{constructor(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}}class NM{static create(e,t){if(!e.hasModel())return null;const n=t.getState();if(!e.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new NM(e,t,!1,n.searchString,n.wholeWord,n.matchCase,null);let s=!1,r,o;const a=e.getSelections();a.length===1&&a[0].isEmpty()?(s=!0,r=!0,o=!0):(r=n.wholeWord,o=n.matchCase);const l=e.getSelection();let c,u=null;if(l.isEmpty()){const h=e.getConfiguredWordAtPosition(l.getStartPosition());if(!h)return null;c=h.word,u=new st(l.startLineNumber,h.startColumn,l.startLineNumber,h.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` +`);return new NM(e,t,s,c,r,o,u)}constructor(e,t,n,s,r,o,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=s,this.wholeWord=r,this.matchCase=o,this.currentMatch=a}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new _4(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new _4(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const s=this.currentMatch;return this.currentMatch=null,s}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return n?new st(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new _4(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new _4(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const s=this.currentMatch;return this.currentMatch=null,s}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1);return n?new st(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(148):null,!1,1073741824)}}const Z9=class Z9 extends se{static get(e){return e.getContribution(Z9.ID)}constructor(e){super(),this._sessionDispose=this._register(new _e),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=NM.create(this._editor,e);if(!t)return;this._session=t;const n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(s=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(s=>{(s.matchCase||s.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new st(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const s=e.getState().matchCase;if(!H5e(this._editor.getModel(),t,s)){const o=this._editor.getModel(),a=[];for(let l=0,c=t.length;l0&&n.isRegex){const s=this._editor.getModel();n.searchScope?t=s.findMatches(n.searchString,n.searchScope,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(148):null,!1,1073741824):t=s.findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(148):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(n.searchScope)}if(t.length>0){const s=this._editor.getSelection();for(let r=0,o=t.length;rnew st(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn)))}}};Z9.ID="editor.contrib.multiCursorController";let GL=Z9;class qD extends rt{run(e,t){const n=GL.get(t);if(!n)return;const s=t._getViewModel();if(s){const r=s.getCursorStates(),o=wc.get(t);if(o)this._run(n,o);else{const a=e.get(ft).createInstance(wc,t);this._run(n,a),a.dispose()}T0(r,s.getCursorStates())}}}class YQt extends qD{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:be(1303,"Add Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:J.focus,primary:2082,weight:100},menuOpts:{menuId:ct.MenubarSelectionMenu,group:"3_multi",title:S(1293,"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class QQt extends qD{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:be(1304,"Add Selection to Previous Find Match"),precondition:void 0,menuOpts:{menuId:ct.MenubarSelectionMenu,group:"3_multi",title:S(1294,"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class XQt extends qD{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:be(1305,"Move Last Selection to Next Find Match"),precondition:void 0,kbOpts:{kbExpr:J.focus,primary:Or(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class ZQt extends qD{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:be(1306,"Move Last Selection to Previous Find Match"),precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class JQt extends qD{constructor(){super({id:"editor.action.selectHighlights",label:be(1307,"Select All Occurrences of Find Match"),precondition:void 0,kbOpts:{kbExpr:J.focus,primary:3114,weight:100},menuOpts:{menuId:ct.MenubarSelectionMenu,group:"3_multi",title:S(1295,"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class eXt extends qD{constructor(){super({id:"editor.action.changeAll",label:be(1308,"Change All Occurrences"),precondition:Ne.and(J.writable,J.editorTextFocus),kbOpts:{kbExpr:J.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class tXt{constructor(e,t,n,s,r){this._model=e,this._searchText=t,this._matchCase=n,this._wordSeparators=s,this._cachedFindMatches=null,this._modelVersionId=this._model.getVersionId(),r&&this._model===r._model&&this._searchText===r._searchText&&this._matchCase===r._matchCase&&this._wordSeparators===r._wordSeparators&&this._modelVersionId===r._modelVersionId&&(this._cachedFindMatches=r._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(e=>e.range),this._cachedFindMatches.sort(z.compareRangesUsingStarts)),this._cachedFindMatches}}var Bw;let rB=(Bw=class extends se{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new pi(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(s=>{this._isEnabled=e.getOption(122),this._isEnabledMultiline=e.getOption(124),this._maxLength=e.getOption(123)})),this._register(e.onDidChangeCursorSelection(s=>{this._isEnabled&&(s.selection.isEmpty()?s.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(s=>{this._setState(null)})),this._register(e.onDidChangeModelContent(s=>{this._isEnabled&&this.updateSoon.schedule()}));const n=wc.get(e);n&&this._register(n.getState().onFindReplaceStateChange(s=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(Oee._createState(this.state,this._isEnabled,this._isEnabledMultiline,this._maxLength,this.editor))}static _createState(e,t,n,s,r){if(!t||!r.hasModel())return null;if(!n){const h=r.getSelection();if(h.startLineNumber!==h.endLineNumber)return null}const o=GL.get(r);if(!o)return null;const a=wc.get(r);if(!a)return null;let l=o.getSession(a);if(!l){const h=r.getSelections();if(h.length>1){const f=a.getState().matchCase;if(!H5e(r.getModel(),h,f))return null}l=NM.create(r,a)}if(!l||l.currentMatch||/^[ \t]+$/.test(l.searchText)||s>0&&l.searchText.length>s)return null;const c=a.getState(),u=c.matchCase;if(c.isRevealed){let h=c.searchString;u||(h=h.toLowerCase());let g=l.searchText;if(u||(g=g.toLowerCase()),h===g&&l.matchCase===c.matchCase&&l.wholeWord===c.wholeWord&&!c.isRegex)return null}return new tXt(r.getModel(),l.searchText,l.matchCase,l.wholeWord?r.getOption(148):null,e)}_setState(e){if(this.state=e,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const n=this.state.findMatches(),s=this.editor.getSelections();s.sort(z.compareRangesUsingStarts);const r=[];for(let c=0,u=0,h=n.length,g=s.length;c=g)r.push(f),c++;else{const m=z.compareRangesUsingStarts(f,s[u]);m<0?((s[u].isEmpty()||!z.areIntersecting(f,s[u]))&&r.push(f),c++):(m>0||c++,u++)}}const o=this.editor.getOption(90)!=="off",a=this._languageFeaturesService.documentHighlightProvider.has(t)&&o,l=r.map(c=>({range:c,options:WQt(a)}));this._decorations.set(l)}dispose(){this._setState(null),super.dispose()}},Oee=Bw,Bw.ID="editor.contrib.selectionHighlighter",Bw);rB=Oee=VQt([zQt(1,lt)],rB);function H5e(i,e,t){const n=G1e(i,e[0],!t);for(let s=1,r=e.length;s{const[t,n,s]=e;Bn(kt.isUri(t)),Bn(te.isIPosition(n)),Bn(typeof s=="string"||!s);const r=i.get(lt),o=await i.get(bl).createModelReference(t);try{const a=await W5e(r.signatureHelpProvider,o.object.textEditorModel,te.lift(n),{triggerKind:fp.Invoke,isRetrigger:!1,triggerCharacter:s},pn.None);return a?(setTimeout(()=>a.dispose(),0),a.value):void 0}finally{o.dispose()}});var gv;(function(i){i.Default={type:0};class e{constructor(s,r){this.request=s,this.previouslyActiveHints=r,this.type=2}}i.Pending=e;class t{constructor(s){this.hints=s,this.type=1}}i.Active=t})(gv||(gv={}));const J9=class J9 extends se{constructor(e,t,n=J9.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new ie),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=gv.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Zn),this.triggerChars=new FF,this.retriggerChars=new FF,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new Uu(n),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(s=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(s=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(s=>this.onCursorChange(s))),this._register(this.editor.onDidChangeModelContent(s=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(s=>this.onDidType(s))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=gv.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const n=this.editor.getModel();if(!n||!this.providers.has(n))return;const s=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(s),t).catch(zt)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,s=this.editor.getOption(98).cycle;if((e<2||n)&&!s){this.cancel();return}this.updateActiveSignature(n&&s?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t===0,s=this.editor.getOption(98).cycle;if((e<2||n)&&!s){this.cancel();return}this.updateActiveSignature(n&&s?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new gv.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=this.state.type===1||this.state.type===2,n=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const s=this._pendingTriggers.reduce(sXt);this._pendingTriggers=[];const r={triggerKind:s.triggerKind,triggerCharacter:s.triggerCharacter,isRetrigger:t,activeSignatureHelp:n};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),a=this.editor.getPosition();this.state=new gv.Pending(io(l=>W5e(this.providers,o,a,r,l)),n);try{const l=await this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new gv.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=gv.Default),zt(l),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const n of t.signatureHelpTriggerCharacters||[])if(n.length){const s=n.charCodeAt(0);this.triggerChars.add(s),this.retriggerChars.add(s)}for(const n of t.signatureHelpRetriggerCharacters||[])n.length&&this.retriggerChars.add(n.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:fp.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:fp.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:fp.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(98).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}};J9.DEFAULT_DELAY=120;let jee=J9;function sXt(i,e){switch(e.triggerKind){case fp.Invoke:return e;case fp.ContentChange:return i;case fp.TriggerCharacter:default:return e}}var rXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Y1e=function(i,e){return function(t,n){e(t,n,i)}},Fee;const fd=Oe,oXt=ls("parameter-hints-next",Ee.chevronDown,S(1312,"Icon for show next parameter hint.")),aXt=ls("parameter-hints-previous",Ee.chevronUp,S(1313,"Icon for show previous parameter hint."));var Hw;let Bee=(Hw=class extends se{constructor(e,t,n,s){super(),this.editor=e,this.model=t,this.markdownRendererService=s,this.renderDisposeables=this._register(new _e),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.keyVisible=VC.Visible.bindTo(n),this.keyMultipleSignatures=VC.MultipleSignatures.bindTo(n)}createParameterHintDOMNodes(){const e=fd(".editor-widget.parameter-hints-widget"),t=De(e,fd(".phwrapper"));t.tabIndex=-1;const n=De(t,fd(".controls")),s=De(n,fd(".button"+Tt.asCSSSelector(aXt))),r=De(n,fd(".overloads")),o=De(n,fd(".button"+Tt.asCSSSelector(oXt)));this._register(de(s,"click",g=>{Vn.stop(g),this.previous()})),this._register(de(o,"click",g=>{Vn.stop(g),this.next()}));const a=fd(".body"),l=new GP(a,{alwaysConsumeMouseWheel:!0});this._register(l),t.appendChild(l.getDomNode());const c=De(a,fd(".signature")),u=De(a,fd(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:r,docs:u,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(g=>{this.visible&&this.editor.layoutContentWidget(this)}));const h=()=>{if(!this.domNodes)return;const g=this.editor.getOption(59),f=this.domNodes.element;f.style.fontSize=`${g.fontSize}px`,f.style.lineHeight=`${g.lineHeight/g.fontSize}`,f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",g.fontFamily),f.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",pc.fontFamily)};h(),this._register(He.chain(this.editor.onDidChangeConfiguration.bind(this.editor),g=>g.filter(f=>f.hasChanged(59)))(h)),this._register(this.editor.onDidLayoutChange(g=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var e;(e=this.domNodes)==null||e.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(e=this.domNodes)==null||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const s=De(this.domNodes.signature,fd(".code")),r=n.parameters.length>0,o=n.activeParameter??e.activeParameter;if(r)this.renderParameters(s,n,o);else{const c=De(s,fd("span"));c.textContent=n.label}const a=n.parameters[o];if(a!=null&&a.documentation){const c=fd("span.documentation");if(typeof a.documentation=="string")c.textContent=a.documentation;else{const u=this.renderMarkdownDocs(a.documentation);c.appendChild(u.element)}De(this.domNodes.docs,fd("p",{},c))}if(n.documentation!==void 0)if(typeof n.documentation=="string")De(this.domNodes.docs,fd("p",{},n.documentation));else{const c=this.renderMarkdownDocs(n.documentation);De(this.domNodes.docs,c.element)}const l=this.hasDocs(n,a);if(this.domNodes.signature.classList.toggle("has-docs",l),this.domNodes.docs.classList.toggle("empty",!l),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,a){let c="";const u=n.parameters[o];Array.isArray(u.label)?c=n.label.substring(u.label[0],u.label[1]):c=u.label,u.documentation&&(c+=typeof u.documentation=="string"?`, ${u.documentation}`:`, ${u.documentation.value}`),n.documentation&&(c+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==c&&($l(S(1314,"{0}, hint",c)),this.announcedLabel=c)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRendererService.render(e,{context:this.editor,asyncRenderCallback:()=>{var n;(n=this.domNodes)==null||n.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Uv(t.documentation).length>0||t&&typeof t.documentation=="object"&&Uv(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Uv(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Uv(e.documentation.value).length>0)}renderParameters(e,t,n){const[s,r]=this.getParameterLabelOffsets(t,n),o=document.createElement("span");o.textContent=t.label.substring(0,s);const a=document.createElement("span");a.textContent=t.label.substring(s,r),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(r),De(e,o,a,l)}getParameterLabelOffsets(e,t){const n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){const s=new RegExp(`(\\W|^)${Qc(n.label)}(?=\\W|$)`,"g");s.test(e.label);const r=s.lastIndex-n.label.length;return r>=0?[r,s.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return Fee.ID}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}},Fee=Hw,Hw.ID="editor.widget.parameterHintsWidget",Hw);Bee=Fee=rXt([Y1e(2,Bt),Y1e(3,Zh)],Bee);Z("editorHoverWidget.highlightForeground",oN,S(1315,"Foreground color of the active item in the parameter hint."));var lXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Q1e=function(i,e){return function(t,n){e(t,n,i)}},Hee,Ww;let YL=(Ww=class extends se{static get(e){return e.getContribution(Hee.ID)}constructor(e,t,n){super(),this.editor=e,this.model=this._register(new jee(e,n.signatureHelpProvider)),this._register(this.model.onChangedHints(s=>{var r;s?(this.widget.value.show(),this.widget.value.render(s)):(r=this.widget.rawValue)==null||r.hide()})),this.widget=new ba(()=>this._register(t.createInstance(Bee,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var e;(e=this.widget.rawValue)==null||e.previous()}next(){var e;(e=this.widget.rawValue)==null||e.next()}trigger(e){this.model.trigger(e,0)}},Hee=Ww,Ww.ID="editor.controller.parameterHints",Ww);YL=Hee=lXt([Q1e(1,ft),Q1e(2,lt)],YL);class cXt extends rt{constructor(){super({id:"editor.action.triggerParameterHints",label:be(1311,"Trigger Parameter Hints"),precondition:J.hasSignatureHelpProvider,kbOpts:{kbExpr:J.editorTextFocus,primary:3082,weight:100}})}run(e,t){const n=YL.get(t);n==null||n.trigger({triggerKind:fp.Invoke})}}Pn(YL.ID,YL,2);Ke(cXt);const Xle=175,Zle=ao.bindToContribution(YL.get);Xe(new Zle({id:"closeParameterHints",precondition:VC.Visible,handler:i=>i.cancel(),kbOpts:{weight:Xle,kbExpr:J.focus,primary:9,secondary:[1033]}}));Xe(new Zle({id:"showPrevParameterHint",precondition:Ne.and(VC.Visible,VC.MultipleSignatures),handler:i=>i.previous(),kbOpts:{weight:Xle,kbExpr:J.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));Xe(new Zle({id:"showNextParameterHint",precondition:Ne.and(VC.Visible,VC.MultipleSignatures),handler:i=>i.next(),kbOpts:{weight:Xle,kbExpr:J.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));const Bce=class Bce extends se{constructor(e){super(),this._editor=e,this._editorObs=Ts(this._editor),this._placeholderText=this._editorObs.getOption(100),this._state=ma({owner:this,equalsFn:UY},t=>{const n=this._placeholderText.read(t);if(n&&this._editorObs.valueIsEmpty.read(t))return{placeholder:n}}),this._shouldViewBeAlive=dXt(this,t=>{var n;return((n=this._state.read(t))==null?void 0:n.placeholder)!==void 0}),this._view=we(t=>{if(!this._shouldViewBeAlive.read(t))return;const n=Fn("div.editorPlaceholder");t.store.add(Pt(s=>{const r=this._state.read(s),o=(r==null?void 0:r.placeholder)!==void 0;n.root.style.display=o?"block":"none",n.root.innerText=(r==null?void 0:r.placeholder)??""})),t.store.add(Pt(s=>{const r=this._editorObs.layoutInfo.read(s);n.root.style.left=`${r.contentLeft}px`,n.root.style.width=r.contentWidth-r.verticalScrollbarWidth+"px",n.root.style.top=`${this._editor.getTopForLineNumber(0)}px`})),t.store.add(Pt(s=>{n.root.style.fontFamily=this._editorObs.getOption(58).read(s),n.root.style.fontSize=this._editorObs.getOption(61).read(s)+"px",n.root.style.lineHeight=this._editorObs.getOption(75).read(s)+"px"})),t.store.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:zi(0),position:zi(null),domNode:n.root}))}),this._view.recomputeInitiallyAndOnChange(this._store)}};Bce.ID="editor.contrib.placeholderText";let oB=Bce;function dXt(i,e){return dx(i,(t,n)=>n===!0?!0:e(t))}var uXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},hXt=function(i,e){return function(t,n){e(t,n,i)}};class gXt{constructor(e){this.instantiationService=e}init(...e){}}function fXt(i){return i()}let X1e=class extends gXt{constructor(e,t){super(t),this.init(e)}};X1e=uXt([hXt(1,ft)],X1e);Pn(oB.ID,fXt(()=>oB),0);Z("editor.placeholder.foreground",rPt,S(1334,"Foreground color of the placeholder text in the editor."));const $W=ln("textResourceConfigurationService"),V5e=ln("textResourcePropertiesService");var pXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},y4=function(i,e){return function(t,n){e(t,n,i)}};const KD=new Ze("renameInputVisible",!1,S(1391,"Whether the rename input widget is visible"));new Ze("renameInputFocused",!1,S(1392,"Whether the rename input widget is focused"));let Wee=class{constructor(e,t,n,s,r,o){this._editor=e,this._acceptKeybindings=t,this._themeService=n,this._keybindingService=s,this._logService=o,this.allowEditorOverflow=!0,this._disposables=new _e,this._visibleContextKey=KD.bindTo(r),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new _o,this._inputWithButton=new mXt,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(59)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new Jle(this._domNode,{fontInfo:this._editor.getOption(59),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange(()=>{var e,t,n;((e=this._renameCandidateListView)==null?void 0:e.focusedCandidate)!==void 0&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??(this._timeBeforeFirstInputFieldEdit=this._beforeFirstInputFieldEditSW.elapsed()),((t=this._renameCandidateProvidersCts)==null?void 0:t.token.isCancellationRequested)===!1&&this._renameCandidateProvidersCts.cancel(),(n=this._renameCandidateListView)==null||n.clearFocus()})),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const t=e.getColor(RD),n=e.getColor(Aoe);this._domNode.style.backgroundColor=String(e.getColor(Fd)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=n?`1px solid ${n}`:"",this._domNode.style.color=String(e.getColor(WAe)??"");const s=e.getColor(VAe);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(CQ)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(CQ)??""),this._inputWithButton.domNode.style.borderWidth=s?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=s?"solid":"none",this._inputWithButton.domNode.style.borderColor=(s==null?void 0:s.toString())??"none"}_updateFont(){if(this._domNode===void 0)return;Bn(this._label!==void 0,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(59);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return e*.8}getPosition(){if(!this._visible||!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=X_(this.getDomNode().ownerDocument.body),t=Zs(this._editor.getDomNode()),n=this._getTopForPosition();this._nPxAvailableAbove=n+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const s=this._editor.getOption(75),{totalHeight:r}=EM.getLayoutInfo({lineHeight:s}),o=this._nPxAvailableBelow>r*6?[2,1]:[1,2];return{position:this._position,preference:o}}beforeRender(){var n,s;const[e,t]=this._acceptKeybindings;return this._label.innerText=S(1393,"{0} to Rename, {1} to Preview",(n=this._keybindingService.lookupKeybinding(e))==null?void 0:n.getLabel(),(s=this._keybindingService.lookupKeybinding(t))==null?void 0:s.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(e===null){this.cancelInput(!0,"afterRender (because position is null)");return}if(!this._editor.hasModel()||!this._editor.getDomNode())return;Bn(this._renameCandidateListView),Bn(this._nPxAvailableAbove!==void 0),Bn(this._nPxAvailableBelow!==void 0);const t=cb(this._inputWithButton.domNode),n=cb(this._label);let s;e===2?s=this._nPxAvailableBelow:s=this._nPxAvailableAbove,this._renameCandidateListView.layout({height:s-n-t,width:Oc(this._inputWithButton.domNode)})}acceptInput(e){var t;this._trace("invoking acceptInput"),(t=this._currentAcceptInput)==null||t.call(this,e)}cancelInput(e,t){var n;(n=this._currentCancelInput)==null||n.call(this,e)}focusNextRenameSuggestion(){var e;(e=this._renameCandidateListView)!=null&&e.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){var e;(e=this._renameCandidateListView)!=null&&e.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,n,s,r){const{start:o,end:a}=this._getSelection(e,t);this._renameCts=r;const l=new _e;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,s===void 0?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=s,this._requestRenameCandidates(t,!1),l.add(de(this._inputWithButton.button,"click",()=>this._requestRenameCandidates(t,!0))),l.add(de(this._inputWithButton.button,Fe.KEY_DOWN,u=>{const h=new ki(u);(h.equals(3)||h.equals(10))&&(h.stopPropagation(),h.preventDefault(),this._requestRenameCandidates(t,!0))}))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",n),this._position=new te(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",o.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max((e.endColumn-e.startColumn)*1.1,20),this._beforeFirstInputFieldEditSW.reset(),l.add(dt(()=>{this._renameCts=void 0,r.dispose(!0)})),l.add(dt(()=>{this._renameCandidateProvidersCts!==void 0&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)})),l.add(dt(()=>this._candidates.clear()));const c=new eS;return c.p.finally(()=>{l.dispose(),this._hide()}),this._currentCancelInput=u=>{var h;return this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,(h=this._renameCandidateListView)==null||h.clearCandidates(),c.complete(u),!0},this._currentAcceptInput=u=>{this._trace("invoking _currentAcceptInput"),Bn(this._renameCandidateListView!==void 0);const h=this._renameCandidateListView.nCandidates;let g,f;const m=this._renameCandidateListView.focusedCandidate;if(m!==void 0?(this._trace("using new name from renameSuggestion"),g=m,f={k:"renameSuggestion"}):(this._trace("using new name from inputField"),g=this._inputWithButton.input.value,f=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),g===t||g.trim().length===0){this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)");return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),c.complete({newName:g,wantsPreview:n&&u,stats:{source:f,nRenameSuggestions:h,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})},l.add(r.token.onCancellationRequested(()=>this.cancelInput(!0,"cts.token.onCancellationRequested"))),l.add(this._editor.onDidBlurEditorWidget(()=>{var u;return this.cancelInput(!((u=this._domNode)!=null&&u.ownerDocument.hasFocus()),"editor.onDidBlurEditorWidget")})),this._show(),c.p}_requestRenameCandidates(e,t){if(this._requestRenameCandidatesOnce!==void 0&&(this._renameCandidateProvidersCts!==void 0&&this._renameCandidateProvidersCts.dispose(!0),Bn(this._renameCts),this._inputWithButton.buttonState!=="stop")){this._renameCandidateProvidersCts=new vs;const n=t?TR.Invoke:TR.Automatic,s=this._requestRenameCandidatesOnce(n,this._renameCandidateProvidersCts.token);if(s.length===0){this._inputWithButton.setSparkleButton();return}t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(s,e,this._renameCts.token)}}_getSelection(e,t){Bn(this._editor.hasModel());const n=this._editor.getSelection();let s=0,r=t.length;return!z.isEmpty(n)&&!z.spansMultipleLines(n)&&z.containsRange(e,n)&&(s=Math.max(0,n.startColumn-e.startColumn),r=Math.min(e.endColumn,n.endColumn)-e.startColumn),{start:s,end:r}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))},100)}async _updateRenameCandidates(e,t,n){const s=(...c)=>this._trace("_updateRenameCandidates",...c);s("start");const r=await pL(Promise.allSettled(e),n);if(this._inputWithButton.setSparkleButton(),r===void 0){s("returning early - received updateRenameCandidates results - undefined");return}const o=r.flatMap(c=>c.status==="fulfilled"&&Ao(c.value)?c.value:[]);s(`received updateRenameCandidates results - total (unfiltered) ${o.length} candidates.`);const a=qb(o,c=>c.newSymbolName);s(`distinct candidates - ${a.length} candidates.`);const l=a.filter(({newSymbolName:c})=>c.trim().length>0&&c!==this._inputWithButton.input.value&&c!==t&&!this._candidates.has(c));if(s(`valid distinct candidates - ${o.length} candidates.`),l.forEach(c=>this._candidates.add(c.newSymbolName)),l.length<1){s("returning early - no valid distinct candidates");return}s("setting candidates"),this._renameCandidateListView.setCandidates(l),s("asking editor to re-layout"),this._editor.layoutContentWidget(this)}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};Wee=pXt([y4(2,Ws),y4(3,zn),y4(4,Bt),y4(5,Ji)],Wee);class Jle{constructor(e,t){this._disposables=new _e,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=Jle._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._disposables.add(this._listWidget.onDidChangeFocus(n=>{n.elements.length===1&&t.onFocusChange(n.elements[0].newSymbolName)},this._disposables)),this._disposables.add(this._listWidget.onDidChangeSelection(n=>{n.elements.length===1&&t.onSelectionChange()},this._disposables)),this._disposables.add(this._listWidget.onDidBlur(n=>{this._listWidget.setFocus([])})),this._listWidget.style(uS({listInactiveFocusForeground:CR,listInactiveFocusBackground:SR}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);const t=this._pickListHeight(this._listWidget.length),n=this._pickListWidth(e);this._listWidget.layout(t,n),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${n}px`,zg(S(1394,"Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(this._listWidget.length===0)return;const e=this._listWidget.getSelectedElements()[0];if(e!==void 0)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];if(t!==void 0)return t.newSymbolName}focusNext(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}focusPrevious(){if(this._listWidget.length===0)return!1;const e=this._listWidget.getFocus();if(e.length===0){this._listWidget.focusLast();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}else{if(e[0]===0)return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const t=this._listWidget.getFocus()[0];return this._listWidget.reveal(t),!0}}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=EM.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,this._candidateViewHeight*7)}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map(s=>s.newSymbolName.length))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,n){const s=new class{getTemplateId(o){return"candidate"}getHeight(o){return t}},r=new class{constructor(){this.templateId="candidate"}renderTemplate(o){return new EM(o,n)}renderElement(o,a,l){l.populate(o)}disposeTemplate(o){o.dispose()}};return new Jd("NewSymbolNameCandidates",e,s,[r],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class mXt{constructor(){this._buttonHoverContent="",this._onDidInputChange=new ie,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new _e}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",S(1395,"Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=S(1396,"Generate New Name Suggestions"),this._buttonCancelHoverText=S(1397,"Cancel"),this._buttonHoverContent=this._buttonGenHoverText,this._disposables.add(Xh().setupDelayedHover(this._buttonNode,()=>({content:this._buttonHoverContent,style:1}))),this._domNode.appendChild(this._buttonNode),this._disposables.add(de(this.input,Fe.INPUT,()=>this._onDidInputChange.fire())),this._disposables.add(de(this.input,Fe.KEY_DOWN,e=>{const t=new ki(e);(t.keyCode===15||t.keyCode===17)&&this._onDidInputChange.fire()})),this._disposables.add(de(this.input,Fe.CLICK,()=>this._onDidInputChange.fire())),this._disposables.add(de(this.input,Fe.FOCUS,()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"})),this._disposables.add(de(this.input,Fe.BLUR,()=>{this.domNode.style.outline="none"}))),this._domNode}get input(){return Bn(this._inputNode),this._inputNode}get button(){return Bn(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??(this._sparkleIcon=Gg(Ee.sparkle)),Qo(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHoverContent=this._buttonGenHoverText,this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??(this._stopIcon=Gg(Ee.stopCircle)),Qo(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHoverContent=this._buttonCancelHoverText,this.input.focus()}dispose(){this._disposables.dispose()}}const N2=class N2{constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${N2._PADDING}px`;const n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.width=n.style.height=`${t.lineHeight*.8}px`,this._domNode.appendChild(n),this._icon=Gg(Ee.sparkle),this._icon.style.display="none",n.appendChild(this._icon),this._label=document.createElement("div"),Po(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){var n;const t=!!((n=e.tags)!=null&&n.includes(MQ.AIGenerated));this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+N2._PADDING*2}}dispose(){}};N2._PADDING=2;let EM=N2;var bXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},_y=function(i,e){return function(t,n){e(t,n,i)}},Vee;class ece{constructor(e,t,n){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=n.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join(` +`):void 0}:{range:z.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` +`):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,n,s){const r=this._providers[t];if(!r)return{edits:[],rejectReason:n.join(` +`)};const o=await r.provideRenameEdits(this.model,this.position,e,s);if(o){if(o.rejectReason)return this._provideRenameEdits(e,t+1,n.concat(o.rejectReason),s)}else return this._provideRenameEdits(e,t+1,n.concat(S(1380,"No result.")),s);return o}}async function xXt(i,e,t,n){const s=new ece(e,t,i),r=await s.resolveRenameLocation(pn.None);return r!=null&&r.rejectReason?{edits:[],rejectReason:r.rejectReason}:s.provideRenameEdits(n,pn.None)}var Vw;let d0=(Vw=class{static get(e){return e.getContribution(Vee.ID)}constructor(e,t,n,s,r,o,a,l){this.editor=e,this._instaService=t,this._notificationService=n,this._bulkEditService=s,this._progressService=r,this._logService=o,this._configService=a,this._languageFeaturesService=l,this._disposableStore=new _e,this._cts=new vs,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(Wee,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var m,x;const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new vs,!this.editor.hasModel()){e("editor has no model");return}const t=this.editor.getPosition(),n=new ece(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!n.hasProvider()){e("skeleton has no provider");return}const s=new ex(this.editor,5,void 0,this._cts.token);let r;try{e("resolving rename location");const v=n.resolveRenameLocation(s.token);this._progressService.showWhile(v,250),r=await v,e("resolved rename location")}catch(v){v instanceof Vu?e("resolve rename location cancelled",JSON.stringify(v,null," ")):(e("resolve rename location failed",v instanceof Error?v:JSON.stringify(v,null," ")),(typeof v=="string"||Ib(v))&&((m=Kc.get(this.editor))==null||m.showMessage(v||S(1381,"An unknown error occurred while resolving rename location"),t)));return}finally{s.dispose()}if(!r){e("returning early - no loc");return}if(r.rejectReason){e(`returning early - rejected with reason: ${r.rejectReason}`,r.rejectReason),(x=Kc.get(this.editor))==null||x.showMessage(r.rejectReason,t);return}if(s.token.isCancellationRequested){e("returning early - cts1 cancelled");return}const o=new ex(this.editor,5,r.range,this._cts.token),a=this.editor.getModel(),l=this._languageFeaturesService.newSymbolNamesProvider.all(a),c=await Promise.all(l.map(async v=>[v,await v.supportsAutomaticNewSymbolNamesTriggerKind??!1])),u=(v,_)=>{let w=c.slice();return v===TR.Automatic&&(w=w.filter(([k,C])=>C)),w.map(([k])=>k.provideNewSymbolNames(a,r.range,v,_))};e("creating rename input field and awaiting its result");const h=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),g=await this._renameWidget.getInput(r.range,r.text,h,l.length>0?u:void 0,o);if(e("received response from rename input field"),typeof g=="boolean"){e(`returning early - rename input field response - ${g}`),g&&this.editor.focus(),o.dispose();return}this.editor.focus(),e("requesting rename edits");const f=pL(n.provideRenameEdits(g.newName,o.token),o.token).then(async v=>{if(!v){e("returning early - no rename edits result");return}if(!this.editor.hasModel()){e("returning early - no model after rename edits are provided");return}if(v.rejectReason){e(`returning early - rejected with reason: ${v.rejectReason}`),this._notificationService.info(v.rejectReason);return}this.editor.setSelection(z.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(v,{editor:this.editor,showPreview:g.wantsPreview,label:S(1382,"Renaming '{0}' to '{1}'",r==null?void 0:r.text,g.newName),code:"undoredo.rename",quotableLabel:S(1383,"Renaming {0} to {1}",r==null?void 0:r.text,g.newName),respectAutoSaveConfig:!0,reason:Aa.rename()}).then(_=>{e("edits applied"),_.ariaSummary&&$l(S(1384,"Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,g.newName,_.ariaSummary))}).catch(_=>{e(`error when applying edits ${JSON.stringify(_,null," ")}`),this._notificationService.error(S(1385,"Rename failed to apply edits")),this._logService.error(_)})},v=>{e("error when providing rename edits",JSON.stringify(v,null," ")),this._notificationService.error(S(1386,"Rename failed to compute edits")),this._logService.error(v)}).finally(()=>{o.dispose()});return e("returning rename operation"),this._progressService.showWhile(f,250),f}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}},Vee=Vw,Vw.ID="editor.contrib.renameController",Vw);d0=Vee=bXt([_y(1,ft),_y(2,nr),_y(3,aO),_y(4,Jb),_y(5,Ji),_y(6,$W),_y(7,lt)],d0);class vXt extends rt{constructor(){super({id:"editor.action.rename",label:be(1388,"Rename Symbol"),precondition:Ne.and(J.writable,J.hasRenameProvider),kbOpts:{kbExpr:J.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1},canTriggerInlineEdits:!0})}runCommand(e,t){const n=e.get(Hn),[s,r]=Array.isArray(t)&&t||[void 0,void 0];return kt.isUri(s)&&te.isIPosition(r)?n.openCodeEditor({resource:s},n.getActiveCodeEditor()).then(o=>{o&&(o.setPosition(r),o.invokeWithinContext(a=>(this.reportTelemetry(a,o),this.run(a,o))))},zt):super.runCommand(e,t)}run(e,t){const n=e.get(Ji),s=d0.get(t);return s?(n.trace("[RenameAction] got controller, running..."),s.run()):(n.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}Pn(d0.ID,d0,4);Ke(vXt);const tce=ao.bindToContribution(d0.get);Xe(new tce({id:"acceptRenameInput",precondition:KD,handler:i=>i.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:Ne.and(J.focus,Ne.not("isComposing")),primary:3}}));Xe(new tce({id:"acceptRenameInputWithPreview",precondition:Ne.and(KD,Ne.has("config.editor.rename.enablePreview")),handler:i=>i.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:Ne.and(J.focus,Ne.not("isComposing")),primary:2051}}));Xe(new tce({id:"cancelRenameInput",precondition:KD,handler:i=>i.cancelRenameInput(),kbOpts:{weight:199,kbExpr:J.focus,primary:9,secondary:[1033]}}));ci(class extends Fo{constructor(){super({id:"focusNextRenameSuggestion",title:{...be(1389,"Focus Next Rename Suggestion")},precondition:KD,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(Hn).getFocusedCodeEditor();if(!t)return;const n=d0.get(t);n&&n.focusNextRenameSuggestion()}});ci(class extends Fo{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...be(1390,"Focus Previous Rename Suggestion")},precondition:KD,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(Hn).getFocusedCodeEditor();if(!t)return;const n=d0.get(t);n&&n.focusPreviousRenameSuggestion()}});kc("_executeDocumentRenameProvider",function(i,e,t,...n){const[s]=n;Bn(typeof s=="string");const{renameProvider:r}=i.get(lt);return xXt(r,e,t,s)});kc("_executePrepareRename",async function(i,e,t){const{renameProvider:n}=i.get(lt),r=await new ece(e,t,n).resolveRenameLocation(pn.None);if(r!=null&&r.rejectReason)throw new Error(r.rejectReason);return r});Hs.as(tf.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:6,description:S(1387,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var _Xt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Z1e=function(i,e){return function(t,n){e(t,n,i)}},QE;let aB=(QE=class extends se{constructor(e,t,n){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=n,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(81)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(e.onDidChangeModelLanguage(s=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0)})),this._register(t.onDidChange(s=>{var o;const r=(o=this.editor.getModel())==null?void 0:o.getLanguageId();r&&s.affects(r)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(81)),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(e.onDidChangeConfiguration(s=>{this.options&&!s.hasChanged(81)||(this.options=this.createOptions(e.getOption(81)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))})),this._register(this.editor.onDidChangeModelContent(s=>{this.computeSectionHeaders.schedule()})),this._register(e.onDidChangeModelTokens(s=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)})),this.computeSectionHeaders=this._register(new pi(()=>{this.findSectionHeaders()},250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const n=this.languageConfigurationService.getLanguageConfiguration(t).comments,s=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;if(!(!n&&!(s!=null&&s.markers)))return{foldingRules:s,markSectionHeaderRegex:e.markSectionHeaderRegex,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}}findSectionHeaders(){var n,s;if(!this.editor.hasModel()||!((n=this.options)!=null&&n.findMarkSectionHeaders)&&!((s=this.options)!=null&&s.findRegionSectionHeaders))return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then(r=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(r)})}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter(r=>{if(!r.shouldBeInComments)return!0;const o=t.validateRange(r.range),a=t.tokenization.getLineTokens(o.startLineNumber),l=a.findTokenIndexAtOffset(o.startColumn-1),c=a.getStandardTokenType(l);return a.getLanguageId(l)===t.getLanguageId()&&c===1}));const n=Object.values(this.currentOccurrences).map(r=>r.decorationId),s=e.map(r=>yXt(r));this.editor.changeDecorations(r=>{const o=r.deltaDecorations(n,s);this.currentOccurrences={};for(let a=0,l=o.length;a=this._minimumTimeBetweenRuns&&(this._lastRun=t,e())}}class r2{static create(e,t){return new r2(e,new zee(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e&&new z(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn)}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,n,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber,[s,r,o]=this._tokens.split(t,e.startColumn-1,n,e.endColumn-1);return[new r2(this._startLineNumber,s),new r2(this._startLineNumber+o,r)]}applyEdit(e,t){const[n,s,r]=i0(t);this.acceptEdit(e,n,s,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,n,s,r){this._acceptDeleteRange(e),this._acceptInsertText(new te(e.startLineNumber,e.startColumn),t,n,s,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,n=e.endLineNumber-this._startLineNumber;if(n<0){const r=n-t;this._startLineNumber-=r;return}const s=this._tokens.getMaxDeltaLine();if(!(t>=s+1)){if(t<0&&n>=s+1){this._startLineNumber=0,this._tokens.clear();return}if(t<0){const r=-t;this._startLineNumber-=r,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}_acceptInsertText(e,t,n,s,r){if(t===0&&n===0)return;const o=e.lineNumber-this._startLineNumber;if(o<0){this._startLineNumber+=t;return}const a=this._tokens.getMaxDeltaLine();o>=a+1||this._tokens.acceptInsertText(o,e.column-1,t,n,s,r)}reportIfInvalid(e){this._tokens.reportIfInvalid(e,this._startLineNumber)}}const yv=class yv{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let n=0;ne)n=s-1;else{let o=s;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let a=s;for(;ae||g===e&&m>=t)&&(ge||m===e&&v>=t){if(mr?x-=r-n:x=n;else if(f===t&&m===n)if(f===s&&x>r)x-=r-n;else{u=!0;continue}else if(fr)f=t,m=n,x=m+(x-r);else{u=!0;continue}else if(f>s){if(l===0&&!u){c=a;break}f-=l}else if(f===s&&m>=r)e&&f===0&&(m+=e,x+=e),f-=l,m-=r-n,x-=r-n;else throw new Error("Not possible!");const _=4*c;o[_]=f,o[_+1]=m,o[_+2]=x,o[_+3]=v,c++}this._tokenCount=c}acceptInsertText(e,t,n,s,r,o){const a=n===0&&s===1&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),l=this._tokens,c=this._tokenCount;for(let u=0;u{console.error("Invalid Semantic Tokens Data From Extension: lineNumber < 1")}):s>e.getLineCount()?yv._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: lineNumber > model.getLineCount()")}):this._getEndCharacter(n)>e.getLineLength(s)&&yv._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: end character > model.getLineLength(lineNumber)")})}}};yv._rateLimiter=new wXt(10/60);let zee=yv;class J1e{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}var CXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},yK=function(i,e){return function(t,n){e(t,n,i)}};let Uee=class{constructor(e,t,n,s){this._legend=e,this._themeService=t,this._languageService=n,this._logService=s,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new $ee}getMetadata(e,t,n){const s=this._languageService.languageIdCodec.encodeLanguageId(n),r=this._hashTable.get(e,t,s);let o;if(r)o=r.metadata;else{let a=this._legend.tokenTypes[e];const l=[];if(a){let c=t;for(let h=0;c>0&&h>1;const u=this._themeService.getColorTheme().getTokenStyleMetadata(a,l,n);if(typeof u>"u")o=2147483647;else{if(o=0,typeof u.italic<"u"){const h=(u.italic?1:0)<<11;o|=h|1}if(typeof u.bold<"u"){const h=(u.bold?2:0)<<11;o|=h|2}if(typeof u.underline<"u"){const h=(u.underline?4:0)<<11;o|=h|4}if(typeof u.strikethrough<"u"){const h=(u.strikethrough?8:0)<<11;o|=h|8}if(u.foreground){const h=u.foreground<<15;o|=h|16}o===0&&(o=2147483647)}}else o=2147483647,a="not-in-legend";this._hashTable.add(e,t,s,o)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,n,s,r){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${n}: The provided start offset ${s} is outside the previous data (length ${r}).`))}};Uee=CXt([yK(1,Ws),yK(2,tr),yK(3,Ji)],Uee);function z5e(i,e,t){const n=i.data,s=i.data.length/5|0,r=Math.max(Math.ceil(s/1024),400),o=[];let a=0,l=1,c=0;for(;au&&n[5*w]===0;)w--;if(w-1===u){let k=h;for(;k+1D)e.warnOverlappingSemanticTokens(E,D+1);else{const j=e.getMetadata(R,P,t);j!==2147483647&&(m===0&&(m=E),g[f]=E-m,g[f+1]=D,g[f+2]=I,g[f+3]=j,f+=4,x=E,v=I)}l=E,c=D,a++}f!==g.length&&(g=g.subarray(0,f));const _=r2.create(m,g);o.push(_)}return o}class SXt{constructor(e,t,n,s){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=n,this.metadata=s,this.next=null}}const Um=class Um{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=Um._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const r=this._elements;this._currentLengthIndex++,this._currentLength=Um._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?t[0]:[]}async function K5e(i,e,t,n,s){const r=DXt(i,e),o=await Promise.all(r.map(async a=>{let l,c=null;try{l=await a.provideDocumentSemanticTokens(e,a===t?n:null,s)}catch(u){c=u,l=null}return(!l||!KW(l)&&!$5e(l))&&(l=null),new LXt(a,l,c)}));for(const a of o){if(a.error)throw a.error;if(a.tokens)return a}return o.length>0?o[0]:null}function TXt(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:null}class IXt{constructor(e,t){this.provider=e,this.tokens=t}}function AXt(i,e){return i.has(e)}function G5e(i,e){const t=i.orderedGroups(e);return t.length>0?t[0]:[]}async function nce(i,e,t,n){const s=G5e(i,e),r=await Promise.all(s.map(async o=>{let a;try{a=await o.provideDocumentRangeSemanticTokens(e,t,n)}catch(l){Pr(l),a=null}return(!a||!KW(a))&&(a=null),new IXt(o,a)}));for(const o of r)if(o.tokens)return o;return r.length>0?r[0]:null}Rn.registerCommand("_provideDocumentSemanticTokensLegend",async(i,...e)=>{const[t]=e;Bn(t instanceof kt);const n=i.get(Is).getModel(t);if(!n)return;const{documentSemanticTokensProvider:s}=i.get(lt),r=TXt(s,n);return r?r[0].getLegend():i.get(es).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)});Rn.registerCommand("_provideDocumentSemanticTokens",async(i,...e)=>{const[t]=e;Bn(t instanceof kt);const n=i.get(Is).getModel(t);if(!n)return;const{documentSemanticTokensProvider:s}=i.get(lt);if(!q5e(s,n))return i.get(es).executeCommand("_provideDocumentRangeSemanticTokens",t,n.getFullModelRange());const r=await K5e(s,n,null,null,pn.None);if(!r)return;const{provider:o,tokens:a}=r;if(!a||!KW(a))return;const l=U5e({id:0,type:"full",data:a.data});return a.resultId&&o.releaseDocumentSemanticTokens(a.resultId),l});Rn.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(i,...e)=>{const[t,n]=e;Bn(t instanceof kt);const s=i.get(Is).getModel(t);if(!s)return;const{documentRangeSemanticTokensProvider:r}=i.get(lt),o=G5e(r,s);if(o.length===0)return;if(o.length===1)return o[0].getLegend();if(!n||!z.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),o[0].getLegend();const a=await nce(r,s,z.lift(n),pn.None);if(a)return a.provider.getLegend()});Rn.registerCommand("_provideDocumentRangeSemanticTokens",async(i,...e)=>{const[t,n]=e;Bn(t instanceof kt),Bn(z.isIRange(n));const s=i.get(Is).getModel(t);if(!s)return;const{documentRangeSemanticTokensProvider:r}=i.get(lt),o=await nce(r,s,z.lift(n),pn.None);if(!(!o||!o.tokens))return U5e({id:0,type:"full",data:o.tokens.data})});const ice="editor.semanticHighlighting";function Dj(i,e,t){var s;const n=(s=t.getValue(ice,{overrideIdentifier:i.getLanguageId(),resource:i.uri}))==null?void 0:s.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}var Y5e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Gf=function(i,e){return function(t,n){e(t,n,i)}},dv;let qee=class extends se{constructor(e,t,n,s,r,o){super(),this._watchers=new Sr;const a=u=>{var h;(h=this._watchers.get(u.uri))==null||h.dispose(),this._watchers.set(u.uri,new Kee(u,e,n,r,o))},l=(u,h)=>{h.dispose(),this._watchers.delete(u.uri)},c=()=>{for(const u of t.getModels()){const h=this._watchers.get(u.uri);Dj(u,n,s)?h||a(u):h&&l(u,h)}};t.getModels().forEach(u=>{Dj(u,n,s)&&a(u)}),this._register(t.onModelAdded(u=>{Dj(u,n,s)&&a(u)})),this._register(t.onModelRemoved(u=>{const h=this._watchers.get(u.uri);h&&l(u,h)})),this._register(s.onDidChangeConfiguration(u=>{u.affectsConfiguration(ice)&&c()})),this._register(n.onDidColorThemeChange(c))}dispose(){ii(this._watchers.values()),this._watchers.clear(),super.dispose()}};qee=Y5e([Gf(0,qW),Gf(1,Is),Gf(2,Ws),Gf(3,Zt),Gf(4,Ju),Gf(5,lt)],qee);var W_;let Kee=(W_=class extends se{constructor(e,t,n,s,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentSemanticTokens",{min:dv.REQUEST_MIN_DELAY,max:dv.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new pi(()=>this._fetchDocumentSemanticTokensNow(),dv.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const o=()=>{ii(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const a of this._provider.all(e))typeof a.onDidChange=="function"&&this._documentProvidersChangeListeners.push(a.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};o(),this._register(this._provider.onDidChange(()=>{o(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(n.onDidColorThemeChange(a=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),ii(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!q5e(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const e=new vs,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,s=K5e(this._provider,this._model,t,n,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const r=[],o=this._model.onDidChangeContent(l=>{r.push(l)}),a=new _o(!1);s.then(l=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),!l)this._setDocumentSemanticTokens(null,null,null,r);else{const{provider:c,tokens:u}=l,h=this._semanticTokensStylingService.getStyling(c);this._setDocumentSemanticTokens(c,u||null,h,r)}},l=>{l&&(Zd(l)||typeof l.message=="string"&&l.message.indexOf("busy")!==-1)||zt(l),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),(r.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(e,t,n,s,r){r=Math.min(r,n.length-s,e.length-t);for(let o=0;o{(s.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!n){this._model.tokenization.setSemanticTokens(null,!1);return}if(!t){this._model.tokenization.setSemanticTokens(null,!0),o();return}if($5e(t)){if(!r){this._model.tokenization.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:r.data};else{let a=0;for(const g of t.edits)a+=(g.data?g.data.length:0)-g.deleteCount;const l=r.data,c=new Uint32Array(l.length+a);let u=l.length,h=c.length;for(let g=t.edits.length-1;g>=0;g--){const f=t.edits[g];if(f.start>l.length){n.warnInvalidEditStart(r.resultId,t.resultId,g,f.start,l.length),this._model.tokenization.setSemanticTokens(null,!0);return}const m=u-(f.start+f.deleteCount);m>0&&(dv._copy(l,u-m,c,h-m,m),h-=m),f.data&&(dv._copy(f.data,0,c,h-f.data.length,f.data.length),h-=f.data.length),u=f.start}u>0&&dv._copy(l,0,c,0,u),t={resultId:t.resultId,data:c}}}if(KW(t)){this._currentDocumentResponse=new RXt(e,t.resultId,t.data);const a=z5e(t,n,this._model.getLanguageId());if(s.length>0)for(const l of s)for(const c of a)for(const u of l.changes)c.applyEdit(u.range,u.text);this._model.tokenization.setSemanticTokens(a,!0)}else this._model.tokenization.setSemanticTokens(null,!0);o()}},dv=W_,W_.REQUEST_MIN_DELAY=300,W_.REQUEST_MAX_DELAY=2e3,W_);Kee=dv=Y5e([Gf(1,qW),Gf(2,Ws),Gf(3,Ju),Gf(4,lt)],Kee);class RXt{constructor(e,t,n){this.provider=e,this.resultId=t,this.data=n}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}UD(qee);var MXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},LI=function(i,e){return function(t,n){e(t,n,i)}},XE;let lB=(XE=class extends se{constructor(e,t,n,s,r,o){super(),this._semanticTokensStylingService=t,this._themeService=n,this._configurationService=s,this._editor=e,this._provider=o.documentRangeSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new pi(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[],this._rangeProvidersChangeListeners=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))},l=()=>{var c;if(this._cleanupProviderListeners(),this._editor.hasModel()){const u=this._editor.getModel();for(const h of this._provider.all(u)){const g=(c=h.onDidChange)==null?void 0:c.call(h,()=>{this._cancelAll(),a()});g&&this._rangeProvidersChangeListeners.push(g)}}};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{l(),this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelLanguage(()=>{l(),this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(c=>{this._cancelAll(),a()})),l(),this._register(this._provider.onDidChange(()=>{l(),this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(c=>{c.affectsConfiguration(ice)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}dispose(){this._cleanupProviderListeners(),super.dispose()}_cleanupProviderListeners(){ii(this._rangeProvidersChangeListeners),this._rangeProvidersChangeListeners=[]}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;tthis._requestRange(e,n)))}_requestRange(e,t){const n=e.getVersionId(),s=io(o=>Promise.resolve(nce(this._provider,e,t,o))),r=new _o(!1);return s.then(o=>{if(this._debounceInformation.update(e,r.elapsed()),!o||!o.tokens||e.isDisposed()||e.getVersionId()!==n)return;const{provider:a,tokens:l}=o,c=this._semanticTokensStylingService.getStyling(a);e.tokenization.setPartialSemanticTokens(t,z5e(l,c,e.getLanguageId()))}).then(()=>this._removeOutstandingRequest(s),()=>this._removeOutstandingRequest(s)),s}},XE.ID="editor.contrib.viewportSemanticTokens",XE);lB=MXt([LI(1,qW),LI(2,Ws),LI(3,Zt),LI(4,Ju),LI(5,lt)],lB);Pn(lB.ID,lB,1);class PXt{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const n=[];for(const s of t){const r=[];n.push(r),this.selectSubwords&&this._addInWordRanges(r,e,s),this._addWordRanges(r,e,s),this._addWhitespaceLine(r,e,s),r.push({range:e.getFullModelRange()})}return n}_addInWordRanges(e,t,n){const s=t.getWordAtPosition(n);if(!s)return;const{word:r,startColumn:o}=s,a=n.column-o;let l=a,c=a,u=0;for(;l>=0;l--){const h=r.charCodeAt(l);if(l!==a&&(h===95||h===45))break;if($v(h)&&Uf(u))break;u=h}for(l+=1;c0&&t.getLineFirstNonWhitespaceColumn(n.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(n.lineNumber)===0&&e.push({range:new z(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}var OXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},jXt=function(i,e){return function(t,n){e(t,n,i)}},Gee;class sce{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const n=new sce(t,this.ranges);return n.ranges[t].equalsRange(this.ranges[this.index])?n.mov(e):n}}var zw;let LM=(zw=class{static get(e){return e.getContribution(Gee.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;(e=this._selectionListener)==null||e.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),n=this._editor.getModel();if(this._state||await X5e(this._languageFeaturesService.selectionRangeProvider,n,t.map(r=>r.getPosition()),this._editor.getOption(129),pn.None).then(r=>{var o;if(!(!ul(r)||r.length!==t.length)&&!(!this._editor.hasModel()||!bs(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;al.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),r[a].unshift(t[a]);this._state=r.map(a=>new sce(0,a)),(o=this._selectionListener)==null||o.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)==null||a.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(r=>r.mov(e));const s=this._state.map(r=>st.fromPositions(r.ranges[r.index].getStartPosition(),r.ranges[r.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(s)}finally{this._ignoreSelection=!1}}},Gee=zw,zw.ID="editor.contrib.smartSelectController",zw);LM=Gee=OXt([jXt(1,lt)],LM);class Q5e extends rt{constructor(e,t){super(t),this._forward=e}async run(e,t){const n=LM.get(t);n&&await n.run(this._forward)}}class FXt extends Q5e{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:be(1400,"Expand Selection"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:ct.MenubarSelectionMenu,group:"1_basic",title:S(1398,"&&Expand Selection"),order:2}})}}Rn.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class BXt extends Q5e{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:be(1401,"Shrink Selection"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:ct.MenubarSelectionMenu,group:"1_basic",title:S(1399,"&&Shrink Selection"),order:3}})}}Pn(LM.ID,LM,4);Ke(FXt);Ke(BXt);async function X5e(i,e,t,n,s){const r=i.all(e).concat(new PXt(n.selectSubwords));r.length===1&&r.unshift(new q8);const o=[],a=[];for(const l of r)o.push(Promise.resolve(l.provideSelectionRanges(e,t,s)).then(c=>{if(ul(c)&&c.length===t.length)for(let u=0;u{if(l.length===0)return[];l.sort((g,f)=>te.isBefore(g.getStartPosition(),f.getStartPosition())?1:te.isBefore(f.getStartPosition(),g.getStartPosition())||te.isBefore(g.getEndPosition(),f.getEndPosition())?-1:te.isBefore(f.getEndPosition(),g.getEndPosition())?1:0);const c=[];let u;for(const g of l)(!u||z.containsRange(g,u)&&!z.equalsRange(g,u))&&(c.push(g),u=g);if(!n.selectLeadingAndTrailingWhitespace)return c;const h=[c[0]];for(let g=1;gte.isIPosition(o)));const s=i.get(lt).selectionRangeProvider,r=await i.get(bl).createModelReference(t);try{return X5e(s,r.object.textEditorModel,n.map(te.lift),{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},pn.None)}finally{r.dispose()}});const Yee=Object.freeze({View:be(1638,"View"),Help:be(1639,"Help"),Test:be(1640,"Test"),File:be(1641,"File"),Preferences:be(1642,"Preferences"),Developer:be(1643,"Developer")});class HXt extends Qh{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...be(1448,"Toggle Editor Sticky Scroll"),mnemonicTitle:S(1444,"&&Toggle Editor Sticky Scroll")},metadata:{description:be(1449,"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:Yee.View,toggled:{condition:Ne.equals("config.editor.stickyScroll.enabled",!0),title:S(1445,"Sticky Scroll"),mnemonicTitle:S(1446,"&&Sticky Scroll")},menu:[{id:ct.CommandPalette},{id:ct.MenubarAppearanceMenu,group:"4_editor",order:3},{id:ct.StickyScrollContext}]})}async runEditorCommand(e,t){var o;const n=e.get(Zt),s=!n.getValue("editor.stickyScroll.enabled"),r=(o=Uh.get(t))==null?void 0:o.isFocused();n.updateValue("editor.stickyScroll.enabled",s),r&&t.focus()}}const GW=100;class WXt extends Qh{constructor(){super({id:"editor.action.focusStickyScroll",title:{...be(1450,"Focus Editor Sticky Scroll"),mnemonicTitle:S(1447,"&&Focus Editor Sticky Scroll")},precondition:Ne.and(Ne.has("config.editor.stickyScroll.enabled"),J.stickyScrollVisible),menu:[{id:ct.CommandPalette}]})}runEditorCommand(e,t){var n;(n=Uh.get(t))==null||n.focus()}}class VXt extends Qh{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:be(1451,"Select the next editor sticky scroll line"),precondition:J.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:GW,primary:18}})}runEditorCommand(e,t){var n;(n=Uh.get(t))==null||n.focusNext()}}class zXt extends Qh{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:be(1452,"Select the previous sticky scroll line"),precondition:J.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:GW,primary:16}})}runEditorCommand(e,t){var n;(n=Uh.get(t))==null||n.focusPrevious()}}class UXt extends Qh{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:be(1453,"Go to the focused sticky scroll line"),precondition:J.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:GW,primary:3}})}runEditorCommand(e,t){var n;(n=Uh.get(t))==null||n.goToFocused()}}class $Xt extends Qh{constructor(){super({id:"editor.action.selectEditor",title:be(1454,"Select Editor"),precondition:J.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:GW,primary:9}})}runEditorCommand(e,t){var n;(n=Uh.get(t))==null||n.selectEditor()}}Pn(Uh.ID,Uh,1);ci(HXt);ci(WXt);ci(zXt);ci(VXt);ci(UXt);ci($Xt);var Z5e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},iA=function(i,e){return function(t,n){e(t,n,i)}};class qXt{constructor(e,t,n,s,r,o,a){this.range=e,this.insertText=t,this.filterText=n,this.additionalTextEdits=s,this.command=r,this.gutterMenuLinkAction=o,this.completion=a}}let Qee=class extends lEt{constructor(e,t,n,s,r,o){super(r.disposable),this.model=e,this.line=t,this.word=n,this.completionModel=s,this._suggestMemoryService=o}canBeReused(e,t,n){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===n.startColumn&&this.word.endColumn=0&&a.resolve(pn.None)}return e}};Qee=Z5e([iA(5,VW)],Qee);let Xee=class extends se{constructor(e,t,n,s){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=n,this._editorService=s,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,n,s){var f;if(n.selectedSuggestionInfo)return;let r;for(const m of this._editorService.listCodeEditors())if(m.getModel()===e){r=m;break}if(!r)return;const o=r.getOption(102);if(mN.isAllOff(o))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(mN.valueFor(o,l)!=="inline")return;let c=e.getWordAtPosition(t),u;if(c!=null&&c.word||(u=this._getTriggerCharacterInfo(e,t)),!(c!=null&&c.word)&&!u||(c||(c=e.getWordUntilPosition(t)),c.endColumn!==t.column))return;let h;const g=e.getValueInRange(new z(t.lineNumber,1,t.lineNumber,t.column));if(!u&&((f=this._lastResult)!=null&&f.canBeReused(e,t.lineNumber,c))){const m=new C1e(g,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=m,this._lastResult.acquire(),h=this._lastResult}else{const m=await Wle(this._languageFeatureService.completionProvider,e,t,new mM(void 0,G8.createSuggestFilter(r).itemKind,u==null?void 0:u.providers),u&&{triggerKind:1,triggerCharacter:u.ch},s);let x;m.needsClipboard&&(x=await this._clipboardService.readText());const v=new Ev(m.items,t.column,new C1e(g,0),K8.None,r.getOption(134),r.getOption(128),{boostFullMatch:!1,firstMatchCanBeWeak:!1},x);h=new Qee(e,t.lineNumber,c,v,m,this._suggestMemoryService)}return this._lastResult=h,h}handleItemDidShow(e,t){t.completion.resolve(pn.None)}disposeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var r;const n=e.getValueInRange(z.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),s=new Set;for(const o of this._languageFeatureService.completionProvider.all(e))(r=o.triggerCharacters)!=null&&r.includes(n)&&s.add(o);if(s.size!==0)return{providers:s,ch:n}}};Xee=Z5e([iA(0,lt),iA(1,ed),iA(2,VW),iA(3,Hn)],Xee);UD(Xee);class KXt extends rt{constructor(){super({id:"editor.action.forceRetokenize",label:be(1532,"Developer: Force Retokenize"),precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getModel();n.tokenization.resetTokenization();const s=new _o;n.tokenization.forceTokenization(n.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}Ke(KXt);const eH=class eH extends Fo{constructor(){super({id:eH.ID,title:be(1530,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:be(1531,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const t=!yL.getTabFocusMode();yL.setTabFocusMode(t),$l(t?S(1528,"Pressing Tab will now move focus to the next focusable element"):S(1529,"Pressing Tab will now insert the tab character"))}};eH.ID="editor.action.toggleTabFocusMode";let Zee=eH;ci(Zee);class rce{static computeUnicodeHighlights(e,t,n){const s=n?n.startLineNumber:1,r=n?n.endLineNumber:e.getLineCount(),o=new ewe(t),a=o.getCandidateCodePoints();let l;a==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${GXt(Array.from(a))}`,"g");const c=new dN(null,l),u=[];let h=!1,g,f=0,m=0,x=0;e:for(let v=s,_=r;v<=_;v++){const w=e.getLineContent(v),k=w.length;c.reset(0);do if(g=c.next(w),g){let C=g.index,E=g.index+g[0].length;if(C>0){const R=w.charCodeAt(C-1);eo(R)&&C--}if(E+1=1e3){h=!0;break e}u.push(new z(v,C+1,v,E+1))}}while(g)}return{ranges:u,hasMore:h,ambiguousCharacterCount:f,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:x}}static computeUnicodeHighlightReason(e,t){const n=new ewe(t);switch(n.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const r=e.codePointAt(0),o=n.ambiguousCharacters.getPrimaryConfusable(r),a=rR.getLocales().filter(l=>!rR.getInstance(new Set([...t.allowedLocales,l])).isAmbiguous(r));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:a}}case 1:return{kind:2}}}}function GXt(i,e){return`[${Qc(i.map(n=>String.fromCodePoint(n)).join(""))}]`}class ewe{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=rR.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of B1.codePoints)twe(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const n=e.codePointAt(0);if(this.allowedCodePoints.has(n))return 0;if(this.options.nonBasicASCII)return 1;let s=!1,r=!1;if(t)for(const o of t){const a=o.codePointAt(0),l=FP(o);s=s||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!B1.isInvisibleCharacter(a)&&(r=!0)}return!s&&r?0:this.options.invisibleCharacters&&!twe(e)&&B1.isInvisibleCharacter(n)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(n)?3:0}}function twe(i){return i===" "||i===` +`||i===" "}var YXt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},nwe=function(i,e){return function(t,n){e(t,n,i)}};let Jee=class extends se{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,n={},s,r){super(),this._link=t,this._hoverService=s,this._enabled=!0,this.el=De(e,Oe("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=n.hoverDelegate??$p("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const o=this._register(new ri(this.el,"click")),a=this._register(new ri(this.el,"keypress")),l=He.chain(a.event,h=>h.map(g=>new ki(g)).filter(g=>g.keyCode===3)),c=this._register(new ri(this.el,Zi.Tap)).event;this._register(Ha.addTarget(this.el));const u=He.any(o.event,l,c);this._register(u(h=>{this.enabled&&(Vn.stop(h,!0),n!=null&&n.opener?n.opener(this._link.href):r.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};Jee=YXt([nwe(3,Zl),nwe(4,px)],Jee);var J5e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},ete=function(i,e){return function(t,n){e(t,n,i)}};const QXt=26;let tte=class extends se{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(nte))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var t;this.hide(),(t=e.onClose)==null||t.call(e)}}),this._editor.setBanner(this.banner.element,QXt)}};tte=J5e([ete(1,ft)],tte);let nte=class extends se{constructor(e,t){super(),this.instantiationService=e,this.markdownRendererService=t,this.element=Oe("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){if(e.ariaLabel)return e.ariaLabel;if(typeof e.message=="string")return e.message}getBannerMessage(e){if(typeof e=="string"){const t=Oe("span");return t.innerText=e,t}return this.markdownRendererService.render(e).element}clear(){Qo(this.element)}show(e){Qo(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const n=De(this.element,Oe("div.icon-container"));n.setAttribute("aria-hidden","true"),e.icon&&n.appendChild(Oe(`div${Tt.asCSSSelector(e.icon)}`));const s=De(this.element,Oe("div.message-container"));if(s.setAttribute("aria-hidden","true"),s.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=De(this.element,Oe("div.message-actions-container")),e.actions)for(const o of e.actions)this._register(this.instantiationService.createInstance(Jee,this.messageActionsContainer,{...o,tabIndex:-1},{}));const r=De(this.element,Oe("div.action-container"));this.actionBar=this._register(new mc(r)),this.actionBar.push(this._register(new Wd("banner.close",S(1533,"Close Banner"),Tt.asClassName(xMe),!0,()=>{typeof e.onClose=="function"&&e.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};nte=J5e([ete(0,ft),ete(1,Zh)],nte);const e3e=ln("workspaceTrustManagementService");var oce=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},o2=function(i,e){return function(t,n){e(t,n,i)}};const XXt=ls("extensions-warning-message",Ee.warning,S(1534,"Icon shown with a warning message in the extensions editor."));var ZE;let DM=(ZE=class extends se{constructor(e,t,n,s){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=n,this._highlighter=null,this._bannerClosed=!1,this._updateState=r=>{if(r&&r.hasMore){if(this._bannerClosed)return;const o=Math.max(r.ambiguousCharacterCount,r.nonBasicAsciiCharacterCount,r.invisibleCharacterCount);let a;if(r.nonBasicAsciiCharacterCount>=o)a={message:S(1535,"This document contains many non-basic ASCII unicode characters"),command:new IM};else if(r.ambiguousCharacterCount>=o)a={message:S(1536,"This document contains many ambiguous unicode characters"),command:new zC};else if(r.invisibleCharacterCount>=o)a={message:S(1537,"This document contains many invisible unicode characters"),command:new TM};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:a.message,icon:XXt,actions:[{label:a.command.shortLabel,href:`command:${a.command.desc.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(s.createInstance(tte,e)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=e.getOption(142),this._register(n.onDidChangeTrust(r=>{this._updateHighlighter()})),this._register(e.onDidChangeConfiguration(r=>{r.hasChanged(142)&&(this._options=e.getOption(142),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=ZXt(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every(n=>n===!1))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map(n=>n.codePointAt(0)),allowedLocales:Object.keys(e.allowedLocales).map(n=>n==="_os"?sS.NumberFormat().value.resolvedOptions().locale:n==="_vscode"?$Nt:n)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new ite(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new JXt(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}},ZE.ID="editor.contrib.unicodeHighlighter",ZE);DM=oce([o2(1,Nc),o2(2,e3e),o2(3,ft)],DM);function ZXt(i,e){return{nonBasicASCII:e.nonBasicASCII===Cd?!i:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments===Cd?!i:e.includeComments,includeStrings:e.includeStrings===Cd?!i:e.includeStrings,allowedCharacters:e.allowedCharacters,allowedLocales:e.allowedLocales}}let ite=class extends se{constructor(e,t,n,s){super(),this._editor=e,this._options=t,this._updateState=n,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new pi(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(t=>{if(this._model.isDisposed()||this._model.getVersionId()!==e)return;this._updateState(t);const n=[];if(!t.hasMore)for(const s of t.ranges)n.push({range:s,options:cB.instance.getDecorationFromOptions(this._options)});this._decorations.set(n)})}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();if(!$oe(t,e))return null;const n=t.getValueInRange(e.range);return{reason:n3e(n,this._options),inComment:qoe(t,e),inString:Koe(t,e)}}};ite=oce([o2(3,Nc)],ite);class JXt extends se{constructor(e,t,n){super(),this._editor=e,this._options=t,this._updateState=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new pi(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const e=this._editor.getVisibleRanges(),t=[],n={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const s of e){const r=rce.computeUnicodeHighlights(this._model,this._options,s);for(const o of r.ranges)n.ranges.push(o);n.ambiguousCharacterCount+=n.ambiguousCharacterCount,n.invisibleCharacterCount+=n.invisibleCharacterCount,n.nonBasicAsciiCharacterCount+=n.nonBasicAsciiCharacterCount,n.hasMore=n.hasMore||r.hasMore}if(!n.hasMore)for(const s of n.ranges)t.push({range:s,options:cB.instance.getDecorationFromOptions(this._options)});this._updateState(n),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),n=t.getValueInRange(e.range);return $oe(t,e)?{reason:n3e(n,this._options),inComment:qoe(t,e),inString:Koe(t,e)}:null}}const t3e=S(1538,"Configure Unicode Highlight Options");let ste=class{constructor(e,t){this._editor=e,this._markdownRendererService=t,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),s=this._editor.getContribution(DM.ID);if(!s)return[];const r=[],o=new Set;let a=300;for(const l of t){const c=s.getDecorationInfo(l);if(!c)continue;const h=n.getValueInRange(l.range).codePointAt(0),g=wK(h);let f;switch(c.reason.kind){case 0:{FP(c.reason.confusableWith)?f=S(1539,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",g,wK(c.reason.confusableWith.codePointAt(0))):f=S(1540,"The character {0} could be confused with the character {1}, which is more common in source code.",g,wK(c.reason.confusableWith.codePointAt(0)));break}case 1:f=S(1541,"The character {0} is invisible.",g);break;case 2:f=S(1542,"The character {0} is not a basic ASCII character.",g);break}if(o.has(f))continue;o.add(f);const m={codePoint:h,reason:c.reason,inComment:c.inComment,inString:c.inString},x=S(1543,"Adjust settings"),v=PRe(dB.ID,m),_=new Ma("",!0).appendMarkdown(f).appendText(" ").appendLink(v,x,t3e);r.push(new Th(this,l.range,[_],!1,a++))}return r}renderHoverParts(e,t){return DWt(e,t,this._editor,this._markdownRendererService)}getAccessibleContent(e){return e.contents.map(t=>t.value).join(` +`)}};ste=oce([o2(1,Zh)],ste);function rte(i){return`U+${i.toString(16).padStart(4,"0")}`}function wK(i){let e=`\`${rte(i)}\``;return B1.isInvisibleCharacter(i)||(e+=` "${`${eZt(i)}`}"`),e}function eZt(i){return i===96?"`` ` ``":"`"+String.fromCodePoint(i)+"`"}function n3e(i,e){return rce.computeUnicodeHighlightReason(i,e)}const tH=class tH{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const n=`${e}${t}`;let s=this.map.get(n);return s||(s=qt.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(n,s)),s}};tH.instance=new tH;let cB=tH;class tZt extends rt{constructor(){super({id:zC.ID,label:be(1552,"Disable highlighting of characters in comments"),precondition:void 0}),this.shortLabel=S(1544,"Disable Highlight In Comments")}async run(e,t,n){const s=e.get(Zt);s&&this.runAction(s)}async runAction(e){await e.updateValue(dc.includeComments,!1,2)}}class nZt extends rt{constructor(){super({id:zC.ID,label:be(1553,"Disable highlighting of characters in strings"),precondition:void 0}),this.shortLabel=S(1545,"Disable Highlight In Strings")}async run(e,t,n){const s=e.get(Zt);s&&this.runAction(s)}async runAction(e){await e.updateValue(dc.includeStrings,!1,2)}}const nH=class nH extends Fo{constructor(){super({id:nH.ID,title:be(1554,"Disable highlighting of ambiguous characters"),precondition:void 0,f1:!1}),this.shortLabel=S(1546,"Disable Ambiguous Highlight")}async run(e,t,n){const s=e.get(Zt);s&&this.runAction(s)}async runAction(e){await e.updateValue(dc.ambiguousCharacters,!1,2)}};nH.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";let zC=nH;const iH=class iH extends Fo{constructor(){super({id:iH.ID,title:be(1555,"Disable highlighting of invisible characters"),precondition:void 0,f1:!1}),this.shortLabel=S(1547,"Disable Invisible Highlight")}async run(e,t,n){const s=e.get(Zt);s&&this.runAction(s)}async runAction(e){await e.updateValue(dc.invisibleCharacters,!1,2)}};iH.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";let TM=iH;const sH=class sH extends Fo{constructor(){super({id:sH.ID,title:be(1556,"Disable highlighting of non basic ASCII characters"),precondition:void 0,f1:!1}),this.shortLabel=S(1548,"Disable Non ASCII Highlight")}async run(e,t,n){const s=e.get(Zt);s&&this.runAction(s)}async runAction(e){await e.updateValue(dc.nonBasicASCII,!1,2)}};sH.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";let IM=sH;const rH=class rH extends Fo{constructor(){super({id:rH.ID,title:be(1557,"Show Exclude Options"),precondition:void 0,f1:!1})}async run(e,t){const{codePoint:n,reason:s,inString:r,inComment:o}=t,a=String.fromCodePoint(n),l=e.get(Wa),c=e.get(Zt);function u(m){return B1.isInvisibleCharacter(m)?S(1549,"Exclude {0} (invisible character) from being highlighted",rte(m)):S(1550,"Exclude {0} from being highlighted",`${rte(m)} "${a}"`)}const h=[];if(s.kind===0)for(const m of s.notAmbiguousInLocales)h.push({label:S(1551,'Allow unicode characters that are more common in the language "{0}".',m),run:async()=>{sZt(c,[m])}});if(h.push({label:u(n),run:()=>iZt(c,[n])}),o){const m=new tZt;h.push({label:m.label,run:async()=>m.runAction(c)})}else if(r){const m=new nZt;h.push({label:m.label,run:async()=>m.runAction(c)})}function g(m){return typeof m.desc.title=="string"?m.desc.title:m.desc.title.value}if(s.kind===0){const m=new zC;h.push({label:g(m),run:async()=>m.runAction(c)})}else if(s.kind===1){const m=new TM;h.push({label:g(m),run:async()=>m.runAction(c)})}else if(s.kind===2){const m=new IM;h.push({label:g(m),run:async()=>m.runAction(c)})}else rZt(s);const f=await l.pick(h,{title:t3e});f&&await f.run()}};rH.ID="editor.action.unicodeHighlight.showExcludeOptions";let dB=rH;async function iZt(i,e){const t=i.getValue(dc.allowedCharacters);let n;typeof t=="object"&&t?n=t:n={};for(const s of e)n[String.fromCodePoint(s)]=!0;await i.updateValue(dc.allowedCharacters,n,2)}async function sZt(i,e){var s;const t=(s=i.inspect(dc.allowedLocales).user)==null?void 0:s.value;let n;typeof t=="object"&&t?n=Object.assign({},t):n={};for(const r of e)n[r]=!0;await i.updateValue(dc.allowedLocales,n,2)}function rZt(i){throw new Error(`Unexpected value: ${i}`)}ci(zC);ci(TM);ci(IM);ci(dB);Pn(DM.ID,DM,1);fS.register(ste);const vO=ln("dialogService");var oZt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},iwe=function(i,e){return function(t,n){e(t,n,i)}};const i3e="ignoreUnusualLineTerminators";function aZt(i,e,t){i.setModelProperty(e.uri,i3e,t)}function lZt(i,e){return i.getModelProperty(e.uri,i3e)}var JE;let uB=(JE=class extends se{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._isPresentingDialog=!1,this._config=this._editor.getOption(143),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(143)&&(this._config=this._editor.getOption(143),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(s=>{s.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||lZt(this._codeEditorService,e)===!0||this._editor.getOption(104))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let n;try{this._isPresentingDialog=!0,n=await this._dialogService.confirm({title:S(1558,"Unusual Line Terminators"),message:S(1559,"Detected unusual line terminators"),detail:S(1560,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",qu(e.uri)),primaryButton:S(1561,"&&Remove Unusual Line Terminators"),cancelButton:S(1562,"Ignore")})}finally{this._isPresentingDialog=!1}if(!n.confirmed){aZt(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())}},JE.ID="editor.contrib.unusualLineTerminatorsDetector",JE);uB=oZt([iwe(1,vO),iwe(2,Hn)],uB);Pn(uB.ID,uB,1);const w4="**",swe="/",Tj="[/\\\\]",Ij="[^/\\\\]",cZt=/\//g;function rwe(i,e){switch(i){case 0:return"";case 1:return`${Ij}*?`;default:return`(?:${Tj}|${Ij}+${Tj}${e?`|${Tj}${Ij}+`:""})*?`}}function owe(i,e){if(!i)return[];const t=[];let n=!1,s=!1,r="";for(const o of i){switch(o){case e:if(!n&&!s){t.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1;break}r+=o}return r&&t.push(r),t}function s3e(i){if(!i)return"";let e="";const t=owe(i,swe);if(t.every(n=>n===w4))e=".*";else{let n=!1;t.forEach((s,r)=>{if(s===w4){if(n)return;e+=rwe(2,r===t.length-1)}else{let o=!1,a="",l=!1,c="";for(const u of s){if(u!=="}"&&o){a+=u;continue}if(l&&(u!=="]"||!c)){let h;u==="-"?h=u:(u==="^"||u==="!")&&!c?h="^":u===swe?h="":h=Qc(u),c+=h;continue}switch(u){case"{":o=!0;continue;case"[":l=!0;continue;case"}":{const g=`(?:${owe(a,",").map(f=>s3e(f)).join("|")})`;e+=g,o=!1,a="";break}case"]":{e+="["+c+"]",l=!1,c="";break}case"?":e+=Ij;continue;case"*":e+=rwe(1);continue;default:e+=Qc(u)}}rl===c,endsWith:n?AEt:(l,c)=>l.endsWith(c),isEqualOrParent:(l,c)=>tQ(l,c,!xc||n)},r=`${n?t.toLowerCase():t}_${!!e.trimForExclusions}_${n}`;let o=awe.get(r);if(o)return cwe(o,i,s);let a;return dZt.test(t)?o=mZt(t.substring(4),t,s):(a=uZt.exec(CK(t,s)))?o=bZt(a[1],t,s):(e.trimForExclusions?gZt:hZt).test(t)?o=xZt(t,s):(a=fZt.exec(CK(t,s)))?o=dwe(a[1].substring(1),t,!0,s):(a=pZt.exec(CK(t,s)))?o=dwe(a[1],t,!1,s):o=vZt(t,s),awe.set(r,o),cwe(o,i,s)}function cwe(i,e,t){if(typeof e=="string")return i;const n=function(s,r){return t.isEqualOrParent(s,e.base)?i(jP(s.substring(e.base.length),Pg),r):null};return n.allBasenames=i.allBasenames,n.allPaths=i.allPaths,n.basenames=i.basenames,n.patterns=i.patterns,n}function CK(i,e){return e.trimForExclusions&&i.endsWith("/**")?i.substring(0,i.length-2):i}function mZt(i,e,t){return function(n,s){return typeof n=="string"&&t.endsWith(n,i)?e:null}}function bZt(i,e,t){const n=`/${i}`,s=`\\${i}`,r=function(a,l){return typeof a!="string"?null:l?t.equals(l,i)?e:null:t.equals(a,i)||t.endsWith(a,n)||t.endsWith(a,s)?e:null},o=[i];return r.basenames=o,r.patterns=[e],r.allBasenames=o,r}function xZt(i,e){const t=o3e(i.slice(1,-1).split(",").map(a=>ace(a,e)).filter(a=>a!==bp),i),n=t.length;if(!n)return bp;if(n===1)return t[0];const s=function(a,l){for(let c=0,u=t.length;c!!a.allBasenames);r&&(s.allBasenames=r.allBasenames);const o=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(s.allPaths=o),s}function dwe(i,e,t,n){const s=Pg===Hr.sep,r=s?i:i.replace(cZt,Pg),o=Pg+r,a=Hr.sep+i;let l;return t?l=function(c,u){return typeof c=="string"&&(n.equals(c,r)||n.endsWith(c,o)||!s&&(n.equals(c,i)||n.endsWith(c,a)))?e:null}:l=function(c,u){return typeof c=="string"&&(n.equals(c,r)||!s&&n.equals(c,i))?e:null},l.allPaths=[(t?"*/":"./")+i],l}function vZt(i,e){try{const t=new RegExp(`^${s3e(i)}$`,e.ignoreCase?"i":void 0);return function(n){return t.lastIndex=0,typeof n=="string"&&t.test(n)?i:null}}catch{return bp}}function _Zt(i,e,t){return!i||typeof e!="string"?!1:r3e(i,t)(e)}function r3e(i,e={}){if(!i)return lwe;if(typeof i=="string"||yZt(i)){const t=ace(i,e);if(t===bp)return lwe;const n=function(s,r){return!!t(s,r)};return t.allBasenames&&(n.allBasenames=t.allBasenames),t.allPaths&&(n.allPaths=t.allPaths),n}return wZt(i,e)}function yZt(i){const e=i;return e?typeof e.base=="string"&&typeof e.pattern=="string":!1}function wZt(i,e){const t=o3e(Object.getOwnPropertyNames(i).map(a=>CZt(a,i[a],e)).filter(a=>a!==bp)),n=t.length;if(!n)return bp;if(!t.some(a=>!!a.requiresSiblings)){if(n===1)return t[0];const a=function(u,h){let g;for(let f=0,m=t.length;f{for(const f of g){const m=await f;if(typeof m=="string")return m}return null})():null},l=t.find(u=>!!u.allBasenames);l&&(a.allBasenames=l.allBasenames);const c=t.reduce((u,h)=>h.allPaths?u.concat(h.allPaths):u,[]);return c.length&&(a.allPaths=c),a}const s=function(a,l,c){let u,h;for(let g=0,f=t.length;g{for(const g of h){const f=await g;if(typeof f=="string")return f}return null})():null},r=t.find(a=>!!a.allBasenames);r&&(s.allBasenames=r.allBasenames);const o=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(s.allPaths=o),s}function CZt(i,e,t){if(e===!1)return bp;const n=ace(i,t);if(n===bp)return bp;if(typeof e=="boolean")return n;if(e){const s=e.when;if(typeof s=="string"){const r=(o,a,l,c)=>{if(!c||!n(o,a))return null;const u=s.replace("$(basename)",()=>l),h=c(u);return RY(h)?h.then(g=>g?i:null):h?i:null};return r.requiresSiblings=!0,r}}return n}function o3e(i,e){const t=i.filter(a=>!!a.basenames);if(t.length<2)return i;const n=t.reduce((a,l)=>{const c=l.basenames;return c?a.concat(c):a},[]);let s;if(e){s=[];for(let a=0,l=n.length;a{const c=l.patterns;return c?a.concat(c):a},[]);const r=function(a,l){if(typeof a!="string")return null;if(!l){let u;for(u=a.length;u>0;u--){const h=a.charCodeAt(u-1);if(h===47||h===92)break}l=a.substring(u)}const c=n.indexOf(l);return c!==-1?s[c]:null};r.basenames=n,r.patterns=s,r.allBasenames=n;const o=i.filter(a=>!a.basenames);return o.push(r),o}function lce(i,e,t,n,s,r){if(Array.isArray(i)){let o=0;for(const a of i){const l=lce(a,e,t,n,s,r);if(l===10)return l;l>o&&(o=l)}return o}else{if(typeof i=="string")return n?i==="*"?5:i===t?10:0:0;if(i){const{language:o,pattern:a,scheme:l,hasAccessToAllModels:c,notebookType:u}=i;if(!n&&!c)return 0;u&&s&&(e=s);let h=0;if(l)if(l===e.scheme)h=10;else if(l==="*")h=5;else return 0;if(o)if(o===t)h=10;else if(o==="*")h=Math.max(h,5);else return 0;if(u)if(u===r)h=10;else if(u==="*"&&r!==void 0)h=Math.max(h,5);else return 0;if(a){let g;if(typeof a=="string"?g=a:g={...a,base:uIe(a.base)},g===e.fsPath||_Zt(g,e.fsPath))h=10;else return 0}return h}else return 0}}var SZt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},kZt=function(i,e){return function(t,n){e(t,n,i)}};class uwe{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,n){const s=[],r=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return r?e.isDisposed()?void 0:e.findMatches(r.word,!0,!1,!0,HF,!1).map(a=>({range:a.range,kind:IL.Text})):Promise.resolve(s)}provideMultiDocumentHighlights(e,t,n,s){const r=new Sr,o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(r);for(const a of[e,...n]){if(a.isDisposed())continue;const c=a.findMatches(o.word,!0,!1,!0,HF,!1).map(u=>({range:u.range,kind:IL.Text}));c&&r.set(a.uri,c)}return r}}let ote=class extends se{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new uwe)),this._register(e.multiDocumentHighlightProvider.register("*",new uwe))}};ote=SZt([kZt(0,lt)],ote);var a3e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Yf=function(i,e){return function(t,n){e(t,n,i)}},Us,ate;const cce=new Ze("hasWordHighlights",!1);function l3e(i,e,t,n){const s=i.ordered(e);return Bre(s.map(r=>()=>Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,Pr)),r=>r!=null).then(r=>{if(r){const o=new Sr;return o.set(e.uri,r),o}return new Sr})}function NZt(i,e,t,n,s){const r=i.ordered(e);return Bre(r.map(o=>()=>{const a=s.filter(l=>oAe(l)).filter(l=>lce(o.selector,l.uri,l.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(o.provideMultiDocumentHighlights(e,t,a,n)).then(void 0,Pr)}),o=>o!=null)}class c3e{constructor(e,t,n){this._model=e,this._selection=t,this._wordSeparators=n,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=io(e=>this._compute(this._model,this._selection,this._wordSeparators,e))),this._result}_getCurrentWordRange(e,t){const n=e.getWordAtPosition(t.getPosition());return n?new z(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}cancel(){this.result.cancel()}}class EZt extends c3e{constructor(e,t,n,s){super(e,t,n),this._providers=s}_compute(e,t,n,s){return l3e(this._providers,e,t.getPosition(),s).then(r=>r||new Sr)}}class LZt extends c3e{constructor(e,t,n,s,r){super(e,t,n),this._providers=s,this._otherModels=r}_compute(e,t,n,s){return NZt(this._providers,e,t.getPosition(),s,this._otherModels).then(r=>r||new Sr)}}function DZt(i,e,t,n){return new EZt(e,t,n,i)}function TZt(i,e,t,n,s){return new LZt(e,t,n,i,s)}kc("_executeDocumentHighlights",async(i,e,t)=>{const n=i.get(lt),s=await l3e(n.documentHighlightProvider,e,t,pn.None);return s==null?void 0:s.get(e.uri)});var V_;let lte=(V_=class{constructor(e,t,n,s,r,o,a,l){this.toUnhook=new _e,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new Sr,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,this.runDelayer=this.toUnhook.add(new Uu(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=n,this.codeEditorService=o,this.textModelService=r,this.configurationService=a,this.logService=l,this._hasWordHighlights=cce.bindTo(s),this._ignorePositionChangeEvent=!1,this.occurrencesHighlightEnablement=this.editor.getOption(90),this.occurrencesHighlightDelay=this.configurationService.getValue("editor.occurrencesHighlightDelay"),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(c=>{this._ignorePositionChangeEvent||this.occurrencesHighlightEnablement!=="off"&&this.runDelayer.trigger(()=>{this._onPositionChanged(c)})})),this.toUnhook.add(e.onDidFocusEditorText(c=>{this.occurrencesHighlightEnablement!=="off"&&(this.workerRequest||this.runDelayer.trigger(()=>{this._run()}))})),this.toUnhook.add(e.onDidChangeModelContent(c=>{v7(this.model.uri,"output")||this._stopAll()})),this.toUnhook.add(e.onDidChangeModel(c=>{!c.newModelUrl&&c.oldModelUrl?this._stopSingular():Us.query&&this._run()})),this.toUnhook.add(e.onDidChangeConfiguration(c=>{var h,g;const u=this.editor.getOption(90);if(this.occurrencesHighlightEnablement!==u)switch(this.occurrencesHighlightEnablement=u,u){case"off":this._stopAll();break;case"singleFile":this._stopAll((g=(h=Us.query)==null?void 0:h.modelInfo)==null?void 0:g.modelURI);break;case"multiFile":Us.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",u);break}})),this.toUnhook.add(this.configurationService.onDidChangeConfiguration(c=>{if(c.affectsConfiguration("editor.occurrencesHighlightDelay")){const u=a.getValue("editor.occurrencesHighlightDelay");this.occurrencesHighlightDelay!==u&&(this.occurrencesHighlightDelay=u)}})),this.toUnhook.add(e.onDidBlurEditorWidget(()=>{var u,h;const c=this.codeEditorService.getFocusedCodeEditor();c?((u=c.getModel())==null?void 0:u.uri.scheme)===Ot.vscodeNotebookCell&&((h=this.editor.getModel())==null?void 0:h.uri.scheme)!==Ot.vscodeNotebookCell&&this._stopAll():this._stopAll()})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=void 0,Us.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(e){this.occurrencesHighlightEnablement!=="off"&&(this.runDelayer.cancel(),this.runDelayer.trigger(()=>{this._run(!1,e)}))}stop(){this.occurrencesHighlightEnablement!=="off"&&this._stopAll()}_getSortedHighlights(){return this.decorations.getRanges().sort(z.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))+1)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const r=this._getWord();if(r){const o=this.editor.getModel().getLineContent(s.startLineNumber);$l(`${o}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),n=(e.findIndex(r=>r.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,s=e[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(s.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(s);const r=this._getWord();if(r){const o=this.editor.getModel().getLineContent(s.startLineNumber);$l(`${o}, ${n+1} of ${e.length} for '${r.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=Us.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),Us.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),n=[];for(const s of t){if(!s.hasModel()||J_(s.getModel().uri,e))continue;const r=Us.storedDecorationIDs.get(s.getModel().uri);if(!r)continue;s.removeDecorations(r),n.push(s.getModel().uri);const o=u0.get(s);o!=null&&o.wordHighlighter&&o.wordHighlighter.decorations.length>0&&(o.wordHighlighter.decorations.clear(),o.wordHighlighter.workerRequest=null,o.wordHighlighter._hasWordHighlights.set(!1))}for(const s of n)Us.storedDecorationIDs.delete(s)}_stopSingular(){var e,t,n,s;this._removeSingleDecorations(),this.editor.hasTextFocus()&&(((e=this.editor.getModel())==null?void 0:e.uri.scheme)!==Ot.vscodeNotebookCell&&((n=(t=Us.query)==null?void 0:t.modelInfo)==null?void 0:n.modelURI.scheme)!==Ot.vscodeNotebookCell?(Us.query=null,this._run()):(s=Us.query)!=null&&s.modelInfo&&(Us.query.modelInfo=null)),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),this.renderDecorationsTimer!==void 0&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=void 0),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(this.occurrencesHighlightEnablement==="off"){this._stopAll();return}if(e.source!=="api"&&e.reason!==3){this._stopAll();return}this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:n})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===Ot.vscodeNotebookCell){const r=[],o=this.codeEditorService.listCodeEditors();for(const a of o){const l=a.getModel();l&&l!==e&&l.uri.scheme===Ot.vscodeNotebookCell&&r.push(l)}return r}const n=[],s=this.codeEditorService.listCodeEditors();for(const r of s){if(!dle(r))continue;const o=r.getModel();o&&e===o.modified&&n.push(o.modified)}if(n.length)return n;if(this.occurrencesHighlightEnablement==="singleFile")return[];for(const r of s){const o=r.getModel();o&&o!==e&&n.push(o)}return n}async _run(e,t){var s,r,o;if(this.editor.hasTextFocus()){const a=this.editor.getSelection();if(!a||a.startLineNumber!==a.endLineNumber){Us.query=null,this._stopAll();return}const l=a.startColumn,c=a.endColumn,u=this._getWord();if(!u||u.startColumn>l||u.endColumn{a===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=u||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},zt)}catch(u){this.logService.error("Unexpected error during occurrence request. Log: ",u)}finally{c.dispose()}}else if(this.model.uri.scheme===Ot.vscodeNotebookCell){const a=++this.workerRequestTokenId;if(this.workerRequestCompleted=!1,!Us.query||!Us.query.modelInfo)return;const l=await this.textModelService.createModelReference(Us.query.modelInfo.modelURI);try{this.workerRequest=this.computeWithModel(l.object.textEditorModel,Us.query.modelInfo.selection,[this.model]),(o=this.workerRequest)==null||o.result.then(c=>{a===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=c||[],this._beginRenderDecorations(t??this.occurrencesHighlightDelay))},zt)}catch(c){this.logService.error("Unexpected error during occurrence request. Log: ",c)}finally{l.dispose()}}}computeWithModel(e,t,n){return n.length?TZt(this.multiDocumentProviders,e,t,this.editor.getOption(148),n):DZt(this.providers,e,t,this.editor.getOption(148))}_beginRenderDecorations(e){const t=new Date().getTime(),n=this.lastCursorPositionChangeTime+e;t>=n?(this.renderDecorationsTimer=void 0,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},n-t)}renderDecorations(){var t,n,s;this.renderDecorationsTimer=void 0;const e=this.codeEditorService.listCodeEditors();for(const r of e){const o=u0.get(r);if(!o)continue;const a=[],l=(t=r.getModel())==null?void 0:t.uri;if(l&&this.workerRequestValue.has(l)){const c=Us.storedDecorationIDs.get(l),u=this.workerRequestValue.get(l);if(u)for(const g of u)g.range&&a.push({range:g.range,options:HQt(g.kind)});let h=[];r.changeDecorations(g=>{h=g.deltaDecorations(c??[],a)}),Us.storedDecorationIDs=Us.storedDecorationIDs.set(l,h),a.length>0&&((n=o.wordHighlighter)==null||n.decorations.set(a),(s=o.wordHighlighter)==null||s._hasWordHighlights.set(!0))}}this.workerRequest=null}dispose(){this._stopSingular(),this.toUnhook.dispose()}},Us=V_,V_.storedDecorationIDs=new Sr,V_.query=null,V_);lte=Us=a3e([Yf(4,bl),Yf(5,Hn),Yf(6,Zt),Yf(7,Ji)],lte);var Uw;let u0=(Uw=class extends se{static get(e){return e.getContribution(ate.ID)}constructor(e,t,n,s,r,o,a){super(),this._wordHighlighter=null;const l=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&e.getModel().uri.scheme!==Ot.accessibleView&&(this._wordHighlighter=new lte(e,n.documentHighlightProvider,n.multiDocumentHighlightProvider,t,r,s,o,a))};this._register(e.onDidChangeModel(c=>{var u,h;this._wordHighlighter&&(!c.newModelUrl&&((u=c.oldModelUrl)==null?void 0:u.scheme)!==Ot.vscodeNotebookCell&&((h=this.wordHighlighter)==null||h.stop()),this._wordHighlighter.dispose(),this._wordHighlighter=null),l()})),l()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var e;(e=this._wordHighlighter)==null||e.moveNext()}moveBack(){var e;(e=this._wordHighlighter)==null||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore(250)}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}},ate=Uw,Uw.ID="editor.contrib.wordHighlighter",Uw);u0=ate=a3e([Yf(1,Bt),Yf(2,lt),Yf(3,Hn),Yf(4,bl),Yf(5,Zt),Yf(6,Ji)],u0);class d3e extends rt{constructor(e,t){super(t),this._isNext=e}run(e,t){const n=u0.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}class IZt extends d3e{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:be(1572,"Go to Next Symbol Highlight"),precondition:cce,kbOpts:{kbExpr:J.editorTextFocus,primary:65,weight:100}})}}class AZt extends d3e{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:be(1573,"Go to Previous Symbol Highlight"),precondition:cce,kbOpts:{kbExpr:J.editorTextFocus,primary:1089,weight:100}})}}class RZt extends rt{constructor(){super({id:"editor.action.wordHighlight.trigger",label:be(1574,"Trigger Symbol Highlight"),precondition:void 0,kbOpts:{kbExpr:J.editorTextFocus,primary:0,weight:100}})}run(e,t,n){const s=u0.get(t);s&&s.restoreViewState(!0)}}Pn(u0.ID,u0,0);Ke(IZt);Ke(AZt);Ke(RZt);UD(ote);class YW extends ao{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){if(!t.hasModel())return;const s=Ku(t.getOption(148),t.getOption(147)),r=t.getModel(),o=t.getSelections(),a=o.length>1,l=o.map(c=>{const u=new te(c.positionLineNumber,c.positionColumn),h=this._move(s,r,u,this._wordNavigationType,a);return this._moveTo(c,h,this._inSelectionMode)});if(r.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,l.map(c=>Wn.fromModelSelection(c))),l.length===1){const c=new te(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(c,0)}}_moveTo(e,t,n){return n?new st(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new st(t.lineNumber,t.column,t.lineNumber,t.column)}}class I0 extends YW{_move(e,t,n,s,r){return ei.moveWordLeft(e,t,n,s,r)}}class A0 extends YW{_move(e,t,n,s,r){return ei.moveWordRight(e,t,n,s)}}class MZt extends I0{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class PZt extends I0{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class OZt extends I0{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:Ne.and(J.textInputFocus,(e=Ne.and(ID,EW))==null?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class jZt extends I0{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class FZt extends I0{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class BZt extends I0{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:Ne.and(J.textInputFocus,(e=Ne.and(ID,EW))==null?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class HZt extends I0{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,n,s,r){return super._move(Ku(sl.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class WZt extends I0{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,n,s,r){return super._move(Ku(sl.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class VZt extends A0{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class zZt extends A0{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:Ne.and(J.textInputFocus,(e=Ne.and(ID,EW))==null?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class UZt extends A0{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class $Zt extends A0{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class qZt extends A0{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:Ne.and(J.textInputFocus,(e=Ne.and(ID,EW))==null?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class KZt extends A0{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class GZt extends A0{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,n,s,r){return super._move(Ku(sl.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class YZt extends A0{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,n,s,r){return super._move(Ku(sl.wordSeparators.defaultValue,e.intlSegmenterLocales),t,n,s,r)}}class QW extends ao{constructor(e){super({canTriggerInlineEdits:!0,...e}),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,n){const s=e==null?void 0:e.get(As);if(!t.hasModel()||!s)return;const r=Ku(t.getOption(148),t.getOption(147)),o=t.getModel(),a=t.getSelections(),l=t.getOption(10),c=t.getOption(15),u=s.getLanguageConfiguration(o.getLanguageId()).getAutoClosingPairs(),h=t._getViewModel(),g=a.map(f=>{const m=this._delete({wordSeparators:r,model:o,selection:f,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(13),autoClosingBrackets:l,autoClosingQuotes:c,autoClosingPairs:u,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new xa(m,"")});t.pushUndoStop(),t.executeCommands(this.id,g),t.pushUndoStop()}}class dce extends QW{_delete(e,t){const n=ei.deleteWordLeft(e,t);return n||new z(1,1,1,1)}}class uce extends QW{_delete(e,t){const n=ei.deleteWordRight(e,t);if(n)return n;const s=e.model.getLineCount(),r=e.model.getLineMaxColumn(s);return new z(s,r,s,r)}}class QZt extends dce{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:J.writable})}}class XZt extends dce{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:J.writable})}}class ZZt extends dce{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:J.writable,kbOpts:{kbExpr:J.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class JZt extends uce{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:J.writable})}}class eJt extends uce{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:J.writable})}}class tJt extends uce{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:J.writable,kbOpts:{kbExpr:J.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class nJt extends rt{constructor(){super({id:"deleteInsideWord",precondition:J.writable,label:be(1575,"Delete Word")})}run(e,t,n){if(!t.hasModel())return;const s=Ku(t.getOption(148),t.getOption(147)),r=t.getModel(),a=t.getSelections().map(l=>{const c=ei.deleteInsideWord(s,r,l);return new xa(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}Xe(new MZt);Xe(new PZt);Xe(new OZt);Xe(new jZt);Xe(new FZt);Xe(new BZt);Xe(new VZt);Xe(new zZt);Xe(new UZt);Xe(new $Zt);Xe(new qZt);Xe(new KZt);Xe(new HZt);Xe(new WZt);Xe(new GZt);Xe(new YZt);Xe(new QZt);Xe(new XZt);Xe(new ZZt);Xe(new JZt);Xe(new eJt);Xe(new tJt);Ke(nJt);class iJt extends QW{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:J.writable,kbOpts:{kbExpr:J.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){const n=B7.deleteWordPartLeft(e);return n||new z(1,1,1,1)}}class sJt extends QW{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:J.writable,kbOpts:{kbExpr:J.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const n=B7.deleteWordPartRight(e);if(n)return n;const s=e.model.getLineCount(),r=e.model.getLineMaxColumn(s);return new z(s,r,s,r)}}class u3e extends YW{_move(e,t,n,s,r){return B7.moveWordPartLeft(e,t,n,r)}}class rJt extends u3e{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:J.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}Rn.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class oJt extends u3e{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:J.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}Rn.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class h3e extends YW{_move(e,t,n,s,r){return B7.moveWordPartRight(e,t,n)}}class aJt extends h3e{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:J.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class lJt extends h3e{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:J.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}Xe(new iJt);Xe(new sJt);Xe(new rJt);Xe(new oJt);Xe(new aJt);Xe(new lJt);const Hce=class Hce extends se{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const e=Kc.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(105);t||(this.editor.isSimpleWidget?t=new Ma(S(1378,"Cannot edit in read-only input")):t=new Ma(S(1379,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}};Hce.ID="editor.contrib.readOnlyMessageController";let hB=Hce;Pn(hB.ID,hB,2);var cJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},hwe=function(i,e){return function(t,n){e(t,n,i)}};let cte=class extends se{constructor(e,t,n){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=n,this._currentModel=Ft(this,void 0);const s=Wc("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),r=Wc("_textModel.onDidChangeContent",He.debounce(o=>this._textModel.onDidChangeContent(o),()=>{},100));this._register(Fa(async(o,a)=>{s.read(o),r.read(o);const l=a.add(new A8t),c=await this._outlineModelService.getOrCreate(this._textModel,l.token);a.isDisposed||this._currentModel.set(c,void 0)}))}getBreadcrumbItems(e,t){const n=this._currentModel.read(t);if(!n)return[];const s=n.asListOfDocumentSymbols().filter(r=>e.contains(r.range.startLineNumber)&&!e.contains(r.range.endLineNumber));return s.sort(yIe(_a(r=>r.range.endLineNumber-r.range.startLineNumber,$c))),s.map(r=>({name:r.name,kind:r.kind,startLineNumber:r.range.startLineNumber}))}};cte=cJt([hwe(1,lt),hwe(2,bO)],cte);V6.setBreadcrumbsSourceFactory((i,e)=>e.createInstance(cte,i));var dJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},SK=function(i,e){return function(t,n){e(t,n,i)}},eL;let gB=(eL=class extends se{constructor(e,t,n,s){super();const r=this._register(Ts(e)),o=this._register(s.createMenu(ct.EditorContent,e.contextKeyService)),a=Gn(this,o.onDidChange,()=>o.getActions().length===0);this._register(Pt(l=>{if(a.read(l))return;const u=Fn("div.floating-menu-overlay-widget");u.root.style.height="28px";const h=t.createInstance(XR,u.root,ct.EditorContent,{actionViewItemProvider:(g,f)=>{if(!(g instanceof Vd))return;const m=n.lookupKeybinding(g.id);if(m)return t.createInstance(class extends a0{updateLabel(){this.options.label&&this.label&&(this.label.textContent=`${this._commandAction.label} (${m.getLabel()})`)}},g,{...f,keybindingNotRenderedWithLabel:!0})},hiddenItemStrategy:0,menuOptions:{shouldForwardArgs:!0},telemetrySource:"editor.overlayToolbar",toolbarOptions:{primaryGroup:()=>!0,useSeparatorsInPrimaryActions:!0}});l.store.add(h),l.store.add(Pt(g=>{const f=r.model.read(g);h.context=f==null?void 0:f.uri})),l.store.add(r.createOverlayWidget({allowEditorOverflow:!1,domNode:u.root,minContentWidthInPx:zi(0),position:zi({preference:1})}))}))}},eL.ID="editor.contrib.floatingToolbar",eL);gB=dJt([SK(1,ft),SK(2,zn),SK(3,Qu)],gB);Pn(gB.ID,gB,1);var dte;(function(i){i.inspectTokensAction=S(786,"Developer: Inspect Tokens")})(dte||(dte={}));var fB;(function(i){i.gotoLineActionLabel=S(787,"Go to Line/Column...")})(fB||(fB={}));var ute;(function(i){i.helpQuickAccessActionLabel=S(788,"Show all Quick Access Providers")})(ute||(ute={}));var pB;(function(i){i.quickCommandActionLabel=S(789,"Command Palette"),i.quickCommandHelp=S(790,"Show And Run Commands")})(pB||(pB={}));var AM;(function(i){i.quickOutlineActionLabel=S(791,"Go to Symbol..."),i.quickOutlineByCategoryActionLabel=S(792,"Go to Symbol by Category...")})(AM||(AM={}));var hte;(function(i){i.editorViewAccessibleLabel=S(793,"Editor content")})(hte||(hte={}));var gte;(function(i){i.toggleHighContrast=S(794,"Toggle High Contrast Theme")})(gte||(gte={}));var fte;(function(i){i.bulkEditServiceSummary=S(795,"Made {0} edits in {1} files")})(fte||(fte={}));const Wce=class Wce extends se{constructor(e){super(),this.editor=e,this.widget=null,zu&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(104);!this.widget&&e?this.widget=new pte(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}};Wce.ID="editor.contrib.iPadShowKeyboard";let mB=Wce;const oH=class oH extends se{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(de(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(de(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return oH.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}};oH.ID="editor.contrib.ShowKeyboardWidget";let pte=oH;Pn(mB.ID,mB,3);const tu=ln("themeService");var uJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},gwe=function(i,e){return function(t,n){e(t,n,i)}},mte,$w;let RM=($w=class extends se{static get(e){return e.getContribution(mte.ID)}constructor(e,t,n){super(),this._editor=e,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(s=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(s=>this.stop())),this._register(Gs.onDidChange(s=>this.stop())),this._register(this._editor.onKeyUp(s=>s.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new bte(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},mte=$w,$w.ID="editor.contrib.inspectTokens",$w);RM=mte=uJt([gwe(1,tu),gwe(2,tr)],RM);class hJt extends rt{constructor(){super({id:"editor.action.inspectTokens",label:dte.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const n=RM.get(t);n==null||n.launch()}}function gJt(i){let e="";for(let t=0,n=i.length;tAL,tokenize:(s,r,o)=>lae(e,o),tokenizeEncoded:(s,r,o)=>cW(n,o)}}const aH=class aH extends se{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=fJt(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return aH._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let n=0;for(let l=t.tokens1.length-1;l>=0;l--){const c=t.tokens1[l];if(e.column-1>=c.offset){n=l;break}}let s=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){s=l;break}const r=this._model.getLineContent(e.lineNumber);let o="";if(nn.prefix.length-t.prefix.length),dt(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return ef([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(n=>e.startsWith(n.prefix))||void 0||this.defaultProvider}}Hs.add(vS.Quickaccess,new pJt);var mJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},fwe=function(i,e){return function(t,n){e(t,n,i)}},sA,qw;let vte=(qw=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=Hs.as(vS.Quickaccess)}provide(e){const t=new _e;return t.add(e.onDidAccept(()=>{const[n]=e.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(n=>{const s=this.registry.getQuickAccessProvider(n.substr(sA.PREFIX.length));s&&s.prefix&&s.prefix!==sA.PREFIX&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),e.items=this.getQuickAccessProviders().filter(n=>n.prefix!==sA.PREFIX),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((t,n)=>t.prefix.localeCompare(n.prefix)).flatMap(t=>this.createPicks(t))}createPicks(e){return e.helpEntries.map(t=>{const n=t.prefix||e.prefix,s=n||"…";return{prefix:n,label:s,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:S(1747,"{0}, {1}",s,t.description),description:t.description}})}},sA=qw,qw.PREFIX="?",qw);vte=sA=mJt([fwe(0,Wa),fwe(1,zn)],vte);Hs.as(vS.Quickaccess).registerQuickAccessProvider({ctor:vte,prefix:"",helpEntries:[{description:ute.helpQuickAccessActionLabel}]});class g3e{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,n){var o;const s=new _e;e.canAcceptInBackground=!!((o=this.options)!=null&&o.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=s.add(new Zn);return r.value=this.doProvide(e,t,n),s.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(e,t)})),s}doProvide(e,t,n){const s=new _e,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const o={editor:r},a=tOe(r);if(a){let l=r.saveViewState()??void 0;s.add(a.onDidChangeCursorPosition(()=>{l=r.saveViewState()??void 0})),o.restoreViewState=()=>{l&&r===this.activeTextEditorControl&&r.restoreViewState(l)},s.add(uC(t.onCancellationRequested)(()=>{var c;return(c=o.restoreViewState)==null?void 0:c.call(o)}))}s.add(dt(()=>this.clearDecorations(r))),s.add(this.provideWithTextEditor(o,e,t,n))}else s.add(this.provideWithoutTextEditor(e,t));return s}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const n=e.getModel();n&&"getLineContent"in n&&zg(`${n.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return dle(e)?(t=e.getModel())==null?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(n=>{const s=[];this.rangeHighlightDecorationId&&(s.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),s.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Ks(b2e),position:zd.Full}}}],[o,a]=n.deltaDecorations(s,r);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(n=>{n.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}const a1=class a1 extends g3e{constructor(){super({canAcceptInBackground:!0})}get useZeroBasedOffset(){return this.storageService.getBoolean(a1.ZERO_BASED_OFFSET_STORAGE_KEY,-1,!1)}set useZeroBasedOffset(e){this.storageService.store(a1.ZERO_BASED_OFFSET_STORAGE_KEY,e,-1,0)}provideWithoutTextEditor(e){const t=S(1335,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,se.None}provideWithTextEditor(e,t,n){const s=e.editor,r=new _e;r.add(t.onDidAccept(c=>{const[u]=t.selectedItems;if(u){if(!u.lineNumber)return;this.gotoLocation(e,{range:this.toRange(u.lineNumber,u.column),keyMods:t.keyMods,preserveFocus:c.inBackground}),c.inBackground||t.hide()}}));const o=()=>{const c=t.value.trim().substring(a1.PREFIX.length),{inOffsetMode:u,lineNumber:h,column:g,label:f}=this.parsePosition(s,c);if(a.visible=!!u,t.items=[{lineNumber:h,column:g,label:f}],t.ariaLabel=f,!h){this.clearDecorations(s);return}const m=this.toRange(h,g);s.revealRangeInCenter(m,0),this.addDecorations(s,m)},a=new mx({title:S(1336,"Use Zero-Based Offset"),icon:Ee.indexZero,isChecked:this.useZeroBasedOffset,inputActiveOptionBorder:Pe(UP),inputActiveOptionForeground:Pe($P),inputActiveOptionBackground:Pe(MD)});r.add(a.onChange(()=>{this.useZeroBasedOffset=!this.useZeroBasedOffset,o()})),t.toggles=[a],o(),r.add(t.onDidChangeValue(()=>o()));const l=tOe(s);return l&&l.getOptions().get(76).renderType===2&&(l.updateOptions({lineNumbers:"on"}),r.add(dt(()=>l.updateOptions({lineNumbers:"relative"})))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){var s,r;const n=this.getModel(e);if(!n)return{label:S(1337,"Open a text editor first to go to a line.")};if(t.startsWith(":")){let o=parseInt(t.substring(1),10);const a=n.getValueLength();if(isNaN(o))return{inOffsetMode:!0,label:this.useZeroBasedOffset?S(1338,"Type a character position to go to (from 0 to {0}).",a-1):S(1339,"Type a character position to go to (from 1 to {0}).",a)};{const l=o<0;this.useZeroBasedOffset||(o-=Math.sign(o)),l&&(o+=a);const c=n.getPositionAt(o);return{...c,inOffsetMode:!0,label:S(1340,"Press 'Enter' to go to line {0} at column {1}.",c.lineNumber,c.column)}}}else{const o=t.split(/,|:|#/),a=n.getLineCount();let l=parseInt((s=o[0])==null?void 0:s.trim(),10);if(o.length<1||isNaN(l))return{label:S(1341,"Type a line number to go to (from 1 to {0}).",a)};l=l>=0?l:a+1+l,l=Math.min(Math.max(1,l),a);const c=n.getLineMaxColumn(l);let u=parseInt((r=o[1])==null?void 0:r.trim(),10);return o.length<2||isNaN(u)?{lineNumber:l,column:1,label:o.length<2?S(1342,"Press 'Enter' to go to line {0} or enter : to add a column number.",l):S(1343,"Press 'Enter' to go to line {0} or enter a column number (from 1 to {1}).",l,c)}:(u=u>=0?u:c+u,u=Math.min(Math.max(1,u),c),{lineNumber:l,column:u,label:S(1344,"Press 'Enter' to go to line {0} at column {1}.",l,u)})}}};a1.PREFIX=":",a1.ZERO_BASED_OFFSET_STORAGE_KEY="gotoLine.useZeroBasedOffset";let _te=a1;var bJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},pwe=function(i,e){return function(t,n){e(t,n,i)}};let MM=class extends _te{constructor(e,t){super(),this.editorService=e,this.storageService=t,this.onDidActiveTextEditorControlChange=He.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};MM=bJt([pwe(0,Hn),pwe(1,xl)],MM);var Kw;let f3e=(Kw=class extends rt{constructor(){super({id:Kw.ID,label:fB.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:J.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Wa).quickAccess.show(MM.PREFIX)}},Kw.ID="editor.action.gotoLine",Kw);Ke(f3e);Hs.as(vS.Quickaccess).registerQuickAccessProvider({ctor:MM,prefix:MM.PREFIX,helpEntries:[{description:fB.gotoLineActionLabel,commandId:f3e.ID}]});const p3e=[void 0,[]];function kK(i,e,t=0,n=0){const s=e;return s.values&&s.values.length>1?xJt(i,s.values,t,n):m3e(i,e,t,n)}function xJt(i,e,t,n){let s=0;const r=[];for(const o of e){const[a,l]=m3e(i,o,t,n);if(typeof a!="number")return p3e;s+=a,r.push(...l)}return[s,vJt(r)]}function m3e(i,e,t,n){const s=SC(e.original,e.originalLowercase,t,i,i.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],ZP(s)]:p3e}function vJt(i){const e=i.sort((s,r)=>s.start-r.start),t=[];let n;for(const s of e)!n||!_Jt(n,s)?(n=s,t.push(s)):(n.start=Math.min(n.start,s.start),n.end=Math.max(n.end,s.end));return t}function _Jt(i,e){return!(i.end=0,o=mwe(i);let a;const l=i.split(b3e);if(l.length>1)for(const c of l){const u=mwe(c),{pathNormalized:h,normalized:g,normalizedLowercase:f}=bwe(c);g&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:h,normalized:g,normalizedLowercase:f,expectContiguousMatch:u}))}return{original:i,originalLowercase:e,pathNormalized:t,normalized:n,normalizedLowercase:s,values:a,containsPathSeparator:r,expectContiguousMatch:o}}function bwe(i){let e;Xo?e=i.replace(/\//g,Pg):e=i.replace(/\\/g,Pg);const t=e.replace(/[\*\u2026\s"]/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function xwe(i){return Array.isArray(i)?yte(i.map(e=>e.original).join(b3e)):yte(i.original)}var yJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},vwe=function(i,e){return function(t,n){e(t,n,i)}},Aj,Ng;let Z1=(Ng=class extends g3e{constructor(e,t,n=Object.create(null)){super(n),this._languageFeaturesService=e,this._outlineModelService=t,this.options=n,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,S(1345,"To go to a symbol, first open a text editor with symbol information.")),se.None}provideWithTextEditor(e,t,n,s){const r=e.editor,o=this.getModel(r);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,n,s):this.doProvideWithoutEditorSymbols(e,o,t,n):se.None}doProvideWithoutEditorSymbols(e,t,n,s){const r=new _e;return this.provideLabelPick(n,S(1346,"The active text editor does not provide symbol information.")),(async()=>!await this.waitForLanguageSymbolRegistry(t,r)||s.isCancellationRequested||r.add(this.doProvideWithEditorSymbols(e,t,n,s)))(),r}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const n=new eS,s=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),n.complete(!0))}));return t.add(dt(()=>n.complete(!1))),n.p}doProvideWithEditorSymbols(e,t,n,s,r){var h;const o=e.editor,a=new _e;a.add(n.onDidAccept(g=>{var m;const[f]=n.selectedItems;f&&f.range&&(this.gotoLocation(e,{range:f.range.selection,keyMods:n.keyMods,preserveFocus:g.inBackground}),(m=r==null?void 0:r.handleAccept)==null||m.call(r,f,g.inBackground),g.inBackground||n.hide())})),a.add(n.onDidTriggerItemButton(({item:g})=>{g&&g.range&&(this.gotoLocation(e,{range:g.range.selection,keyMods:n.keyMods,forceSideBySide:!0}),n.hide())}));const l=this.getDocumentSymbols(t,s),c=a.add(new Zn),u=async g=>{var f;(f=c==null?void 0:c.value)==null||f.cancel(),n.busy=!1,c.value=new vs,n.busy=!0;try{const m=yte(n.value.substr(Aj.PREFIX.length).trim()),x=await this.doGetSymbolPicks(l,m,void 0,c.value.token,t);if(s.isCancellationRequested)return;if(x.length>0){if(n.items=x,g&&m.original.length===0){const v=NR(x,_=>!!(_.type!=="separator"&&_.range&&z.containsPosition(_.range.decoration,g)));v&&(n.activeItems=[v])}}else m.original.length>0?this.provideLabelPick(n,S(1347,"No matching editor symbols")):this.provideLabelPick(n,S(1348,"No editor symbols"))}finally{s.isCancellationRequested||(n.busy=!1)}};return a.add(n.onDidChangeValue(()=>u(void 0))),u((h=o.getSelection())==null?void 0:h.getPosition()),a.add(n.onDidChangeActive(()=>{const[g]=n.activeItems;g&&g.range&&(o.revealRangeInCenter(g.range.selection,0),this.addDecorations(o,g.range.decoration))})),a}async doGetSymbolPicks(e,t,n,s,r){var v,_;const o=await e;if(s.isCancellationRequested)return[];const a=t.original.indexOf(Aj.SCOPE_PREFIX)===0,l=a?1:0;let c,u;t.values&&t.values.length>1?(c=xwe(t.values[0]),u=xwe(t.values.slice(1))):c=t;let h;const g=(_=(v=this.options)==null?void 0:v.openSideBySideDirection)==null?void 0:_.call(v);g&&(h=[{iconClass:g==="right"?Tt.asClassName(Ee.splitHorizontal):Tt.asClassName(Ee.splitVertical),tooltip:g==="right"?S(1349,"Open to the Side"):S(1350,"Open to the Bottom")}]);const f=[];for(let w=0;wl){let H=!1;if(c!==t&&([I,R]=kK(E,{...t,values:void 0},l,D),typeof I=="number"&&(H=!0)),typeof I!="number"&&([I,R]=kK(E,c,l,D),typeof I!="number"))continue;if(!H&&u){if(T&&u.original.length>0&&([P,j]=kK(T,u)),typeof P!="number")continue;typeof I=="number"&&(I+=P)}}const B=k.tags&&k.tags.indexOf(1)>=0;f.push({index:w,kind:k.kind,score:I,label:E,ariaLabel:GPt(k.name,k.kind),description:T,highlights:B?void 0:{label:R,description:j},range:{selection:z.collapseToStart(k.selectionRange),decoration:k.range},uri:r.uri,symbolName:C,strikethrough:B,buttons:h})}const m=f.sort((w,k)=>a?this.compareByKindAndScore(w,k):this.compareByScore(w,k));let x=[];if(a){let E=function(){k&&typeof w=="number"&&C>0&&(k.label=gC(EK[w]||NK,C))},w,k,C=0;for(const D of m)w!==D.kind?(E(),w=D.kind,C=1,k={type:"separator"},x.push(k)):C++,x.push(D);E()}else m.length>0&&(x=[{label:S(1351,"symbols ({0})",f.length),type:"separator"},...m]);return x}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const n=EK[e.kind]||NK,s=EK[t.kind]||NK,r=n.localeCompare(s);return r===0?this.compareByScore(e,t):r}async getDocumentSymbols(e,t){const n=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:n.asListOfDocumentSymbols()}},Aj=Ng,Ng.PREFIX="@",Ng.SCOPE_PREFIX=":",Ng.PREFIX_BY_CATEGORY=`${Ng.PREFIX}${Ng.SCOPE_PREFIX}`,Ng);Z1=Aj=yJt([vwe(0,lt),vwe(1,bO)],Z1);const NK=S(1352,"properties ({0})"),EK={5:S(1353,"methods ({0})"),11:S(1354,"functions ({0})"),8:S(1355,"constructors ({0})"),12:S(1356,"variables ({0})"),4:S(1357,"classes ({0})"),22:S(1358,"structs ({0})"),23:S(1359,"events ({0})"),24:S(1360,"operators ({0})"),10:S(1361,"interfaces ({0})"),2:S(1362,"namespaces ({0})"),3:S(1363,"packages ({0})"),25:S(1364,"type parameters ({0})"),1:S(1365,"modules ({0})"),6:S(1366,"properties ({0})"),9:S(1367,"enumerations ({0})"),21:S(1368,"enumeration members ({0})"),14:S(1369,"strings ({0})"),0:S(1370,"files ({0})"),17:S(1371,"arrays ({0})"),15:S(1372,"numbers ({0})"),16:S(1373,"booleans ({0})"),18:S(1374,"objects ({0})"),19:S(1375,"keys ({0})"),7:S(1376,"fields ({0})"),13:S(1377,"constants ({0})")};var wJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},LK=function(i,e){return function(t,n){e(t,n,i)}};let wte=class extends Z1{constructor(e,t,n){super(t,n),this.editorService=e,this.onDidActiveTextEditorControlChange=He.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};wte=wJt([LK(0,Hn),LK(1,lt),LK(2,bO)],wte);const lH=class lH extends rt{constructor(){super({id:lH.ID,label:AM.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:J.hasDocumentSymbolProvider,kbOpts:{kbExpr:J.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Wa).quickAccess.show(Z1.PREFIX,{itemActivation:xg.NONE})}};lH.ID="editor.action.quickOutline";let bB=lH;Ke(bB);Hs.as(vS.Quickaccess).registerQuickAccessProvider({ctor:wte,prefix:Z1.PREFIX,helpEntries:[{description:AM.quickOutlineActionLabel,prefix:Z1.PREFIX,commandId:bB.ID},{description:AM.quickOutlineByCategoryActionLabel,prefix:Z1.PREFIX_BY_CATEGORY}]});function CJt(i){const e=new Map;for(const t of i)e.set(t,(e.get(t)??0)+1);return e}class a2{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const n=this.computeEmbedding(e),s=new Map,r=[];for(const[o,a]of this.documents){if(t.isCancellationRequested)return[];for(const l of a.chunks){const c=this.computeSimilarityScore(l,n,s);c>0&&r.push({key:o,score:c})}}return r}static termFrequencies(e){return CJt(a2.splitTerms(e))}static*splitTerms(e){const t=n=>n.toLowerCase();for(const[n]of e.matchAll(new RegExp("\\b\\p{Letter}[\\p{Letter}\\d]{2,}\\b","gu"))){yield t(n);const s=n.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(s.length>1)for(const r of s)r.length>2&&new RegExp("\\p{Letter}{3,}","gu").test(r)&&(yield t(r))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const n=[];for(const s of t.textChunks){const r=a2.termFrequencies(s);for(const o of r.keys())this.chunkOccurrences.set(o,(this.chunkOccurrences.get(o)??0)+1);n.push({text:s,tf:r})}this.chunkCount+=n.length,this.documents.set(t.key,{chunks:n})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const n of t.chunks)for(const s of n.tf.keys()){const r=this.chunkOccurrences.get(s);if(typeof r=="number"){const o=r-1;o<=0?this.chunkOccurrences.delete(s):this.chunkOccurrences.set(s,o)}}}}computeSimilarityScore(e,t,n){let s=0;for(const[r,o]of Object.entries(t)){const a=e.tf.get(r);if(!a)continue;let l=n.get(r);typeof l!="number"&&(l=this.computeIdf(r),n.set(r,l));const c=a*l;s+=c*o}return s}computeEmbedding(e){const t=a2.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[n,s]of e){const r=this.computeIdf(n);r>0&&(t[n]=s*r)}return t}}function SJt(i){var n;const e=i.slice(0);e.sort((s,r)=>r.score-s.score);const t=((n=e[0])==null?void 0:n.score)??0;if(t>0)for(const s of e)s.score/=t;return e}var vN;(function(i){i[i.NO_ACTION=0]="NO_ACTION",i[i.CLOSE_PICKER=1]="CLOSE_PICKER",i[i.REFRESH_PICKER=2]="REFRESH_PICKER",i[i.REMOVE_ITEM=3]="REMOVE_ITEM"})(vN||(vN={}));function DK(i){return Array.isArray(i.items)}function _we(i){const e=i;return!!e.picks&&e.additionalPicks instanceof Promise}class kJt extends se{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,n){var c;const s=new _e;e.canAcceptInBackground=!!((c=this.options)!=null&&c.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let r;const o=s.add(new Zn),a=async()=>{var v;r==null||r.dispose(!0),e.busy=!1;const u=o.value=new _e;r=u.add(new vs(t));const h=r.token;let g=e.value.substring(this.prefix.length);(v=this.options)!=null&&v.shouldSkipTrimPickFilter||(g=g.trim());const f=this._getPicks(g,u,h,n),m=(_,w)=>{var E;let k,C;if(DK(_)?(k=_.items,C=_.active):k=_,k.length===0){if(w)return!1;(g.length>0||e.hideInput)&&((E=this.options)!=null&&E.noResultsPick)&&(cC(this.options.noResultsPick)?k=[this.options.noResultsPick(g)]:k=[this.options.noResultsPick])}return e.items=k,C&&(e.activeItems=[C]),!0},x=async _=>{let w=!1,k=!1;await Promise.all([(async()=>{typeof _.mergeDelay=="number"&&(await kp(_.mergeDelay),h.isCancellationRequested)||k||(w=m(_.picks,!0))})(),(async()=>{e.busy=!0;try{const C=await _.additionalPicks;if(h.isCancellationRequested)return;let E,D;DK(_.picks)?(E=_.picks.items,D=_.picks.active):E=_.picks;let T,I;if(DK(C)?(T=C.items,I=C.active):T=C,T.length>0||!w){let R;if(!D&&!I){const P=e.activeItems[0];P&&E.indexOf(P)!==-1&&(R=P)}m({items:[...E,...T],active:D||I||R})}}finally{h.isCancellationRequested||(e.busy=!1),k=!0}})()])};if(f!==null)if(_we(f))await x(f);else if(!(f instanceof Promise))m(f);else{e.busy=!0;try{const _=await f;if(h.isCancellationRequested)return;_we(_)?await x(_):m(_)}finally{h.isCancellationRequested||(e.busy=!1)}}};s.add(e.onDidChangeValue(()=>a())),a(),s.add(e.onDidAccept(u=>{var g;if(n!=null&&n.handleAccept){u.inBackground||e.hide(),(g=n.handleAccept)==null||g.call(n,e.activeItems[0],u.inBackground);return}const[h]=e.selectedItems;typeof(h==null?void 0:h.accept)=="function"&&(u.inBackground||e.hide(),h.accept(e.keyMods,u))}));const l=async(u,h)=>{var f;if(typeof h.trigger!="function")return;const g=((f=h.buttons)==null?void 0:f.indexOf(u))??-1;if(g>=0){const m=h.trigger(g,e.keyMods),x=typeof m=="number"?m:await m;if(t.isCancellationRequested)return;switch(x){case vN.NO_ACTION:break;case vN.CLOSE_PICKER:e.hide();break;case vN.REFRESH_PICKER:a();break;case vN.REMOVE_ITEM:{const v=e.items.indexOf(h);if(v!==-1){const _=e.items.slice(),w=_.splice(v,1),k=e.activeItems.filter(E=>E!==w[0]),C=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,k&&(e.activeItems=k),e.keepScrollPosition=C}break}}}};return s.add(e.onDidTriggerItemButton(({button:u,item:h})=>l(u,h))),s.add(e.onDidTriggerSeparatorButton(({button:u,separator:h})=>l(u,h))),s}}new Yh(1e4);const NJt=new Yh(1e4);function EJt(i){return DJt(i,"NFD",NJt)}const LJt=/[^\u0000-\u0080]/;function DJt(i,e,t){if(!i)return i;const n=t.get(i);if(n)return n;let s;return LJt.test(i)?s=i.normalize(e):s=i,t.set(i,s),s}const TJt=(function(){const i=/[\u0300-\u036f]/g;return function(e){return EJt(e).replace(i,"")}})();var x3e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Lv=function(i,e){return function(t,n){e(t,n,i)}},Ry,Kr,sp;let Cte=(sp=class extends kJt{constructor(e,t,n,s,r,o){super(Ry.PREFIX,e),this.keybindingService=n,this.commandService=s,this.telemetryService=r,this.dialogService=o,this.commandsHistory=this._register(t.createInstance(Ste)),this.options=e}async _getPicks(e,t,n,s){var m,x;const r=await this.getCommandPicks(n);if(n.isCancellationRequested)return[];const o=uC(()=>{const v=new a2;v.updateDocuments(r.map(w=>({key:w.commandId,textChunks:[this.getTfIdfChunk(w)]})));const _=v.calculateScores(e,n);return SJt(_).filter(w=>w.score>Ry.TFIDF_THRESHOLD).slice(0,Ry.TFIDF_MAX_RESULTS)}),a=this.normalizeForFiltering(e),l=[];for(const v of r){v.labelNoAccents??(v.labelNoAccents=this.normalizeForFiltering(v.label));const _=Ry.WORD_FILTER(a,v.labelNoAccents)??void 0;let w;if(v.commandAlias&&(v.aliasNoAccents??(v.aliasNoAccents=this.normalizeForFiltering(v.commandAlias)),w=Ry.WORD_FILTER(a,v.aliasNoAccents)??void 0),_||w)v.highlights={label:_,detail:this.options.showAlias?w:void 0},l.push(v);else if(e===v.commandId)l.push(v);else if(e.length>=3){const k=o();if(n.isCancellationRequested)return[];const C=k.find(E=>E.key===v.commandId);C&&(v.tfIdfScore=C.score,l.push(v))}}const c=new Map;for(const v of l){const _=c.get(v.label);_?(v.description=v.commandId,_.description=_.commandId):c.set(v.label,v)}l.sort((v,_)=>{if(v.tfIdfScore&&_.tfIdfScore)return v.tfIdfScore===_.tfIdfScore?v.label.localeCompare(_.label):_.tfIdfScore-v.tfIdfScore;if(v.tfIdfScore)return 1;if(_.tfIdfScore)return-1;const w=this.commandsHistory.peek(v.commandId),k=this.commandsHistory.peek(_.commandId);if(w&&k)return w>k?-1:1;if(w)return-1;if(k)return 1;if(this.options.suggestedCommandIds){const D=this.options.suggestedCommandIds.has(v.commandId),T=this.options.suggestedCommandIds.has(_.commandId);if(D&&T)return 0;if(D)return-1;if(T)return 1}const C=v.commandCategory===Yee.Developer.value,E=_.commandCategory===Yee.Developer.value;return C&&!E?1:!C&&E?-1:v.label.localeCompare(_.label)});const u=[];let h=!1,g=!0,f=!!this.options.suggestedCommandIds;for(let v=0;v{var w;const v=await this.getAdditionalCommandPicks(r,l,e,n);if(n.isCancellationRequested)return[];const _=v.map(k=>this.toCommandPick(k,s));return g&&((w=_[0])==null?void 0:w.type)!=="separator"&&_.unshift({type:"separator",label:S(1744,"similar commands")}),_})()}:u}toCommandPick(e,t){if(e.type==="separator")return e;const n=this.keybindingService.lookupKeybinding(e.commandId),s=n?S(1745,"{0}, {1}",e.label,n.getAriaLabel()):e.label;return{...e,ariaLabel:s,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:n,accept:async()=>{var r;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:(t==null?void 0:t.from)??"quick open"});try{(r=e.args)!=null&&r.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(o){Zd(o)||this.dialogService.error(S(1746,"Command '{0}' resulted in an error",e.label),Q6(o))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:n}){let s=e;return t&&t!==e&&(s+=` - ${t}`),n&&n.value!==e&&(s+=` - ${n.value===n.original?n.value:`${n.value} (${n.original})`}`),s}normalizeForFiltering(e){const t=TJt(e);return t.length!==e.length?(this.telemetryService.publicLog2("QuickAccess:FilterLengthMismatch",{originalLength:e.length,normalizedLength:t.length}),e):t}},Ry=sp,sp.PREFIX=">",sp.TFIDF_THRESHOLD=.5,sp.TFIDF_MAX_RESULTS=5,sp.WORD_FILTER=mae(VR,Yjt,SRe),sp);Cte=Ry=x3e([Lv(1,ft),Lv(2,zn),Lv(3,es),Lv(4,Ua),Lv(5,vO)],Cte);var Eg;let Ste=(Eg=class extends se{constructor(e,t,n){super(),this.storageService=e,this.configurationService=t,this.logService=n,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>this.updateConfiguration(e))),this._register(this.storageService.onWillSaveState(e=>{e.reason===__.SHUTDOWN&&this.saveState()}))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=Kr.getConfiguredCommandHistoryLength(this.configurationService),Kr.cache&&Kr.cache.limit!==this.configuredCommandsHistoryLength&&(Kr.cache.limit=this.configuredCommandsHistoryLength,Kr.hasChanges=!0))}load(){const e=this.storageService.get(Kr.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(s){this.logService.error(`[CommandsHistory] invalid data: ${s}`)}const n=Kr.cache=new Yh(this.configuredCommandsHistoryLength,1);if(t){let s;t.usesLRU?s=t.entries:s=t.entries.sort((r,o)=>r.value-o.value),s.forEach(r=>n.set(r.key,r.value))}Kr.counter=this.storageService.getNumber(Kr.PREF_KEY_COUNTER,0,Kr.counter)}push(e){Kr.cache&&(Kr.cache.set(e,Kr.counter++),Kr.hasChanges=!0)}peek(e){var t;return(t=Kr.cache)==null?void 0:t.peek(e)}saveState(){if(!Kr.cache||!Kr.hasChanges)return;const e={usesLRU:!0,entries:[]};Kr.cache.forEach((t,n)=>e.entries.push({key:n,value:t})),this.storageService.store(Kr.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(Kr.PREF_KEY_COUNTER,Kr.counter,0,0),Kr.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var s,r;const n=(r=(s=e.getValue().workbench)==null?void 0:s.commandPalette)==null?void 0:r.history;return typeof n=="number"?n:Kr.DEFAULT_COMMANDS_HISTORY_LENGTH}},Kr=Eg,Eg.DEFAULT_COMMANDS_HISTORY_LENGTH=50,Eg.PREF_KEY_CACHE="commandPalette.mru.cache",Eg.PREF_KEY_COUNTER="commandPalette.mru.counter",Eg.counter=1,Eg.hasChanges=!1,Eg);Ste=Kr=x3e([Lv(0,xl),Lv(1,Zt),Lv(2,Ji)],Ste);class IJt extends Cte{constructor(e,t,n,s,r,o){super(e,t,n,s,r,o)}getCodeEditorCommandPicks(){var n;const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const s of e.getSupportedActions()){let r;(n=s.metadata)!=null&&n.description&&(OBt(s.metadata.description)?r=s.metadata.description:r={original:s.metadata.description,value:s.metadata.description}),t.push({commandId:s.id,commandAlias:s.alias,commandDescription:r,label:wae(s.label)||s.id})}return t}}var AJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},jk=function(i,e){return function(t,n){e(t,n,i)}};let PM=class extends IJt{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,n,s,r,o){super({showAlias:!1},e,n,s,r,o),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};PM=AJt([jk(0,ft),jk(1,Hn),jk(2,zn),jk(3,es),jk(4,Ua),jk(5,vO)],PM);const cH=class cH extends rt{constructor(){super({id:cH.ID,label:pB.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:J.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Wa).quickAccess.show(PM.PREFIX)}};cH.ID="editor.action.quickCommand";let xB=cH;Ke(xB);Hs.as(vS.Quickaccess).registerQuickAccessProvider({ctor:PM,prefix:PM.PREFIX,helpEntries:[{description:pB.quickCommandHelp,commandId:xB.ID}]});var RJt=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Fk=function(i,e){return function(t,n){e(t,n,i)}};let kte=class extends BC{constructor(e,t,n,s,r,o,a){super(!0,e,t,n,s,r,o,a)}};kte=RJt([Fk(1,Bt),Fk(2,Hn),Fk(3,nr),Fk(4,ft),Fk(5,xl),Fk(6,Zt)],kte);Pn(BC.ID,kte,4);class MJt{constructor(e,t,n,s,r){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=n,this.foreground=s,this.background=r}}function PJt(i){if(!i||!Array.isArray(i))return[];const e=[];let t=0;for(let n=0,s=i.length;n{const g=WJt(u.token,h.token);return g!==0?g:u.index-h.index});let t=0,n="000000",s="ffffff";for(;i.length>=1&&i[0].token==="";){const u=i.shift();u.fontStyle!==-1&&(t=u.fontStyle),u.foreground!==null&&(n=u.foreground),u.background!==null&&(s=u.background)}const r=new FJt;for(const u of e)r.getId(u);const o=r.getId(n),a=r.getId(s),l=new hce(t,o,a),c=new gce(l);for(let u=0,h=i.length;u"u"){const s=this._match(t),r=HJt(t);n=(s.metadata|r<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}}const BJt=/\b(comment|string|regex|regexp)\b/;function HJt(i){const e=i.match(BJt);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}function WJt(i,e){return ie?1:0}class hce{constructor(e,t,n){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new hce(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,n){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class gce{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;const t=e.indexOf(".");let n,s;t===-1?(n=e,s=""):(n=e.substring(0,t),s=e.substring(t+1));const r=this._children.get(n);return typeof r<"u"?r.match(s):this._mainRule}insert(e,t,n,s){if(e===""){this._mainRule.acceptOverwrite(t,n,s);return}const r=e.indexOf(".");let o,a;r===-1?(o=e,a=""):(o=e.substring(0,r),a=e.substring(r+1));let l=this._children.get(o);typeof l>"u"&&(l=new gce(this._mainRule.clone()),this._children.set(o,l)),l.insert(a,t,n,s)}}function VJt(i){const e=[];for(let t=1,n=i.length;tt.fire())),i&&e.add(i.onDidProductIconThemeChange(()=>t.fire())),{dispose:()=>e.dispose(),onDidChange:t.event,getCSS(){const s=i?i.getProductIconTheme():new _3e,r={},o=new fq,a=new fq;for(const l of n.getIcons()){const c=s.getIcon(l);if(!c)continue;const u=c.font,h=Tc`--vscode-icon-${O3(l.id)}-font-family`,g=Tc`--vscode-icon-${O3(l.id)}-content`;u?(r[u.id]=u.definition,a.push(Tc`${h}: ${Qx(u.id)};`,Tc`${g}: ${Qx(c.fontCharacter)};`),o.push(Tc`.codicon-${O3(l.id)}:before { content: ${Qx(c.fontCharacter)}; font-family: ${Qx(u.id)}; }`)):(a.push(Tc`${g}: ${Qx(c.fontCharacter)}; ${h}: 'codicon';`),o.push(Tc`.codicon-${O3(l.id)}:before { content: ${Qx(c.fontCharacter)}; }`))}for(const l in r){const c=r[l],u=c.weight?Tc`font-weight: ${D_e(c.weight)};`:Tc``,h=c.style?Tc`font-style: ${D_e(c.style)};`:Tc``,g=new fq;for(const f of c.src)g.push(Tc`${Dp(f.location)} format(${Qx(f.format)})`);o.push(Tc`@font-face { src: ${g.join(", ")}; font-family: ${Qx(l)};${u}${h} font-display: block; }`)}return o.push(Tc`:root { ${a.join(" ")} }`),o.join(` +`)}}}class _3e{getIcon(e){const t=pMe();let n=e.defaults;for(;Tt.isThemeIcon(n);){const s=t.getIcon(n.id);if(!s)return;n=s.defaults}return n}}const ob="vs",fE="vs-dark",J1="hc-black",ew="hc-light",y3e=Hs.as(IAe.ColorContribution),GJt=Hs.as(h2e.ThemingContribution);class w3e{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const n=t.base;e.length>0?(Rj(e)?this.id=e:this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,ye.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=Nte(this.themeData.base);for(const n in t.colors)e.has(n)||e.set(n,ye.fromHex(t.colors[n]))}this.colors=e}return this.colors}getColor(e,t){const n=this.getColors().get(e);if(n)return n;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=y3e.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case ob:return Pu.LIGHT;case J1:return Pu.HIGH_CONTRAST_DARK;case ew:return Pu.HIGH_CONTRAST_LIGHT;default:return Pu.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const r=Nte(this.themeData.base);e=r.rules,r.encodedTokensColors&&(t=r.encodedTokensColors)}const n=this.themeData.colors["editor.foreground"],s=this.themeData.colors["editor.background"];if(n||s){const r={token:""};n&&(r.foreground=n),s&&(r.background=s),e.push(r)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=v3e.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,n){const r=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=Ra.getForeground(r),a=Ra.getFontStyle(r);return{foreground:o,italic:!!(a&1),bold:!!(a&2),underline:!!(a&4),strikethrough:!!(a&8)}}get tokenColorMap(){return[]}}function Rj(i){return i===ob||i===fE||i===J1||i===ew}function Nte(i){switch(i){case ob:return zJt;case fE:return UJt;case J1:return $Jt;case ew:return qJt}}function C4(i){const e=Nte(i);return new w3e(i,e)}class YJt extends se{constructor(){super(),this._onColorThemeChange=this._register(new ie),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new ie),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new _3e,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(ob,C4(ob)),this._knownThemes.set(fE,C4(fE)),this._knownThemes.set(J1,C4(J1)),this._knownThemes.set(ew,C4(ew));const e=this._register(KJt(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(ob),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),BTe(fi,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return RF(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Yu(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),se.None}_registerShadowDomContainer(e){const t=Yu(e,n=>{n.className="monaco-colors",n.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let n=0;n{n.base===e&&n.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(ob),this._updateActualTheme(t)}_updateActualTheme(e){!e||this._theme===e||(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=fi.matchMedia("(forced-colors: active)").matches;if(e!==Fg(this._theme.type)){let t;Xb(this._theme.type)?t=e?J1:fE:t=e?ew:ob,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},n={addRule:o=>{t[o]||(e.push(o),t[o]=!0)}};GJt.getThemingParticipants().forEach(o=>o(this._theme,n,this._environment));const s=[];for(const o of y3e.getColors()){const a=this._theme.getColor(o.id,!0);a&&s.push(`${Noe(o.id)}: ${a.toString()};`)}n.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${s.join(` +`)} }`);const r=this._colorMapOverride||this._theme.tokenTheme.getColorMap();n.addRule(VJt(r)),n.addRule(".monaco-editor, .monaco-diff-editor, .monaco-component { forced-color-adjust: none; }"),this._themeCSS=e.join(` +`),this._updateCSS(),Gs.setColorMap(r),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}class QJt extends rt{constructor(){super({id:"editor.action.toggleHighContrast",label:gte.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const n=e.get(tu),s=n.getColorTheme();Fg(s.type)?(n.setTheme(this._originalThemeName||(Xb(s.type)?fE:ob)),this._originalThemeName=null):(n.setTheme(Xb(s.type)?J1:ew),this._originalThemeName=s.themeName)}}Ke(QJt);var Ete;(function(i){i[i.Unknown=0]="Unknown",i[i.Disabled=1]="Disabled",i[i.Enabled=2]="Enabled"})(Ete||(Ete={}));var Lte;(function(i){i[i.Invoke=1]="Invoke",i[i.Auto=2]="Auto"})(Lte||(Lte={}));var Dte;(function(i){i[i.None=0]="None",i[i.KeepWhitespace=1]="KeepWhitespace",i[i.InsertAsSnippet=4]="InsertAsSnippet"})(Dte||(Dte={}));var Tte;(function(i){i[i.Method=0]="Method",i[i.Function=1]="Function",i[i.Constructor=2]="Constructor",i[i.Field=3]="Field",i[i.Variable=4]="Variable",i[i.Class=5]="Class",i[i.Struct=6]="Struct",i[i.Interface=7]="Interface",i[i.Module=8]="Module",i[i.Property=9]="Property",i[i.Event=10]="Event",i[i.Operator=11]="Operator",i[i.Unit=12]="Unit",i[i.Value=13]="Value",i[i.Constant=14]="Constant",i[i.Enum=15]="Enum",i[i.EnumMember=16]="EnumMember",i[i.Keyword=17]="Keyword",i[i.Text=18]="Text",i[i.Color=19]="Color",i[i.File=20]="File",i[i.Reference=21]="Reference",i[i.Customcolor=22]="Customcolor",i[i.Folder=23]="Folder",i[i.TypeParameter=24]="TypeParameter",i[i.User=25]="User",i[i.Issue=26]="Issue",i[i.Tool=27]="Tool",i[i.Snippet=28]="Snippet"})(Tte||(Tte={}));var Ite;(function(i){i[i.Deprecated=1]="Deprecated"})(Ite||(Ite={}));var Ate;(function(i){i[i.Invoke=0]="Invoke",i[i.TriggerCharacter=1]="TriggerCharacter",i[i.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Ate||(Ate={}));var Rte;(function(i){i[i.EXACT=0]="EXACT",i[i.ABOVE=1]="ABOVE",i[i.BELOW=2]="BELOW"})(Rte||(Rte={}));var Mte;(function(i){i[i.NotSet=0]="NotSet",i[i.ContentFlush=1]="ContentFlush",i[i.RecoverFromMarkers=2]="RecoverFromMarkers",i[i.Explicit=3]="Explicit",i[i.Paste=4]="Paste",i[i.Undo=5]="Undo",i[i.Redo=6]="Redo"})(Mte||(Mte={}));var Pte;(function(i){i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(Pte||(Pte={}));var Ote;(function(i){i[i.Text=0]="Text",i[i.Read=1]="Read",i[i.Write=2]="Write"})(Ote||(Ote={}));var jte;(function(i){i[i.None=0]="None",i[i.Keep=1]="Keep",i[i.Brackets=2]="Brackets",i[i.Advanced=3]="Advanced",i[i.Full=4]="Full"})(jte||(jte={}));var Fte;(function(i){i[i.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",i[i.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",i[i.accessibilitySupport=2]="accessibilitySupport",i[i.accessibilityPageSize=3]="accessibilityPageSize",i[i.allowOverflow=4]="allowOverflow",i[i.allowVariableLineHeights=5]="allowVariableLineHeights",i[i.allowVariableFonts=6]="allowVariableFonts",i[i.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",i[i.ariaLabel=8]="ariaLabel",i[i.ariaRequired=9]="ariaRequired",i[i.autoClosingBrackets=10]="autoClosingBrackets",i[i.autoClosingComments=11]="autoClosingComments",i[i.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",i[i.autoClosingDelete=13]="autoClosingDelete",i[i.autoClosingOvertype=14]="autoClosingOvertype",i[i.autoClosingQuotes=15]="autoClosingQuotes",i[i.autoIndent=16]="autoIndent",i[i.autoIndentOnPaste=17]="autoIndentOnPaste",i[i.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",i[i.automaticLayout=19]="automaticLayout",i[i.autoSurround=20]="autoSurround",i[i.bracketPairColorization=21]="bracketPairColorization",i[i.guides=22]="guides",i[i.codeLens=23]="codeLens",i[i.codeLensFontFamily=24]="codeLensFontFamily",i[i.codeLensFontSize=25]="codeLensFontSize",i[i.colorDecorators=26]="colorDecorators",i[i.colorDecoratorsLimit=27]="colorDecoratorsLimit",i[i.columnSelection=28]="columnSelection",i[i.comments=29]="comments",i[i.contextmenu=30]="contextmenu",i[i.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",i[i.cursorBlinking=32]="cursorBlinking",i[i.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",i[i.cursorStyle=34]="cursorStyle",i[i.cursorSurroundingLines=35]="cursorSurroundingLines",i[i.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",i[i.cursorWidth=37]="cursorWidth",i[i.cursorHeight=38]="cursorHeight",i[i.disableLayerHinting=39]="disableLayerHinting",i[i.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",i[i.domReadOnly=41]="domReadOnly",i[i.dragAndDrop=42]="dragAndDrop",i[i.dropIntoEditor=43]="dropIntoEditor",i[i.editContext=44]="editContext",i[i.emptySelectionClipboard=45]="emptySelectionClipboard",i[i.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",i[i.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",i[i.extraEditorClassName=48]="extraEditorClassName",i[i.fastScrollSensitivity=49]="fastScrollSensitivity",i[i.find=50]="find",i[i.fixedOverflowWidgets=51]="fixedOverflowWidgets",i[i.folding=52]="folding",i[i.foldingStrategy=53]="foldingStrategy",i[i.foldingHighlight=54]="foldingHighlight",i[i.foldingImportsByDefault=55]="foldingImportsByDefault",i[i.foldingMaximumRegions=56]="foldingMaximumRegions",i[i.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",i[i.fontFamily=58]="fontFamily",i[i.fontInfo=59]="fontInfo",i[i.fontLigatures=60]="fontLigatures",i[i.fontSize=61]="fontSize",i[i.fontWeight=62]="fontWeight",i[i.fontVariations=63]="fontVariations",i[i.formatOnPaste=64]="formatOnPaste",i[i.formatOnType=65]="formatOnType",i[i.glyphMargin=66]="glyphMargin",i[i.gotoLocation=67]="gotoLocation",i[i.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",i[i.hover=69]="hover",i[i.inDiffEditor=70]="inDiffEditor",i[i.inlineSuggest=71]="inlineSuggest",i[i.letterSpacing=72]="letterSpacing",i[i.lightbulb=73]="lightbulb",i[i.lineDecorationsWidth=74]="lineDecorationsWidth",i[i.lineHeight=75]="lineHeight",i[i.lineNumbers=76]="lineNumbers",i[i.lineNumbersMinChars=77]="lineNumbersMinChars",i[i.linkedEditing=78]="linkedEditing",i[i.links=79]="links",i[i.matchBrackets=80]="matchBrackets",i[i.minimap=81]="minimap",i[i.mouseStyle=82]="mouseStyle",i[i.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",i[i.mouseWheelZoom=84]="mouseWheelZoom",i[i.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",i[i.multiCursorModifier=86]="multiCursorModifier",i[i.mouseMiddleClickAction=87]="mouseMiddleClickAction",i[i.multiCursorPaste=88]="multiCursorPaste",i[i.multiCursorLimit=89]="multiCursorLimit",i[i.occurrencesHighlight=90]="occurrencesHighlight",i[i.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",i[i.overtypeCursorStyle=92]="overtypeCursorStyle",i[i.overtypeOnPaste=93]="overtypeOnPaste",i[i.overviewRulerBorder=94]="overviewRulerBorder",i[i.overviewRulerLanes=95]="overviewRulerLanes",i[i.padding=96]="padding",i[i.pasteAs=97]="pasteAs",i[i.parameterHints=98]="parameterHints",i[i.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",i[i.placeholder=100]="placeholder",i[i.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",i[i.quickSuggestions=102]="quickSuggestions",i[i.quickSuggestionsDelay=103]="quickSuggestionsDelay",i[i.readOnly=104]="readOnly",i[i.readOnlyMessage=105]="readOnlyMessage",i[i.renameOnType=106]="renameOnType",i[i.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",i[i.renderControlCharacters=108]="renderControlCharacters",i[i.renderFinalNewline=109]="renderFinalNewline",i[i.renderLineHighlight=110]="renderLineHighlight",i[i.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",i[i.renderValidationDecorations=112]="renderValidationDecorations",i[i.renderWhitespace=113]="renderWhitespace",i[i.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",i[i.roundedSelection=115]="roundedSelection",i[i.rulers=116]="rulers",i[i.scrollbar=117]="scrollbar",i[i.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",i[i.scrollBeyondLastLine=119]="scrollBeyondLastLine",i[i.scrollPredominantAxis=120]="scrollPredominantAxis",i[i.selectionClipboard=121]="selectionClipboard",i[i.selectionHighlight=122]="selectionHighlight",i[i.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",i[i.selectionHighlightMultiline=124]="selectionHighlightMultiline",i[i.selectOnLineNumbers=125]="selectOnLineNumbers",i[i.showFoldingControls=126]="showFoldingControls",i[i.showUnused=127]="showUnused",i[i.snippetSuggestions=128]="snippetSuggestions",i[i.smartSelect=129]="smartSelect",i[i.smoothScrolling=130]="smoothScrolling",i[i.stickyScroll=131]="stickyScroll",i[i.stickyTabStops=132]="stickyTabStops",i[i.stopRenderingLineAfter=133]="stopRenderingLineAfter",i[i.suggest=134]="suggest",i[i.suggestFontSize=135]="suggestFontSize",i[i.suggestLineHeight=136]="suggestLineHeight",i[i.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",i[i.suggestSelection=138]="suggestSelection",i[i.tabCompletion=139]="tabCompletion",i[i.tabIndex=140]="tabIndex",i[i.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",i[i.unicodeHighlighting=142]="unicodeHighlighting",i[i.unusualLineTerminators=143]="unusualLineTerminators",i[i.useShadowDOM=144]="useShadowDOM",i[i.useTabStops=145]="useTabStops",i[i.wordBreak=146]="wordBreak",i[i.wordSegmenterLocales=147]="wordSegmenterLocales",i[i.wordSeparators=148]="wordSeparators",i[i.wordWrap=149]="wordWrap",i[i.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",i[i.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",i[i.wordWrapColumn=152]="wordWrapColumn",i[i.wordWrapOverride1=153]="wordWrapOverride1",i[i.wordWrapOverride2=154]="wordWrapOverride2",i[i.wrappingIndent=155]="wrappingIndent",i[i.wrappingStrategy=156]="wrappingStrategy",i[i.showDeprecated=157]="showDeprecated",i[i.inertialScroll=158]="inertialScroll",i[i.inlayHints=159]="inlayHints",i[i.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",i[i.effectiveCursorStyle=161]="effectiveCursorStyle",i[i.editorClassName=162]="editorClassName",i[i.pixelRatio=163]="pixelRatio",i[i.tabFocusMode=164]="tabFocusMode",i[i.layoutInfo=165]="layoutInfo",i[i.wrappingInfo=166]="wrappingInfo",i[i.defaultColorDecorators=167]="defaultColorDecorators",i[i.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",i[i.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",i[i.effectiveEditContext=170]="effectiveEditContext",i[i.scrollOnMiddleClick=171]="scrollOnMiddleClick",i[i.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts"})(Fte||(Fte={}));var Bte;(function(i){i[i.TextDefined=0]="TextDefined",i[i.LF=1]="LF",i[i.CRLF=2]="CRLF"})(Bte||(Bte={}));var Hte;(function(i){i[i.LF=0]="LF",i[i.CRLF=1]="CRLF"})(Hte||(Hte={}));var Wte;(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=3]="Right"})(Wte||(Wte={}));var Vte;(function(i){i[i.Increase=0]="Increase",i[i.Decrease=1]="Decrease"})(Vte||(Vte={}));var zte;(function(i){i[i.None=0]="None",i[i.Indent=1]="Indent",i[i.IndentOutdent=2]="IndentOutdent",i[i.Outdent=3]="Outdent"})(zte||(zte={}));var Ute;(function(i){i[i.Both=0]="Both",i[i.Right=1]="Right",i[i.Left=2]="Left",i[i.None=3]="None"})(Ute||(Ute={}));var $te;(function(i){i[i.Type=1]="Type",i[i.Parameter=2]="Parameter"})($te||($te={}));var qte;(function(i){i[i.Accepted=0]="Accepted",i[i.Rejected=1]="Rejected",i[i.Ignored=2]="Ignored"})(qte||(qte={}));var Kte;(function(i){i[i.Code=1]="Code",i[i.Label=2]="Label"})(Kte||(Kte={}));var Gte;(function(i){i[i.Automatic=0]="Automatic",i[i.Explicit=1]="Explicit"})(Gte||(Gte={}));var Yte;(function(i){i[i.DependsOnKbLayout=-1]="DependsOnKbLayout",i[i.Unknown=0]="Unknown",i[i.Backspace=1]="Backspace",i[i.Tab=2]="Tab",i[i.Enter=3]="Enter",i[i.Shift=4]="Shift",i[i.Ctrl=5]="Ctrl",i[i.Alt=6]="Alt",i[i.PauseBreak=7]="PauseBreak",i[i.CapsLock=8]="CapsLock",i[i.Escape=9]="Escape",i[i.Space=10]="Space",i[i.PageUp=11]="PageUp",i[i.PageDown=12]="PageDown",i[i.End=13]="End",i[i.Home=14]="Home",i[i.LeftArrow=15]="LeftArrow",i[i.UpArrow=16]="UpArrow",i[i.RightArrow=17]="RightArrow",i[i.DownArrow=18]="DownArrow",i[i.Insert=19]="Insert",i[i.Delete=20]="Delete",i[i.Digit0=21]="Digit0",i[i.Digit1=22]="Digit1",i[i.Digit2=23]="Digit2",i[i.Digit3=24]="Digit3",i[i.Digit4=25]="Digit4",i[i.Digit5=26]="Digit5",i[i.Digit6=27]="Digit6",i[i.Digit7=28]="Digit7",i[i.Digit8=29]="Digit8",i[i.Digit9=30]="Digit9",i[i.KeyA=31]="KeyA",i[i.KeyB=32]="KeyB",i[i.KeyC=33]="KeyC",i[i.KeyD=34]="KeyD",i[i.KeyE=35]="KeyE",i[i.KeyF=36]="KeyF",i[i.KeyG=37]="KeyG",i[i.KeyH=38]="KeyH",i[i.KeyI=39]="KeyI",i[i.KeyJ=40]="KeyJ",i[i.KeyK=41]="KeyK",i[i.KeyL=42]="KeyL",i[i.KeyM=43]="KeyM",i[i.KeyN=44]="KeyN",i[i.KeyO=45]="KeyO",i[i.KeyP=46]="KeyP",i[i.KeyQ=47]="KeyQ",i[i.KeyR=48]="KeyR",i[i.KeyS=49]="KeyS",i[i.KeyT=50]="KeyT",i[i.KeyU=51]="KeyU",i[i.KeyV=52]="KeyV",i[i.KeyW=53]="KeyW",i[i.KeyX=54]="KeyX",i[i.KeyY=55]="KeyY",i[i.KeyZ=56]="KeyZ",i[i.Meta=57]="Meta",i[i.ContextMenu=58]="ContextMenu",i[i.F1=59]="F1",i[i.F2=60]="F2",i[i.F3=61]="F3",i[i.F4=62]="F4",i[i.F5=63]="F5",i[i.F6=64]="F6",i[i.F7=65]="F7",i[i.F8=66]="F8",i[i.F9=67]="F9",i[i.F10=68]="F10",i[i.F11=69]="F11",i[i.F12=70]="F12",i[i.F13=71]="F13",i[i.F14=72]="F14",i[i.F15=73]="F15",i[i.F16=74]="F16",i[i.F17=75]="F17",i[i.F18=76]="F18",i[i.F19=77]="F19",i[i.F20=78]="F20",i[i.F21=79]="F21",i[i.F22=80]="F22",i[i.F23=81]="F23",i[i.F24=82]="F24",i[i.NumLock=83]="NumLock",i[i.ScrollLock=84]="ScrollLock",i[i.Semicolon=85]="Semicolon",i[i.Equal=86]="Equal",i[i.Comma=87]="Comma",i[i.Minus=88]="Minus",i[i.Period=89]="Period",i[i.Slash=90]="Slash",i[i.Backquote=91]="Backquote",i[i.BracketLeft=92]="BracketLeft",i[i.Backslash=93]="Backslash",i[i.BracketRight=94]="BracketRight",i[i.Quote=95]="Quote",i[i.OEM_8=96]="OEM_8",i[i.IntlBackslash=97]="IntlBackslash",i[i.Numpad0=98]="Numpad0",i[i.Numpad1=99]="Numpad1",i[i.Numpad2=100]="Numpad2",i[i.Numpad3=101]="Numpad3",i[i.Numpad4=102]="Numpad4",i[i.Numpad5=103]="Numpad5",i[i.Numpad6=104]="Numpad6",i[i.Numpad7=105]="Numpad7",i[i.Numpad8=106]="Numpad8",i[i.Numpad9=107]="Numpad9",i[i.NumpadMultiply=108]="NumpadMultiply",i[i.NumpadAdd=109]="NumpadAdd",i[i.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",i[i.NumpadSubtract=111]="NumpadSubtract",i[i.NumpadDecimal=112]="NumpadDecimal",i[i.NumpadDivide=113]="NumpadDivide",i[i.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",i[i.ABNT_C1=115]="ABNT_C1",i[i.ABNT_C2=116]="ABNT_C2",i[i.AudioVolumeMute=117]="AudioVolumeMute",i[i.AudioVolumeUp=118]="AudioVolumeUp",i[i.AudioVolumeDown=119]="AudioVolumeDown",i[i.BrowserSearch=120]="BrowserSearch",i[i.BrowserHome=121]="BrowserHome",i[i.BrowserBack=122]="BrowserBack",i[i.BrowserForward=123]="BrowserForward",i[i.MediaTrackNext=124]="MediaTrackNext",i[i.MediaTrackPrevious=125]="MediaTrackPrevious",i[i.MediaStop=126]="MediaStop",i[i.MediaPlayPause=127]="MediaPlayPause",i[i.LaunchMediaPlayer=128]="LaunchMediaPlayer",i[i.LaunchMail=129]="LaunchMail",i[i.LaunchApp2=130]="LaunchApp2",i[i.Clear=131]="Clear",i[i.MAX_VALUE=132]="MAX_VALUE"})(Yte||(Yte={}));var Qte;(function(i){i[i.Hint=1]="Hint",i[i.Info=2]="Info",i[i.Warning=4]="Warning",i[i.Error=8]="Error"})(Qte||(Qte={}));var Xte;(function(i){i[i.Unnecessary=1]="Unnecessary",i[i.Deprecated=2]="Deprecated"})(Xte||(Xte={}));var Zte;(function(i){i[i.Inline=1]="Inline",i[i.Gutter=2]="Gutter"})(Zte||(Zte={}));var Jte;(function(i){i[i.Normal=1]="Normal",i[i.Underlined=2]="Underlined"})(Jte||(Jte={}));var ene;(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.TEXTAREA=1]="TEXTAREA",i[i.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",i[i.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",i[i.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",i[i.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",i[i.CONTENT_TEXT=6]="CONTENT_TEXT",i[i.CONTENT_EMPTY=7]="CONTENT_EMPTY",i[i.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",i[i.CONTENT_WIDGET=9]="CONTENT_WIDGET",i[i.OVERVIEW_RULER=10]="OVERVIEW_RULER",i[i.SCROLLBAR=11]="SCROLLBAR",i[i.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",i[i.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(ene||(ene={}));var tne;(function(i){i[i.AIGenerated=1]="AIGenerated"})(tne||(tne={}));var nne;(function(i){i[i.Invoke=0]="Invoke",i[i.Automatic=1]="Automatic"})(nne||(nne={}));var ine;(function(i){i[i.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",i[i.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",i[i.TOP_CENTER=2]="TOP_CENTER"})(ine||(ine={}));var sne;(function(i){i[i.Left=1]="Left",i[i.Center=2]="Center",i[i.Right=4]="Right",i[i.Full=7]="Full"})(sne||(sne={}));var rne;(function(i){i[i.Word=0]="Word",i[i.Line=1]="Line",i[i.Suggest=2]="Suggest"})(rne||(rne={}));var one;(function(i){i[i.Left=0]="Left",i[i.Right=1]="Right",i[i.None=2]="None",i[i.LeftOfInjectedText=3]="LeftOfInjectedText",i[i.RightOfInjectedText=4]="RightOfInjectedText"})(one||(one={}));var ane;(function(i){i[i.Off=0]="Off",i[i.On=1]="On",i[i.Relative=2]="Relative",i[i.Interval=3]="Interval",i[i.Custom=4]="Custom"})(ane||(ane={}));var lne;(function(i){i[i.None=0]="None",i[i.Text=1]="Text",i[i.Blocks=2]="Blocks"})(lne||(lne={}));var cne;(function(i){i[i.Smooth=0]="Smooth",i[i.Immediate=1]="Immediate"})(cne||(cne={}));var dne;(function(i){i[i.Auto=1]="Auto",i[i.Hidden=2]="Hidden",i[i.Visible=3]="Visible"})(dne||(dne={}));var une;(function(i){i[i.LTR=0]="LTR",i[i.RTL=1]="RTL"})(une||(une={}));var hne;(function(i){i.Off="off",i.OnCode="onCode",i.On="on"})(hne||(hne={}));var gne;(function(i){i[i.Invoke=1]="Invoke",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange"})(gne||(gne={}));var fne;(function(i){i[i.File=0]="File",i[i.Module=1]="Module",i[i.Namespace=2]="Namespace",i[i.Package=3]="Package",i[i.Class=4]="Class",i[i.Method=5]="Method",i[i.Property=6]="Property",i[i.Field=7]="Field",i[i.Constructor=8]="Constructor",i[i.Enum=9]="Enum",i[i.Interface=10]="Interface",i[i.Function=11]="Function",i[i.Variable=12]="Variable",i[i.Constant=13]="Constant",i[i.String=14]="String",i[i.Number=15]="Number",i[i.Boolean=16]="Boolean",i[i.Array=17]="Array",i[i.Object=18]="Object",i[i.Key=19]="Key",i[i.Null=20]="Null",i[i.EnumMember=21]="EnumMember",i[i.Struct=22]="Struct",i[i.Event=23]="Event",i[i.Operator=24]="Operator",i[i.TypeParameter=25]="TypeParameter"})(fne||(fne={}));var pne;(function(i){i[i.Deprecated=1]="Deprecated"})(pne||(pne={}));var mne;(function(i){i[i.LTR=0]="LTR",i[i.RTL=1]="RTL"})(mne||(mne={}));var bne;(function(i){i[i.Hidden=0]="Hidden",i[i.Blink=1]="Blink",i[i.Smooth=2]="Smooth",i[i.Phase=3]="Phase",i[i.Expand=4]="Expand",i[i.Solid=5]="Solid"})(bne||(bne={}));var xne;(function(i){i[i.Line=1]="Line",i[i.Block=2]="Block",i[i.Underline=3]="Underline",i[i.LineThin=4]="LineThin",i[i.BlockOutline=5]="BlockOutline",i[i.UnderlineThin=6]="UnderlineThin"})(xne||(xne={}));var vne;(function(i){i[i.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",i[i.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",i[i.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",i[i.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(vne||(vne={}));var _ne;(function(i){i[i.None=0]="None",i[i.Same=1]="Same",i[i.Indent=2]="Indent",i[i.DeepIndent=3]="DeepIndent"})(_ne||(_ne={}));var wb;let XJt=(wb=class{static chord(e,t){return Or(e,t)}},wb.CtrlCmd=2048,wb.Shift=1024,wb.Alt=512,wb.WinCtrl=256,wb);function C3e(){return{editor:void 0,languages:void 0,CancellationTokenSource:vs,Emitter:ie,KeyCode:Yte,KeyMod:XJt,Position:te,Range:z,Selection:st,SelectionDirection:une,MarkerSeverity:Qte,MarkerTag:Xte,Uri:kt,Token:LR}}const ywe="default",ZJt="$initialize";let wwe=!1;function yne(i){Vp&&(wwe||(wwe=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(i.message))}class JJt{constructor(e,t,n,s,r){this.vsWorker=e,this.req=t,this.channel=n,this.method=s,this.args=r,this.type=0}}class Cwe{constructor(e,t,n,s){this.vsWorker=e,this.seq=t,this.res=n,this.err=s,this.type=1}}class een{constructor(e,t,n,s,r){this.vsWorker=e,this.req=t,this.channel=n,this.eventName=s,this.arg=r,this.type=2}}class ten{constructor(e,t,n){this.vsWorker=e,this.req=t,this.event=n,this.type=3}}class nen{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class ien{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,t,n){const s=String(++this._lastSentReq);return new Promise((r,o)=>{this._pendingReplies[s]={resolve:r,reject:o},this._send(new JJt(this._workerId,s,e,t,n))})}listen(e,t,n){let s=null;const r=new ie({onWillAddFirstListener:()=>{s=String(++this._lastSentReq),this._pendingEmitters.set(s,r),this._send(new een(this._workerId,s,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(s),this._send(new nen(this._workerId,s)),s=null}});return r.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,t){const n={get:(s,r)=>(typeof r=="string"&&!s[r]&&(k3e(r)?s[r]=o=>this.listen(e,r,o):S3e(r)?s[r]=this.listen(e,r,void 0):r.charCodeAt(0)===36&&(s[r]=async(...o)=>(await(t==null?void 0:t()),this.sendMessage(e,r,o)))),s[r])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;if(e.err.$isError){const s=new Error;s.name=e.err.name,s.message=e.err.message,s.stack=e.err.stack,n=s}t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(s=>{this._send(new Cwe(this._workerId,t,s,void 0))},s=>{s.detail instanceof Error&&(s.detail=SY(s.detail)),this._send(new Cwe(this._workerId,t,void 0,SY(s)))})}_handleSubscribeEventMessage(e){const t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(s=>{this._send(new ten(this._workerId,t,s))});this._pendingEvents.set(t,n)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const t=[];if(e.type===0)for(let n=0;n{this._protocol.handleMessage(t)})),this._register(this._worker.onError(t=>{yne(t),zt(t)})),this._protocol=new ien({sendMessage:(t,n)=>{this._worker.postMessage(t,n)},handleMessage:(t,n,s)=>this._handleMessage(t,n,s),handleEvent:(t,n,s)=>this._handleEvent(t,n,s)}),this._protocol.setWorkerId(this._worker.getId()),this._onModuleLoaded=this._protocol.sendMessage(ywe,ZJt,[this._worker.getId()]).then(()=>{}),this.proxy=this._protocol.createProxyToRemoteChannel(ywe,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(t=>{this._onError("Worker failed to load ",t)})}_handleMessage(e,t,n){const s=this._localChannels.get(e);if(!s)return Promise.reject(new Error(`Missing channel ${e} on main thread`));const r=s[t];if(typeof r!="function")return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(r.apply(s,n))}catch(o){return Promise.reject(o)}}_handleEvent(e,t,n){const s=this._localChannels.get(e);if(!s)throw new Error(`Missing channel ${e} on main thread`);if(k3e(t)){const r=s[t];if(typeof r!="function")throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);const o=r.call(s,n);if(typeof o!="function")throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return o}if(S3e(t)){const r=s[t];if(typeof r!="function")throw new Error(`Missing event ${t} on main thread channel ${e}.`);return r}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function S3e(i){return i[0]==="o"&&i[1]==="n"&&Uf(i.charCodeAt(2))}function k3e(i){return/^onDynamic/.test(i)&&Uf(i.charCodeAt(9))}let _N;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?_N=globalThis.workerttPolicy:_N=Up("defaultWorkerFactory",{createScriptURL:i=>i});function ren(i,e){const t=i.label||"anonymous"+e,n=Ire();if(n){if(typeof n.getWorker=="function")return n.getWorker("workerMain.js",t);if(typeof n.getWorkerUrl=="function"){const r=n.getWorkerUrl("workerMain.js",t);return new Worker(_N?_N.createScriptURL(r):r,{name:t,type:"module"})}}const s=i.esmModuleLocation;if(s){const r=oen(t,s.toString(!0)),o=new Worker(_N?_N.createScriptURL(r):r,{name:t,type:"module"});return aen(o)}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function oen(i,e){if(!(/^((http:)|(https:)|(file:))/.test(e)&&e.substring(0,globalThis.origin.length)!==globalThis.origin)){const n=e.lastIndexOf("?"),s=e.lastIndexOf("#",n),r=n>0?new URLSearchParams(e.substring(n+1,~s?s:void 0)):new URLSearchParams;HY.addSearchParam(r,!0,!0),r.toString()?e=`${e}?${r.toString()}#${i}`:e=`${e}#${i}`}const t=new Blob([ef([`/*${i}*/`,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify(jTe())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify(Tre())};`,`globalThis._VSCODE_FILE_ROOT = ${JSON.stringify(globalThis._VSCODE_FILE_ROOT)};`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",`await import(ttPolicy?.createScriptURL(${JSON.stringify(e)}) ?? ${JSON.stringify(e)});`,"globalThis.postMessage({ type: 'vscode-worker-ready' });",`/*${i}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(t)}function aen(i){return new Promise((e,t)=>{i.onmessage=function(n){n.data.type==="vscode-worker-ready"&&(i.onmessage=null,e(i))},i.onerror=t})}function len(i){return!!i&&typeof i.then=="function"}const dH=class dH extends se{constructor(e){super(),this._onMessage=this._register(new ie),this.onMessage=this._onMessage.event,this._onError=this._register(new ie),this.onError=this._onError.event,this.id=++dH.LAST_WORKER_ID;const t=e instanceof Worker||"then"in e?e:ren(e,this.id);len(t)?this.worker=t:this.worker=Promise.resolve(t),this.postMessage("-please-ignore-",[]);const n=s=>{this._onError.fire(s)};this.worker.then(s=>{s.onmessage=r=>{this._onMessage.fire(r.data)},s.onmessageerror=r=>{this._onError.fire(r)},typeof s.addEventListener=="function"&&s.addEventListener("error",n)}),this._register(dt(()=>{var s;(s=this.worker)==null||s.then(r=>{r.onmessage=null,r.onmessageerror=null,r.removeEventListener("error",n),r.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(e,t){var n;(n=this.worker)==null||n.then(s=>{try{s.postMessage(e,t)}catch(r){zt(r),zt(new Error("FAILED to post message to worker",{cause:r}))}})}};dH.LAST_WORKER_ID=0;let wne=dH;class cen{constructor(e,t){this.esmModuleLocation=e,this.label=t}}function den(i,e){const t=kt.isUri(i)?new cen(i,e):i;return new sen(new wne(t))}class uen{constructor(e,t,n){const s=new Uint8Array(e*t);for(let r=0,o=e*t;rt&&(t=l),a>n&&(n=a),c>n&&(n=c)}t++,n++;const s=new uen(n,t,0);for(let r=0,o=e.length;r=this._maxCharCode?0:this._states.get(e,t)}}let TK=null;function gen(){return TK===null&&(TK=new hen([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),TK}let DI=null;function fen(){if(DI===null){DI=new LD(0);const i=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`;for(let t=0;ts);if(s>0){const a=t.charCodeAt(s-1),l=t.charCodeAt(o);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&o--}return{range:{startLineNumber:n,startColumn:s+1,endLineNumber:n,endColumn:o+2},url:t.substring(s,o+1)}}static computeLinks(e,t=gen()){const n=fen(),s=[];for(let r=1,o=e.getLineCount();r<=o;r++){const a=e.getLineContent(r),l=a.length;let c=0,u=0,h=0,g=1,f=!1,m=!1,x=!1,v=!1;for(;c=0?(s+=n?1:-1,s<0?s=e.length-1:s%=e.length,e[s]):null}};uH.INSTANCE=new uH;let Cne=uH;function N3e(i){const e=[];for(const t of i){const n=Number(t);(n||n===0&&t.replace(/\s/g,"")!=="")&&e.push(n)}return e}function fce(i,e,t,n){return{red:i/255,blue:t/255,green:e/255,alpha:n}}function TI(i,e){const t=e.index,n=e[0].length;if(t===void 0)return;const s=i.positionAt(t);return{startLineNumber:s.lineNumber,startColumn:s.column,endLineNumber:s.lineNumber,endColumn:s.column+n}}function men(i,e){if(!i)return;const t=ye.Format.CSS.parseHex(e);if(t)return{range:i,color:fce(t.rgba.r,t.rgba.g,t.rgba.b,t.rgba.a)}}function Swe(i,e,t){if(!i||e.length!==1)return;const s=e[0].values(),r=N3e(s);return{range:i,color:fce(r[0],r[1],r[2],t?r[3]:1)}}function kwe(i,e,t){if(!i||e.length!==1)return;const s=e[0].values(),r=N3e(s),o=new ye(new Eh(r[0],r[1]/100,r[2]/100,t?r[3]:1));return{range:i,color:fce(o.rgba.r,o.rgba.g,o.rgba.b,o.rgba.a)}}function II(i,e){return typeof i=="string"?[...i.matchAll(e)]:i.findMatches(e)}function ben(i){const e=[],t=new RegExp(`\\b(rgb|rgba|hsl|hsla)(\\([0-9\\s,.\\%]*\\))|^(#)([A-Fa-f0-9]{3})\\b|^(#)([A-Fa-f0-9]{4})\\b|^(#)([A-Fa-f0-9]{6})\\b|^(#)([A-Fa-f0-9]{8})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{3})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{4})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{6})\\b|(?<=['"\\s])(#)([A-Fa-f0-9]{8})\\b`,"gm"),n=II(i,t);if(n.length>0)for(const s of n){const r=s.filter(c=>c!==void 0),o=r[1],a=r[2];if(!a)continue;let l;if(o==="rgb"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=Swe(TI(i,s),II(a,c),!1)}else if(o==="rgba"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=Swe(TI(i,s),II(a,c),!0)}else if(o==="hsl"){const c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=kwe(TI(i,s),II(a,c),!1)}else if(o==="hsla"){const c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;l=kwe(TI(i,s),II(a,c),!0)}else o==="#"&&(l=men(TI(i,s),o+a));l&&e.push(l)}return e}function xen(i){return!i||typeof i.getValue!="function"||typeof i.positionAt!="function"?[]:ben(i)}const ven=/^-+|-+$/g,Nwe=100,_en=5;function yen(i,e){var n;let t=[];if(e.findRegionSectionHeaders&&((n=e.foldingRules)!=null&&n.markers)){const s=wen(i,e);t=t.concat(s)}if(e.findMarkSectionHeaders){const s=Cen(i,e);t=t.concat(s)}return t}function wen(i,e){const t=[],n=i.getLineCount();for(let s=1;s<=n;s++){const r=i.getLineContent(s),o=r.match(e.foldingRules.markers.start);if(o){const a={startLineNumber:s,startColumn:o[0].length+1,endLineNumber:s,endColumn:r.length+1};if(a.endColumn>a.startColumn){const l={range:a,...Sen(r.substring(o[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&t.push(l)}}}return t}function Cen(i,e){const t=[],n=i.getLineCount();if(!e.markSectionHeaderRegex||e.markSectionHeaderRegex.trim()==="")return t;const s=lRe(e.markSectionHeaderRegex),r=new RegExp(e.markSectionHeaderRegex,`gdm${s?"s":""}`);if(iIe(r))return t;for(let o=1;o<=n;o+=Nwe-_en){const a=Math.min(o+Nwe-1,n),l=[];for(let h=o;h<=a;h++)l.push(i.getLineContent(h));const c=l.join(` +`);r.lastIndex=0;let u;for(;(u=r.exec(c))!==null;){const h=c.substring(0,u.index),g=(h.match(/\n/g)||[]).length,f=o+g,m=u[0].split(` +`),x=m.length,v=f+x-1,_=h.lastIndexOf(` +`)+1,w=u.index-_+1,k=m[m.length-1],C=x===1?w+u[0].length:k.length+1,E={startLineNumber:f,startColumn:w,endLineNumber:v,endColumn:C},D=(u.groups??{}).label??"",T=((u.groups??{}).separator??"")!=="",I={range:E,text:D,hasSeparatorLine:T,shouldBeInComments:!0};(I.text||I.hasSeparatorLine)&&(t.length===0||t[t.length-1].range.endLineNumberthis._checkStopModelSync(),Math.round(Ewe/2)),this._register(s)}}dispose(){for(const e in this._syncedModels)ii(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const n of e){const s=n.toString();this._syncedModels[s]||this._beginModelSync(n,t),this._syncedModels[s]&&(this._syncedModelsLastUsedTime[s]=new Date().getTime())}}_checkStopModelSync(){const e=new Date().getTime(),t=[];for(const n in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[n]>Ewe&&t.push(n);for(const n of t)this._stopModelSync(n)}_beginModelSync(e,t){const n=this._modelService.getModel(e);if(!n||!t&&n.isTooLargeForSyncing())return;const s=e.toString();this._proxy.$acceptNewModel({url:n.uri.toString(),lines:n.getLinesContent(),EOL:n.getEOL(),versionId:n.getVersionId()});const r=new _e;r.add(n.onDidChangeContent(o=>{this._proxy.$acceptModelChanged(s.toString(),o)})),r.add(n.onWillDispose(()=>{this._stopModelSync(s)})),r.add(dt(()=>{this._proxy.$acceptRemovedModel(s)})),this._syncedModels[s]=r}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],ii(t)}}class Een{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new Len(kt.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class Len extends ken{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let n=0;nthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,s=!0;else{const r=this._lines[t-1].length+1;n<1?(n=1,s=!0):n>r&&(n=r,s=!0)}return s?{lineNumber:t,column:n}:e}}const l1=class l1{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new Een}dispose(){}async $ping(){return"pong"}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,t){this._workerTextModelSyncServer.$acceptModelChanged(e,t)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,t,n){const s=this._getModel(e);return s?rce.computeUnicodeHighlights(s,t,n):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,t){const n=this._getModel(e);return n?yen(n,t):[]}async $computeDiff(e,t,n,s){const r=this._getModel(e),o=this._getModel(t);return!r||!o?null:l1.computeDiff(r,o,n,s)}static computeDiff(e,t,n,s){const r=s==="advanced"?BJ.getDefault():BJ.getLegacy(),o=e.getLinesContent(),a=t.getLinesContent(),l=r.computeDiff(o,a,n),c=l.changes.length>0?!1:this._modelsAreIdentical(e,t);function u(h){return h.map(g=>{var f;return[g.original.startLineNumber,g.original.endLineNumberExclusive,g.modified.startLineNumber,g.modified.endLineNumberExclusive,(f=g.innerChanges)==null?void 0:f.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])]})}return{identical:c,quitEarly:l.hitTimeout,changes:u(l.changes),moves:l.moves.map(h=>[h.lineRangeMapping.original.startLineNumber,h.lineRangeMapping.original.endLineNumberExclusive,h.lineRangeMapping.modified.startLineNumber,h.lineRangeMapping.modified.endLineNumberExclusive,u(h.changes)])}}static _modelsAreIdentical(e,t){const n=e.getLineCount(),s=t.getLineCount();if(n!==s)return!1;for(let r=1;r<=n;r++){const o=e.getLineContent(r),a=t.getLineContent(r);if(o!==a)return!1}return!0}async $computeMoreMinimalEdits(e,t,n){const s=this._getModel(e);if(!s)return t;const r=[];let o;t=t.slice(0).sort((l,c)=>{if(l.range&&c.range)return z.compareRangesUsingStarts(l.range,c.range);const u=l.range?0:1,h=c.range?0:1;return u-h});let a=0;for(let l=1;ll1._diffLimit){r.push({range:l,text:c});continue}const g=uVt(h,c,n),f=s.offsetAt(z.lift(l).getStartPosition());for(const m of g){const x=s.positionAt(f+m.originalStart),v=s.positionAt(f+m.originalStart+m.originalLength),_={text:c.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:x.lineNumber,startColumn:x.column,endLineNumber:v.lineNumber,endColumn:v.column}};s.getValueInRange(_.range)!==_.text&&r.push(_)}}return typeof o=="number"&&r.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?pen(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?xen(t):null}async $textualSuggest(e,t,n,s){const r=new _o,o=new RegExp(n,s),a=new Set;e:for(const l of e){const c=this._getModel(l);if(c){for(const u of c.words(o))if(!(u===t||!isNaN(Number(u)))&&(a.add(u),a.size>l1._suggestionsLimit))break e}}return{words:Array.from(a),duration:r.elapsed()}}async $computeWordRanges(e,t,n,s){const r=this._getModel(e);if(!r)return Object.create(null);const o=new RegExp(n,s),a=Object.create(null);for(let l=t.startLineNumber;l=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Ky=function(i,e){return function(t,n){e(t,n,i)}};const Lwe=300*1e3;function Gy(i,e){const t=i.getModel(e);return!(!t||t.isTooLargeForSyncing())}let Nne=class extends se{constructor(e,t,n,s,r,o){super(),this._languageConfigurationService=r,this._modelService=t,this._workerManager=this._register(new Ene(e,this._modelService)),this._logService=s,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:async(a,l)=>{if(!Gy(this._modelService,a.uri))return Promise.resolve({links:[]});const u=await(await this._workerWithResources([a.uri])).$computeLinks(a.uri.toString());return u&&{links:u}}})),this._register(o.completionProvider.register("*",new Den(this._workerManager,n,this._modelService,this._languageConfigurationService,this._logService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return Gy(this._modelService,e)}async computedUnicodeHighlights(e,t,n){return(await this._workerWithResources([e])).$computeUnicodeHighlights(e.toString(),t,n)}async computeDiff(e,t,n,s){const o=await(await this._workerWithResources([e,t],!0)).$computeDiff(e.toString(),t.toString(),n,s);if(!o)return null;return{identical:o.identical,quitEarly:o.quitEarly,changes:l(o.changes),moves:o.moves.map(c=>new g5e(new al(new jt(c[0],c[1]),new jt(c[2],c[3])),l(c[4])))};function l(c){return c.map(u=>{var h;return new $d(new jt(u[0],u[1]),new jt(u[2],u[3]),(h=u[4])==null?void 0:h.map(g=>new Ml(new z(g[0],g[1],g[2],g[3]),new z(g[4],g[5],g[6],g[7]))))})}}async computeMoreMinimalEdits(e,t,n=!1){if(ul(t)){if(!Gy(this._modelService,e))return Promise.resolve(t);const s=_o.create(),r=this._workerWithResources([e]).then(o=>o.$computeMoreMinimalEdits(e.toString(),t,n));return r.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),s.elapsed())),Promise.race([r,kp(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return Gy(this._modelService,e)}async navigateValueSet(e,t,n){const s=this._modelService.getModel(e);if(!s)return null;const r=this._languageConfigurationService.getLanguageConfiguration(s.getLanguageId()).getWordDefinition(),o=r.source,a=r.flags;return(await this._workerWithResources([e])).$navigateValueSet(e.toString(),t,n,o,a)}canComputeWordRanges(e){return Gy(this._modelService,e)}async computeWordRanges(e,t){const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const s=this._languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),r=s.source,o=s.flags;return(await this._workerWithResources([e])).$computeWordRanges(e.toString(),t,r,o)}async findSectionHeaders(e,t){return(await this._workerWithResources([e])).$findSectionHeaders(e.toString(),t)}async computeDefaultDocumentColors(e){return(await this._workerWithResources([e])).$computeDefaultDocumentColors(e.toString())}async _workerWithResources(e,t=!1){return await(await this._workerManager.withWorker()).workerWithSyncedResources(e,t)}};Nne=pce([Ky(1,Is),Ky(2,$W),Ky(3,Ji),Ky(4,As),Ky(5,lt)],Nne);class Den{constructor(e,t,n,s,r){this.languageConfigurationService=s,this.logService=r,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=n}async provideCompletionItems(e,t){const n=this._configurationService.getValue(e.uri,t,"editor");if(n.wordBasedSuggestions==="off")return;const s=[];if(n.wordBasedSuggestions==="currentDocument")Gy(this._modelService,e.uri)&&s.push(e.uri);else for(const h of this._modelService.getModels())Gy(this._modelService,h.uri)&&(h===e?s.unshift(h.uri):(n.wordBasedSuggestions==="allDocuments"||h.getLanguageId()===e.getLanguageId())&&s.push(h.uri));if(s.length===0)return;const r=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),o=e.getWordAtPosition(t),a=o?new z(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):z.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column);this.logService.trace("[WordBasedCompletionItemProvider]",`word: "${(o==null?void 0:o.word)||""}", wordDef: "${r}", replace: [${a.toString()}], insert: [${l.toString()}]`);const u=await(await this._workerManager.withWorker()).textualSuggest(s,o==null?void 0:o.word,r);if(u)return{duration:u.duration,suggestions:u.words.map(h=>({kind:18,label:h,insertText:h,range:{insert:l,replace:a}}))}}}let Ene=class extends se{constructor(e,t){super(),this._workerDescriptor=e,this._modelService=t,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new ooe).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(Lwe/2),fi),this._register(this._modelService.onModelRemoved(s=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>Lwe&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new _B(this._workerDescriptor,!1,this._modelService)),Promise.resolve(this._editorWorkerClient)}};Ene=pce([Ky(1,Is)],Ene);class Ten{constructor(e){this._instance=e,this.proxy=this._instance}dispose(){this._instance.dispose()}setChannel(e,t){throw new Error("Not supported")}}let _B=class extends se{constructor(e,t,n){super(),this._workerDescriptorOrWorker=e,this._disposed=!1,this._modelService=n,this._keepIdleModels=t,this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(den(this._workerDescriptorOrWorker)),kne.setChannel(this._worker,this._createEditorWorkerHost())}catch(e){yne(e),this._worker=this._createFallbackLocalWorker()}return this._worker}async _getProxy(){try{const e=this._getOrCreateWorker().proxy;return await e.$ping(),e}catch(e){return yne(e),this._worker=this._createFallbackLocalWorker(),this._worker.proxy}}_createFallbackLocalWorker(){return new Ten(new Sne(null))}_createEditorWorkerHost(){return{$fhr:(e,t)=>this.fhr(e,t)}}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Nen(e,this._modelService,this._keepIdleModels))),this._modelManager}async workerWithSyncedResources(e,t=!1){if(this._disposed)return Promise.reject(MNt());const n=await this._getProxy();return this._getOrCreateModelManager(n).ensureSyncedResources(e,t),n}async textualSuggest(e,t,n){const s=await this.workerWithSyncedResources(e),r=n.source,o=n.flags;return s.$textualSuggest(e.map(a=>a.toString()),t,r,o)}dispose(){super.dispose(),this._disposed=!0}};_B=pce([Ky(2,Is)],_B);function Ien(i,e){return new Aen(i,e)}class Aen extends _B{constructor(e,t){super(t.worker,t.keepIdleModels||!1,e),this._foreignModuleHost=t.host||null,this._foreignProxy=this._getProxy().then(n=>new Proxy({},{get(s,r,o){if(r!=="then"){if(typeof r!="string")throw new Error("Not supported");return(...a)=>n.$fmr(r,a)}}}))}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(n){return Promise.reject(n)}}getProxy(){return this._foreignProxy}withSyncedResources(e){return this.workerWithSyncedResources(e).then(t=>this.getProxy())}}function Ren(i){return Array.isArray(i)}function Men(i){return!Ren(i)}function E3e(i){return typeof i=="string"}function Dwe(i){return!E3e(i)}function Yy(i){return!i}function Pb(i,e){return i.ignoreCase&&e?e.toLowerCase():e}function Twe(i){return i.replace(/[&<>'"_]/g,"-")}function Pen(i,e){console.log(`${i.languageId}: ${e}`)}function gs(i,e){return new Error(`${i.languageId}: ${e}`)}function Dv(i,e,t,n,s){const r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let o=null;return e.replace(r,function(a,l,c,u,h,g,f,m,x){return Yy(c)?Yy(u)?!Yy(h)&&h0;){const n=i.tokenizer[t];if(n)return n;const s=t.lastIndexOf(".");s<0?t=null:t=t.substr(0,s)}return null}function jen(i,e){let t=e;for(;t&&t.length>0;){if(i.stateNames[t])return!0;const s=t.lastIndexOf(".");s<0?t=null:t=t.substr(0,s)}return!1}var Fen=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Ben=function(i,e){return function(t,n){e(t,n,i)}},Lne;const L3e=5,hH=class hH{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new pE(e,t);let n=pE.getStackElementId(e);n.length>0&&(n+="|"),n+=t;let s=this._entries[n];return s||(s=new pE(e,t),this._entries[n]=s,s)}};hH._INSTANCE=new hH(L3e);let OM=hH;class pE{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return pE._equals(this,e)}push(e){return OM.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return OM.create(this.parent,e)}}class yN{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new yN(this.languageId,this.state)}}const gH=class gH{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(t!==null)return new l2(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new l2(e,t);const n=pE.getStackElementId(e);let s=this._entries[n];return s||(s=new l2(e,null),this._entries[n]=s,s)}};gH._INSTANCE=new gH(L3e);let Tv=gH;class l2{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Tv.create(this.stack,this.embeddedLanguageData)}equals(e){return!(e instanceof l2)||!this.stack.equals(e.stack)?!1:this.embeddedLanguageData===null&&e.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||e.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(e.embeddedLanguageData)}}class Hen{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new LR(e,t,this._languageId)))}nestedLanguageTokenize(e,t,n,s){const r=n.languageId,o=n.state,a=Gs.get(r);if(!a)return this.enterLanguage(r),this.emit(s,""),o;const l=a.tokenize(e,t,o);if(s!==0)for(const c of l.tokens)this._tokens.push(new LR(c.offset+s,c.type,c.language));else this._tokens=this._tokens.concat(l.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,l.endState}finalize(e){return new Uoe(this._tokens,e)}}class yB{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const n=this._theme.match(this._currentLanguageId,t)|1024;this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}static _merge(e,t,n){const s=e!==null?e.length:0,r=t.length,o=n!==null?n.length:0;if(s===0&&r===0&&o===0)return new Uint32Array(0);if(s===0&&r===0)return n;if(r===0&&o===0)return e;const a=new Uint32Array(s+r+o);e!==null&&a.set(e);for(let l=0;l{if(o)return;let l=!1;for(let c=0,u=a.changedLanguages.length;c{a.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const n=Gs.get(t);if(n){if(n instanceof Lne){const s=n.getLoadStatus();s.loaded===!1&&e.push(s.promise)}continue}Gs.isResolved(t)||e.push(Gs.getOrCreate(t))}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){const e=OM.create(null,this._lexer.start);return Tv.create(e,null)}tokenize(e,t,n){if(e.length>=this._maxTokenizationLineLength)return lae(this._languageId,n);const s=new Hen,r=this._tokenize(e,t,n,s);return s.finalize(r)}tokenizeEncoded(e,t,n){if(e.length>=this._maxTokenizationLineLength)return cW(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),n);const s=new yB(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,n,s);return s.finalize(r)}_tokenize(e,t,n,s){return n.embeddedLanguageData?this._nestedTokenize(e,t,n,0,s):this._myTokenize(e,t,n,0,s)}_findLeavingNestedLanguageOffset(e,t){let n=this._lexer.tokenizer[t.stack.state];if(!n&&(n=S4(this._lexer,t.stack.state),!n))throw gs(this._lexer,"tokenizer state is not defined: "+t.stack.state);let s=-1,r=!1;for(const o of n){if(!Dwe(o.action)||!(o.action.nextEmbedded==="@pop"||o.action.hasEmbeddedEndInCases))continue;r=!0;let a=o.resolveRegex(t.stack.state);const l=a.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){const u=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),u)}const c=e.search(a);c===-1||c!==0&&o.matchOnlyAtLineStart||(s===-1||c0&&r.nestedLanguageTokenize(a,!1,n.embeddedLanguageData,s);const l=e.substring(o);return this._myTokenize(l,t,n,s+o,r)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,n,s,r){r.enterLanguage(this._languageId);const o=e.length,a=t&&this._lexer.includeLF?e+` +`:e,l=a.length;let c=n.embeddedLanguageData,u=n.stack,h=0,g=null,f=!0;for(;f||h=l)break;f=!1;let R=this._lexer.tokenizer[_];if(!R&&(R=S4(this._lexer,_),!R))throw gs(this._lexer,"tokenizer state is not defined: "+_);const P=a.substr(h);for(const j of R)if((h===0||!j.matchOnlyAtLineStart)&&(w=P.match(j.resolveRegex(_)),w)){k=w[0],C=j.action;break}}if(w||(w=[""],k=""),C||(h=this._lexer.maxStack)throw gs(this._lexer,"maximum tokenizer stack size reached: ["+u.state+","+u.parent.state+",...]");u=u.push(_)}else if(C.next==="@pop"){if(u.depth<=1)throw gs(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(E));u=u.pop()}else if(C.next==="@popall")u=u.popall();else{let R=Dv(this._lexer,C.next,k,w,_);if(R[0]==="@"&&(R=R.substr(1)),S4(this._lexer,R))u=u.push(R);else throw gs(this._lexer,"trying to set a next state '"+R+"' that is undefined in rule: "+this._safeRuleName(E))}}C.log&&typeof C.log=="string"&&Pen(this._lexer,this._lexer.languageId+": "+Dv(this._lexer,C.log,k,w,_))}if(T===null)throw gs(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(E));const I=R=>{const P=this._languageService.getLanguageIdByLanguageName(R)||this._languageService.getLanguageIdByMimeType(R)||R,j=this._getNestedEmbeddedLanguageData(P);if(h0)throw gs(this._lexer,"groups cannot be nested: "+this._safeRuleName(E));if(w.length!==T.length+1)throw gs(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(E));let R=0;for(let P=1;Pi});class mce{static colorizeElement(e,t,n,s){s=s||{};const r=s.theme||"vs",o=s.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();const a=t.getLanguageIdByMimeType(o)||o;e.setTheme(r);const l=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+r;const c=u=>{const h=(IK==null?void 0:IK.createHTML(u))??u;n.innerHTML=h};return this.colorize(t,l||"",a,s).then(c,u=>console.error(u))}static async colorize(e,t,n,s){const r=e.languageIdCodec;let o=4;s&&typeof s.tabSize=="number"&&(o=s.tabSize),Gre(t)&&(t=t.substr(1));const a=Xc(t);if(!e.isRegisteredLanguageId(n))return Iwe(a,o,r);const l=await Gs.getOrCreate(n);return l?Ven(a,o,l,r):Iwe(a,o,r)}static colorizeLine(e,t,n,s,r=4){const o=Gd.isBasicASCII(e,t),a=Gd.containsRTL(e,o,n);return tW(new ux(!1,!0,e,!1,o,a,0,s,[],r,0,0,0,0,-1,"none",!1,!1,null,null,0)).html}static colorizeModelLine(e,t,n=4){const s=e.getLineContent(t);e.tokenization.forceTokenization(t);const o=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(s,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,n)}}function Ven(i,e,t,n){return new Promise((s,r)=>{const o=()=>{const a=zen(i,e,t,n);if(t instanceof jM){const l=t.getLoadStatus();if(l.loaded===!1){l.promise.then(o,r);return}}s(a)};o()})}function Iwe(i,e,t){let n=[];const r=new Uint32Array(2);r[0]=0,r[1]=33587200;for(let o=0,a=i.length;o")}return n.join("")}function zen(i,e,t,n){let s=[],r=t.getInitialState();for(let o=0,a=i.length;o"),r=c.endState}return s.join("")}var Uen=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},$en=function(i,e){return function(t,n){e(t,n,i)}};let Dne=class extends se{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new ie),this._onCodeEditorAdd=this._register(new ie),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new ie),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new ie),this._onDiffEditorAdd=this._register(new ie),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new ie),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new ll,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const n of t){if(n.hasTextFocus())return n;n.hasWidgetFocus()&&(e=n)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(n=>n.removeDecorationsByType(e))))}setModelProperty(e,t,n){const s=e.toString();let r;this._modelProperties.has(s)?r=this._modelProperties.get(s):(r=new Map,this._modelProperties.set(s,r)),r.set(t,n)}getModelProperty(e,t){const n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}async openCodeEditor(e,t,n){for(const s of this._codeEditorOpenHandlers){const r=await s(e,t,n);if(r!==null)return r}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return dt(t)}};Dne=Uen([$en(0,Ws)],Dne);var qen=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Awe=function(i,e){return function(t,n){e(t,n,i)}};let wB=class extends Dne{constructor(e,t){super(t),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,s,r)=>s?this.doOpenEditor(s,n):null))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const r=t.resource.scheme;if(r===Ot.http||r===Ot.https)return FIe(t.resource.toString()),e}return null}const s=t.options?t.options.selection:null;if(s)if(typeof s.endLineNumber=="number"&&typeof s.endColumn=="number")e.setSelection(s),e.revealRangeInCenter(s,1);else{const r={lineNumber:s.startLineNumber,column:s.startColumn};e.setPosition(r),e.revealPositionInCenter(r,1)}return e}findModel(e,t){const n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}};wB=qen([Awe(0,Bt),Awe(1,Ws)],wB);wn(Hn,wB,0);var D3e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},T3e=function(i,e){return function(t,n){e(t,n,i)}};let CB=class{get mainContainer(){var e;return((e=this._codeEditorService.listCodeEditors().at(0))==null?void 0:e.getContainerDomNode())??fi.document.body}get activeContainer(){const e=this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor();return(e==null?void 0:e.getContainerDomNode())??this.mainContainer}get mainContainerDimension(){return X_(this.mainContainer)}get activeContainerDimension(){return X_(this.activeContainer)}get containers(){return ef(this._codeEditorService.listCodeEditors().map(e=>e.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())==null||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=He.None,this.onDidLayoutActiveContainer=He.None,this.onDidLayoutContainer=He.None,this.onDidChangeActiveContainer=He.None,this.onDidAddContainer=He.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};CB=D3e([T3e(0,Hn)],CB);let Tne=class extends CB{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};Tne=D3e([T3e(1,Hn)],Tne);wn(qp,CB,1);var Ken=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Rwe=function(i,e){return function(t,n){e(t,n,i)}};function k4(i){return i.scheme===Ot.file?i.fsPath:i.path}let I3e=0;class N4{constructor(e,t,n,s,r,o,a){this.id=++I3e,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=n,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=s,this.groupOrder=r,this.sourceId=o,this.sourceOrder=a,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Mwe{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Pwe{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,s]of this.elements)(s.reason===0?e:t).push(s.resourceLabel);const n=[];return e.length>0&&n.push(S(2030,"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&n.push(S(2031,"The following files have been modified in an incompatible way: {0}.",t.join(", "))),n.join(` +`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Gen{constructor(e,t,n,s,r,o,a){this.id=++I3e,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=n,this.groupId=s,this.groupOrder=r,this.sourceId=o,this.sourceOrder=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,n){this.removedResources||(this.removedResources=new Pwe),this.removedResources.has(t)||this.removedResources.set(t,new Mwe(e,n))}setValid(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Pwe),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Mwe(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class A3e{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` +`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const n of this._past)t(n.actual)&&this._setElementValidFlag(n,e);for(const n of this._future)t(n.actual)&&this._setElementValidFlag(n,e)}pushElement(e){for(const t of this._future)t.type===1&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let n=0,s=this._past.length;n=0;n--)t.push(this._future[n].id);return new pRe(e,t)}restoreSnapshot(e){const t=e.elements.length;let n=!0,s=0,r=-1;for(let a=0,l=this._past.length;a=t||c.id!==e.elements[s])&&(n=!1,r=0),!n&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let a=this._future.length-1;a>=0;a--,s++){const l=this._future[a];n&&(s>=t||l.id!==e.elements[s])&&(n=!1,o=a),!n&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}r!==-1&&(this._past=this._past.slice(0,r)),o!==-1&&(this._future=this._future.slice(o+1)),this.versionId++}getElements(){const e=[],t=[];for(const n of this._past)e.push(n.actual);for(const n of this._future)t.push(n.actual);return{past:e,future:t}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class AK{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,n=this.editStacks.length;tt.sourceOrder)&&(t=o,n=s)}return[t,n]}canUndo(e){if(e instanceof Uy){const[,n]=this._findClosestUndoElementWithSource(e.id);return!!n}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){zt(e);for(const n of t.strResources)this.removeElements(n);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,n,s,r){const o=this._acquireLocks(n);let a;try{a=t()}catch(l){return o(),s.dispose(),this._onError(l,e)}return a?a.then(()=>(o(),s.dispose(),r()),l=>(o(),s.dispose(),this._onError(l,e))):(o(),s.dispose(),r())}async _invokeWorkspacePrepare(e){if(typeof e.actual.prepareUndoRedo>"u")return se.None;const t=e.actual.prepareUndoRedo();return typeof t>"u"?se.None:t}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo>"u")return t(se.None);const n=e.actual.prepareUndoRedo();return n?JC(n)?t(n):n.then(s=>t(s)):t(se.None)}_getAffectedEditStacks(e){const t=[];for(const n of e.strResources)t.push(this._editStacks.get(n)||R3e);return new AK(t)}_tryToSplitAndUndo(e,t,n,s){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.warn(s),new E4(this._undo(e,0,!0));for(const r of t.strResources)this.removeElements(r);return this._notificationService.warn(s),new E4}_checkWorkspaceUndo(e,t,n,s){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,S(2032,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(s&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,S(2033,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const r=[];for(const a of n.editStacks)a.getClosestPastElement()!==t&&r.push(a.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,t,null,S(2034,"Could not undo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const o=[];for(const a of n.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,S(2035,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,S(2036,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,n){const s=this._getAffectedEditStacks(t),r=this._checkWorkspaceUndo(e,t,s,!1);return r?r.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,s,n)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const n=t.getClosestPastElement();if(n){if(n===e){const s=t.getSecondClosestPastElement();if(s&&s.groupId===e.groupId)return!0}if(n.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,n,s){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let a;(function(u){u[u.All=0]="All",u[u.This=1]="This",u[u.Cancel=2]="Cancel"})(a||(a={}));const{result:l}=await this._dialogService.prompt({type:Os.Info,message:S(2037,"Would you like to undo '{0}' across all files?",t.label),buttons:[{label:S(2038,"&&Undo in {0} Files",n.editStacks.length),run:()=>a.All},{label:S(2039,"Undo this &&File"),run:()=>a.This}],cancelButton:{run:()=>a.Cancel}});if(l===a.Cancel)return;if(l===a.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const c=this._checkWorkspaceUndo(e,t,n,!1);if(c)return c.returnValue;s=!0}let r;try{r=await this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const o=this._checkWorkspaceUndo(e,t,n,!0);if(o)return r.dispose(),o.returnValue;for(const a of n.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),n,r,()=>this._continueUndoInGroup(t.groupId,s))}_resourceUndo(e,t,n){if(!t.isValid){e.flushAllElements();return}if(e.locked){const s=S(2040,"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(s);return}return this._invokeResourcePrepare(t,s=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new AK([e]),s,()=>this._continueUndoInGroup(t.groupId,n))))}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[s,r]of this._editStacks){const o=r.getClosestPastElement();o&&o.groupId===e&&(!t||o.groupOrder>t.groupOrder)&&(t=o,n=s)}return[t,n]}_continueUndoInGroup(e,t){if(!e)return;const[,n]=this._findClosestUndoElementInGroup(e);if(n)return this._undo(n,0,t)}undo(e){if(e instanceof Uy){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,n){if(!this._editStacks.has(e))return;const s=this._editStacks.get(e),r=s.getClosestPastElement();if(!r)return;if(r.groupId){const[a,l]=this._findClosestUndoElementInGroup(r.groupId);if(r!==a&&l)return this._undo(l,t,n)}if((r.sourceId!==t||r.confirmBeforeUndo)&&!n)return this._confirmAndContinueUndo(e,t,r);try{return r.type===1?this._workspaceUndo(e,r,n):this._resourceUndo(s,r,n)}finally{}}async _confirmAndContinueUndo(e,t,n){if((await this._dialogService.confirm({message:S(2041,"Would you like to undo '{0}'?",n.label),primaryButton:S(2042,"&&Yes"),cancelButton:S(2043,"No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,n=null;for(const[s,r]of this._editStacks){const o=r.getClosestFutureElement();o&&o.sourceId===e&&(!t||o.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,S(2046,"Could not redo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const o=[];for(const a of n.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,S(2047,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,S(2048,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceRedo(e,t,n,!1);return s?s.returnValue:this._executeWorkspaceRedo(e,t,n)}async _executeWorkspaceRedo(e,t,n){let s;try{s=await this._invokeWorkspacePrepare(t)}catch(o){return this._onError(o,t)}const r=this._checkWorkspaceRedo(e,t,n,!0);if(r)return s.dispose(),r.returnValue;for(const o of n.editStacks)o.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),n,s,()=>this._continueRedoInGroup(t.groupId))}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=S(2049,"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new AK([e]),n,()=>this._continueRedoInGroup(t.groupId))))}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,n=null;for(const[s,r]of this._editStacks){const o=r.getClosestFutureElement();o&&o.groupId===e&&(!t||o.groupOrder=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},RK=function(i,e){return function(t,n){e(t,n,i)}};let Ane=class extends se{constructor(e,t,n){super(),this._themeService=e,this._logService=t,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new Uee(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};Ane=Yen([RK(0,Ws),RK(1,Ji),RK(2,tr)],Ane);wn(qW,Ane,1);function M3e(i){return typeof i=="string"?!1:Array.isArray(i)?i.every(M3e):!!i.exclusive}class Owe{constructor(e,t,n,s,r){this.uri=e,this.languageId=t,this.notebookUri=n,this.notebookType=s,this.recursive=r}equals(e){var t,n;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&((t=this.notebookUri)==null?void 0:t.toString())===((n=e.notebookUri)==null?void 0:n.toString())&&this.recursive===e.recursive}}class Ps{get onDidChange(){return this._onDidChange.event}constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new ie}register(e,t){let n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),dt(()=>{if(n){const s=this._entries.indexOf(n);s>=0&&(this._entries.splice(s,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const n of this._entries)n._score>0&&t.push(n.provider);return t}ordered(e,t=!1){const n=[];return this._orderedForEach(e,t,s=>n.push(s.provider)),n}orderedGroups(e){const t=[];let n,s;return this._orderedForEach(e,!1,r=>{n&&s===r._score?n.push(r.provider):(s=r._score,n=[r.provider],t.push(n))}),t}_orderedForEach(e,t,n){this._updateScores(e,t);for(const s of this._entries)s._score>0&&n(s)}_updateScores(e,t){var r,o;const n=(r=this._notebookInfoResolver)==null?void 0:r.call(this,e.uri),s=n?new Owe(e.uri,e.getLanguageId(),n.uri,n.type,t):new Owe(e.uri,e.getLanguageId(),void 0,void 0,t);if(!((o=this._lastCandidate)!=null&&o.equals(s))){this._lastCandidate=s;for(const a of this._entries)if(a._score=lce(a.selector,s.uri,s.languageId,oAe(e),s.notebookUri,s.notebookType),M3e(a.selector)&&a._score>0)if(t)a._score=0;else{for(const l of this._entries)l._score=0;a._score=1e3;break}this._entries.sort(Ps._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:rA(e.selector)&&!rA(t.selector)?1:!rA(e.selector)&&rA(t.selector)?-1:e._timet._time?-1:0}}function rA(i){return typeof i=="string"?!1:Array.isArray(i)?i.some(rA):!!i.isBuiltin}class Qen{constructor(){this.referenceProvider=new Ps(this._score.bind(this)),this.renameProvider=new Ps(this._score.bind(this)),this.newSymbolNamesProvider=new Ps(this._score.bind(this)),this.codeActionProvider=new Ps(this._score.bind(this)),this.definitionProvider=new Ps(this._score.bind(this)),this.typeDefinitionProvider=new Ps(this._score.bind(this)),this.declarationProvider=new Ps(this._score.bind(this)),this.implementationProvider=new Ps(this._score.bind(this)),this.documentSymbolProvider=new Ps(this._score.bind(this)),this.inlayHintsProvider=new Ps(this._score.bind(this)),this.colorProvider=new Ps(this._score.bind(this)),this.codeLensProvider=new Ps(this._score.bind(this)),this.documentFormattingEditProvider=new Ps(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Ps(this._score.bind(this)),this.onTypeFormattingEditProvider=new Ps(this._score.bind(this)),this.signatureHelpProvider=new Ps(this._score.bind(this)),this.hoverProvider=new Ps(this._score.bind(this)),this.documentHighlightProvider=new Ps(this._score.bind(this)),this.multiDocumentHighlightProvider=new Ps(this._score.bind(this)),this.selectionRangeProvider=new Ps(this._score.bind(this)),this.foldingRangeProvider=new Ps(this._score.bind(this)),this.linkProvider=new Ps(this._score.bind(this)),this.inlineCompletionsProvider=new Ps(this._score.bind(this)),this.completionProvider=new Ps(this._score.bind(this)),this.linkedEditingRangeProvider=new Ps(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Ps(this._score.bind(this)),this.documentSemanticTokensProvider=new Ps(this._score.bind(this)),this.documentDropEditProvider=new Ps(this._score.bind(this)),this.documentPasteEditProvider=new Ps(this._score.bind(this))}_score(e){var t;return(t=this._notebookTypeResolver)==null?void 0:t.call(this,e)}}wn(lt,Qen,1);var Xen=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},L4=function(i,e){return function(t,n){e(t,n,i)}};const vf=Oe;let Rne=class extends id{get _targetWindow(){return xt(this._target.targetElements[0])}get _targetDocumentElement(){return xt(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,n,s,r){var g,f,m,x,v,_,w,k,C,E,D;if(super(),this._keybindingService=t,this._configurationService=n,this._markdownRenderer=s,this._accessibilityService=r,this._messageListeners=new _e,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._maxHeightRatioRelativeToWindow=.5,this._onDispose=this._register(new ie),this._onRequestLayout=this._register(new ie),this._linkHandler=e.linkHandler,this._target="targetElements"in e.target?e.target:new Zen(e.target),e.style)switch(e.style){case 1:{e.appearance??(e.appearance={}),(g=e.appearance).compact??(g.compact=!0),(f=e.appearance).showPointer??(f.showPointer=!0);break}case 2:{e.appearance??(e.appearance={}),(m=e.appearance).compact??(m.compact=!0);break}}this._hoverPointer=(x=e.appearance)!=null&&x.showPointer?vf("div.workbench-hover-pointer"):void 0,this._hover=this._register(new sle(!((v=e.appearance)!=null&&v.skipFadeInAnimation))),this._hover.containerDomNode.classList.add("workbench-hover"),(_=e.appearance)!=null&&_.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),(w=e.position)!=null&&w.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0);const o=(k=e.appearance)==null?void 0:k.maxHeightRatio;o!==void 0&&o>0&&o<=1&&(this._maxHeightRatioRelativeToWindow=o),this._hoverPosition=((C=e.position)==null?void 0:C.hoverPosition)===void 0?3:Wb(e.position.hoverPosition)?e.position.hoverPosition:2,this.onmousedown(this._hover.containerDomNode,T=>T.stopPropagation()),this.onkeydown(this._hover.containerDomNode,T=>{T.equals(9)&&this.dispose()}),this._register(de(this._targetWindow,"blur",()=>this.dispose()));const a=vf("div.hover-row.markdown-hover"),l=vf("div.hover-contents");if(typeof e.content=="string")l.textContent=e.content,l.style.whiteSpace="pre-wrap";else if(er(e.content))l.appendChild(e.content),l.classList.add("html-hover-contents");else{const T=e.content,{element:I}=this._register(this._markdownRenderer.render(T,{actionHandler:this._linkHandler,asyncRenderCallback:()=>{l.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}}));l.appendChild(I)}if(a.appendChild(l),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){const T=vf("div.hover-row.status-bar"),I=vf("div.actions");e.actions.forEach(R=>{const P=this._keybindingService.lookupKeybinding(R.commandId),j=P?P.getLabel():null;this._register(SW.render(I,{label:R.label,commandId:R.commandId,run:B=>{R.run(B),this.dispose()},iconClass:R.iconClass},j))}),T.appendChild(I),this._hover.containerDomNode.appendChild(T)}this._hoverContainer=vf("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let c;if(e.actions&&e.actions.length>0?c=!1:((E=e.persistence)==null?void 0:E.hideOnHover)===void 0?c=typeof e.content=="string"||Ib(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):c=e.persistence.hideOnHover,(D=e.appearance)!=null&&D.showHoverHint){const T=vf("div.hover-row.status-bar"),I=vf("div.info");I.textContent=S(1699,"Hold {0} key to mouse over",bn?"Option":"Alt"),T.appendChild(I),this._hover.containerDomNode.appendChild(T)}const u=[...this._target.targetElements];c||u.push(this._hoverContainer);const h=this._register(new jwe(u));if(this._register(h.onMouseOut(()=>{this._isLocked||this.dispose()})),c){const T=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new jwe(T)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=h}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){const n=k7(this._hoverContainer,vf("div")),s=De(this._hoverContainer,vf("div"));n.tabIndex=0,s.tabIndex=0,this._register(de(s,"focus",r=>{e.focus(),r.preventDefault()})),this._register(de(n,"focus",r=>{t.focus(),r.preventDefault()}))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return r}const s=this.findLastFocusableChild(n);if(s)return s}}render(e){var s;e.appendChild(this._hoverContainer);const n=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&LPe(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))==null?void 0:s.getAriaLabel());n&&zg(n),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=u=>{const h=RIe(u),g=u.getBoundingClientRect();return{top:g.top*h,bottom:g.bottom*h,right:g.right*h,left:g.left*h}},t=this._target.targetElements.map(u=>e(u)),{top:n,right:s,bottom:r,left:o}=t[0],a=s-o,l=r-n,c={top:n,right:s,bottom:r,left:o,width:a,height:l,center:{x:o+a/2,y:n+l/2}};if(this.adjustHorizontalHoverPosition(c),this.adjustVerticalHoverPosition(c),this.adjustHoverMaxHeight(c),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:c.left+=3,c.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:c.left-=3,c.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:c.top+=3,c.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:c.top-=3,c.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}c.center.x=c.left+a/2,c.center.y=c.top+l/2}this.computeXCordinate(c),this.computeYCordinate(c),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(c)),this._hover.onContentsChanged()}computeXCordinate(e){const t=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=e.right:this._hoverPosition===0?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(this._target.x!==void 0)return;const t=this._hoverPointer?3:0;if(this._forcePosition){const n=t+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-e.right-n}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${e.left-n}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(e.left=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(this._target.y!==void 0||this._forcePosition)return;const t=this._hoverPointer?3:0;this._hoverPosition===3?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):this._hoverPosition===2&&e.bottom+this._hover.containerDomNode.offsetHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight*this._maxHeightRatioRelativeToWindow;if(this._forcePosition){const n=(this._hoverPointer?3:0)+2;this._hoverPosition===3?t=Math.min(t,e.top-n):this._hoverPosition===2&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-n))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=`${e.center.y-(this._y-t)-3}px`:this._hoverPointer.style.top=`${Math.round(t/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");const t=this._hover.containerDomNode.clientWidth;let n=Math.round(t/2)-3;const s=this._x+n;(se.right)&&(n=e.center.x-this._x-3),this._hoverPointer.style.left=`${n}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){var e,t;this._isDisposed||(this._onDispose.fire(),(t=(e=this._target).dispose)==null||t.call(e),this._hoverContainer.remove(),this._messageListeners.dispose(),super.dispose()),this._isDisposed=!0}};Rne=Xen([L4(1,zn),L4(2,Zt),L4(3,Zh),L4(4,Zo)],Rne);class jwe extends id{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e,t=200){super(),this._elements=e,this._eventDebounceDelay=t,this._isMouseIn=!0,this._mouseTimer=this._register(new Zn),this._onMouseOut=this._register(new ie);for(const n of this._elements)this.onmouseover(n,()=>this._onTargetMouseOver()),this.onmouseleave(n,()=>this._onTargetMouseLeave())}_onTargetMouseOver(){this._isMouseIn=!0,this._mouseTimer.clear()}_onTargetMouseLeave(){this._isMouseIn=!1,this._mouseTimer.value=new Yc(()=>this._fireIfMouseOutside(),this._eventDebounceDelay)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class Zen{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}function Jen(i){const e=i;return!!e&&typeof e.x=="number"&&typeof e.y=="number"}var a_;(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})(a_||(a_={}));function wN(i,e,t){const n=t.mode===a_.ALIGN?t.offset:t.offset+t.size,s=t.mode===a_.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=i-n?n:e<=s?s-e:Math.max(i-e,0):e<=s?s-e:e<=i-n?n:0}const FN=class FN extends se{constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=se.None,this.toDisposeOnSetContainer=se.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Oe(".context-view"),Al(this.view),this.setContainer(e,t),this._register(dt(()=>this.setContainer(null,1)))}setContainer(e,t){var s;this.useFixedPosition=t!==1;const n=this.useShadowDOM;if(this.useShadowDOM=t===3,!(e===this.container&&n===this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,(s=this.shadowRootHostElement)==null||s.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=Oe(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const o=document.createElement("style");o.textContent=etn,this.shadowRoot.appendChild(o),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Oe("slot"))}else this.container.appendChild(this.view);const r=new _e;FN.BUBBLE_UP_EVENTS.forEach(o=>{r.add(yr(this.container,o,a=>{this.onDOMEvent(a,!1)}))}),FN.BUBBLE_DOWN_EVENTS.forEach(o=>{r.add(yr(this.container,o,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=r}}show(e){var t,n;this.isVisible()&&this.hide(),Qo(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",Bc(this.view),this.toDisposeOnClean=e.render(this.view)||se.None,this.delegate=e,this.doLayout(),(n=(t=this.delegate).focus)==null||n.call(t)}getViewElement(){return this.view}layout(){var e,t;if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(zu&&PP.pointerEvents)){this.hide();return}(t=(e=this.delegate)==null?void 0:e.layout)==null||t.call(e),this.doLayout()}}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(er(e)){const m=Zs(e),x=RIe(e);t={top:m.top*x,left:m.left*x,width:m.width*x,height:m.height*x}}else Jen(e)?t={top:e.y,left:e.x,width:e.width||1,height:e.height||2}:t={top:e.posy,left:e.posx,width:2,height:2};const n=Oc(this.view),s=cb(this.view),r=this.delegate.anchorPosition??0,o=this.delegate.anchorAlignment??0,a=this.delegate.anchorAxisAlignment??0;let l,c;const u=oi();if(a===0){const m={offset:t.top-u.pageYOffset,size:t.height,position:r===0?0:1},x={offset:t.left,size:t.width,position:o===0?0:1,mode:a_.ALIGN};l=wN(u.innerHeight,s,m)+u.pageYOffset,Da.intersects({start:l,end:l+s},{start:m.offset,end:m.offset+m.size})&&(x.mode=a_.AVOID),c=wN(u.innerWidth,n,x)}else{const m={offset:t.left,size:t.width,position:o===0?0:1},x={offset:t.top,size:t.height,position:r===0?0:1,mode:a_.ALIGN};c=wN(u.innerWidth,n,m),Da.intersects({start:c,end:c+n},{start:m.offset,end:m.offset+m.size})&&(x.mode=a_.AVOID),l=wN(u.innerHeight,s,x)+u.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(r===0?"bottom":"top"),this.view.classList.add(o===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const h=Zs(this.container),g=this.container.scrollTop||0,f=this.container.scrollLeft||0;this.view.style.top=`${l-(this.useFixedPosition?Zs(this.view).top:h.top)+g}px`,this.view.style.left=`${c-(this.useFixedPosition?Zs(this.view).left:h.left)+f}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t!=null&&t.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Al(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,xt(e).document.activeElement):t&&!xo(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}};FN.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],FN.BUBBLE_DOWN_EVENTS=["click"];let Mne=FN;const etn=` + :host { + all: initial; /* 1st rule so subsequent properties are reset. */ + } + + .codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + :host { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; + } + + :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } + :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } + :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } + :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } + :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif; } + + :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } + :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } + :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } + :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } + :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } + + :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } + :host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; } + :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; } +`;var ttn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},ntn=function(i,e){return function(t,n){e(t,n,i)}};let SB=class extends se{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new Mne(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer(()=>this.layout()))}showContextView(e,t,n){let s;t?t===this.layoutService.getContainer(xt(t))?s=1:n?s=3:s=2:s=1,this.contextView.setContainer(t??this.layoutService.activeContainer,s),this.contextView.show(e);const r={close:()=>{this.openContextView===r&&this.hideContextView()}};return this.openContextView=r,r}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};SB=ttn([ntn(0,qp)],SB);class itn extends SB{getContextViewElement(){return this.contextView.getViewElement()}}function P3e(i){const e=i;return typeof e=="object"&&"markdown"in e&&"markdownNotSupportedFallback"in e}class stn{constructor(e,t,n){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=n}async update(e,t,n){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let s;if(bo(e)||er(e)||e===void 0)s=e;else{this._cancellationTokenSource=new vs;const r=this._cancellationTokenSource.token;let o;if(P3e(e)?cC(e.markdown)?o=e.markdown(r).then(a=>a??e.markdownNotSupportedFallback):o=e.markdown??e.markdownNotSupportedFallback:o=e.element(r),o instanceof Promise?(this._hoverWidget||this.show(S(1700,"Loading..."),t,n),s=await o):s=o,this.isDisposed||r.isCancellationRequested)return}this.show(s,t,n)}show(e,t,n){var r;const s=this._hoverWidget;if(this.hasContent(e)){const o={content:e,target:this.target,actions:n==null?void 0:n.actions,linkHandler:n==null?void 0:n.linkHandler,trapFocus:n==null?void 0:n.trapFocus,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!s,showHoverHint:(r=n==null?void 0:n.appearance)==null?void 0:r.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(o,t)}s==null||s.dispose()}hasContent(e){return e?Ib(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)==null?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)==null||e.dispose(),(t=this._cancellationTokenSource)==null||t.dispose(!0),this._cancellationTokenSource=void 0}}var rtn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Bk=function(i,e){return function(t,n){e(t,n,i)}};let Pne=class extends se{constructor(e,t,n,s,r,o){super(),this._instantiationService=e,this._configurationService=t,this._keybindingService=s,this._layoutService=r,this._accessibilityService=o,this._currentDelayedHoverWasShown=!1,this._delayedHovers=new Map,this._managedHovers=new Map,this._register(n.onDidShowContextMenu(()=>this.hideHover())),this._contextViewHandler=this._register(new SB(this._layoutService)),this._register(jo.registerCommandAndKeybindingRule({id:"workbench.action.showHover",weight:0,primary:Or(2089,2087),handler:()=>{this._showAndFocusHoverForActiveElement()}}))}showInstantHover(e,t,n,s){const r=this._createHover(e,n);if(r)return this._showHover(r,e,t),r}showDelayedHover(e,t){var s;if(e.id===void 0&&(e.id=Fwe(e.content)),!this._currentDelayedHover||this._currentDelayedHoverWasShown){if((s=this._currentHover)!=null&&s.isLocked)return;if(Zx(this._currentHoverOptions)===Zx(e))return this._currentHover;if(this._currentHover&&!this._currentHover.isDisposed&&this._currentDelayedHoverGroupId!==void 0&&this._currentDelayedHoverGroupId===(t==null?void 0:t.groupId))return this.showInstantHover({...e,appearance:{...e.appearance,skipFadeInAnimation:!0}})}else if(this._currentDelayedHover&&Zx(this._currentHoverOptions)===Zx(e))return this._currentDelayedHover;const n=this._createHover(e,void 0);if(!n){this._currentDelayedHover=void 0,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=void 0;return}return this._currentDelayedHover=n,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=t==null?void 0:t.groupId,kp(this._configurationService.getValue("workbench.hover.delay")).then(()=>{n&&!n.isDisposed&&(this._currentDelayedHoverWasShown=!0,this._showHover(n,e))}),n}setupDelayedHover(e,t,n){const s=()=>({...typeof t=="function"?t():t,target:e});return this._setupDelayedHover(e,s,n)}setupDelayedHoverAtMouse(e,t,n){const s=r=>({...typeof t=="function"?t():t,target:{targetElements:[e],x:r!==void 0?r.x+10:void 0}});return this._setupDelayedHover(e,s,n)}_setupDelayedHover(e,t,n){const s=new _e;return s.add(de(e,Fe.MOUSE_OVER,r=>{this.showDelayedHover(t(r),{groupId:n==null?void 0:n.groupId})})),n!=null&&n.setupKeyboardEvents&&s.add(de(e,Fe.KEY_DOWN,r=>{const o=new ki(r);(o.equals(10)||o.equals(3))&&this.showInstantHover(t(),!0)})),this._delayedHovers.set(e,{show:r=>{this.showInstantHover(t(),r)}}),s.add(dt(()=>this._delayedHovers.delete(e))),s}_createHover(e,t){var a,l,c,u;if(this._currentDelayedHover=void 0,e.content===""||(a=this._currentHover)!=null&&a.isLocked||(e.id===void 0&&(e.id=Fwe(e.content)),Zx(this._currentHoverOptions)===Zx(e)))return;this._currentHoverOptions=e,this._lastHoverOptions=e;const n=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),s=so();t||(n&&s?s.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=s):this._lastFocusedElementBeforeOpen=void 0);const r=new _e,o=this._instantiationService.createInstance(Rne,e);if((l=e.persistence)!=null&&l.sticky&&(o.isLocked=!0),(c=e.position)!=null&&c.hoverPosition&&!Wb(e.position.hoverPosition)&&(e.target={targetElements:er(e.target)?[e.target]:e.target.targetElements,x:e.position.hoverPosition.x+10}),o.onDispose(()=>{var g,f;((g=this._currentHover)==null?void 0:g.domNode)&&PIe(this._currentHover.domNode)&&((f=this._lastFocusedElementBeforeOpen)==null||f.focus()),Zx(this._currentHoverOptions)===Zx(e)&&this.doHideHover(),r.dispose()},void 0,r),!e.container){const h=er(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(xt(h))}if(o.onRequestLayout(()=>this._contextViewHandler.layout(),void 0,r),(u=e.persistence)!=null&&u.sticky)r.add(de(xt(e.container).document,Fe.MOUSE_DOWN,h=>{xo(h.target,o.domNode)||this.doHideHover()}));else{if("targetElements"in e.target)for(const g of e.target.targetElements)r.add(de(g,Fe.CLICK,()=>this.hideHover()));else r.add(de(e.target,Fe.CLICK,()=>this.hideHover()));const h=so();if(h){const g=xt(h).document;r.add(de(h,Fe.KEY_DOWN,f=>{var m;return this._keyDown(f,o,!!((m=e.persistence)!=null&&m.hideOnKeyDown))})),r.add(de(g,Fe.KEY_DOWN,f=>{var m;return this._keyDown(f,o,!!((m=e.persistence)!=null&&m.hideOnKeyDown))})),r.add(de(h,Fe.KEY_UP,f=>this._keyUp(f,o))),r.add(de(g,Fe.KEY_UP,f=>this._keyUp(f,o)))}}if("IntersectionObserver"in fi){const h=new IntersectionObserver(f=>this._intersectionChange(f,o),{threshold:0}),g="targetElements"in e.target?e.target.targetElements[0]:e.target;h.observe(g),r.add(dt(()=>h.disconnect()))}return this._currentHover=o,o}_showHover(e,t,n){this._contextViewHandler.showContextView(new atn(e,n),t.container)}hideHover(e){var t;!e&&((t=this._currentHover)!=null&&t.isLocked)||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showInstantHover(this._lastHoverOptions,!0,!0)}_showAndFocusHoverForActiveElement(){let e=so();for(;e;){const t=this._delayedHovers.get(e)??this._managedHovers.get(e);if(t){t.show(!0);return}e=e.parentElement}}_keyDown(e,t,n){var o,a;if(e.key==="Alt"){t.isLocked=!0;return}const s=new ki(e);this._keybindingService.resolveKeyboardEvent(s).getSingleModifierDispatchChords().some(l=>!!l)||this._keybindingService.softDispatch(s,s.target).kind!==0||n&&(!((o=this._currentHoverOptions)!=null&&o.trapFocus)||e.key!=="Tab")&&(this.hideHover(),(a=this._lastFocusedElementBeforeOpen)==null||a.focus())}_keyUp(e,t){var n;e.key==="Alt"&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),(n=this._lastFocusedElementBeforeOpen)==null||n.focus()))}setupManagedHover(e,t,n,s){if(e.showNativeHover)return otn(t,n);t.setAttribute("custom-hover","true"),t.title!==""&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",t.title),t.title="");let r,o;const a=(f,m)=>{var v;const x=o!==void 0;f&&(o==null||o.dispose(),o=void 0),m&&(r==null||r.dispose(),r=void 0),x&&((v=e.onDidHideHover)==null||v.call(e),o=void 0)},l=(f,m,x,v)=>new Yc(async()=>{(!o||o.isDisposed)&&(o=new stn(e,x||t,f>0),await o.update(typeof n=="function"?n():n,m,{...s,trapFocus:v}))},f),c=new _e;let u=!1;c.add(de(t,Fe.MOUSE_DOWN,()=>{u=!0,a(!0,!0)},!0)),c.add(de(t,Fe.MOUSE_UP,()=>{u=!1},!0)),c.add(de(t,Fe.MOUSE_LEAVE,f=>{u=!1,a(!1,f.fromElement===t)},!0)),c.add(de(t,Fe.MOUSE_OVER,f=>{if(r)return;const m=new _e,x={targetElements:[t],dispose:()=>{}};if(e.placement===void 0||e.placement==="mouse"){const v=_=>{x.x=_.x+10,MK(_,t)||a(!0,!0)};m.add(de(t,Fe.MOUSE_MOVE,v,!0))}r=m,MK(f,t)&&m.add(l(typeof e.delay=="function"?e.delay(n):e.delay,!1,x))},!0));const h=f=>{if(u||r||!MK(f,t))return;const m={targetElements:[t],dispose:()=>{}},x=new _e,v=()=>a(!0,!0);x.add(de(t,Fe.BLUR,v,!0)),x.add(l(typeof e.delay=="function"?e.delay(n):e.delay,!1,m)),r=x};Og(t)||c.add(de(t,Fe.FOCUS,h,!0));const g={show:f=>{a(!1,!0),l(0,f,void 0,f)},hide:()=>{a(!0,!0)},update:async(f,m)=>{n=f,await(o==null?void 0:o.update(n,void 0,m))},dispose:()=>{this._managedHovers.delete(t),c.dispose(),a(!0,!0)}};return this._managedHovers.set(t,g),g}showManagedHover(e){const t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach(e=>e.dispose()),super.dispose()}};Pne=rtn([Bk(0,ft),Bk(1,Zt),Bk(2,eu),Bk(3,zn),Bk(4,qp),Bk(5,Zo)],Pne);function Zx(i){if(i!==void 0)return(i==null?void 0:i.id)??i}function Fwe(i){if(!er(i))return typeof i=="string"?i.toString():i.value}function Bwe(i){const e=typeof i=="function"?i():i;if(bo(e))return wae(e);if(P3e(e))return e.markdownNotSupportedFallback}function otn(i,e){function t(n){n?i.setAttribute("title",n):i.removeAttribute("title")}return t(Bwe(e)),{update:n=>t(Bwe(n)),show:()=>{},hide:()=>{},dispose:()=>t(void 0)}}class atn{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function MK(i,e){return er(i.target)&<n(i.target,e)===e}function ltn(i,e){for(e=e??xt(i).document.body;!i.hasAttribute("custom-hover")&&i!==e;)i=i.parentElement;return i}wn(Zl,Pne,1);Zu((i,e)=>{const t=i.getColor(Doe);t&&(e.addRule(`.monaco-hover.workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-hover.workbench-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`))});function D4(i){return Object.isFrozen(i)?i:mTt(i)}class $o{static createEmptyModel(e){return new $o({},[],[],void 0,e)}constructor(e,t,n,s,r){this._contents=e,this._keys=t,this._overrides=n,this.raw=s,this.logService=r,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw){const e=(Array.isArray(this.raw)?this.raw:[this.raw]).map(t=>{if(t instanceof $o)return t;const n=new ctn("",this.logService);return n.parseRaw(t),n.configurationModel});this._rawConfiguration=e.reduce((t,n)=>n===t?n:t.merge(n),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Pxe(this.contents,e):this.contents}inspect(e,t){const n=this;return{get value(){return D4(n.rawConfiguration.getValue(e))},get override(){return t?D4(n.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return D4(t?n.rawConfiguration.override(t).getValue(e):n.rawConfiguration.getValue(e))},get overrides(){const s=[];for(const{contents:r,identifiers:o,keys:a}of n.rawConfiguration.overrides){const l=new $o(r,a,[],void 0,n.logService).getValue(e);l!==void 0&&s.push({identifiers:o,value:l})}return s.length?D4(s):void 0}}}getOverrideValue(e,t){const n=this.getContentsForOverrideIdentifer(t);return n?e?Pxe(n,e):n:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=$f(this.contents),n=$f(this.overrides),s=[...this.keys],r=this.raw?Array.isArray(this.raw)?[...this.raw]:[this.raw]:[this];for(const o of e)if(r.push(...o.raw?Array.isArray(o.raw)?o.raw:[o.raw]:[o]),!o.isEmpty()){this.mergeContents(t,o.contents);for(const a of o.overrides){const[l]=n.filter(c=>bs(c.identifiers,a.identifiers));l?(this.mergeContents(l.contents,a.contents),l.keys.push(...a.keys),l.keys=qb(l.keys)):n.push($f(a))}for(const a of o.keys)s.indexOf(a)===-1&&s.push(a)}return new $o(t,s,n,!r.length||r.every(o=>o instanceof $o)?void 0:r,this.logService)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;const n={};for(const s of qb([...Object.keys(this.contents),...Object.keys(t)])){let r=this.contents[s];const o=t[s];o&&(typeof r=="object"&&typeof o=="object"?(r=$f(r),this.mergeContents(r,o)):r=o),n[s]=r}return new $o(n,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(const n of Object.keys(t)){if(n in e&&no(e[n])&&no(t[n])){this.mergeContents(e[n],t[n]);continue}e[n]=$f(t[n])}}getContentsForOverrideIdentifer(e){let t=null,n=null;const s=r=>{r&&(n?this.mergeContents(n,r):n=$f(r))};for(const r of this.overrides)r.identifiers.length===1&&r.identifiers[0]===e?t=r.contents:r.identifiers.includes(e)&&s(r.contents);return s(t),n}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);t!==-1&&(this.keys.splice(t,1),PTt(this.contents,e),n0.test(e)&&this.overrides.splice(this.overrides.findIndex(n=>bs(n.identifiers,VF(e))),1))}updateValue(e,t,n){if(hAe(this.contents,e,t,s=>this.logService.error(s)),n=n||this.keys.indexOf(e)===-1,n&&this.keys.push(e),n0.test(e)){const s=VF(e),r={identifiers:s,keys:Object.keys(this.contents[e]),contents:oQ(this.contents[e],a=>this.logService.error(a))},o=this.overrides.findIndex(a=>bs(a.identifiers,s));o!==-1?this.overrides[o]=r:this.overrides.push(r)}}}class ctn{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||$o.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;const{contents:n,keys:s,overrides:r,restricted:o,hasExcludedProperties:a}=this.doParseRaw(e,t);this._configurationModel=new $o(n,s,r,a?[e]:void 0,this.logService),this._restrictedConfigurations=o||[]}doParseRaw(e,t){const n=Hs.as(tf.Configuration),s=n.getConfigurationProperties(),r=n.getExcludedConfigurationProperties(),o=this.filter(e,s,r,!0,t);e=o.raw;const a=oQ(e,u=>this.logService.error(`Conflict in settings file ${this._name}: ${u}`)),l=Object.keys(e),c=this.toOverrides(e,u=>this.logService.error(`Conflict in settings file ${this._name}: ${u}`));return{contents:a,keys:l,overrides:c,restricted:o.restricted,hasExcludedProperties:o.hasExcludedProperties}}filter(e,t,n,s,r){var c;let o=!1;if(!(r!=null&&r.scopes)&&!(r!=null&&r.skipRestricted)&&!(r!=null&&r.skipUnregistered)&&!((c=r==null?void 0:r.exclude)!=null&&c.length))return{raw:e,restricted:[],hasExcludedProperties:o};const a={},l=[];for(const u in e)if(n0.test(u)&&s){const h=this.filter(e[u],t,n,!1,r);a[u]=h.raw,o=o||h.hasExcludedProperties,l.push(...h.restricted)}else{const h=t[u];h!=null&&h.restricted&&l.push(u),this.shouldInclude(u,h,n,r)?a[u]=e[u]:o=!0}return{raw:a,restricted:l,hasExcludedProperties:o}}shouldInclude(e,t,n,s){var a,l;if((a=s.exclude)!=null&&a.includes(e))return!1;if((l=s.include)!=null&&l.includes(e))return!0;if(s.skipRestricted&&(t!=null&&t.restricted)||s.skipUnregistered&&!t)return!1;const r=t??n[e],o=r?typeof r.scope<"u"?r.scope:4:void 0;return o===void 0||s.scopes===void 0?!0:s.scopes.includes(o)}toOverrides(e,t){const n=[];for(const s of Object.keys(e))if(n0.test(s)){const r={};for(const o in e[s])r[o]=e[s][o];n.push({identifiers:VF(s),keys:Object.keys(r),contents:oQ(r,t)})}return n}}class dtn{constructor(e,t,n,s,r,o,a,l,c,u,h,g,f){this.key=e,this.overrides=t,this._value=n,this.overrideIdentifiers=s,this.defaultConfiguration=r,this.policyConfiguration=o,this.applicationConfiguration=a,this.userConfiguration=l,this.localUserConfiguration=c,this.remoteUserConfiguration=u,this.workspaceConfiguration=h,this.folderConfigurationModel=g,this.memoryConfigurationModel=f}toInspectValue(e){return(e==null?void 0:e.value)!==void 0||(e==null?void 0:e.override)!==void 0||(e==null?void 0:e.overrides)!==void 0?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class XW{constructor(e,t,n,s,r,o,a,l,c,u){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=n,this._localUserConfiguration=s,this._remoteUserConfiguration=r,this._workspaceConfiguration=o,this._folderConfigurations=a,this._memoryConfiguration=l,this._memoryConfigurationByResource=c,this.logService=u,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Sr,this._userConfiguration=null}getValue(e,t,n){return this.getConsolidatedConfigurationModel(e,t,n).getValue(e)}updateValue(e,t,n={}){let s;n.resource?(s=this._memoryConfigurationByResource.get(n.resource),s||(s=$o.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(n.resource,s))):s=this._memoryConfiguration,t===void 0?s.removeValue(e):s.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){const s=this.getConsolidatedConfigurationModel(e,t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),o=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration,a=new Set;for(const l of s.overrides)for(const c of l.identifiers)s.getOverrideValue(e,c)!==void 0&&a.add(c);return new dtn(e,t,s.getValue(e),a.size?[...a]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,n?this._workspaceConfiguration:void 0,r||void 0,o)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){if(!this._userConfiguration)if(this._remoteUserConfiguration.isEmpty())this._userConfiguration=this._localUserConfiguration;else{const e=this._localUserConfiguration.merge(this._remoteUserConfiguration);this._userConfiguration=new $o(e.contents,e.keys,e.overrides,void 0,this.logService)}return this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,n){let s=this.getConsolidatedConfigurationModelForResource(t,n);if(t.overrideIdentifier&&(s=s.override(t.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(e)!==void 0){s=s.merge();for(const r of this._policyConfiguration.keys)s.setValue(r,this._policyConfiguration.getValue(r))}return s}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const s=t.getFolder(e);s&&(n=this.getFolderConsolidatedConfiguration(s.uri)||n);const r=this._memoryConfigurationByResource.get(e);r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const n=this.getWorkspaceConsolidatedConfiguration(),s=this._folderConfigurations.get(e);s?(t=n.merge(s),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys,raw:Array.isArray(this.applicationConfiguration.raw)?void 0:this.applicationConfiguration.raw},userLocal:{contents:this.localUserConfiguration.contents,overrides:this.localUserConfiguration.overrides,keys:this.localUserConfiguration.keys,raw:Array.isArray(this.localUserConfiguration.raw)?void 0:this.localUserConfiguration.raw},userRemote:{contents:this.remoteUserConfiguration.contents,overrides:this.remoteUserConfiguration.overrides,keys:this.remoteUserConfiguration.keys,raw:Array.isArray(this.remoteUserConfiguration.raw)?void 0:this.remoteUserConfiguration.raw},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:n,overrides:s,keys:r}=this._folderConfigurations.get(t);return e.push([t,{contents:n,overrides:s,keys:r}]),e},[])}}static parse(e,t){const n=this.parseConfigurationModel(e.defaults,t),s=this.parseConfigurationModel(e.policy,t),r=this.parseConfigurationModel(e.application,t),o=this.parseConfigurationModel(e.userLocal,t),a=this.parseConfigurationModel(e.userRemote,t),l=this.parseConfigurationModel(e.workspace,t),c=e.folders.reduce((u,h)=>(u.set(kt.revive(h[0]),this.parseConfigurationModel(h[1],t)),u),new Sr);return new XW(n,s,r,o,a,l,c,$o.createEmptyModel(t),new Sr,t)}static parseConfigurationModel(e,t){return new $o(e.contents,e.keys,e.overrides,e.raw,t)}}class utn{constructor(e,t,n,s,r){this.change=e,this.previous=t,this.currentConfiguraiton=n,this.currentWorkspace=s,this.logService=r,this._marker=` +`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const o of e.keys)this.affectedKeys.add(o);for(const[,o]of e.overrides)for(const a of o)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(const o of this.affectedKeys)this._affectsConfigStr+=o+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=XW.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){var a;const n=this._marker+e,s=this._affectsConfigStr.indexOf(n);if(s<0)return!1;const r=s+n.length;if(r>=this._affectsConfigStr.length)return!1;const o=this._affectsConfigStr.charCodeAt(r);if(o!==this._markerCode1&&o!==this._markerCode2)return!1;if(t){const l=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(a=this.previous)==null?void 0:a.workspace):void 0,c=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!qc(l,c)}return!0}}const kB={kind:0},htn={kind:1};function gtn(i,e,t){return{kind:2,commandId:i,commandArgs:e,isBubble:t}}class c2{constructor(e,t,n){var s;this._log=n,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const r of e){const o=r.command;o&&o.charAt(0)!=="-"&&this._defaultBoundCommands.set(o,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=c2.handleRemovals([].concat(e).concat(t));for(let r=0,o=this._keybindings.length;r"u"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let s=n.length-1;s>=0;s--){const r=n[s];if(r.command===t.command)continue;let o=!0;for(let a=1;a"u"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;const t=this._lookupMap.get(e.command);if(!(typeof t>"u")){for(let n=0,s=t.length;n"u"||s.length===0)return null;if(s.length===1&&!n)return s[0];for(let r=s.length-1;r>=0;r--){const o=s[r];if(t.contextMatchesRules(o.when))return o}return n?null:s[s.length-1]}resolve(e,t,n){const s=[...t,n];this._log(`| Resolving ${s}`);const r=this._map.get(s[0]);if(r===void 0)return this._log("\\ No keybinding entries."),kB;let o=null;if(s.length<2)o=r;else{o=[];for(let l=0,c=r.length;lu.chords.length)continue;let h=!0;for(let g=1;g=0;n--){const s=t[n];if(c2._contextMatchesRules(e,s.when))return s}return null}static _contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function Hwe(i){return i?`${i.serialize()}`:"no when condition"}function Wwe(i){return i.extensionId?i.isBuiltinExtension?`built-in extension ${i.extensionId}`:`user extension ${i.extensionId}`:i.isDefault?"built-in":"user"}const ftn=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class ptn extends se{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:He.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,n,s,r){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=n,this._notificationService=s,this._logService=r,this._onDidUpdateKeybindings=this._register(new ie),this._currentChords=[],this._currentChordChecker=new Hre,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=CN.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Yc,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t,n=!1){const s=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService,n);if(s)return s.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const n=this.resolveKeyboardEvent(e);if(n.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),kB;const[s]=n.getDispatchChords();if(s===null)return this._log("\\ Keyboard event cannot be dispatched"),kB;const r=this._contextKeyService.getContext(t),o=this._currentChords.map((({keypress:a})=>a));return this._getResolver().resolve(r,o,s)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-e>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw _F("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(S(1701,"({0}) was pressed. Waiting for second key of chord...",t));break;default:{const n=this._currentChords.map(({label:s})=>s).join(", ");this._currentChordStatusMessage=this._notificationService.status(S(1702,"({0}) was pressed. Waiting for next key of chord...",n))}}this._scheduleLeaveChordMode(),pp.enabled&&pp.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.close(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],pp.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const n=this.resolveKeyboardEvent(e),[s]=n.getSingleModifierDispatchChords();if(s)return this._ignoreSingleModifiers.has(s)?(this._log(`+ Ignoring single modifier ${s} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=CN.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=CN.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${s}.`),this._currentSingleModifier=s,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):s===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${s} ${s}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(n,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${s}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[r]=n.getChords();return this._ignoreSingleModifiers=new CN(r),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,n=!1){let s=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let r=null,o=null;if(n){const[u]=e.getSingleModifierDispatchChords();r=u,o=u?[u]:[]}else[r]=e.getDispatchChords(),o=this._currentChords.map(({keypress:u})=>u);if(r===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),s;const a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,o,r);switch(c.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(S(1703,"The key combination ({0}, {1}) is not a command.",u,l),{hideAfter:10*1e3}),this._leaveChordMode(),s=!0}return s}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),s=!0,this._expectAnotherChord(r,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),s;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${c.commandId} ]`),c.commandId===null||c.commandId===""){if(this.inChordMode){const u=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${u}, ${l}".`),this._notificationService.status(S(1704,"The key combination ({0}, {1}) is not a command.",u,l),{hideAfter:10*1e3}),this._leaveChordMode(),s=!0}}else{this.inChordMode&&this._leaveChordMode(),c.isBubble||(s=!0),this._log(`+ Invoking command ${c.commandId}.`),this._currentlyDispatchingCommandId=c.commandId;try{typeof c.commandArgs>"u"?this._commandService.executeCommand(c.commandId).then(void 0,u=>this._notificationService.warn(u)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,u=>this._notificationService.warn(u))}finally{this._currentlyDispatchingCommandId=null}ftn.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return s}}}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}const fH=class fH{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}};fH.EMPTY=new fH(null);let CN=fH;class Vwe{constructor(e,t,n,s,r,o,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?One(e.getDispatchChords()):[],e&&this.chords.length===0&&(this.chords=One(e.getSingleModifierDispatchChords())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=s,this.isDefault=r,this.extensionId=o,this.isBuiltinExtension=a}}function One(i){const e=[];for(let t=0,n=i.length;tthis._getLabel(e))}getAriaLabel(){return ABt.toLabel(this._os,this._chords,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:RBt.toLabel(this._os,this._chords,e=>this._getElectronAccelerator(e))}getUserSettingsLabel(){return MBt.toLabel(this._os,this._chords,e=>this._getUserSettingsLabel(e))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(e=>this._getChord(e))}_getChord(e){return new ZNt(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map(e=>this._getChordDispatch(e))}getSingleModifierDispatchChords(){return this._chords.map(e=>this._getSingleModifierChordDispatch(e))}}class FM extends mtn{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return nb.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":nb.toString(e.keyCode)}_getElectronAccelerator(e){return nb.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=nb.toUserSettingsUS(e.keyCode);return t&&t.toLowerCase()}_getChordDispatch(e){return FM.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=nb.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const t=jre[e];if(t!==-1)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof Vb)return e;const t=this._scanCodeToKeyCode(e.scanCode);return t===0?null:new Vb(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const n=One(e.chords.map(s=>this._toKeyCodeChord(s)));return n.length>0?[new FM(n,t)]:[]}}let QL=[],bce=[],O3e=[];function T4(i,e=!1){btn(i,!1,e)}function btn(i,e,t){const n=xtn(i,e);QL.push(n),n.userConfigured?O3e.push(n):bce.push(n),t&&!n.userConfigured&&QL.forEach(s=>{s.mime===n.mime||s.userConfigured||(n.extension&&s.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&s.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&s.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&s.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))})}function xtn(i,e){return{id:i.id,mime:i.mime,filename:i.filename,extension:i.extension,filepattern:i.filepattern,firstline:i.firstline,userConfigured:e,filenameLowercase:i.filename?i.filename.toLowerCase():void 0,extensionLowercase:i.extension?i.extension.toLowerCase():void 0,filepatternLowercase:i.filepattern?r3e(i.filepattern.toLowerCase()):void 0,filepatternOnPath:i.filepattern?i.filepattern.indexOf(Hr.sep)>=0:!1}}function vtn(){QL=QL.filter(i=>i.userConfigured),bce=[]}function _tn(i,e){return ytn(i,e).map(t=>t.id)}function ytn(i,e){let t;if(i)switch(i.scheme){case Ot.file:t=i.fsPath;break;case Ot.data:{t=e0.parseMetaData(i).get(e0.META_DATA_LABEL);break}case Ot.vscodeNotebookCell:t=void 0;break;default:t=i.path}if(!t)return[{id:"unknown",mime:dr.unknown}];t=t.toLowerCase();const n=Eb(t),s=zwe(t,n,O3e);if(s)return[s,{id:Ud,mime:dr.text}];const r=zwe(t,n,bce);if(r)return[r,{id:Ud,mime:dr.text}];if(e){const o=wtn(e);if(o)return[o,{id:Ud,mime:dr.text}]}return[{id:"unknown",mime:dr.unknown}]}function zwe(i,e,t){var o;let n,s,r;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const c=l.filepatternOnPath?i:e;(o=l.filepatternLowercase)!=null&&o.call(l,c)&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&e.endsWith(l.extensionLowercase)&&(r=l)}if(n)return n;if(s)return s;if(r)return r}function wtn(i){if(Gre(i)&&(i=i.substr(1)),i.length>0)for(let e=QL.length-1;e>=0;e--){const t=QL[e];if(!t.firstline)continue;const n=i.match(t.firstline);if(n&&n.length>0)return t}}const I4=Object.prototype.hasOwnProperty,Uwe="vs.editor.nullLanguage";class Ctn{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(Uwe,0),this._register(Ud,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||Uwe}}const L2=class L2 extends se{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new ie),this.onDidChange=this._onDidChange.event,L2.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Ctn,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(_L.onDidChangeLanguages(n=>{this._initializeFromRegistry()})))}dispose(){L2.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},vtn();const e=[].concat(_L.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{const n=this._languages[t];n.name&&(this._nameMap[n.name]=n.identifier),n.aliases.forEach(s=>{this._lowercaseNameMap[s.toLowerCase()]=n.identifier}),n.mimetypes.forEach(s=>{this._mimeTypesMap[s]=n.identifier})}),Hs.as(tf.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let n;I4.call(this._languages,t)?n=this._languages[t]:(this.languageIdCodec.register(t),n={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=n),this._mergeLanguage(n,e)}_mergeLanguage(e,t){const n=t.id;let s=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),s=t.mimetypes[0]),s||(s=`text/x-${n}`,e.mimetypes.push(s)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const a of t.extensions)T4({id:n,mime:s,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const a of t.filenames)T4({id:n,mime:s,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(const a of t.filenamePatterns)T4({id:n,mime:s,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{const l=new RegExp(a);iIe(l)||T4({id:n,mime:s,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${t.id}]: Invalid regular expression \`${a}\`: `,l)}}e.aliases.push(n);let r=null;if(typeof t.aliases<"u"&&Array.isArray(t.aliases)&&(t.aliases.length===0?r=[null]:r=t.aliases),r!==null)for(const a of r)!a||a.length===0||e.aliases.push(a);const o=r!==null&&r.length>0;if(!(o&&r[0]===null)){const a=(o?r[0]:null)||n;(o||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return e?I4.call(this._languages,e):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return I4.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&I4.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return!e&&!t?[]:_tn(e,t)}};L2.instanceCount=0;let jne=L2;const D2=class D2 extends se{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new ie),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new ie),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new ie({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,D2.instanceCount++,this._registry=this._register(new jne(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){D2.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){return this._registry.guessLanguageIdByFilepathOrFirstLine(e,t).at(0)??null}createById(e){return new $we(this.onDidChange,()=>this._createAndGetLanguageIdentifier(e))}createByFilepathOrFirstLine(e,t){return new $we(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(e){return(!e||!this.isRegisteredLanguageId(e))&&(e=Ud),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),Gs.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}};D2.instanceCount=0;let Fne=D2;class $we{constructor(e,t){this._value=Gn(this,e,()=>t()),this.onDidChange=He.fromObservable(this._value)}get languageId(){return this._value.get()}}const Bne=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,PK=/(&)?(&)([^\s&])/g;var NB;(function(i){i[i.Right=0]="Right",i[i.Left=1]="Left"})(NB||(NB={}));var Hne;(function(i){i[i.Above=0]="Above",i[i.Below=1]="Below"})(Hne||(Hne={}));class mE extends mc{constructor(e,t,n,s){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const r=document.createElement("div");r.classList.add("monaco-menu"),r.setAttribute("role","presentation"),super(r,{orientation:1,actionViewItemProvider:c=>this.doGetActionViewItem(c,n,o),context:n.context,actionRunner:n.actionRunner,ariaLabel:n.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...bn||xc?[10]:[]],keyDown:!0}}),this.menuStyles=s,this.menuElement=r,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,s),this._register(Ha.addTarget(r)),this._register(de(r,Fe.KEY_DOWN,c=>{new ki(c).equals(2)&&c.preventDefault()})),n.enableMnemonics&&this._register(de(r,Fe.KEY_DOWN,c=>{const u=c.key.toLocaleLowerCase();if(this.mnemonics.has(u)){Vn.stop(c,!0);const h=this.mnemonics.get(u);if(h.length===1&&(h[0]instanceof qwe&&h[0].container&&this.focusItemByElement(h[0].container),h[0].onClick(c)),h.length>1){const g=h.shift();g&&g.container&&(this.focusItemByElement(g.container),h.push(g)),this.mnemonics.set(u,h)}}})),xc&&this._register(de(r,Fe.KEY_DOWN,c=>{const u=new ki(c);u.equals(14)||u.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Vn.stop(c,!0)):(u.equals(13)||u.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Vn.stop(c,!0))})),this._register(de(this.domNode,Fe.MOUSE_OUT,c=>{const u=c.relatedTarget;xo(u,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),c.stopPropagation())})),this._register(de(this.actionsList,Fe.MOUSE_OVER,c=>{let u=c.target;if(!(!u||!xo(u,this.actionsList)||u===this.actionsList)){for(;u.parentElement!==this.actionsList&&u.parentElement!==null;)u=u.parentElement;if(u.classList.contains("action-item")){const h=this.focusedItem;this.setFocusedItem(u),h!==this.focusedItem&&this.updateFocus()}}})),this._register(Ha.addTarget(this.actionsList)),this._register(de(this.actionsList,Zi.Tap,c=>{let u=c.initialTarget;if(!(!u||!xo(u,this.actionsList)||u===this.actionsList)){for(;u.parentElement!==this.actionsList&&u.parentElement!==null;)u=u.parentElement;if(u.classList.contains("action-item")){const h=this.focusedItem;this.setFocusedItem(u),h!==this.focusedItem&&this.updateFocus()}}}));const o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new GP(r,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const a=this.scrollableElement.getDomNode();a.style.position="",this.styleScrollElement(a,s),this._register(de(r,Zi.Change,c=>{Vn.stop(c,!0);const u=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:u-c.translationY})})),this._register(de(a,Fe.MOUSE_UP,c=>{c.preventDefault()}));const l=xt(e);r.style.maxHeight=`${Math.max(10,l.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((c,u)=>{var h;return(h=n.submenuIds)!=null&&h.has(c.id)?(console.warn(`Found submenu cycle: ${c.id}`),!1):!(c instanceof Gr&&(u===t.length-1||u===0||t[u-1]instanceof Gr))}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(c=>!(c instanceof Kwe)).forEach((c,u,h)=>{c.updatePositionInSet(u+1,h.length)})}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(RF(e)?this.styleSheet=Yu(e):(mE.globalStyleSheet||(mE.globalStyleSheet=Yu()),this.styleSheet=mE.globalStyleSheet)),this.styleSheet.textContent=ktn(t,RF(e))}styleScrollElement(e,t){const n=t.foregroundColor??"",s=t.backgroundColor??"",r=t.borderColor?`1px solid ${t.borderColor}`:"",o="5px",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=r,e.style.borderRadius=o,e.style.color=n,e.style.backgroundColor=s,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(de(this.element,Fe.MOUSE_UP,r=>{if(Vn.stop(r,!0),bc){if(new va(xt(this.element),r).rightButton)return;this.onClick(r)}else setTimeout(()=>{this.onClick(r)},0)})),this._register(de(this.element,Fe.CONTEXT_MENU,r=>{Vn.stop(r,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=De(this.element,Oe("a.action-menu-item")),this._action.id===Gr.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=De(this.item,Oe("span.menu-item-check"+Tt.asCSSSelector(Ee.menuSelection))),this.check.setAttribute("role","none"),this.label=De(this.item,Oe("span.action-label")),this.options.label&&this.options.keybinding&&(De(this.item,Oe("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),(e=this.item)==null||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){Qo(this.label);let t=wae(this.action.label);if(t){const n=Stn(t);this.options.enableMnemonics||(t=n),this.label.setAttribute("aria-label",n.replace(/&&/g,"&"));const s=Bne.exec(t);if(s){t=Ph(t),PK.lastIndex=0;let r=PK.exec(t);for(;r&&r[1];)r=PK.exec(t);const o=a=>a.replace(/&&/g,"&");r?this.label.append(jP(o(t.substr(0,r.index))," "),Oe("u",{"aria-hidden":"true"},r[3]),tIe(o(t.substr(r.index+r[0].length))," ")):this.label.textContent=o(t).trim(),(e=this.item)==null||e.setAttribute("aria-keyshortcuts",(s[1]?s[1]:s[3]).toLocaleLowerCase())}else this.label.textContent=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),e!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,s=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",r=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=n??"",this.item.style.outline=s,this.item.style.outlineOffset=r),this.check&&(this.check.style.color=t??"")}}class qwe extends j3e{constructor(e,t,n,s,r){super(e,e,s,r),this.submenuActions=t,this.parentData=n,this.submenuOptions=s,this.mysubmenu=null,this.submenuDisposables=this._register(new _e),this.mouseOver=!1,this.expandDirection=s&&s.expandDirection!==void 0?s.expandDirection:{horizontal:NB.Right,vertical:Hne.Below},this.showScheduler=new pi(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new pi(()=>{this.element&&!xo(so(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=De(this.item,Oe("span.submenu-indicator"+Tt.asCSSSelector(Ee.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(de(this.element,Fe.KEY_UP,t=>{const n=new ki(t);(n.equals(17)||n.equals(3))&&(Vn.stop(t,!0),this.createSubmenu(!0))})),this._register(de(this.element,Fe.KEY_DOWN,t=>{const n=new ki(t);so()===this.item&&(n.equals(17)||n.equals(3))&&Vn.stop(t,!0)})),this._register(de(this.element,Fe.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(de(this.element,Fe.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(de(this.element,Fe.FOCUS_OUT,t=>{this.element&&!xo(so(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(e){Vn.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,n,s){const r={top:0,left:0};return r.left=wN(e.width,t.width,{position:s.horizontal===NB.Right?0:1,offset:n.left,size:n.width}),r.left>=n.left&&r.left{new ki(u).equals(15)&&(Vn.stop(u,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(de(this.submenuContainer,Fe.KEY_DOWN,u=>{new ki(u).equals(15)&&Vn.stop(u,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&((t=this.item)==null||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Kwe extends ML{constructor(e,t,n,s){super(e,t,n),this.menuStyles=s}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function Stn(i){const e=Bne,t=e.exec(i);if(!t)return i;const n=!t[1];return i.replace(e,n?"$2$3":"").trim()}function Gwe(i){const e=VIe()[i.id];return`.codicon-${i.id}:before { content: '\\${e.toString(16)}'; }`}function ktn(i,e){let t=` +.monaco-menu { + font-size: 13px; + border-radius: 5px; + min-width: 160px; +} + +${Gwe(Ee.menuSelection)} +${Gwe(Ee.menuSubmenu)} + +.monaco-menu .monaco-action-bar { + text-align: right; + overflow: hidden; + white-space: nowrap; +} + +.monaco-menu .monaco-action-bar .actions-container { + display: flex; + margin: 0 auto; + padding: 0; + width: 100%; + justify-content: flex-end; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: inline-block; +} + +.monaco-menu .monaco-action-bar.reverse .actions-container { + flex-direction: row-reverse; +} + +.monaco-menu .monaco-action-bar .action-item { + cursor: pointer; + display: inline-block; + transition: transform 50ms ease; + position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ +} + +.monaco-menu .monaco-action-bar .action-item.disabled { + cursor: default; +} + +.monaco-menu .monaco-action-bar .action-item .icon, +.monaco-menu .monaco-action-bar .action-item .codicon { + display: inline-block; +} + +.monaco-menu .monaco-action-bar .action-item .codicon { + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar .action-label { + font-size: 11px; + margin-right: 4px; +} + +.monaco-menu .monaco-action-bar .action-item.disabled .action-label, +.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { + color: var(--vscode-disabledForeground); +} + +/* Vertical actions */ + +.monaco-menu .monaco-action-bar.vertical { + text-align: left; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + display: block; + border-bottom: 1px solid var(--vscode-menu-separatorBackground); + padding-top: 1px; + padding: 30px; +} + +.monaco-menu .secondary-actions .monaco-action-bar .action-label { + margin-left: 6px; +} + +/* Action Items */ +.monaco-menu .monaco-action-bar .action-item.select-container { + overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ + flex: 1; + max-width: 170px; + min-width: 60px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; +} + +.monaco-menu .monaco-action-bar.vertical { + margin-left: 0; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + padding: 0; + transform: none; + display: flex; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.active { + transform: none; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + flex: 1 1 auto; + display: flex; + height: 2em; + align-items: center; + position: relative; + margin: 0 4px; + border-radius: 4px; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding { + opacity: unset; +} + +.monaco-menu .monaco-action-bar.vertical .action-label { + flex: 1 1 auto; + text-decoration: none; + padding: 0 1em; + background: none; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .keybinding, +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + display: inline-block; + flex: 2 1 auto; + padding: 0 1em; + text-align: right; + font-size: 12px; + line-height: 1; + opacity: 0.7; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { + font-size: 16px !important; + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { + margin-left: auto; + margin-right: -20px; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { + opacity: 0.4; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { + display: inline-block; + box-sizing: border-box; + margin: 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + position: static; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { + position: absolute; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + width: 100%; + height: 0px !important; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { + padding: 0.7em 1em 0.1em 1em; + font-weight: bold; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:hover { + color: inherit; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + position: absolute; + visibility: hidden; + width: 1em; + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { + visibility: visible; + display: flex; + align-items: center; + justify-content: center; +} + +/* Context Menu */ + +.context-view.monaco-menu-container { + outline: 0; + border: none; + animation: fadeIn 0.083s linear; + -webkit-app-region: no-drag; +} + +.context-view.monaco-menu-container :focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { + outline: 0; +} + +.hc-black .context-view.monaco-menu-container, +.hc-light .context-view.monaco-menu-container, +:host-context(.hc-black) .context-view.monaco-menu-container, +:host-context(.hc-light) .context-view.monaco-menu-container { + box-shadow: none; +} + +.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused, +.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused, +:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused, +:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused { + background: none; +} + +/* Vertical Action Bar Styles */ + +.monaco-menu .monaco-action-bar.vertical { + padding: 4px 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + height: 2em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), +.monaco-menu .monaco-action-bar.vertical .keybinding { + font-size: inherit; + padding: 0 2em; + max-height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + font-size: inherit; + width: 2em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + font-size: inherit; + margin: 5px 0 !important; + padding: 0; + border-radius: 0; +} + +.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator, +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { + margin-left: 0; + margin-right: 0; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + font-size: 60%; + padding: 0 1.8em; +} + +.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator, +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; + mask-size: 10px 10px; + -webkit-mask-size: 10px 10px; +} + +.monaco-menu .action-item { + cursor: default; +}`;if(e){t+=` + /* Arrows */ + .monaco-scrollable-element > .scrollbar > .scra { + cursor: pointer; + font-size: 11px !important; + } + + .monaco-scrollable-element > .visible { + opacity: 1; + + /* Background rule added for IE9 - to allow clicks on dom node */ + background:rgba(0,0,0,0); + + transition: opacity 100ms linear; + } + .monaco-scrollable-element > .invisible { + opacity: 0; + pointer-events: none; + } + .monaco-scrollable-element > .invisible.fade { + transition: opacity 800ms linear; + } + + /* Scrollable Content Inset Shadow */ + .monaco-scrollable-element > .shadow { + position: absolute; + display: none; + } + .monaco-scrollable-element > .shadow.top { + display: block; + top: 0; + left: 3px; + height: 3px; + width: 100%; + } + .monaco-scrollable-element > .shadow.left { + display: block; + top: 3px; + left: 0; + height: 100%; + width: 3px; + } + .monaco-scrollable-element > .shadow.top-left-corner { + display: block; + top: 0; + left: 0; + height: 3px; + width: 3px; + } + /* Fix for https://github.com/microsoft/vscode/issues/103170 */ + .monaco-menu .action-item .monaco-submenu { + z-index: 1; + } + `;const n=i.scrollbarShadow;n&&(t+=` + .monaco-scrollable-element > .shadow.top { + box-shadow: ${n} 0 6px 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.left { + box-shadow: ${n} 6px 0 6px -6px inset; + } + + .monaco-scrollable-element > .shadow.top.left { + box-shadow: ${n} 6px 6px 6px -6px inset; + } + `);const s=i.scrollbarSliderBackground;s&&(t+=` + .monaco-scrollable-element > .scrollbar > .slider { + background: ${s}; + } + `);const r=i.scrollbarSliderHoverBackground;r&&(t+=` + .monaco-scrollable-element > .scrollbar > .slider:hover { + background: ${r}; + } + `);const o=i.scrollbarSliderActiveBackground;o&&(t+=` + .monaco-scrollable-element > .scrollbar > .slider.active { + background: ${o}; + } + `)}return t}class Ntn{constructor(e,t,n,s){this.contextViewService=e,this.telemetryService=t,this.notificationService=n,this.keybindingService=s,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=so();let n;const s=er(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,layer:e.layer,render:r=>{var u;this.lastContainer=r;const o=e.getMenuClassName?e.getMenuClassName():"";o&&(r.className+=" "+o),this.options.blockMouse&&(this.block=r.appendChild(Oe(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(u=this.blockDisposable)==null||u.dispose(),this.blockDisposable=de(this.block,Fe.MOUSE_DOWN,h=>h.stopPropagation()));const a=new _e,l=e.actionRunner||a.add(new fC);l.onWillRun(h=>this.onActionRun(h,!e.skipTelemetry),this,a),l.onDidRun(this.onDidActionRun,this,a),n=new mE(r,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:h=>this.keybindingService.lookupKeybinding(h.id)},$Bt),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a);const c=xt(r);return a.add(de(c,Fe.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(de(c,Fe.MOUSE_DOWN,h=>{if(h.defaultPrevented)return;const g=new va(c,h);let f=g.target;if(!g.rightButton){for(;f;){if(f===r)return;f=f.parentElement}this.contextViewService.hideContextView(!0)}})),Mh(a,n)},focus:()=>{n==null||n.focus(!!e.autoSelectFirstItem)},onHide:r=>{var o,a,l;(o=e.onHide)==null||o.call(e,!!r),this.block&&(this.block.remove(),this.block=null),(a=this.blockDisposable)==null||a.dispose(),this.blockDisposable=null,this.lastContainer&&(so()===this.lastContainer||xo(so(),this.lastContainer))&&((l=this.focusToReturn)==null||l.focus()),this.lastContainer=null}},s,!!s)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Zd(e.error)&&this.notificationService.error(e.error)}}var Etn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Hk=function(i,e){return function(t,n){e(t,n,i)}};let Wne=class extends se{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Ntn(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,n,s,r,o){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=n,this.keybindingService=s,this.menuService=r,this.contextKeyService=o,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new ie),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new ie),this.onDidHideContextMenu=this._onDidHideContextMenu.event}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Vne.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{var n;(n=e.onHide)==null||n.call(e,t),this._onDidHideContextMenu.fire()}}),db.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};Wne=Etn([Hk(0,Ua),Hk(1,nr),Hk(2,fx),Hk(3,zn),Hk(4,Qu),Hk(5,Bt)],Wne);var Vne;(function(i){function e(n){return n&&n.menuId instanceof ct}function t(n,s,r){if(!e(n))return n;const{menuId:o,menuActionOptions:a,contextKeyService:l}=n;return{...n,getActions:()=>{let c=[];if(o){const u=s.getMenuActions(o,l??r,a);c=YBt(u)}return n.getActions?Gr.join(n.getActions(),c):c}}}i.transform=t})(Vne||(Vne={}));var EB;(function(i){i[i.API=0]="API",i[i.USER=1]="USER"})(EB||(EB={}));var xce=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},LB=function(i,e){return function(t,n){e(t,n,i)}};let zne=class{constructor(e){this._commandService=e}async open(e,t){if(!v7(e,Ot.command))return!1;if(!(t!=null&&t.allowCommands)||(typeof e=="string"&&(e=kt.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path)))return!0;let n=[];try{n=wX(decodeURIComponent(e.query))}catch{try{n=wX(e.query)}catch{}}return Array.isArray(n)||(n=[n]),await this._commandService.executeCommand(e.path,...n),!0}};zne=xce([LB(0,es)],zne);let Une=class{constructor(e){this._editorService=e}async open(e,t){typeof e=="string"&&(e=kt.parse(e));const{selection:n,uri:s}=V9t(e);return e=s,e.scheme===Ot.file&&(e=GDt(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:n,source:t!=null&&t.fromUserGesture?EB.USER:EB.API,...t==null?void 0:t.editorOptions}},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0}};Une=xce([LB(0,Hn)],Une);let $ne=class{constructor(e,t){this._openers=new ll,this._validators=new ll,this._resolvers=new ll,this._resolvedUriTargets=new Sr(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new ll,this._defaultExternalOpener={openExternal:async n=>(FY(n,Ot.http,Ot.https)?FIe(n):fi.location.href=n,!0)},this._openers.push({open:async(n,s)=>s!=null&&s.openExternal||FY(n,Ot.mailto,Ot.http,Ot.https,Ot.vsls)?(await this._doOpenExternal(n,s),!0):!1}),this._openers.push(new zne(t)),this._openers.push(new Une(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){if(!(t!=null&&t.skipValidation)){const n=typeof e=="string"?kt.parse(e):e,s=this._resolvedUriTargets.get(n)??e;for(const r of this._validators)if(!await r.shouldOpen(s,t))return!1}for(const n of this._openers)if(await n.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(const n of this._resolvers)try{const s=await n.resolveExternalUri(e,t);if(s)return this._resolvedUriTargets.has(s.resolved)||this._resolvedUriTargets.set(s.resolved,e),s}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const n=typeof e=="string"?kt.parse(e):e;let s;try{s=(await this.resolveExternalUri(n,t)).resolved}catch{s=n}let r;if(typeof e=="string"&&n.toString()===s.toString()?r=e:r=encodeURI(s.toString(!0)),t!=null&&t.allowContributedOpeners){const o=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(await a.openExternal(r,{sourceUri:n,preferredOpenerId:o},pn.None))return!0}return this._defaultExternalOpener.openExternal(r,{sourceUri:n},pn.None)}dispose(){this._validators.clear()}};$ne=xce([LB(0,Hn),LB(1,es)],$ne);var Ltn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Ywe=function(i,e){return function(t,n){e(t,n,i)}};let qne=class extends se{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new ie),this._suppressedRanges=new Sr,this._markerDecorations=new Sr,e.getModels().forEach(n=>this._onModelAdded(n)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const n=this._markerDecorations.get(e);return n&&n.getMarker(t)||null}_handleMarkerChange(e){e.forEach(t=>{const n=this._markerDecorations.get(t);n&&this._updateDecorations(n)})}_onModelAdded(e){const t=new Dtn(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var n;const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Ot.inMemory||e.uri.scheme===Ot.internal||e.uri.scheme===Ot.vscode)&&((n=this._markerService)==null||n.read({resource:e.uri}).map(s=>s.owner).forEach(s=>this._markerService.remove(s,[e.uri])))}_updateDecorations(e){let t=this._markerService.read({resource:e.model.uri,take:500});const n=this._suppressedRanges.get(e.model.uri);n&&(t=t.filter(s=>!En.some(n,r=>z.areIntersectingOrTouching(r,s)))),e.update(t)&&this._onDidChangeMarker.fire(e.model)}};qne=Ltn([Ywe(0,Is),Ywe(1,Kp)],qne);class Dtn extends se{constructor(e){super(),this.model=e,this._map=new VDt,this._register(dt(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(e){const{added:t,removed:n}=c4t(new Set(this._map.keys()),new Set(e));if(t.length===0&&n.length===0)return!1;const s=n.map(a=>this._map.get(a)),r=t.map(a=>({range:this._createDecorationRange(this.model,a),options:this._createDecorationOption(a)})),o=this.model.deltaDecorations(s,r);for(const a of n)this._map.delete(a);for(let a=0;a=s)return n;const r=e.getWordAtPosition(n.getStartPosition());r&&(n=new z(n.startLineNumber,r.startColumn,n.endLineNumber,r.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&n.startLineNumber===n.endLineNumber){const s=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);s=0:!1}}var Ttn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},A4=function(i,e){return function(t,n){e(t,n,i)}},Zk;function yy(i){return i.toString()}class Itn{constructor(e,t,n){this.model=e,this._modelEventListeners=new _e,this.model=e,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(s=>n(e,s)))}dispose(){this._modelEventListeners.dispose()}}const Atn=xc||bn?1:2;class Rtn{constructor(e,t,n,s,r,o,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=n,this.sharesUndoRedoStack=s,this.heapSize=r,this.sha1=o,this.versionId=a,this.alternativeVersionId=l}}var Gw;let Kne=(Gw=class extends se{constructor(e,t,n,s){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=n,this._instantiationService=s,this._onModelAdded=this._register(new ie),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new ie),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new ie),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(r=>this._updateModelOptions(r))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var g;let n=pa.tabSize;e.editor&&typeof e.editor.tabSize<"u"&&(n=qm(e.editor.tabSize,pa.tabSize,1,100));let s="tabSize";e.editor&&typeof e.editor.indentSize<"u"&&e.editor.indentSize!=="tabSize"&&(s=qm(e.editor.indentSize,"tabSize",1,100));let r=pa.insertSpaces;e.editor&&typeof e.editor.insertSpaces<"u"&&(r=e.editor.insertSpaces==="false"?!1:!!e.editor.insertSpaces);let o=Atn;const a=e.eol;a===`\r +`?o=2:a===` +`&&(o=1);let l=pa.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace<"u"&&(l=e.editor.trimAutoWhitespace==="false"?!1:!!e.editor.trimAutoWhitespace);let c=pa.detectIndentation;e.editor&&typeof e.editor.detectIndentation<"u"&&(c=e.editor.detectIndentation==="false"?!1:!!e.editor.detectIndentation);let u=pa.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations<"u"&&(u=e.editor.largeFileOptimizations==="false"?!1:!!e.editor.largeFileOptimizations);let h=pa.bracketPairColorizationOptions;if((g=e.editor)!=null&&g.bracketPairColorization&&typeof e.editor.bracketPairColorization=="object"){const f=e.editor.bracketPairColorization;h={enabled:!!f.enabled,independentColorPoolPerBracketType:!!f.independentColorPoolPerBracketType}}return{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:r,detectIndentation:c,defaultEOL:o,trimAutoWhitespace:l,largeFileOptimizations:u,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&typeof n=="string"&&n!=="auto"?n:Vc===3||Vc===2?` +`:`\r +`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,n){const s=typeof e=="string"?e:e.languageId;let r=this._modelCreationOptionsByLanguageAndResource[s+t];if(!r){const o=this._configurationService.getValue("editor",{overrideIdentifier:s,resource:t}),a=this._getEOL(t,s);r=Zk._readModelOptions({editor:o,eol:a},n),this._modelCreationOptionsByLanguageAndResource[s+t]=r}return r}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const n=Object.keys(this._models);for(let s=0,r=n.length;se){const t=[];for(this._disposedModels.forEach(n=>{n.sharesUndoRedoStack||t.push(n)}),t.sort((n,s)=>n.time-s.time);t.length>0&&this._disposedModelsHeapSize>e;){const n=t.shift();this._removeDisposedModel(n.uri),n.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}_createModelData(e,t,n,s){const r=this.getCreationOptions(t,n,s),o=this._instantiationService.createInstance(yC,e,t,r,n);if(n&&this._disposedModels.has(yy(n))){const c=this._removeDisposedModel(n),u=this._undoRedoService.getElements(n),h=this._getSHA1Computer(),g=h.canComputeSHA1(o)?h.computeSHA1(o)===c.sha1:!1;if(g||c.sharesUndoRedoStack){for(const f of u.past)Gm(f)&&f.matchesResource(n)&&f.setModel(o);for(const f of u.future)Gm(f)&&f.matchesResource(n)&&f.setModel(o);this._undoRedoService.setElementsValidFlag(n,!0,f=>Gm(f)&&f.matchesResource(n)),g&&(o._overwriteVersionId(c.versionId),o._overwriteAlternativeVersionId(c.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=yy(o.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new Itn(o,c=>this._onWillDispose(c),(c,u)=>this._onDidChangeLanguage(c,u));return this._models[a]=l,l}createModel(e,t,n,s=!1){let r;return t?r=this._createModelData(e,t,n,s):r=this._createModelData(e,Ud,n,s),this._onModelAdded.fire(r.model),r.model}getModels(){const e=[],t=Object.keys(this._models);for(let n=0,s=t.length;n0||c.future.length>0){for(const u of c.past)Gm(u)&&u.matchesResource(e.uri)&&(r=!0,o+=u.heapSize(e.uri),u.setModel(e.uri));for(const u of c.future)Gm(u)&&u.matchesResource(e.uri)&&(r=!0,o+=u.heapSize(e.uri),u.setModel(e.uri))}}const a=Zk.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(r)if(!s&&(o>a||!l.canComputeSHA1(e))){const c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}else this._ensureDisposedModelsHeapSize(a-o),this._undoRedoService.setElementsValidFlag(e.uri,!1,c=>Gm(c)&&c.matchesResource(e.uri)),this._insertDisposedModel(new Rtn(e.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),s,o,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!s){const c=n.model.getInitialUndoRedoSnapshot();c!==null&&this._undoRedoService.restoreSnapshot(c)}delete this._models[t],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const n=t.oldLanguage,s=e.getLanguageId(),r=this.getCreationOptions(n,e.uri,e.isForSimpleWidget),o=this.getCreationOptions(s,e.uri,e.isForSimpleWidget);Zk._setModelOptionsForModel(e,o,r),this._onModelModeChanged.fire({model:e,oldLanguageId:n})}_getSHA1Computer(){return new Gne}},Zk=Gw,Gw.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,Gw);Kne=Zk=Ttn([A4(0,Zt),A4(1,V5e),A4(2,uae),A4(3,ft)],Kne);const pH=class pH{canComputeSHA1(e){return e.getValueLength()<=pH.MAX_MODEL_SIZE}computeSHA1(e){const t=new WY,n=e.createSnapshot();let s;for(;s=n.read();)t.update(s);return t.digest()}};pH.MAX_MODEL_SIZE=10*1024*1024;let Gne=pH;var Mtn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Qwe=function(i,e){return function(t,n){e(t,n,i)}};let Yne=class extends se{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Hs.as(vS.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0,this._register(dt(()=>{var n;for(const s of this.mapProviderToDescriptor.values())JC(s)&&s.dispose();(n=this.visibleQuickAccess)==null||n.picker.dispose()}))}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,n){var m,x;const[s,r]=this.getOrInstantiateProvider(e,n==null?void 0:n.enabledProviderPrefixes),o=this.visibleQuickAccess,a=o==null?void 0:o.descriptor;if(o&&r&&a===r){e!==r.prefix&&!(n!=null&&n.preserveValue)&&(o.picker.value=e),this.adjustValueSelection(o.picker,r,n);return}if(r&&!(n!=null&&n.preserveValue)){let v;if(o&&a&&a!==r){const _=o.value.substr(a.prefix.length);_&&(v=`${r.prefix}${_}`)}if(!v){const _=s==null?void 0:s.defaultFilterValue;_===xte.LAST?v=this.lastAcceptedPickerValues.get(r):typeof _=="string"&&(v=`${r.prefix}${_}`)}typeof v=="string"&&(e=v)}const l=(m=o==null?void 0:o.picker)==null?void 0:m.valueSelection,c=(x=o==null?void 0:o.picker)==null?void 0:x.value,u=new _e,h=u.add(this.quickInputService.createQuickPick({useSeparators:!0}));h.value=e,this.adjustValueSelection(h,r,n),h.placeholder=(n==null?void 0:n.placeholder)??(r==null?void 0:r.placeholder),h.quickNavigate=n==null?void 0:n.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!o,(typeof(n==null?void 0:n.itemActivation)=="number"||n!=null&&n.quickNavigateConfiguration)&&(h.itemActivation=(n==null?void 0:n.itemActivation)??xg.SECOND),h.contextKey=r==null?void 0:r.contextKey,h.filterValue=v=>v.substring(r?r.prefix.length:0);let g;t&&(g=new eS,u.add(He.once(h.onWillAccept)(v=>{v.veto(),h.hide()}))),u.add(this.registerPickerListeners(h,s,r,e,n));const f=u.add(new vs);if(s&&u.add(s.provide(h,f.token,n==null?void 0:n.providerOptions)),He.once(h.onDidHide)(()=>{h.selectedItems.length===0&&f.cancel(),u.dispose(),g==null||g.complete(h.selectedItems.slice(0))}),h.show(),l&&c===e&&(h.valueSelection=l),t)return g==null?void 0:g.p}adjustValueSelection(e,t,n){let s;n!=null&&n.preserveValue?s=[e.value.length,e.value.length]:s=[(t==null?void 0:t.prefix.length)??0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,n,s,r){const o=new _e,a=this.visibleQuickAccess={picker:e,descriptor:n,value:s};return o.add(dt(()=>{a===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),o.add(e.onDidChangeValue(l=>{const[c]=this.getOrInstantiateProvider(l,r==null?void 0:r.enabledProviderPrefixes);c!==t?this.show(l,{enabledProviderPrefixes:r==null?void 0:r.enabledProviderPrefixes,preserveValue:!0,providerOptions:r==null?void 0:r.providerOptions}):a.value=l})),n&&o.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(n,e.value)})),o}getOrInstantiateProvider(e,t){const n=this.registry.getQuickAccessProvider(e);if(!n||t&&!(t!=null&&t.includes(n.prefix)))return[void 0,void 0];let s=this.mapProviderToDescriptor.get(n);return s||(s=this.instantiationService.createInstance(n.ctor),this.mapProviderToDescriptor.set(n,s)),[s,n]}};Yne=Mtn([Qwe(0,Wa),Qwe(1,ft)],Yne);var Ptn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};class F3e{constructor(e){this.nodes=e}toString(){return this.nodes.map(e=>typeof e=="string"?e:e.label).join("")}}Ptn([gr],F3e.prototype,"toString",null);const Otn=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function jtn(i){const e=[];let t=0,n;for(;n=Otn.exec(i);){n.index-t>0&&e.push(i.substring(t,n.index));const[,s,r,,o]=n;o?e.push({label:s,href:r,title:o}):e.push({label:s,href:r}),t=n.index+n[0].length}return t{iDt(f)&&Vn.stop(f,!0),t.callback(r.href)},c=t.disposables.add(new ri(a,Fe.CLICK)).event,u=t.disposables.add(new ri(a,Fe.KEY_DOWN)).event,h=He.chain(u,f=>f.filter(m=>{const x=new ki(m);return x.equals(10)||x.equals(3)}));t.disposables.add(Ha.addTarget(a));const g=t.disposables.add(new ri(a,Zi.Tap)).event;He.any(c,g,h)(l,null,t.disposables),e.appendChild(a)}}var Wtn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Xwe=function(i,e){return function(t,n){e(t,n,i)}};const B3e="inQuickInput",Vtn=new Ze(B3e,!1,S(1748,"Whether keyboard focus is inside the quick input control")),ZW=Ne.has(B3e),ztn="quickInputAlignment",Utn=new Ze(ztn,"top",S(1749,"The alignment of the quick input")),BM="quickInputType",$tn=new Ze(BM,void 0,S(1750,"The type of the currently visible quick input")),H3e="cursorAtEndOfQuickInputBox",qtn=new Ze(H3e,!1,S(1751,"Whether the cursor in the quick input is at the end of the input box")),Ktn=Ne.has(H3e),Qne={iconClass:Tt.asClassName(Ee.quickInputBack),tooltip:S(1752,"Back")},mH=class mH extends se{constructor(e){super(),this.ui=e,this._visible=Ft("visible",!1),this._widgetUpdated=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=mH.noPromptMessage,this._severity=Os.Ignore,this.onDidTriggerButtonEmitter=this._register(new ie),this.onDidHideEmitter=this._register(new ie),this.onWillHideEmitter=this._register(new ie),this.onDisposeEmitter=this._register(new ie),this.visibleDisposables=this._register(new _e),this.onDidHide=this.onDidHideEmitter.event}get visible(){return this._visible.get()}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!zu;this._ignoreFocusOut=e&&!zu,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter(t=>t===Qne),this._rightButtons=e.filter(t=>t!==Qne&&t.location!==q6.Inline),this._inlineButtons=e.filter(t=>t.location===q6.Inline),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this._visible.set(!0,void 0),this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=JR.Other){this._visible.set(!1,void 0),this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=JR.Other){this.onWillHideEmitter.fire({reason:e})}update(){var s;if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?vo(this.ui.widget,this._widget):vo(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new Yc,this.busyDelay.setIfNotSet(()=>{this.visible&&(this.ui.progressBar.infinite(),this.ui.progressBar.getContainer().removeAttribute("aria-hidden"))},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.ui.progressBar.getContainer().setAttribute("aria-hidden","true"),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const r=this._leftButtons.map((l,c)=>bE(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.leftActionBar.push(r,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const o=this._rightButtons.map((l,c)=>bE(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.rightActionBar.push(o,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();const a=this._inlineButtons.map((l,c)=>bE(l,`id-${c}`,async()=>this.onDidTriggerButtonEmitter.fire(l)));this.ui.inlineActionBar.push(a,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const r=((s=this.toggles)==null?void 0:s.filter(a=>a instanceof mx))??[];this.ui.inputBox.toggles=r;const o=r.length*22;this.ui.countContainer.style.right=o>0?`${4+o}px`:"4px",this.ui.visibleCountContainer.style.right=o>0?`${4+o}px`:"4px"}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const n=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==n&&(this._lastValidationMessage=n,vo(this.ui.message),n&&Htn(n,this.ui.message,{callback:r=>{this.ui.linkOpenerDelegate(r)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?S(1754,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Os.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}};mH.noPromptMessage=S(1753,"Press 'Enter' to confirm your input or 'Escape' to cancel");let HM=mH;const bH=class bH extends HM{constructor(e){super(e),this._value="",this.onDidChangeValueEmitter=this._register(new ie),this.onWillAcceptEmitter=this._register(new ie),this.onDidAcceptEmitter=this._register(new ie),this.onDidCustomEmitter=this._register(new ie),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=xg.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new ie),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new ie),this.onDidTriggerItemButtonEmitter=this._register(new ie),this.onDidTriggerSeparatorButtonEmitter=this._register(new ie),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new OP,this.type="quickPick",this.filterValue=t=>t,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event,this.noValidationMessage=void 0}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get prompt(){return this.noValidationMessage}set prompt(e){this.noValidationMessage=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?A9t:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get okLabel(){return this._okLabel??S(1756,"OK")}set okLabel(e){this._okLabel=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(ss.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{this.doSetValue(e,!0)})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,(e,t)=>t)(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&bs(e,this._activeItems,(t,n)=>t===n)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany&&!e.some(n=>n.pickable===!1)){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&bs(e,this._selectedItems,(n,s)=>n===s)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(aoe(t)&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||!this.visible||this.selectedItemsToConfirm!==this._selectedItems&&bs(e,this._selectedItems,(t,n)=>t===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(e=>this.onDidTriggerSeparatorButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return de(this.ui.container,Fe.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ki(e),n=t.keyCode;this._quickNavigate.keybindings.some(o=>{const a=o.getChords();return a.length>1?!1:a[0].shiftKey&&n===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a[0].altKey&&n===6||a[0].ctrlKey&&n===5||a[0].metaKey&&n===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,n={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage||!!this.prompt,customButton:this.customButton};this.ui.setVisibilities(n),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let s=this.ariaLabel;!s&&n.inputBox&&(s=this.placeholder,this.title&&(s=s?`${s} - ${this.title}`:this.title),s||(s=bH.DEFAULT_ARIA_LABEL)),this.ui.list.ariaLabel!==s&&(this.ui.list.ariaLabel=s??null),this.ui.inputBox.ariaLabel!==s&&(this.ui.inputBox.ariaLabel=s??"input"),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents(()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case xg.NONE:this._itemActivation=xg.FIRST;break;case xg.SECOND:this.ui.list.focus(ss.Second),this._itemActivation=xg.FIRST;break;case xg.LAST:this.ui.list.focus(ss.Last),this._itemActivation=xg.FIRST;break;default:this.trySelectFirst();break}})),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.ok.label=this.okLabel||"",this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",n.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(ss.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||(this.activeItems[0]&&!this._canSelectMany&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(e??!1))}};bH.DEFAULT_ARIA_LABEL=S(1755,"Type to narrow down results.");let d2=bH;class Gtn extends HM{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new ie),this.onDidAcceptEmitter=this._register(new ie),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}get prompt(){return this._prompt}set prompt(e){this._prompt=e,this.noValidationMessage=e?S(1757,"{0} (Press 'Enter' to confirm or 'Escape' to cancel)",e):HM.noPromptMessage,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}accept(){this.onDidAcceptEmitter.fire()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password);let t=this.ariaLabel;!t&&e.inputBox&&(t=this.placeholder?this.title?`${this.placeholder} - ${this.title}`:this.placeholder:this.title?this.title:"input"),this.ui.inputBox.ariaLabel!==t&&(this.ui.inputBox.ariaLabel=t||"input")}}let Xne=class extends PL{constructor(e,t){super("mouse",void 0,n=>this.getOverrideOptions(n),e,t)}getOverrideOptions(e){const t=(er(e.content)?e.content.textContent??"":typeof e.content=="string"?e.content:e.content.value).includes(` +`);return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:t,skipFadeInAnimation:!0}}}};Xne=Wtn([Xwe(0,Zt),Xwe(1,Zl)],Xne);const Zwe="done",Jwe="active",jK="infinite",FK="infinite-long-running",eCe="discrete",xH=class xH extends se{constructor(e,t){super(),this.progressSignal=this._register(new Zn),this.workedVal=0,this.showDelayedScheduler=this._register(new pi(()=>Bc(this.element),0)),this.longRunningScheduler=this._register(new pi(()=>this.infiniteLongRunning(),xH.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(t==null?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Jwe,jK,FK,eCe),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Zwe),this.element.classList.contains(jK)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(eCe,Zwe,FK),this.element.classList.add(Jwe,jK),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(FK)}getContainer(){return this.element}};xH.LONG_RUNNING_INFINITE_THRESHOLD=1e4;let Zne=xH;const Ytn=Oe;class Qtn extends se{constructor(e,t,n){super(),this.parent=e,this.onDidChange=r=>this.findInput.onDidChange(r),this.container=De(this.parent,Ytn(".quick-input-box")),this.findInput=this._register(new WPe(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:n}));const s=this.findInput.inputBox.inputElement;s.role="textbox",s.ariaHasPopup="menu",s.ariaAutoComplete="list"}get onKeyDown(){return this.findInput.onKeyDown}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}get ariaLabel(){return this.findInput.inputBox.inputElement.getAttribute("aria-label")||""}set ariaLabel(e){this.findInput.inputBox.inputElement.setAttribute("aria-label",e)}hasFocus(){return this.findInput.inputBox.hasFocus()}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.findInput.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Os.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===Os.Info?1:e===Os.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===Os.Info?1:e===Os.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}const tCe=new ba(()=>{const i=sS.Collator(void 0,{numeric:!0,sensitivity:"base"}).value;return{collator:i,collatorIsNumeric:i.resolvedOptions().numeric}});new ba(()=>({collator:sS.Collator(void 0,{numeric:!0}).value}));new ba(()=>({collator:sS.Collator(void 0,{numeric:!0,sensitivity:"accent"}).value}));function Xtn(i,e,t=!1){const n=i||"",s=e||"",r=tCe.value.collator.compare(n,s);return tCe.value.collatorIsNumeric&&r===0&&n!==s?ns.length)return 1}return 0}var JW=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Jne=function(i,e){return function(t,n){e(t,n,i)}},eie;const Ef=Oe;class W3e{constructor(e,t,n){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new ba(()=>{const s=n.label??"",r=_1(s).text.trim(),o=n.ariaLabel||[s,this.saneDescription,this.saneDetail].map(a=>MRe(a)).filter(a=>!!a).join(", ");return{saneLabel:s,saneSortLabel:r,saneAriaLabel:o}}),this._saneDescription=n.description,this._saneTooltip=n.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class ca extends W3e{constructor(e,t,n,s,r,o,a){var l,c,u;super(e,n,o),this.childIndex=t,this.fireButtonTriggered=s,this._onChecked=r,this.item=o,this._separator=a,this._checked=!1,this.onChecked=n?He.map(He.filter(this._onChecked.event,h=>h.element===this),h=>h.checked):He.None,this._saneDetail=o.detail,this._labelHighlights=(l=o.highlights)==null?void 0:l.label,this._descriptionHighlights=(c=o.highlights)==null?void 0:c.description,this._detailHighlights=(u=o.highlights)==null?void 0:u.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var Ff;(function(i){i[i.NONE=0]="NONE",i[i.MOUSE_HOVER=1]="MOUSE_HOVER",i[i.ACTIVE_ITEM=2]="ACTIVE_ITEM"})(Ff||(Ff={}));class My extends W3e{constructor(e,t,n){super(e,!1,n),this.fireSeparatorButtonTriggered=t,this.separator=n,this.children=new Array,this.focusInsideSeparator=Ff.NONE}}class enn{getHeight(e){return e instanceof My?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof ca?DB.ID:TB.ID}}class tnn{getWidgetAriaLabel(){return S(1770,"Quick Input")}getAriaLabel(e){var t;return(t=e.separator)!=null&&t.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(!(!e.hasCheckbox||!(e instanceof ca)))return{get value(){return e.checked},onDidChange:t=>e.onChecked(()=>t())}}}class V3e{constructor(e){this.hoverDelegate=e}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=new _e,t.toDisposeTemplate=new _e,t.entry=De(e,Ef(".quick-input-list-entry"));const n=De(t.entry,Ef("label.quick-input-list-label"));t.outerLabel=n,t.checkbox=t.toDisposeTemplate.add(new Zn),t.toDisposeTemplate.add(yr(n,Fe.CLICK,c=>{if(t.checkbox.value&&!c.defaultPrevented&&t.checkbox.value.enabled){const u=!t.checkbox.value.checked;t.checkbox.value.checked=u,t.element.checked=u}}));const s=De(n,Ef(".quick-input-list-rows")),r=De(s,Ef(".quick-input-list-row")),o=De(s,Ef(".quick-input-list-row"));t.label=new uM(r,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=k7(t.label.element,Ef(".quick-input-list-icon"));const a=De(r,Ef(".quick-input-list-entry-keybinding"));t.keybinding=new zD(a,Vc),t.toDisposeTemplate.add(t.keybinding);const l=De(o,Ef(".quick-input-list-label-meta"));return t.detail=new uM(l,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=De(t.entry,Ef(".quick-input-list-separator")),t.actionBar=new mc(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.actionBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,n){n.toDisposeElement.clear(),n.actionBar.clear()}}var Yw;let DB=(Yw=class extends V3e{constructor(e,t){super(e),this.themeService=t,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return eie.ID}ensureCheckbox(e,t){var s;if(!e.hasCheckbox){(s=t.checkbox.value)==null||s.domNode.remove(),t.checkbox.clear();return}let n=t.checkbox.value;n?n.setTitle(e.saneLabel):(n=new RPe(e.saneLabel,e.checked,{...Hae,size:15}),t.checkbox.value=n,t.outerLabel.prepend(n.domNode)),e.checkboxDisabled?n.disable():n.enable(),n.checked=e.checked,t.toDisposeElement.add(e.onChecked(r=>n.checked=r)),t.toDisposeElement.add(n.onChange(()=>e.checked=n.checked))}renderElement(e,t,n){var g;const s=e.element;n.element=s,s.element=n.entry??void 0;const r=s.item;s.element.classList.toggle("not-pickable",s.item.pickable===!1),this.ensureCheckbox(s,n);const{labelHighlights:o,descriptionHighlights:a,detailHighlights:l}=s;if(r.iconPath){const f=Xb(this.themeService.getColorTheme().type)?r.iconPath.dark:r.iconPath.light??r.iconPath.dark,m=kt.revive(f);n.icon.className="quick-input-list-icon",n.icon.style.backgroundImage=Dp(m)}else n.icon.style.backgroundImage="",n.icon.className=r.iconClass?`quick-input-list-icon ${r.iconClass}`:"";let c;!s.saneTooltip&&s.saneDescription&&(c={markdown:{value:Ph(s.saneDescription),supportThemeIcons:!0},markdownNotSupportedFallback:s.saneDescription});const u={matches:o||[],descriptionTitle:c,descriptionMatches:a||[],labelEscapeNewLines:!0};if(u.extraClasses=r.iconClasses,u.italic=r.italic,u.strikethrough=r.strikethrough,n.entry.classList.remove("quick-input-list-separator-as-item"),n.label.setLabel(s.saneLabel,s.saneDescription,u),n.keybinding.set(r.keybinding),s.saneDetail){let f;s.saneTooltip||(f={markdown:{value:Ph(s.saneDetail),supportThemeIcons:!0},markdownNotSupportedFallback:s.saneDetail}),n.detail.element.style.display="",n.detail.setLabel(s.saneDetail,void 0,{matches:l,title:f,labelEscapeNewLines:!0})}else n.detail.element.style.display="none";(g=s.separator)!=null&&g.label?(n.separator.textContent=s.separator.label,n.separator.style.display="",this.addItemWithSeparator(s)):n.separator.style.display="none",n.entry.classList.toggle("quick-input-list-separator-border",!!s.separator&&s.childIndex!==0);const h=r.buttons;h&&h.length?(n.actionBar.push(h.map((f,m)=>bE(f,`id-${m}`,()=>s.fireButtonTriggered({button:f,item:s.item}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,n)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}},eie=Yw,Yw.ID="quickpickitem",Yw);DB=eie=JW([Jne(1,Ws)],DB);const vH=class vH extends V3e{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}get templateId(){return vH.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderElement(e,t,n){const s=e.element;n.element=s,s.element=n.entry??void 0,s.element.classList.toggle("focus-inside",!!s.focusInsideSeparator);const r=s.separator,{labelHighlights:o,descriptionHighlights:a}=s;n.icon.style.backgroundImage="",n.icon.className="";let l;!s.saneTooltip&&s.saneDescription&&(l={markdown:{value:Ph(s.saneDescription),supportThemeIcons:!0},markdownNotSupportedFallback:s.saneDescription});const c={matches:o||[],descriptionTitle:l,descriptionMatches:a||[],labelEscapeNewLines:!0};n.entry.classList.add("quick-input-list-separator-as-item"),n.label.setLabel(s.saneLabel,s.saneDescription,c),n.separator.style.display="none",n.entry.classList.add("quick-input-list-separator-border");const u=r.buttons;u&&u.length?(n.actionBar.push(u.map((h,g)=>bE(h,`id-${g}`,()=>s.fireSeparatorButtonTriggered({button:h,separator:s.separator}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions"),this.addSeparator(s)}disposeElement(e,t,n){var s;this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||(s=e.element.element)==null||s.classList.remove("focus-inside"),super.disposeElement(e,t,n)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}};vH.ID="quickpickseparator";let TB=vH,WM=class extends se{constructor(e,t,n,s,r,o){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=n,this.accessibilityService=o,this._onKeyDown=new ie,this._onLeave=new ie,this.onLeave=this._onLeave.event,this._visibleCountObservable=Ft("VisibleCount",0),this.onChangedVisibleCount=He.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=Ft("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=He.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=Ft("CheckedCount",0),this.onChangedCheckedCount=He.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=MA({equalsFn:bs},new Array),this.onChangedCheckedElements=He.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new ie,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new ie,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new ie,this._elementCheckedEventBufferer=new OP,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new _e),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=De(this.parent,Ef(".quick-input-list")),this._separatorRenderer=new TB(t),this._itemRenderer=r.createInstance(DB,t),this._tree=this._register(r.createInstance(m8,"QuickInput",this._container,new enn,[this._itemRenderer,this._separatorRenderer],{filter:{filter(a){return a.hidden?0:a instanceof My?2:1}},sorter:{compare:(a,l)=>{if(!this.sortByLabel||!this._lastQueryString)return 0;const c=this._lastQueryString.toLowerCase();return inn(a,l,c)}},accessibilityProvider:new tnn,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:OC.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=s,this._registerListeners()}get onDidChangeFocus(){return He.map(this._tree.onDidChangeFocus,e=>e.elements.filter(t=>t instanceof ca).map(t=>t.item),this._store)}get onDidChangeSelection(){return He.map(this._tree.onDidChangeSelection,e=>({items:e.elements.filter(t=>t instanceof ca).map(t=>t.item),event:e.browserEvent}),this._store)}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown(e=>{const t=new ki(e);switch(t.keyCode){case 10:this.toggleCheckbox();break}this._onKeyDown.fire(t)}))}_registerOnContainerClick(){this._register(de(this._container,Fe.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()}))}_registerOnMouseMiddleClick(){this._register(de(this._container,Fe.AUXCLICK,e=>{e.button===1&&this._onLeave.fire()}))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel(()=>{const e=this._itemElements.filter(t=>!t.hidden).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()}))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,(e,t)=>t)(e=>this._updateCheckedObservables()))}_registerOnContextMenu(){this._register(this._tree.onContextMenu(e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))}))}_registerHoverListeners(){const e=this._register(new XTe(typeof this.hoverDelegate.delay=="function"?this.hoverDelegate.delay():this.hoverDelegate.delay));this._register(this._tree.onMouseOver(async t=>{var n;if(mxe(t.browserEvent.target)){e.cancel();return}if(!(!mxe(t.browserEvent.relatedTarget)&&xo(t.browserEvent.relatedTarget,(n=t.element)==null?void 0:n.element)))try{await e.trigger(async()=>{t.element instanceof ca&&this.showHover(t.element)})}catch(s){if(!Zd(s))throw s}})),this._register(this._tree.onMouseOut(t=>{var n;xo(t.browserEvent.relatedTarget,(n=t.element)==null?void 0:n.element)||e.cancel()}))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus(e=>{const t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const n of this._separatorRenderer.visibleSeparators){const s=n===t;!!(n.focusInsideSeparator&Ff.ACTIVE_ITEM)!==s&&(s?n.focusInsideSeparator|=Ff.ACTIVE_ITEM:n.focusInsideSeparator&=~Ff.ACTIVE_ITEM,this._tree.rerender(n))}})),this._register(this._tree.onMouseOver(e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const n of this._separatorRenderer.visibleSeparators){if(n!==t)continue;!!(n.focusInsideSeparator&Ff.MOUSE_HOVER)||(n.focusInsideSeparator|=Ff.MOUSE_HOVER,this._tree.rerender(n))}})),this._register(this._tree.onMouseOut(e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const n of this._separatorRenderer.visibleSeparators){if(n!==t)continue;!!(n.focusInsideSeparator&Ff.MOUSE_HOVER)&&(n.focusInsideSeparator&=~Ff.MOUSE_HOVER,this._tree.rerender(n))}}))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection(e=>{const t=e.elements.filter(n=>n instanceof ca);t.length!==e.elements.length&&(e.elements.length===1&&e.elements[0]instanceof My&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))}))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents(()=>{this._itemElements.forEach(t=>{!t.hidden&&!t.checkboxDisabled&&t.item.pickable!==!1&&(t.checked=e)})})}setElements(e){this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes");let t;this._itemElements=new Array,this._elementTree=e.reduce((n,s,r)=>{let o;if(s.type==="separator"){if(!s.buttons)return n;t=new My(r,a=>this._onSeparatorButtonTriggered.fire(a),s),o=t}else{const a=r>0?e[r-1]:void 0;let l;a&&a.type==="separator"&&!a.buttons&&(l=a);const c=new ca(r,t!=null&&t.children?t.children.length:r,this._hasCheckboxes&&s.pickable!==!1,u=>this._onButtonTriggered.fire(u),this._elementChecked,s,l);if(this._itemElements.push(c),t)return t.children.push(c),n;o=c}return n.push(o),n},new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout(()=>{const n=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),s=n==null?void 0:n.parentNode;if(n&&s){const r=n.nextSibling;n.remove(),s.insertBefore(n,r)}},0)}setFocusedElements(e){const t=e.map(n=>this._itemElements.find(s=>s.item===n)).filter(n=>!!n).filter(n=>!n.hidden);if(this._tree.setFocus(t),e.length>0){const n=this._tree.getFocus()[0];n&&this._tree.reveal(n)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const t=e.map(n=>this._itemElements.find(s=>s.item===n)).filter(n=>!!n);this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents(()=>{const t=new Set;for(const n of e)t.add(n);for(const n of this._itemElements)n.checked=t.has(n.item)})}focus(e){var t;if(this._itemElements.length)switch(e===ss.Second&&this._itemElements.length<2&&(e=ss.First),e){case ss.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,n=>n.element instanceof ca);break;case ss.Second:{this._tree.scrollTop=0;let n=!1;this._tree.focusFirst(void 0,s=>s.element instanceof ca?n?!0:(n=!n,!1):!1);break}case ss.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,n=>n.element instanceof ca);break;case ss.Next:{const n=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,r=>r.element instanceof ca?(this._tree.reveal(r.element),!0):!1);const s=this._tree.getFocus();n.length&&n[0]===s[0]&&this._onLeave.fire();break}case ss.Previous:{const n=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,r=>{if(!(r.element instanceof ca))return!1;const o=this._tree.getParentElement(r.element);return o===null||o.children[0]!==r.element?this._tree.reveal(r.element):this._tree.reveal(o),!0});const s=this._tree.getFocus();n.length&&n[0]===s[0]&&this._onLeave.fire();break}case ss.NextPage:this._tree.focusNextPage(void 0,n=>n.element instanceof ca?(this._tree.reveal(n.element),!0):!1);break;case ss.PreviousPage:this._tree.focusPreviousPage(void 0,n=>{if(!(n.element instanceof ca))return!1;const s=this._tree.getParentElement(n.element);return s===null||s.children[0]!==n.element?this._tree.reveal(n.element):this._tree.reveal(s),!0});break;case ss.NextSeparator:{let n=!1;const s=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,o=>{if(n)return!0;if(o.element instanceof My)n=!0,this._separatorRenderer.isSeparatorVisible(o.element)?this._tree.reveal(o.element.children[0]):this._tree.reveal(o.element,0);else if(o.element instanceof ca){if(o.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(o.element)?this._tree.reveal(o.element):this._tree.reveal(o.element,0),!0;if(o.element===this._elementTree[0])return this._tree.reveal(o.element,0),!0}return!1});const r=this._tree.getFocus()[0];s===r&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,o=>o.element instanceof ca));break}case ss.PreviousSeparator:{let n,s=!!((t=this._tree.getFocus()[0])!=null&&t.separator);this._tree.focusPrevious(void 0,!0,void 0,r=>{if(r.element instanceof My)s?n||(this._separatorRenderer.isSeparatorVisible(r.element)?this._tree.reveal(r.element):this._tree.reveal(r.element,0),n=r.element.children[0]):s=!0;else if(r.element instanceof ca&&!n){if(r.element.separator)this._itemRenderer.isItemWithSeparatorVisible(r.element)?this._tree.reveal(r.element):this._tree.reveal(r.element,0),n=r.element;else if(r.element===this._elementTree[0])return this._tree.reveal(r.element,0),!0}return!1}),n&&this._tree.setFocus([n]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const t=e;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this._itemElements.forEach(n=>{n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!1;const s=n.index&&this._inputElements[n.index-1];n.item&&(n.separator=s&&s.type==="separator"&&!s.buttons?s:void 0)});else{let n;this._itemElements.forEach(s=>{let r;this.matchOnLabelMode==="fuzzy"?r=this.matchOnLabel?BA(e,_1(s.saneLabel))??void 0:void 0:r=this.matchOnLabel?nnn(t,_1(s.saneLabel))??void 0:void 0;const o=this.matchOnDescription?BA(e,_1(s.saneDescription||""))??void 0:void 0,a=this.matchOnDetail?BA(e,_1(s.saneDetail||""))??void 0:void 0;if(r||o||a?(s.labelHighlights=r,s.descriptionHighlights=o,s.detailHighlights=a,s.hidden=!1):(s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=s.item?!s.item.alwaysShow:!0),s.item?s.separator=void 0:s.separator&&(s.hidden=!0),!this.sortByLabel){const l=s.index&&this._inputElements[s.index-1]||void 0;(l==null?void 0:l.type)==="separator"&&!l.buttons&&(n=l),n&&!s.hidden&&(s.separator=n,n=void 0)}})}return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents(()=>{const e=this._tree.getFocus().filter(n=>n instanceof ca),t=this._allVisibleChecked(e);for(const n of e)n.checkboxDisabled||(n.checked=!t)})}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!(e!=null&&e.saneTooltip)||!(e instanceof ca))return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}this.showHover(e);const t=new _e;t.add(this._tree.onDidChangeFocus(n=>{n.elements[0]instanceof ca&&this.showHover(n.elements[0])})),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){const t=new Array;for(const n of e)n instanceof My?t.push({element:n,collapsible:!1,collapsed:!1,children:n.children.map(s=>({element:s,collapsible:!1,collapsed:!1}))}):t.push({element:n,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let n=0,s=e.length;n{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);const t=this._itemElements.filter(n=>n.checked).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)})}showHover(e){var t,n,s;this._lastHover&&!this._lastHover.isDisposed&&((n=(t=this.hoverDelegate).onDidHideHover)==null||n.call(t),(s=this._lastHover)==null||s.dispose()),!(!e.element||!e.saneTooltip)&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:r=>{this.linkOpenerDelegate(r)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};JW([gr],WM.prototype,"onDidChangeFocus",null);JW([gr],WM.prototype,"onDidChangeSelection",null);WM=JW([Jne(4,ft),Jne(5,Zo)],WM);function nnn(i,e){const{text:t,iconOffsets:n}=e;if(!n||n.length===0)return nCe(i,t);const s=jP(t," "),r=t.length-s.length,o=nCe(i,s);if(o)for(const a of o){const l=n[a.start+r]+r;a.start+=l,a.end+=l}return o}function nCe(i,e){const t=e.toLowerCase().indexOf(i.toLowerCase());return t!==-1?[{start:t,end:t+i.length}]:null}function inn(i,e,t){const n=i.labelHighlights||[],s=e.labelHighlights||[];return n.length&&!s.length?-1:!n.length&&s.length?1:n.length===0&&s.length===0?0:Ztn(i.saneSortLabel,e.saneSortLabel,t)}function snn(i,e={}){jo.registerCommandAndKeybindingRule({weight:200,when:ZW,metadata:{description:S(1758,"Used while in the context of any kind of quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},...i,secondary:vce(i.primary,i.secondary??[],e)})}function cc(i,e={}){jo.registerCommandAndKeybindingRule({weight:200,when:Ne.and(Ne.or(Ne.equals(BM,"quickPick"),Ne.equals(BM,"quickTree")),ZW),metadata:{description:S(1759,"Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},...i,secondary:vce(i.primary,i.secondary??[],e)})}const VM=bn?256:2048;function vce(i,e,t={}){return t.withAltMod&&e.push(512+i),t.withCtrlMod&&(e.push(VM+i),t.withAltMod&&e.push(512+VM+i)),t.withCmdMod&&bn&&(e.push(2048+i),t.withCtrlMod&&e.push(2304+i),t.withAltMod&&(e.push(2560+i),t.withCtrlMod&&e.push(2816+i))),e}function Id(i,e){return t=>{const n=t.get(Wa).currentQuickInput;if(n)return e&&n.quickNavigate?n.focus(e):n.focus(i)}}cc({id:"quickInput.pageNext",primary:12,handler:Id(ss.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});cc({id:"quickInput.pagePrevious",primary:11,handler:Id(ss.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});cc({id:"quickInput.first",primary:VM+14,handler:Id(ss.First)},{withAltMod:!0,withCmdMod:!0});cc({id:"quickInput.last",primary:VM+13,handler:Id(ss.Last)},{withAltMod:!0,withCmdMod:!0});cc({id:"quickInput.next",primary:18,handler:Id(ss.Next)},{withCtrlMod:!0});cc({id:"quickInput.previous",primary:16,handler:Id(ss.Previous)},{withCtrlMod:!0});const iCe=S(1760,"If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),sCe=S(1761,"If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");bn?(cc({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:Id(ss.NextSeparator,ss.Next),metadata:{description:iCe}}),cc({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:Id(ss.NextSeparator)},{withCtrlMod:!0}),cc({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:Id(ss.PreviousSeparator,ss.Previous),metadata:{description:sCe}}),cc({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:Id(ss.PreviousSeparator)},{withCtrlMod:!0})):(cc({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:Id(ss.NextSeparator,ss.Next),metadata:{description:iCe}}),cc({id:"quickInput.nextSeparator",primary:2578,handler:Id(ss.NextSeparator)}),cc({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:Id(ss.PreviousSeparator,ss.Previous),metadata:{description:sCe}}),cc({id:"quickInput.previousSeparator",primary:2576,handler:Id(ss.PreviousSeparator)}));jo.registerCommandAndKeybindingRule({id:"quickInput.accept",primary:3,weight:200,when:Ne.and(Ne.notEquals(BM,"quickWidget"),ZW,Ne.not("isComposing")),metadata:{description:S(1762,"Used while in the context of some quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")},handler:i=>{const e=i.get(Wa).currentQuickInput;e==null||e.accept()},secondary:vce(3,[],{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0})});cc({id:"quickInput.acceptInBackground",when:Ne.and(ZW,Ne.equals(BM,"quickPick"),Ne.or(vle.negate(),Ktn)),primary:17,weight:250,handler:i=>{const e=i.get(Wa).currentQuickInput;e==null||e.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});snn({id:"quickInput.hide",primary:9,handler:i=>{const e=i.get(Wa).currentQuickInput;e==null||e.hide()}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});cc({id:"quickInput.toggleHover",primary:VM|10,handler:i=>{i.get(Wa).toggleHover()}});var rnn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},onn=function(i,e){return function(t,n){e(t,n,i)}},tie;const AI=Oe;var Qw;let IB=(Qw=class extends se{constructor(e,t,n,s){super(),this._hoverDelegate=e,this._buttonTriggeredEmitter=t,this.onCheckedEvent=n,this._themeService=s,this.templateId=tie.ID}renderTemplate(e){const t=new _e,n=De(e,AI(".quick-input-tree-entry")),s=t.add(new MPe("",!1,{...Hae,size:15}));n.appendChild(s.domNode);const r=De(n,AI("label.quick-input-tree-label")),o=De(r,AI(".quick-input-tree-rows")),a=De(o,AI(".quick-input-tree-row")),l=k7(a,AI(".quick-input-tree-icon")),c=t.add(new uM(a,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this._hoverDelegate})),u=t.add(new mc(n,this._hoverDelegate?{hoverDelegate:this._hoverDelegate}:void 0));return u.domNode.classList.add("quick-input-tree-entry-action-bar"),{toDisposeTemplate:t,entry:n,checkbox:s,icon:l,label:c,actionBar:u,toDisposeElement:new _e}}renderElement(e,t,n,s){const r=n.toDisposeElement,o=e.element;if(o.pickable===!1?n.checkbox.domNode.style.display="none":(n.checkbox.domNode.style.display="",n.checkbox.checked=o.checked??!1,r.add(He.filter(this.onCheckedEvent,h=>h.item===o)(h=>n.checkbox.checked=h.checked)),o.disabled&&n.checkbox.disable()),o.iconPath){const h=Xb(this._themeService.getColorTheme().type)?o.iconPath.dark:o.iconPath.light??o.iconPath.dark,g=kt.revive(h);n.icon.className="quick-input-tree-icon",n.icon.style.backgroundImage=Dp(g)}else n.icon.style.backgroundImage="",n.icon.className=o.iconClass?`quick-input-tree-icon ${o.iconClass}`:"";const{labelHighlights:a,descriptionHighlights:l}=e.filterData||{};let c;o.description&&(c={markdown:{value:Ph(o.description),supportThemeIcons:!0},markdownNotSupportedFallback:o.description}),n.label.setLabel(o.label,o.description,{matches:a,descriptionMatches:l,extraClasses:o.iconClasses,italic:o.italic,strikethrough:o.strikethrough,labelEscapeNewLines:!0,descriptionTitle:c});const u=o.buttons;u&&u.length?(n.actionBar.push(u.map((h,g)=>bE(h,`tree-${g}`,()=>this._buttonTriggeredEmitter.fire({item:o,button:h}))),{icon:!0,label:!1}),n.entry.classList.add("has-actions")):n.entry.classList.remove("has-actions")}disposeElement(e,t,n,s){n.toDisposeElement.clear(),n.actionBar.clear()}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}},tie=Qw,Qw.ID="quickInputTreeElement",Qw);IB=tie=rnn([onn(3,Ws)],IB);class ann{getHeight(e){return 22}getTemplateId(e){return IB.ID}}function lnn(i){var r;let e=!1,t=!1,n=!1;for(const o of i){switch((r=o.element)==null?void 0:r.checked){case"mixed":n=!0;break;case!0:e=!0;break;default:t=!0;break}if(e&&t&&n)break}return t?n||e?"mixed":!1:n?"mixed":e}class cnn{constructor(e){this.onCheckedEvent=e}getWidgetAriaLabel(){return S(1772,"Quick Tree")}getAriaLabel(e){return e.ariaLabel||[e.label,e.description].map(t=>MRe(t)).filter(t=>!!t).join(", ")}getWidgetRole(){return"tree"}getRole(e){return"checkbox"}isChecked(e){return{get value(){return e.checked==="mixed"?"mixed":!!e.checked},onDidChange:t=>He.filter(this.onCheckedEvent,n=>n.item===e)(n=>t())}}}class dnn{constructor(){this.filterValue="",this.matchOnLabel=!0,this.matchOnDescription=!1}filter(e,t){if(!this.filterValue||!(this.matchOnLabel||this.matchOnDescription))return e.children?{visibility:2,data:{}}:{visibility:1,data:{}};const n=this.matchOnLabel?BA(this.filterValue,_1(e.label))??void 0:void 0,s=this.matchOnDescription?BA(this.filterValue,_1(e.description||""))??void 0:void 0;return{visibility:t===1||n||s?1:e.children?2:0,data:{labelHighlights:n,descriptionHighlights:s}}}}class unn extends se{constructor(){super(...arguments),this._sortByLabel=!0}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}compare(e,t){if(!this._sortByLabel)return 0;if(e.labelt.label)return 1;if(e.description&&t.description){if(e.descriptiont.description)return 1}else{if(e.description)return-1;if(t.description)return 1}return 0}}var hnn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},gnn=function(i,e){return function(t,n){e(t,n,i)}};const fnn=Oe;let nie=class extends se{constructor(e,t,n){super(),this.instantiationService=n,this._onDidTriggerButton=this._register(new ie),this._onDidChangeCheckboxState=this._register(new ie),this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event,this._onDidCheckedLeafItemsChange=this._register(new ie),this._onLeave=new ie,this.onLeave=this._onLeave.event,this._onDidAccept=this._register(new ie),this.onDidAccept=this._onDidAccept.event,this._container=De(e,fnn(".quick-input-tree")),this._renderer=this._register(this.instantiationService.createInstance(IB,t,this._onDidTriggerButton,this.onDidChangeCheckboxState)),this._filter=this.instantiationService.createInstance(dnn),this._sorter=this._register(new unn),this._tree=this._register(this.instantiationService.createInstance(m8,"QuickInputTree",this._container,new ann,[this._renderer],{accessibilityProvider:new cnn(this.onDidChangeCheckboxState),horizontalScrolling:!1,multipleSelectionSupport:!1,findWidgetEnabled:!1,alwaysConsumeMouseWheel:!0,hideTwistiesOfChildlessElements:!0,renderIndentGuides:OC.None,expandOnDoubleClick:!0,expandOnlyOnTwistieClick:!0,disableExpandOnSpacebar:!0,sorter:this._sorter,filter:this._filter})),this.registerOnOpenListener()}get tree(){return this._tree}get displayed(){return this._container.style.display!=="none"}set displayed(e){this._container.style.display=e?"":"none"}get sortByLabel(){return this._sorter.sortByLabel}set sortByLabel(e){this._sorter.sortByLabel=e,this._tree.resort(null,!0)}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}updateFilterOptions(e){e.matchOnLabel!==void 0&&(this._filter.matchOnLabel=e.matchOnLabel),e.matchOnDescription!==void 0&&(this._filter.matchOnDescription=e.matchOnDescription),this._tree.refilter()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?`${Math.floor(e/44)*44+6}px`:"",this._tree.layout()}registerOnOpenListener(){this._register(this._tree.onDidOpen(e=>{const t=e.element;if(!t||t.disabled)return;if(t.pickable===!1){this._tree.setFocus([t]),this._onDidAccept.fire();return}const n=t.checked!==!0;if((t.checked??!1)===n)return;t.checked=n,this._tree.rerender(t);const s=new Set,r=[...this._tree.getNode(t).children];for(;r.length;){const a=r.shift();a!=null&&a.element&&!s.has(a.element)&&(s.add(a.element),(a.element.checked??!1)!==t.checked&&(a.element.checked=t.checked,this._tree.rerender(a.element)),r.push(...a.children))}let o=this._tree.getParentElement(t);for(;o;){const a=[...this._tree.getNode(o).children],l=lnn(a);(o.checked??!1)!==l&&(o.checked=l,this._tree.rerender(o)),o=this._tree.getParentElement(o)}this._onDidChangeCheckboxState.fire({item:t,checked:t.checked??!1}),this._onDidCheckedLeafItemsChange.fire(this.getCheckedLeafItems())}))}getCheckedLeafItems(){const e=new Set,t=[...this._tree.getNode().children],n=new Array;for(;t.length;){const s=t.shift();!(s!=null&&s.element)||e.has(s.element)||s.element.checked&&(e.add(s.element),t.push(...s.children),s.element.children||n.push(s.element))}return n}};nie=hnn([gnn(2,ft)],nie);var z3e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},E1=function(i,e){return function(t,n){e(t,n,i)}},iie;const pd=Oe,BK="workbench.quickInput.viewState";var Xw;let sie=(Xw=class extends se{get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,n,s,r){super(),this.options=e,this.layoutService=t,this.instantiationService=n,this.storageService=r,this.enabled=!0,this.onDidAcceptEmitter=this._register(new ie),this.onDidCustomEmitter=this._register(new ie),this.onDidTriggerButtonEmitter=this._register(new ie),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new ie),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new ie),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=Vtn.bindTo(s),this.quickInputTypeContext=$tn.bindTo(s),this.endOfQuickInputBoxContext=qtn.bindTo(s),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(He.runAndSubscribe(HP,({window:o,disposables:a})=>this.registerKeyModsListeners(o,a),{window:fi,disposables:this._store})),this._register(KLt(o=>{this.ui&&xt(this.ui.container)===o&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})),this.viewState=this.loadViewState()}registerKeyModsListeners(e,t){const n=s=>{this.keyMods.ctrlCmd=s.ctrlKey||s.metaKey,this.keyMods.alt=s.altKey};for(const s of[Fe.KEY_DOWN,Fe.KEY_UP,Fe.MOUSE_DOWN])t.add(de(e,s,n,!0))}getUI(e){if(this.ui)return e&&xt(this._container)!==xt(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const t=De(this._container,pd(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const n=Yu(t),s=De(t,pd(".quick-input-titlebar")),r=this._register(new mc(s,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-left-action-bar");const o=De(s,pd(".quick-input-title")),a=this._register(new mc(s,{hoverDelegate:this.options.hoverDelegate}));a.domNode.classList.add("quick-input-right-action-bar");const l=De(t,pd(".quick-input-header")),c=this._register(new MPe(S(1763,"Toggle all checkboxes"),!1,{...Hae,size:15}));De(l,c.domNode),this._register(c.onChange(()=>{const q=c.checked;B.setAllVisibleChecked(q===!0)})),this._register(de(c.domNode,Fe.CLICK,q=>{(q.x||q.y)&&f.setFocus()}));const u=De(l,pd(".quick-input-description")),h=De(l,pd(".quick-input-and-message")),g=De(h,pd(".quick-input-filter")),f=this._register(new Qtn(g,this.styles.inputBox,this.styles.toggle));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const m=De(g,pd(".quick-input-visible-count"));m.setAttribute("aria-live","polite"),m.setAttribute("aria-atomic","true");const x=this._register(new UZ(m,{countFormat:S(1764,"{0} Results")},this.styles.countBadge)),v=De(g,pd(".quick-input-count"));v.setAttribute("aria-live","polite");const _=this._register(new UZ(v,{countFormat:S(1765,"{0} Selected")},this.styles.countBadge)),w=this._register(new mc(l,{hoverDelegate:this.options.hoverDelegate}));w.domNode.classList.add("quick-input-inline-action-bar");const k=De(l,pd(".quick-input-action")),C=this._register(new Y6(k,this.styles.button));C.label=S(1766,"OK"),this._register(C.onDidClick(q=>{this.onDidAcceptEmitter.fire()}));const E=De(l,pd(".quick-input-action")),D=this._register(new Y6(E,{...this.styles.button,supportIcons:!0}));D.label=S(1767,"Custom"),this._register(D.onDidClick(q=>{this.onDidCustomEmitter.fire()}));const T=De(h,pd(`#${this.idPrefix}message.quick-input-message`)),I=this._register(new Zne(t,this.styles.progressBar));I.getContainer().classList.add("quick-input-progress");const R=De(t,pd(".quick-input-html-widget"));R.tabIndex=-1;const P=De(t,pd(".quick-input-description")),j=this.idPrefix+"list",B=this._register(this.instantiationService.createInstance(WM,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,j));f.setAttribute("aria-controls",j),this._register(B.onDidChangeFocus(()=>{f.hasFocus()&&f.setAttribute("aria-activedescendant",B.getActiveDescendant()??"")})),this._register(B.onChangedAllVisibleChecked(q=>{c.checked=q})),this._register(B.onChangedVisibleCount(q=>{x.setCount(q)})),this._register(B.onChangedCheckedCount(q=>{MP(()=>_.setCount(q))})),this._register(B.onLeave(()=>{setTimeout(()=>{this.controller&&(f.setFocus(),this.controller instanceof d2&&this.controller.canSelectMany&&B.clearFocus())},0)}));const H=this._register(this.instantiationService.createInstance(nie,t,this.options.hoverDelegate));this._register(H.tree.onDidChangeFocus(()=>{f.hasFocus()&&f.setAttribute("aria-activedescendant",H.getActiveDescendant()??"")})),this._register(H.onLeave(()=>{setTimeout(()=>{this.controller&&(f.setFocus(),H.tree.setFocus([]))},0)})),this._register(H.onDidAccept(()=>{this.onDidAcceptEmitter.fire()})),this._register(H.tree.onDidChangeContentHeight(()=>this.updateLayout()));const $=$u(t);return this._register($),this._register(de(t,Fe.FOCUS,q=>{const V=this.getUI();if(xo(q.relatedTarget,V.inputContainer)){const X=V.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==X&&this.endOfQuickInputBoxContext.set(X)}xo(q.relatedTarget,V.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=er(q.relatedTarget)?q.relatedTarget:void 0)},!0)),this._register($.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(JR.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0})),this._register(f.onKeyDown(q=>{const V=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==V&&this.endOfQuickInputBoxContext.set(V),f.removeAttribute("aria-activedescendant")})),this._register(de(t,Fe.FOCUS,q=>{f.setFocus()})),this.dndController=this._register(this.instantiationService.createInstance(rie,this._container,t,[{node:s,includeChildren:!0},{node:l,includeChildren:!1}],this.viewState)),this._register(Pt(q=>{var X;const V=(X=this.dndController)==null?void 0:X.dndViewState.read(q);V&&(V.top!==void 0&&V.left!==void 0?this.viewState={...this.viewState,top:V.top,left:V.left}:this.viewState=void 0,this.updateLayout(),V.done&&this.saveViewState(this.viewState))})),this.ui={container:t,styleSheet:n,leftActionBar:r,titleBar:s,title:o,description1:P,description2:u,widget:R,rightActionBar:a,inlineActionBar:w,checkAll:c,inputContainer:h,filterContainer:g,inputBox:f,visibleCountContainer:m,visibleCount:x,countContainer:v,count:_,okContainer:k,ok:C,message:T,customButtonContainer:E,customButton:D,list:B,tree:H,progressBar:I,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:q=>this.show(q),hide:()=>this.hide(),setVisibilities:q=>this.setVisibilities(q),setEnabled:q=>this.setEnabled(q),setContextKey:q=>this.options.setContextKey(q),linkOpenerDelegate:q=>this.options.linkOpenerDelegate(q)},this.updateStyles(),this.ui}reparentUI(e){var t;this.ui&&(this._container=e,De(this._container,this.ui.container),(t=this.dndController)==null||t.reparentUI(this._container))}pick(e,t={},n=pn.None){return new Promise((s,r)=>{let o=u=>{var h;o=s,(h=t.onKeyMods)==null||h.call(t,a.keyMods),s(u)};if(n.isCancellationRequested){o(void 0);return}const a=this.createQuickPick({useSeparators:!0});let l;const c=[a,a.onDidAccept(()=>{if(a.canSelectMany)o(a.selectedItems.slice()),a.hide();else{const u=a.activeItems[0];u&&(o(u),a.hide())}}),a.onDidChangeActive(u=>{const h=u[0];h&&t.onDidFocus&&t.onDidFocus(h)}),a.onDidChangeSelection(u=>{if(!a.canSelectMany){const h=u[0];h&&(o(h),a.hide())}}),a.onDidTriggerItemButton(u=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...u,removeItem:()=>{const h=a.items.indexOf(u.item);if(h!==-1){const g=a.items.slice(),f=g.splice(h,1),m=a.activeItems.filter(v=>v!==f[0]),x=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=g,m&&(a.activeItems=m),a.keepScrollPosition=x}}})),a.onDidTriggerSeparatorButton(u=>{var h;return(h=t.onDidTriggerSeparatorButton)==null?void 0:h.call(t,u)}),a.onDidChangeValue(u=>{l&&!u&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),n.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{ii(c),o(void 0)})];a.title=t.title,t.value&&(a.value=t.value),a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.prompt=t.prompt,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,t.sortByLabel!==void 0&&(a.sortByLabel=t.sortByLabel),a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.quickNavigate=t.quickNavigate,a.hideInput=!!t.hideInput,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([u,h])=>{l=h,a.busy=!1,a.items=u,a.canSelectMany&&(a.selectedItems=u.filter(g=>g.type!=="separator"&&g.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,u=>{r(u),a.hide()})})}setValidationOnInput(e,t){t&&bo(t)?(e.severity=Os.Error,e.validationMessage=t):t&&!bo(t)?(e.severity=t.severity,e.validationMessage=t.content):(e.severity=Os.Ignore,e.validationMessage=void 0)}input(e={},t=pn.None){return new Promise(n=>{if(t.isCancellationRequested){n(void 0);return}const s=this.createInputBox(),r=e.validateInput||(()=>Promise.resolve(void 0)),o=He.debounce(s.onDidChangeValue,(u,h)=>h,100);let a=e.value||"",l=Promise.resolve(r(a));const c=[s,o(u=>{u!==a&&(l=Promise.resolve(r(u)),a=u),l.then(h=>{u===a&&this.setValidationOnInput(s,h)})}),s.onDidAccept(()=>{const u=s.value;u!==a&&(l=Promise.resolve(r(u)),a=u),l.then(h=>{!h||!bo(h)&&h.severity!==Os.Error?(n(u),s.hide()):u===a&&this.setValidationOnInput(s,h)})}),t.onCancellationRequested(()=>{s.hide()}),s.onDidHide(()=>{ii(c),n(void 0)})];s.title=e.title,s.value=e.value||"",s.valueSelection=e.valueSelection,s.prompt=e.prompt,s.placeholder=e.placeHolder,s.password=!!e.password,s.ignoreFocusOut=!!e.ignoreFocusLost,s.show()})}createQuickPick(e={useSeparators:!1}){const t=this.getUI(!0);return new d2(t)}createInputBox(){const e=this.getUI(!0);return new Gtn(e)}show(e){var r;const t=this.getUI(!0);this.onShowEmitter.fire();const n=this.controller;this.controller=e,n==null||n.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",vo(t.widget),t.rightActionBar.clear(),t.inlineActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Os.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),vo(t.message),t.progressBar.stop(),t.progressBar.getContainer().setAttribute("aria-hidden","true"),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.tree.updateFilterOptions({matchOnDescription:!1,matchOnLabel:!0}),t.tree.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const s=this.options.backKeybindingLabel();Qne.tooltip=s?S(1768,"Back ({0})",s):S(1769,"Back"),t.container.style.display="",this.updateLayout(),(r=this.dndController)==null||r.layoutContainer(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.domNode.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.tree.displayed=!!e.tree,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;const t=this.getUI();for(const n of t.leftActionBar.viewItems)n.action.enabled=e;for(const n of t.rightActionBar.viewItems)n.action.enabled=e;e?t.checkAll.enable():t.checkAll.disable(),t.inputBox.enabled=e,t.ok.enabled=e,t.list.enabled=e}}hide(e){var r;const t=this.controller;if(!t)return;t.willHide(e);const n=(r=this.ui)==null?void 0:r.container,s=n&&!PIe(n);if(this.controller=null,this.onHideEmitter.fire(),n&&(n.style.display="none"),!s){let o=this.previousFocusElement;for(;o&&!o.offsetParent;)o=o.parentElement??void 0;o!=null&&o.offsetParent?(o.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}t.didHide(e)}toggleHover(){this.isVisible()&&this.controller instanceof d2&&this.getUI().list.toggleHover()}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){var e,t;if(this.ui&&this.isVisible()){const n=this.ui.container.style,s=Math.min(this.dimension.width*.62,iie.MAX_WIDTH);n.width=s+"px",n.top=`${(e=this.viewState)!=null&&e.top?Math.round(this.dimension.height*this.viewState.top):this.titleBarOffset}px`,n.left=`${Math.round(this.dimension.width*(((t=this.viewState)==null?void 0:t.left)??.5)-s/2)}px`,this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4),this.ui.tree.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:n,widgetBorder:s,widgetShadow:r}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=n??"",this.ui.container.style.border=s?`1px solid ${s}`:"",this.ui.container.style.boxShadow=r?`0 0 8px 2px ${r}`:"",this.ui.list.style(this.styles.list),this.ui.tree.tree.style(this.styles.list);const o=[];this.styles.pickerGroup.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(o.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&o.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&o.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&o.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&o.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&o.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),o.push("}"));const a=o.join(` +`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}loadViewState(){try{const e=JSON.parse(this.storageService.get(BK,-1,"{}"));if(e.top!==void 0||e.left!==void 0)return e}catch{}}saveViewState(e){this.layoutService.activeContainer===this.layoutService.mainContainer&&(e!==void 0?this.storageService.store(BK,JSON.stringify(e),-1,1):this.storageService.remove(BK,-1))}},iie=Xw,Xw.MAX_WIDTH=600,Xw);sie=iie=z3e([E1(1,qp),E1(2,ft),E1(3,Bt),E1(4,xl)],sie);let rie=class extends se{constructor(e,t,n,s,r,o,a){super(),this._container=e,this._quickInputContainer=t,this._quickInputDragAreas=n,this._layoutService=r,this.configurationService=a,this.dndViewState=Ft(this,void 0),this._snapThreshold=20,this._snapLineHorizontalRatio=.25,this._quickInputAlignmentContext=Utn.bindTo(o);const l=GBt(this.configurationService)==="custom";this._controlsOnLeft=l&&y$===1,this._controlsOnRight=l&&(y$===3||y$===2),this._registerLayoutListener(),this.registerMouseListeners(),this.dndViewState.set({...s,done:!0},void 0)}reparentUI(e){this._container=e}layoutContainer(e=this._layoutService.activeContainerDimension){const t=this.dndViewState.get(),n=this._quickInputContainer.getBoundingClientRect();if(t!=null&&t.top&&(t!=null&&t.left)){const s=Math.round(t.left*100)/100,r=e.width,o=n.width,a=s*r-o/2;this._layout(t.top*e.height,a)}}_registerLayoutListener(){this._register(He.filter(this._layoutService.onDidLayoutContainer,e=>e.container===this._container)(e=>this.layoutContainer(e.dimension)))}registerMouseListeners(){const e=this._quickInputContainer;this._register(pxe(e,t=>{const n=new va(xt(e),t);n.detail===2&&this._quickInputDragAreas.some(({node:s,includeChildren:r})=>r?xo(n.target,s):n.target===s)&&this.dndViewState.set({top:void 0,left:void 0,done:!0},void 0)})),this._register(IIe(e,t=>{const n=xt(this._layoutService.activeContainer),s=new va(n,t);if(!this._quickInputDragAreas.some(({node:h,includeChildren:g})=>g?xo(s.target,h):s.target===h))return;const r=this._quickInputContainer.getBoundingClientRect(),o=s.browserEvent.clientX-r.left,a=s.browserEvent.clientY-r.top;let l=!1;const c=ZLt(n,h=>{new va(n,h).preventDefault(),l||(l=!0),this._layout(h.clientY-a,h.clientX-o)}),u=pxe(n,h=>{if(l){const g=this.dndViewState.get();this.dndViewState.set({top:g==null?void 0:g.top,left:g==null?void 0:g.left,done:!0},void 0)}c.dispose(),u.dispose()})}))}_layout(e,t){const n=this._getTopSnapValue(),s=this._getCenterYSnapValue(),r=this._getCenterXSnapValue();e=Math.max(0,Math.min(e,this._container.clientHeight-this._quickInputContainer.clientHeight)),e=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},RI=function(i,e){return function(t,n){e(t,n,i)}};let oie=class extends jMt{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Yne))),this._quickAccess}constructor(e,t,n,s,r){super(n),this.instantiationService=e,this.contextKeyService=t,this.layoutService=s,this.configurationService=r,this._onShow=this._register(new ie),this._onHide=this._register(new ie),this.contexts=new Map}createController(e=this.layoutService,t){const n={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:r=>this.setContextKey(r),linkOpenerDelegate:r=>{this.instantiationService.invokeFunction(o=>{o.get(px).open(r,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(Xne))},s=this._register(this.instantiationService.createInstance(sie,{...n,...t}));return s.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer(r=>{xt(e.activeContainer)===xt(s.container)&&s.layout(r,e.activeContainerOffset.quickPickTop)})),this._register(e.onDidChangeActiveContainer(()=>{s.isVisible()||s.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)})),this._register(s.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(s.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),s}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Ze(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t==null||t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t,n=pn.None){return this.controller.pick(e,t,n)}input(e={},t=pn.None){return this.controller.input(e,t)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}toggleHover(){this.hasController&&this.controller.toggleHover()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Pe(q$),quickInputForeground:Pe(NRt),quickInputTitleBackground:Pe(ERt),widgetBorder:Pe(Aoe),widgetShadow:Pe(RD)},inputBox:B6,toggle:F6,countBadge:NMe,button:WBt,progressBar:VBt,keybindingLabel:kMe,list:uS({listBackground:q$,listFocusBackground:SR,listFocusForeground:CR,listInactiveFocusForeground:CR,listInactiveSelectionIconForeground:Foe,listInactiveFocusBackground:SR,listFocusOutline:ys,listInactiveFocusOutline:ys,treeStickyScrollBackground:q$}),pickerGroup:{pickerGroupBorder:Pe(LRt),pickerGroupForeground:Pe(GAe)}}}};oie=pnn([RI(0,ft),RI(1,Bt),RI(2,Ws),RI(3,qp),RI(4,Zt)],oie);var U3e=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Qy=function(i,e){return function(t,n){e(t,n,i)}};let aie=class extends oie{constructor(e,t,n,s,r,o){super(t,n,s,new Tne(e.getContainerDomNode(),r),o),this.host=void 0;const a=zM.get(e);if(a){const l=a.widget;this.host={_serviceBrand:void 0,get mainContainer(){return l.getDomNode()},getContainer(){return l.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[l.getDomNode()]},get activeContainer(){return l.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return He.map(e.onDidLayoutChange,c=>({container:l.getDomNode(),dimension:c}))},get onDidChangeActiveContainer(){return He.None},get onDidAddContainer(){return He.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};aie=U3e([Qy(1,ft),Qy(2,Bt),Qy(3,Ws),Qy(4,Hn),Qy(5,Zt)],aie);let lie=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const n=t=this.instantiationService.createInstance(aie,e);this.mapEditorToService.set(e,t),uC(e.onDidDispose)(()=>{n.dispose(),this.mapEditorToService.delete(e)})}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,n=pn.None){return this.activeService.pick(e,t,n)}input(e,t){return this.activeService.input(e,t)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}toggleHover(){return this.activeService.toggleHover()}};lie=U3e([Qy(0,ft),Qy(1,Hn)],lie);const _H=class _H{static get(e){return e.getContribution(_H.ID)}constructor(e){this.editor=e,this.widget=new cie(this.editor)}dispose(){this.widget.dispose()}};_H.ID="editor.controller.quickInput";let zM=_H;const yH=class yH{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return yH.ID}getDomNode(){return this.domNode}getPosition(){return{preference:{top:0,left:0}}}dispose(){this.codeEditor.removeOverlayWidget(this)}};yH.ID="editor.contrib.quickInputWidget";let cie=yH;Pn(zM.ID,zM,4);var mnn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},HK=function(i,e){return function(t,n){e(t,n,i)}};let die=class extends se{constructor(e,t,n){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new ie,this._onDidChangeReducedMotion=new ie,this._onDidChangeLinkUnderline=new ie,this._accessibilityModeEnabledContext=ID.bindTo(this._contextKeyService);const s=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration("editor.accessibilitySupport")&&(s(),this._onDidChangeScreenReaderOptimized.fire()),o.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),s(),this._register(this.onDidChangeScreenReaderOptimized(()=>s()));const r=fi.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(r),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register(de(e,"change",()=>{this._systemMotionReduced=e.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const t=()=>{const n=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("monaco-reduce-motion",n),this._layoutService.mainContainer.classList.toggle("monaco-enable-motion",!n)};t(),this._register(this.onDidChangeReducedMotion(()=>t()))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration(t=>{if(t.affectsConfiguration("accessibility.underlineLinks")){const n=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=n,this._onDidChangeLinkUnderline.fire()}}));const e=()=>{const t=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",t)};e(),this._register(this.onDidChangeLinkUnderlines(()=>e()))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return e==="on"||e==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};die=mnn([HK(0,Bt),HK(1,qp),HK(2,Zt)],die);var bnn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},rCe=function(i,e){return function(t,n){e(t,n,i)}},uie;const oCe="application/vnd.code.resources";var Zw;let hie=(Zw=class extends se{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(lC||HTe)&&this.installWebKitWriteTextWorkaround(),this._register(He.runAndSubscribe(HP,({window:n,disposables:s})=>{s.add(de(n.document,"copy",()=>this.clearResourcesState()))},{window:fi,disposables:this._store}))}triggerPaste(){this.logService.trace("BrowserClipboardService#triggerPaste")}installWebKitWriteTextWorkaround(){const e=()=>{const t=new eS;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,oi().navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(async n=>{(!(n instanceof Error)||n.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(n)})};this._register(He.runAndSubscribe(this.layoutService.onDidAddContainer,({container:t,disposables:n})=>{n.add(de(t,"click",e)),n.add(de(t,"keydown",e))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.logService.trace("BrowserClipboardService#writeText called with type:",t," text.length:",e.length),this.clearResourcesState(),t){this.mapTextToType.set(t,e),this.logService.trace("BrowserClipboardService#writeText");return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return this.logService.trace("before navigator.clipboard.writeText"),await oi().navigator.clipboard.writeText(e)}catch(n){console.error(n)}this.fallbackWriteText(e)}fallbackWriteText(e){this.logService.trace("BrowserClipboardService#fallbackWriteText");const t=WP(),n=t.activeElement,s=t.body.appendChild(Oe("textarea",{"aria-hidden":!0}));s.style.height="1px",s.style.width="1px",s.style.position="absolute",s.value=e,s.focus(),s.select(),t.execCommand("copy"),er(n)&&n.focus(),s.remove()}async readText(e){if(this.logService.trace("BrowserClipboardService#readText called with type:",e),e){const t=this.mapTextToType.get(e)||"";return this.logService.trace("BrowserClipboardService#readText text.length:",t.length),t}try{const t=await oi().navigator.clipboard.readText();return this.logService.trace("BrowserClipboardService#readText text.length:",t.length),t}catch(t){console.error(t)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async readResources(){try{const t=await oi().navigator.clipboard.read();for(const n of t)if(n.types.includes(`web ${oCe}`)){const s=await n.getType(`web ${oCe}`);return JSON.parse(await s.text()).map(o=>kt.from(o))}}catch{}const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;const e=await this.readText();return BP(e.substring(0,uie.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}},uie=Zw,Zw.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3,Zw);hie=uie=bnn([rCe(0,qp),rCe(1,Ji)],hie);var xnn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},vnn=function(i,e){return function(t,n){e(t,n,i)}};const u2="data-keybinding-context";class _ce{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t>"u"&&this._parent?this._parent.getValue(e):t}}const wH=class wH extends _ce{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}};wH.INSTANCE=new wH;let XL=wH;const T2=class T2 extends _ce{constructor(e,t,n){super(e,null),this._configurationService=t,this._values=lE.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(s=>{if(s.source===7){const r=Array.from(this._values,([o])=>o);this._values.clear(),n.fire(new lCe(r))}else{const r=[];for(const o of s.affectedKeys){const a=`config.${o}`,l=this._values.findSuperstr(a);l!==void 0&&(r.push(...En.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(r.push(a),this._values.delete(a))}n.fire(new lCe(r))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(T2._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(T2._keyPrefix.length),n=this._configurationService.getValue(t);let s;switch(typeof n){case"number":case"boolean":case"string":s=n;break;default:Array.isArray(n)?s=JSON.stringify(n):s=n}return this._values.set(e,s),s}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}};T2._keyPrefix="config.";let gie=T2;class _nn{constructor(e,t,n){this._service=e,this._key=t,this._defaultValue=n,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class aCe{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class lCe{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every(t=>e.has(t))}}class ynn{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every(t=>t.allKeysContainedIn(e))}}function wnn(i,e){return i.allKeysContainedIn(new Set(Object.keys(e)))}class $3e extends se{get onDidChangeContext(){return this._onDidChangeContext.event}constructor(e){super(),this._onDidChangeContext=this._register(new hC({merge:t=>new ynn(t)})),this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new _nn(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Cnn(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return e?e.evaluate(t):!0}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new aCe(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new aCe(e))}getContext(e){return this._isDisposed?XL.INSTANCE:this.getContextValuesContainer(Snn(e))}dispose(){super.dispose(),this._isDisposed=!0}}let fie=class extends $3e{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0,this.inputFocusedContext=vle.bindTo(this);const t=this._register(new gie(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t),this._register(He.runAndSubscribe(HP,({window:n,disposables:s})=>{const r=s.add(new Zn);s.add(de(n,Fe.FOCUS_IN,()=>{r.value=new _e,this.updateInputContextKeys(n.document,r.value)},!0))},{window:fi,disposables:this._store}))}updateInputContextKeys(e,t){function n(){return!!e.activeElement&&Og(e.activeElement)}const s=n();if(this.inputFocusedContext.set(s),s){const r=t.add($u(e.activeElement));He.once(r.onDidBlur)(()=>{oi().document===e&&this.inputFocusedContext.set(n()),r.dispose()},void 0,t)}}getContextValuesContainer(e){return this._isDisposed?XL.INSTANCE:this._contexts.get(e)||XL.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new _ce(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};fie=xnn([vnn(0,Zt)],fie);class Cnn extends $3e{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new Zn),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(u2)){let n="";this._domNode.classList&&(n=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${n?": "+n:""}`)}this._domNode.setAttribute(u2,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(e=>{const n=this._parent.getContextValuesContainer(this._myContextId).value;wnn(e,n)||this._onDidChangeContext.fire(e)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(u2),super.dispose())}getContextValuesContainer(e){return this._isDisposed?XL.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function Snn(i){for(;i;){if(i.hasAttribute(u2)){const e=i.getAttribute(u2);return e?parseInt(e,10):NaN}i=i.parentElement}return 0}function knn(i,e,t){i.get(Bt).createKey(String(e),Nnn(t))}function Nnn(i){return rAe(i,e=>{if(typeof e=="object"&&e.$mid===1)return kt.revive(e).toString();if(e instanceof kt)return e.toString()})}Rn.registerCommand("_setContext",knn);Rn.registerCommand({id:"getContextKeyInfo",handler(){return[...Ze.all()].sort((i,e)=>i.key.localeCompare(e.key))},metadata:{description:S(1674,"A command that returns information about context keys"),args:[]}});Rn.registerCommand("_generateContextKeyInfo",function(){const i=[],e=new Set;for(const t of Ze.all())e.has(t.key)||(e.add(t.key),i.push(t));i.sort((t,n)=>t.key.localeCompare(n.key)),console.log(JSON.stringify(i,void 0,2))});let Enn=class{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}};class cCe{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),s=this.lookupOrInsertNode(t);n.outgoing.set(s.key,s),s.incoming.set(n.key,n)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const n of this._nodes.values())n.outgoing.delete(t),n.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let n=this._nodes.get(t);return n||(n=new Enn(t,e),this._nodes.set(t,n)),n}isEmpty(){return this._nodes.size===0}toString(){const e=[];for(const[t,n]of this._nodes)e.push(`${t} + (-> incoming)[${[...n.incoming.keys()].join(", ")}] + (outgoing ->)[${[...n.outgoing.keys()].join(",")}] +`);return e.join(` +`)}findCycleSlow(){for(const[e,t]of this._nodes){const n=new Set([e]),s=this._findCycle(t,n);if(s)return s}}_findCycle(e,t){for(const[n,s]of e.outgoing){if(t.has(n))return[...t,n].join(" -> ");t.add(n);const r=this._findCycle(s,t);if(r)return r;t.delete(n)}}}const Lnn=!1;class dCe extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: +${e.toString()}`}}class AB{constructor(e=new FD,t=!1,n,s=Lnn){this._services=e,this._strict=t,this._parent=n,this._enableTracing=s,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(ft,this),this._globalGraph=s?(n==null?void 0:n._globalGraph)??new cCe(r=>r):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,ii(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)JC(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const n=this,s=new class extends AB{dispose(){n._children.delete(s),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(s),t==null||t.add(s),s}invokeFunction(e,...t){this._throwIfDisposed();const n=h2.traceInvocation(this._enableTracing,e);let s=!1;try{return e({get:o=>{if(s)throw _F("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(o,n);if(!a)throw new Error(`[invokeFunction] unknown service '${o}'`);return a},getIfExists:o=>{if(s)throw _F("service accessor is only valid during the invocation of its target method");return this._getOrCreateServiceInstance(o,n)}},...t)}finally{s=!0,n.stop()}}createInstance(e,...t){this._throwIfDisposed();let n,s;return e instanceof qf?(n=h2.traceCreation(this._enableTracing,e.ctor),s=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=h2.traceCreation(this._enableTracing,e),s=this._createInstance(e,t,n)),n.stop(),s}_createInstance(e,t=[],n){const s=Ig.getServiceDependencies(e).sort((a,l)=>a.index-l.index),r=[];for(const a of s){const l=this._getOrCreateServiceInstance(a.id,n);l||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`,!1),r.push(l)}const o=s.length>0?s[0].index:t.length;if(t.length!==o){console.trace(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);const a=o-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,o)}return Reflect.construct(e,t.concat(r))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof qf)this._services.set(e,t);else if(this._parent)this._parent._setCreatedServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const n=this._getServiceInstanceOrDescriptor(e);return n instanceof qf?this._safeCreateAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_safeCreateAndCacheServiceInstance(e,t,n){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,n)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,n){var l;const s=new cCe(c=>c.id.toString());let r=0;const o=[{id:e,desc:t,_trace:n}],a=new Set;for(;o.length;){const c=o.pop();if(!a.has(String(c.id))){if(a.add(String(c.id)),s.lookupOrInsertNode(c),r++>1e3)throw new dCe(s);for(const u of Ig.getServiceDependencies(c.desc.ctor)){const h=this._getServiceInstanceOrDescriptor(u.id);if(h||this._throwIfStrict(`[createInstance] ${e} depends on ${u.id} which is NOT registered.`,!0),(l=this._globalGraph)==null||l.insertEdge(String(c.id),String(u.id)),h instanceof qf){const g={id:u.id,desc:h,_trace:c._trace.branch(u.id,!0)};s.insertEdge(c,g),o.push(g)}}}}for(;;){const c=s.roots();if(c.length===0){if(!s.isEmpty())throw new dCe(s);break}for(const{data:u}of c){if(this._getServiceInstanceOrDescriptor(u.id)instanceof qf){const g=this._createServiceInstanceWithOwner(u.id,u.desc.ctor,u.desc.staticArguments,u.desc.supportsDelayedInstantiation,u._trace);this._setCreatedServiceInstance(u.id,g)}s.removeNode(u)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],s,r){if(this._services.get(e)instanceof qf)return this._createServiceInstance(e,t,n,s,r,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,s,r);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,n=[],s,r,o){if(s){const a=new AB(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(e);const l=new Map,c=new CEt(()=>{const u=a._createInstance(t,n,r);for(const[h,g]of l){const f=u[h];if(typeof f=="function")for(const m of g)m.disposable=f.apply(u,m.listener)}return l.clear(),o.add(u),u});return new Proxy(Object.create(null),{get(u,h){if(!c.isInitialized&&typeof h=="string"&&(h.startsWith("onDid")||h.startsWith("onWill"))){let m=l.get(h);return m||(m=new ll,l.set(h,m)),(v,_,w)=>{if(c.isInitialized)return c.value[h](v,_,w);{const k={listener:[v,_,w],disposable:void 0},C=m.push(k);return dt(()=>{var D;C(),(D=k.disposable)==null||D.dispose()})}}}if(h in u)return u[h];const g=c.value;let f=g[h];return typeof f!="function"||(f=f.bind(g),u[h]=f),f},set(u,h,g){return c.value[h]=g,!0},getPrototypeOf(u){return t.prototype}})}else{const a=this._createInstance(t,n,r);return o.add(a),a}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}const wd=class wd{static traceInvocation(e,t){return e?new wd(2,t.name||new Error().stack.split(` +`).slice(3,4).join(` +`)):wd._None}static traceCreation(e,t){return e?new wd(1,t.name):wd._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const n=new wd(3,e.toString());return this._dep.push([e,t,n]),n}stop(){const e=Date.now()-this._start;wd._totals+=e;let t=!1;function n(r,o){const a=[],l=new Array(r+1).join(" ");for(const[c,u,h]of o._dep)if(u&&h){t=!0,a.push(`${l}CREATES -> ${c}`);const g=n(r+1,h);g&&a.push(g)}else a.push(`${l}uses -> ${c}`);return a.join(` +`)}const s=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${n(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${wd._totals.toFixed(2)}ms)`];(e>2||t)&&wd.all.add(s.join(` +`))}};wd.all=new Set,wd._None=new class extends wd{constructor(){super(0,null)}stop(){}branch(){return this}},wd._totals=0;let h2=wd;const Dnn=new Set([Ot.inMemory,Ot.vscodeSourceControl,Ot.walkThrough,Ot.walkThroughSnippet,Ot.vscodeChatCodeBlock,Ot.vscodeTerminal]);class Tnn{constructor(){this._byResource=new Sr,this._byOwner=new Map}set(e,t,n){let s=this._byResource.get(e);s||(s=new Map,this._byResource.set(e,s)),s.set(t,n);let r=this._byOwner.get(t);r||(r=new Sr,this._byOwner.set(t,r)),r.set(e,n)}get(e,t){const n=this._byResource.get(e);return n==null?void 0:n.get(t)}delete(e,t){let n=!1,s=!1;const r=this._byResource.get(e);r&&(n=r.delete(t));const o=this._byOwner.get(t);if(o&&(s=o.delete(e)),n!==s)throw new Error("illegal state");return n&&s}values(e){var t,n;return typeof e=="string"?((t=this._byOwner.get(e))==null?void 0:t.values())??En.empty():kt.isUri(e)?((n=this._byResource.get(e))==null?void 0:n.values())??En.empty():En.map(En.concat(...this._byOwner.values()),s=>s[1])}}class Inn{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Sr,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const n=this._data.get(t);n&&this._substract(n);const s=this._resourceStats(t);this._add(s),this._data.set(t,s)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Dnn.has(e.scheme))return t;for(const{severity:n}of this._service.read({resource:e}))n===Fs.Error?t.errors+=1:n===Fs.Warning?t.warnings+=1:n===Fs.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class Xy{constructor(){this._onMarkerChanged=new GTe({delay:0,merge:Xy._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Tnn,this._stats=new Inn(this),this._filteredResources=new Sr}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const n of t||[])this.changeOne(e,n,[])}changeOne(e,t,n){if(xIe(n))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const s=[];for(const r of n){const o=Xy._toMarker(e,t,r);o&&s.push(o)}this._data.set(t,e,s),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,n){let{code:s,severity:r,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:h,relatedInformation:g,tags:f,origin:m}=n;if(o)return l=l>0?l:1,c=c>0?c:1,u=u>=l?u:l,h=h>0?h:c,{resource:t,owner:e,code:s,severity:r,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:h,relatedInformation:g,tags:f,origin:m}}changeAll(e,t){const n=[],s=this._data.values(e);if(s)for(const r of s){const o=En.first(r);o&&(n.push(o.resource),this._data.delete(o.resource,e))}if(ul(t)){const r=new Sr;for(const{resource:o,marker:a}of t){const l=Xy._toMarker(e,o,a);if(!l)continue;const c=r.get(o);c?c.push(l):(r.set(o,[l]),n.push(o))}for(const[o,a]of r)this._data.set(o,e,a)}n.length>0&&this._onMarkerChanged.fire(n)}_createFilteredMarker(e,t){const n=t.length===1?S(1738,'Problems are paused because: "{0}"',t[0]):S(1739,'Problems are paused because: "{0}" and {1} more',t[0],t.length-1);return{owner:"markersFilter",resource:e,severity:Fs.Info,message:n,startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1}}read(e=Object.create(null)){let{owner:t,resource:n,severities:s,take:r}=e;if((!r||r<0)&&(r=-1),t&&n){const o=e.ignoreResourceFilters?void 0:this._filteredResources.get(n);if(o!=null&&o.length)return[this._createFilteredMarker(n,o)];const a=this._data.get(n,t);if(!a)return[];const l=[];for(const c of a){if(r>0&&l.length===r)break;const u=e.ignoreResourceFilters?void 0:this._filteredResources.get(n);u!=null&&u.length?l.push(this._createFilteredMarker(n,u)):Xy._accept(c,s)&&l.push(c)}return l}else{const o=!t&&!n?this._data.values():this._data.values(n??t),a=[],l=new BDt;for(const c of o)for(const u of c){if(l.has(u.resource))continue;if(r>0&&a.length===r)break;const h=e.ignoreResourceFilters?void 0:this._filteredResources.get(u.resource);h!=null&&h.length?(a.push(this._createFilteredMarker(u.resource,h)),l.add(u.resource)):Xy._accept(u,s)&&a.push(u)}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new Sr;for(const n of e)for(const s of n)t.set(s,!0);return Array.from(t.keys())}}class Ann extends se{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=$o.createEmptyModel(e)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=$o.createEmptyModel(this.logService);const e=Hs.as(tf.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const n=this.getConfigurationDefaultOverrides();for(const s of e){const r=n[s],o=t[s];r!==void 0?this._configurationModel.setValue(s,r):o?this._configurationModel.setValue(s,$f(o.default)):this._configurationModel.removeValue(s)}}}class Rnn extends se{constructor(e,t=[]){super(),this.logger=new XDt([e,...t]),this._register(e.onDidChangeLogLevel(n=>this.setLevel(n)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}class Mnn{getParserClass(){throw new Error("not implemented in StandaloneTreeSitterLibraryService")}supportsLanguage(e,t){return!1}getLanguage(e,t,n){}getInjectionQueries(e,t){return null}getHighlightingQueries(e,t){return null}}var Yp=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Rr=function(i,e){return function(t,n){e(t,n,i)}};class Pnn{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new ie}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let pie=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new cEt(new Pnn(t))):Promise.reject(new Error("Model not found"))}};pie=Yp([Rr(0,Is)],pie);const CH=class CH{show(){return CH.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}};CH.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};let mie=CH;class Onn{withProgress(e,t,n){return t({report:()=>{}})}}class jnn{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class Fnn{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let n=e;return t&&(n=n+` + +`+t),fi.confirm(n)}async prompt(e){var s;let t;if(this.doConfirm(e.message,e.detail)){const r=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&r.push(e.cancelButton),t=await((s=r[0])==null?void 0:s.run({checkboxChecked:!1}))}return{result:t}}async error(e,t){await this.prompt({type:Os.Error,message:e,detail:t})}}const I2=class I2{info(e){return this.notify({severity:Os.Info,message:e})}warn(e){return this.notify({severity:Os.Warning,message:e})}error(e){return this.notify({severity:Os.Error,message:e})}notify(e){switch(e.severity){case Os.Error:console.error(e.message);break;case Os.Warning:console.warn(e.message);break;default:console.log(e.message);break}return I2.NO_OP}prompt(e,t,n,s){return I2.NO_OP}status(e,t){return{close:()=>{}}}};I2.NO_OP=new IOt;let bie=I2,xie=class{constructor(e){this._onWillExecuteCommand=new ie,this._onDidExecuteCommand=new ie,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const n=Rn.getCommand(e);if(!n)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const s=this._instantiationService.invokeFunction.apply(this._instantiationService,[n.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(s)}catch(s){return Promise.reject(s)}}};xie=Yp([Rr(0,ft)],xie);let ZL=class extends ptn{constructor(e,t,n,s,r,o){super(e,t,n,s,r),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=f=>{const m=new _e;m.add(de(f,Fe.KEY_DOWN,x=>{const v=new ki(x);this._dispatch(v,v.target)&&(v.preventDefault(),v.stopPropagation())})),m.add(de(f,Fe.KEY_UP,x=>{const v=new ki(x);this._singleModifierDispatch(v,v.target)&&v.preventDefault()})),this._domNodeListeners.push(new Bnn(f,m))},l=f=>{for(let m=0;m{f.getOption(70)||a(f.getContainerDomNode())},u=f=>{f.getOption(70)||l(f.getContainerDomNode())};this._register(o.onCodeEditorAdd(c)),this._register(o.onCodeEditorRemove(u)),o.listCodeEditors().forEach(c);const h=f=>{a(f.getContainerDomNode())},g=f=>{l(f.getContainerDomNode())};this._register(o.onDiffEditorAdd(h)),this._register(o.onDiffEditorRemove(g)),o.listDiffEditors().forEach(h)}addDynamicKeybinding(e,t,n,s){return Mh(Rn.registerCommand(e,n),this.addDynamicKeybindings([{keybinding:t,command:e,when:s}]))}addDynamicKeybindings(e){const t=e.map(n=>({keybinding:DY(n.keybinding,Vc),command:n.command??null,commandArgs:n.commandArgs,when:n.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),dt(()=>{for(let n=0;nthis._log(n))}return this._cachedResolver}_documentHasFocus(){return fi.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const n=[];let s=0;for(const r of e){const o=r.when||void 0,a=r.keybinding;if(!a)n[s++]=new Vwe(void 0,r.command,r.commandArgs,o,t,null,!1);else{const l=FM.resolveKeybinding(a,Vc);for(const c of l)n[s++]=new Vwe(c,r.command,r.commandArgs,o,t,null,!1)}}return n}resolveKeyboardEvent(e){const t=new Vb(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new FM([t],Vc)}};ZL=Yp([Rr(0,Bt),Rr(1,es),Rr(2,Ua),Rr(3,nr),Rr(4,Ji),Rr(5,Hn)],ZL);class Bnn extends se{constructor(e,t){super(),this.domNode=e,this._register(t)}}function uCe(i){return!!i&&typeof i=="object"&&(!i.overrideIdentifier||typeof i.overrideIdentifier=="string")&&(!i.resource||i.resource instanceof kt)}let RB=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new ie,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new Ann(e);this._configuration=new XW(t.reload(),$o.createEmptyModel(e),$o.createEmptyModel(e),$o.createEmptyModel(e),$o.createEmptyModel(e),$o.createEmptyModel(e),new Sr,$o.createEmptyModel(e),new Sr,e),t.dispose()}getValue(e,t){const n=typeof e=="string"?e:void 0,s=uCe(e)?e:uCe(t)?t:{};return this._configuration.getValue(n,s,void 0)}updateValues(e){const t={data:this._configuration.toData()},n=[];for(const s of e){const[r,o]=s;this.getValue(r)!==o&&(this._configuration.updateValue(r,o),n.push(r))}if(n.length>0){const s=new utn({keys:n,overrides:[]},t,this._configuration,void 0,this.logService);s.source=8,this._onDidChangeConfiguration.fire(s)}return Promise.resolve()}updateValue(e,t,n,s){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};RB=Yp([Rr(0,Ji)],RB);let vie=class{constructor(e,t,n){this.configurationService=e,this.modelService=t,this.languageService=n,this._onDidChangeConfiguration=new ie,this.configurationService.onDidChangeConfiguration(s=>{this._onDidChangeConfiguration.fire({affectedKeys:s.affectedKeys,affectsConfiguration:(r,o)=>s.affectsConfiguration(o)})})}getValue(e,t,n){const s=te.isIPosition(t)?t:null,r=s?typeof n=="string"?n:void 0:typeof t=="string"?t:void 0,o=e?this.getLanguage(e,s):void 0;return typeof r>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:o}):this.configurationService.getValue(r,{resource:e,overrideIdentifier:o})}getLanguage(e,t){const n=this.modelService.getModel(e);return n?t?n.getLanguageIdAtPosition(t.lineNumber,t.column):n.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};vie=Yp([Rr(0,Zt),Rr(1,Is),Rr(2,tr)],vie);let _ie=class{constructor(e){this.configurationService=e}getEOL(e,t){const n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&typeof n=="string"&&n!=="auto"?n:xc||bn?` +`:`\r +`}};_ie=Yp([Rr(0,Zt)],_ie);class Hnn{publicLog2(){}}const A2=class A2{constructor(){const e=kt.from({scheme:A2.SCHEME,authority:"model",path:"/"});this.workspace={id:GMe,folders:[new nHt({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===A2.SCHEME?this.workspace.folders[0]:null}};A2.SCHEME="inmemory";let yie=A2;function MB(i,e,t){if(!e||!(i instanceof RB))return;const n=[];Object.keys(e).forEach(s=>{_Ht(s)&&n.push([`editor.${s}`,e[s]]),t&&yHt(s)&&n.push([`diffEditor.${s}`,e[s]])}),n.length>0&&i.updateValues(n)}let wie=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const n=Array.isArray(e)?e:Uae.convert(e),s=new Map;for(const a of n){if(!(a instanceof y_))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=s.get(l);c||(c=[],s.set(l,c)),c.push(Qs.replaceMove(z.lift(a.textEdit.range),a.textEdit.text))}let r=0,o=0;for(const[a,l]of s)a.pushStackElement(),a.pushEditOperations([],l,()=>[]),a.pushStackElement(),o+=1,r+=l.length;return{ariaSummary:gC(fte.bulkEditServiceSummary,r,o),isApplied:r>0}}};wie=Yp([Rr(0,Is)],wie);class Wnn{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}getUriBasenameLabel(e){return qu(e)}}let Cie=class extends itn{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,n){if(!t){const s=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();s&&(t=s.getContainerDomNode())}return super.showContextView(e,t,n)}};Cie=Yp([Rr(0,qp),Rr(1,Hn)],Cie);class Vnn{constructor(){this._neverEmitter=new ie,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class znn extends Fne{constructor(){super()}}class Unn extends Rnn{constructor(){super(new QDt)}}let Sie=class extends Wne{constructor(e,t,n,s,r,o){super(e,t,n,s,r,o),this.configure({blockMouse:!1})}};Sie=Yp([Rr(0,Ua),Rr(1,nr),Rr(2,fx),Rr(3,zn),Rr(4,Qu),Rr(5,Bt)],Sie);const $nn={esmModuleLocation:void 0,label:"editorWorkerService"};let kie=class extends Nne{constructor(e,t,n,s,r){super($nn,e,t,n,s,r)}};kie=Yp([Rr(0,Is),Rr(1,$W),Rr(2,Ji),Rr(3,As),Rr(4,lt)],kie);class qnn{async playSignal(e,t){}}wn(Ji,Unn,0);wn(Zt,RB,0);wn($W,vie,0);wn(V5e,_ie,0);wn(tx,yie,0);wn(FC,Wnn,0);wn(Ua,Hnn,0);wn(vO,Fnn,0);wn(ele,jnn,0);wn(nr,bie,0);wn(Kp,Xy,0);wn(tr,znn,0);wn(tu,YJt,0);wn(Is,Kne,0);wn(Soe,qne,0);wn(Bt,fie,0);wn(yRe,Onn,0);wn(Jb,mie,0);wn(xl,BBt,0);wn(Nc,kie,0);wn(aO,wie,0);wn(e3e,Vnn,0);wn(bl,pie,0);wn(Zo,die,0);wn(eh,KVt,0);wn(es,xie,0);wn(zn,ZL,0);wn(Wa,lie,0);wn(fx,Cie,0);wn(px,$ne,0);wn(ed,hie,0);wn(eu,Sie,0);wn(Qu,GX,0);wn(hx,qnn,0);wn(cae,Mnn,0);wn(YIe,eTt,0);wn(zle,cqt,0);var Ut;(function(i){const e=new FD;for(const[l,c]of Oxe())e.set(l,c);const t=new AB(e,!0);e.set(ft,t);function n(l){s||o({});const c=e.get(l);if(!c)throw new Error("Missing service "+l);return c instanceof qf?t.invokeFunction(u=>u.get(l)):c}i.get=n;let s=!1;const r=new ie;function o(l){if(s)return t;s=!0;for(const[u,h]of Oxe())e.get(u)||e.set(u,h);for(const u in l)if(l.hasOwnProperty(u)){const h=ln(u);e.get(h)instanceof qf&&e.set(h,l[u])}const c=n7t();for(const u of c)try{t.createInstance(u)}catch(h){zt(h)}return r.fire(),t}i.initialize=o;function a(l){if(s)return l();const c=new _e,u=c.add(r.event(()=>{u.dispose(),c.add(l())}));return c}i.withServices=a})(Ut||(Ut={}));var Knn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},hCe=function(i,e){return function(t,n){e(t,n,i)}},Mj,Jw;let Nie=(Jw=class{constructor(e,t){this._configurationService=e,this._languageService=t}async renderCodeBlock(e,t,n){var u;const s=Yg(n.context)?n.context:void 0;let r;e?r=this._languageService.getLanguageIdByLanguageName(e):s&&(r=(u=s.getModel())==null?void 0:u.getLanguageId()),r||(r=Ud);const o=await tjt(this._languageService,t,r),a=Mj._ttpTokenizer?Mj._ttpTokenizer.createHTML(o)??o:o,l=document.createElement("span");l.innerHTML=a;const c=l.querySelector(".monaco-tokenized-source");return er(c)?(Po(c,this.getFontInfo(s)),l):document.createElement("span")}getFontInfo(e){return e?e.getOption(59):RAt({fontFamily:this._configurationService.getValue("editor").fontFamily},1)}},Mj=Jw,Jw._ttpTokenizer=Up("tokenizeToString",{createHTML(e){return e}}),Jw);Nie=Mj=Knn([hCe(0,Zt),hCe(1,tr)],Nie);var yce=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},Hi=function(i,e){return function(t,n){e(t,n,i)}};let Gnn=0,gCe=!1;function Ynn(i){if(!i){if(gCe)return;gCe=!0}pDt(i||fi.document.body)}let PB=class extends wC{constructor(e,t,n,s,r,o,a,l,c,u,h,g,f,m){const x={...t};x.ariaLabel=x.ariaLabel||hte.editorViewAccessibleLabel,super(e,x,{},n,s,r,o,c,u,h,g,f),l instanceof ZL?this._standaloneKeybindingService=l:this._standaloneKeybindingService=null,Ynn(x.ariaContainerElement),Wjt((v,_)=>n.createInstance(PL,v,{instantHover:_},{})),X6t(a),m.setDefaultCodeBlockRenderer(n.createInstance(Nie))}addCommand(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const s="DYNAMIC_"+ ++Gnn,r=Ne.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(s,e,t,r),s}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"),se.None;const t=e.id,n=e.label,s=Ne.and(Ne.equals("editorId",this.getId()),Ne.deserialize(e.precondition)),r=e.keybindings,o=Ne.and(s,Ne.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...m)=>Promise.resolve(e.run(this,...m)),u=new _e,h=this.getId()+":"+t;if(u.add(Rn.registerCommand(h,c)),a){const f={command:{id:h,title:n},when:s,group:a,order:l};u.add(Ro.appendMenuItem(ct.EditorContext,f))}if(Array.isArray(r))for(const f of r)u.add(this._standaloneKeybindingService.addDynamicKeybinding(h,f,c,o));const g=new $2e(h,n,n,void 0,s,(...f)=>Promise.resolve(e.run(this,...f)),this._contextKeyService);return this._actions.set(t,g),u.add(dt(()=>{this._actions.delete(t)})),u}_triggerCommand(e,t){if(this._codeEditorService instanceof wB)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};PB=yce([Hi(2,ft),Hi(3,Hn),Hi(4,es),Hi(5,Bt),Hi(6,Zl),Hi(7,zn),Hi(8,Ws),Hi(9,nr),Hi(10,Zo),Hi(11,As),Hi(12,lt),Hi(13,Zh)],PB);let Eie=class extends PB{constructor(e,t,n,s,r,o,a,l,c,u,h,g,f,m,x,v,_){const w={...t};MB(h,w,!1);const k=c.registerEditorContainer(e);typeof w.theme=="string"&&c.setTheme(w.theme),typeof w.autoDetectHighContrast<"u"&&c.setAutoDetectHighContrast(!!w.autoDetectHighContrast);const C=w.model;delete w.model,super(e,w,n,s,r,o,a,l,c,u,g,x,v,_),this._configurationService=h,this._standaloneThemeService=c,this._register(k);let E;if(typeof C>"u"){const D=m.getLanguageIdByMimeType(w.language)||w.language||Ud;E=q3e(f,m,w.value||"",D,void 0),this._ownsModel=!0}else E=C,this._ownsModel=!1;if(this._attachModel(E),E){const D={oldModelUrl:null,newModelUrl:E.uri};this._onDidChangeModel.fire(D)}}dispose(){super.dispose()}updateOptions(e){MB(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)}};Eie=yce([Hi(2,ft),Hi(3,Hn),Hi(4,es),Hi(5,Bt),Hi(6,Zl),Hi(7,zn),Hi(8,tu),Hi(9,nr),Hi(10,Zt),Hi(11,Zo),Hi(12,Is),Hi(13,tr),Hi(14,As),Hi(15,lt),Hi(16,Zh)],Eie);let Lie=class extends Tp{constructor(e,t,n,s,r,o,a,l,c,u,h,g){const f={...t};MB(l,f,!0);const m=o.registerEditorContainer(e);typeof f.theme=="string"&&o.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&o.setAutoDetectHighContrast(!!f.autoDetectHighContrast),super(e,f,{},s,n,r,g,u),this._configurationService=l,this._standaloneThemeService=o,this._register(m)}dispose(){super.dispose()}updateOptions(e){MB(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,n){return e.createInstance(PB,t,n)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};Lie=yce([Hi(2,ft),Hi(3,Bt),Hi(4,Hn),Hi(5,tu),Hi(6,nr),Hi(7,Zt),Hi(8,eu),Hi(9,Jb),Hi(10,ed),Hi(11,hx)],Lie);function q3e(i,e,t,n,s){if(t=t||"",!n){const r=t.indexOf(` +`);let o=t;return r!==-1&&(o=t.substring(0,r)),fCe(i,t,e.createByFilepathOrFirstLine(s||null,o),s)}return fCe(i,t,e.createById(n),s)}function fCe(i,e,t,n){return i.createModel(e,t,n)}Z("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},S(142,"The background color of the diff editor's header"));Z("multiDiffEditor.background",wr,S(143,"The background color of the multi file diff editor"));Z("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},S(144,"The border color of the multi file diff editor"));var Qnn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},pCe=function(i,e){return function(t,n){e(t,n,i)}};class Xnn{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let Die=class extends se{constructor(e,t,n,s,r){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=n,this._instantiationService=s,this._viewModel=Ft(this,void 0),this._collapsed=we(this,l=>{var c;return(c=this._viewModel.read(l))==null?void 0:c.collapsed.read(l)}),this._editorContentHeight=Ft(this,500),this.contentHeight=we(this,l=>(this._collapsed.read(l)?0:this._editorContentHeight.read(l))+this._outerEditorHeight),this._modifiedContentWidth=Ft(this,0),this._modifiedWidth=Ft(this,0),this._originalContentWidth=Ft(this,0),this._originalWidth=Ft(this,0),this.maxScroll=we(this,l=>{const c=this._modifiedContentWidth.read(l)-this._modifiedWidth.read(l),u=this._originalContentWidth.read(l)-this._originalWidth.read(l);return c>u?{maxScroll:c,width:this._modifiedWidth.read(l)}:{maxScroll:u,width:this._originalWidth.read(l)}}),this._elements=Fn("div.multiDiffEntry",[Fn("div.header@header",[Fn("div.header-content",[Fn("div.collapse-button@collapseButton"),Fn("div.file-path",[Fn("div.title.modified.show-file-icons@primaryPath",[]),Fn("div.status.deleted@status",["R"]),Fn("div.title.original.show-file-icons@secondaryPath",[])]),Fn("div.actions@actions")])]),Fn("div.editorParent",[Fn("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(Tp,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode,fixedOverflowWidgets:!0},{})),this.isModifedFocused=Ts(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=Ts(this.editor.getOriginalEditor()).isFocused,this.isFocused=we(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 _e),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const o=new Y6(this._elements.collapseButton,{});this._register(Pt(l=>{o.element.className="",o.icon=this._collapsed.read(l)?Ee.chevronRight:Ee.chevronDown})),this._register(o.onDidClick(()=>{var l;(l=this._viewModel.get())==null||l.collapsed.set(!this._collapsed.get(),void 0)})),this._register(Pt(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=>{WI(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(Pt(l=>{var u;const c=(u=this._viewModel.read(l))==null?void 0:u.isActive.read(l);this._elements.root.classList.toggle("active",c)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(r.createScoped(this._elements.actions));const a=this._register(this._instantiationService.createChild(new FD([Bt,this._contextKeyService])));this._register(a.createInstance(XR,this._elements.actions,ct.MultiDiffEditorFileToolbar,{actionRunner:this._register(new MMe(()=>{var l,c;return((l=this._viewModel.get())==null?void 0:l.modifiedUri)??((c=this._viewModel.get())==null?void 0:c.originalUri)})),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:l=>l.startsWith("navigation")},actionViewItemProvider:(l,c)=>Vae(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(s){return{...s,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(!e){WI(s=>{this._viewModel.set(void 0,s),this.editor.setDiffModel(null,s),this._dataStore.clear()});return}const n=e.viewModel.documentDiffItem;if(WI(s=>{var c,u;(c=this._resourceLabel)==null||c.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:e.viewModel.modifiedUri===void 0});let r=!1,o=!1,a=!1,l="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(l="R",r=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(l="A",a=!0):(l="D",o=!0),this._elements.status.classList.toggle("renamed",r),this._elements.status.classList.toggle("deleted",o),this._elements.status.classList.toggle("added",a),this._elements.status.innerText=l,(u=this._resourceLabel2)==null||u.setUri(r?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,s),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,s),this.editor.updateOptions(t(n.options??{}))}),n.onOptionsDidChange&&this._dataStore.add(n.onOptionsDidChange(()=>{this.editor.updateOptions(t(n.options??{}))})),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,s=>{s||this.setData(void 0)}),e.viewModel.documentDiffItem.contextKeys)for(const[s,r]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(s,r)}render(e,t,n,s){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 r=e.length-this._headerHeight,o=Math.max(0,Math.min(s.start-e.start,r));this._elements.header.style.transform=`translateY(${o}px)`,WI(a=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})});try{this._isSettingScrollTop=!0,this._lastScrollTop=n,this.editor.getOriginalEditor().setScrollTop(n)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",o>0||n>0),this._elements.header.classList.toggle("collapsed",o===r)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};Die=Qnn([pCe(3,ft),pCe(4,Bt)],Die);class Znn{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 n=[...this._unused.values()];t=n.find(s=>this._itemData.get(s).getId()===e.getId())??n[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 Jnn=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},mCe=function(i,e){return function(t,n){e(t,n,i)}};let Tie=class extends se{constructor(e,t,n,s,r,o){super(),this._element=e,this._dimension=t,this._viewModel=n,this._workbenchUIElementFactory=s,this._parentContextKeyService=r,this._parentInstantiationService=o,this._scrollableElements=Fn("div.scrollContent",[Fn("div@content",{style:{overflow:"hidden"}}),Fn("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new OD({forceIntegerValues:!1,scheduleAtNextAnimationFrame:c=>vc(xt(this._element),c),smoothScrollDuration:100})),this._scrollableElement=this._register(new nW(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=Fn("div.monaco-component.multiDiffEditor",{},[Fn("div",{},[this._scrollableElement.getDomNode()]),Fn("div.placeholder@placeholder",{},[Fn("div")])]),this._sizeObserver=this._register(new fMe(this._element,void 0)),this._objectPool=this._register(new Znn(c=>{const u=this._instantiationService.createInstance(Die,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return u.setData(c),u})),this.scrollTop=Gn(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=Gn(this,this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItemsInfo=we(this,c=>{const u=this._viewModel.read(c);if(!u)return{items:[],getItem:m=>{throw new Nt}};const h=u.items.read(c),g=new Map;return{items:h.map(m=>{var _;const x=c.store.add(new tin(m,this._objectPool,this.scrollLeft,w=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+w})})),v=(_=this._lastDocStates)==null?void 0:_[x.getKey()];return v&&Vi(w=>{x.setViewState(v,w)}),g.set(m,x),x}),getItem:m=>g.get(m)}}),this._viewItems=this._viewItemsInfo.map(this,c=>c.items),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,(c,u)=>c.reduce((h,g)=>h+g.contentHeight.read(u)+this._spaceBetweenPx,0)),this.activeControl=we(this,c=>{var g,f;const u=(g=this._viewModel.read(c))==null?void 0:g.activeDiffItem.read(c);return u?(f=this._viewItemsInfo.read(c).getItem(u).template.read(c))==null?void 0:f.editor:void 0}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new FD([Bt,this._contextKeyService]))),this._contextKeyService.createKey(J.inMultiDiffEditor.key,!0),this._lastDocStates={},this._register(Fa((c,u)=>{const h=this._viewModel.read(c);if(h&&h.contextKeys)for(const[g,f]of Object.entries(h.contextKeys)){const m=this._contextKeyService.createKey(g,void 0);m.set(f),u.add(dt(()=>m.reset()))}}));const a=this._parentContextKeyService.createKey(J.multiDiffEditorAllCollapsed.key,!1);this._register(Pt(c=>{const u=this._viewModel.read(c);if(u){const h=u.items.read(c).every(g=>g.collapsed.read(c));a.set(h)}})),this._register(Pt(c=>{const u=this._dimension.read(c);this._sizeObserver.observe(u)}));const l=we(c=>{if(this._viewItems.read(c).length>0)return;const h=this._viewModel.read(c);return!h||h.isLoading.read(c)?S(145,"Loading..."):S(146,"No Changed Files")});this._register(Pt(c=>{const u=l.read(c);this._elements.placeholder.innerText=u??"",this._elements.placeholder.classList.toggle("visible",!!u)})),this._scrollableElements.content.style.position="relative",this._register(Pt(c=>{const u=this._sizeObserver.height.read(c);this._scrollableElements.root.style.height=`${u}px`;const h=this._totalHeight.read(c);this._scrollableElements.content.style.height=`${h}px`;const g=this._sizeObserver.width.read(c);let f=g;const m=this._viewItems.read(c),x=zoe(m,_a(v=>v.maxScroll.read(c).maxScroll,$c));if(x){const v=x.maxScroll.read(c);f=g+v.maxScroll}this._scrollableElement.setScrollDimensions({width:g,height:u,scrollHeight:h,scrollWidth:f})})),e.replaceChildren(this._elements.root),this._register(dt(()=>{e.replaceChildren()})),this._register(Pt(c=>{const u=this._viewModel.read(c);if(u&&!u.isLoading.read(c)){if(u.items.read(c).length===0||u.activeDiffItem.read(c))return;this.goToNextChange()}})),this._register(this._register(Pt(c=>{WI(u=>{this.render(c)})})))}reveal(e,t){var c;const n=this._viewItems.get(),s=n.findIndex(u=>{var h,g,f,m;return((h=u.viewModel.originalUri)==null?void 0:h.toString())===((g=e.original)==null?void 0:g.toString())&&((f=u.viewModel.modifiedUri)==null?void 0:f.toString())===((m=e.modified)==null?void 0:m.toString())});if(s===-1)throw new Nt("Resource not found in diff editor");const r=n[s];this._viewModel.get().activeDiffItem.setCache(r.viewModel,void 0);let o=0;for(let u=0;uf.viewModel===n):-1;if(s===-1){this._goToFile(0,"first");return}const r=t[s];r.viewModel.collapsed.get()&&r.viewModel.collapsed.set(!1,void 0);const o=(c=r.template.get())==null?void 0:c.editor;if((h=(u=o==null?void 0:o.getDiffComputationResult())==null?void 0:u.changes2)!=null&&h.length){const f=((g=o.getModifiedEditor().getPosition())==null?void 0:g.lineNumber)||1,m=o.getDiffComputationResult().changes2;if(e==="next"?m.some(v=>v.modified.startLineNumber>f):m.some(v=>v.modified.endLineNumberExclusive<=f)){o.goToDiff(e);return}}const a=(s+(e==="next"?1:-1)+t.length)%t.length;this._goToFile(a,e==="next"?"first":"last")}_goToFile(e,t){var r,o,a;const n=this._viewItems.get()[e];n.viewModel.collapsed.get()&&n.viewModel.collapsed.set(!1,void 0),this.reveal({original:n.viewModel.originalUri,modified:n.viewModel.modifiedUri});const s=(r=n.template.get())==null?void 0:r.editor;if((a=(o=s==null?void 0:s.getDiffComputationResult())==null?void 0:o.changes2)!=null&&a.length)if(t==="first")s.revealFirstDiff();else{const l=s.getDiffComputationResult().changes2.at(-1),c=s.getModifiedEditor();c.setPosition({lineNumber:l.modified.startLineNumber,column:1}),c.revealLineInCenter(l.modified.startLineNumber)}s==null||s.focus()}render(e){const t=this.scrollTop.read(e);let n=0,s=0,r=0;const o=this._sizeObserver.height.read(e),a=ht.ofStartAndLength(t,o),l=this._sizeObserver.width.read(e);for(const c of this._viewItems.read(e)){const u=c.contentHeight.read(e),h=Math.min(u,o),g=ht.ofStartAndLength(s,h),f=ht.ofStartAndLength(r,u);if(f.isBefore(a))n-=u-h,c.hide();else if(f.isAfter(a))c.hide();else{const m=Math.max(0,Math.min(a.start-f.start,u-h));n-=m;const x=ht.ofStartAndLength(t+n,o);c.render(g,m,l,x)}s+=h+this._spaceBetweenPx,r+=u+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+n)}px)`}};Tie=Jnn([mCe(4,Bt),mCe(5,ft)],Tie);function ein(i,e){const t=i.getModel(),n=i.createDecorationsCollection([{range:e,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{i.getModel()===t&&n.clear()},350)}class tin extends se{constructor(e,t,n,s){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=n,this._deltaScrollVertical=s,this._templateRef=this._register(roe(this,void 0)),this.contentHeight=we(this,r=>{var o,a;return((a=(o=this._templateRef.read(r))==null?void 0:o.object.contentHeight)==null?void 0:a.read(r))??this.viewModel.lastTemplateData.read(r).contentHeight}),this.maxScroll=we(this,r=>{var o;return((o=this._templateRef.read(r))==null?void 0:o.object.maxScroll.read(r))??{maxScroll:0,scrollWidth:0}}),this.template=we(this,r=>{var o;return(o=this._templateRef.read(r))==null?void 0:o.object}),this._isHidden=Ft(this,!1),this._isFocused=we(this,r=>{var o;return((o=this.template.read(r))==null?void 0:o.isFocused.read(r))??!1}),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(Pt(r=>{var a;const o=this._scrollLeft.read(r);(a=this._templateRef.read(r))==null||a.object.setScrollLeft(o)})),this._register(Pt(r=>{const o=this._templateRef.read(r);!o||!this._isHidden.read(r)||o.object.isFocused.read(r)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){var e;return`VirtualViewItem(${(e=this.viewModel.documentDiffItem.modified)==null?void 0:e.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){var o;this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const n=this.viewModel.lastTemplateData.get(),s=(o=e.selections)==null?void 0:o.map(st.liftSelection);this.viewModel.lastTemplateData.set({...n,selections:s},t);const r=this._templateRef.get();r&&s&&r.object.editor.setSelections(s)}_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&&Vi(t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)})}hide(){this._isHidden.set(!0,void 0)}render(e,t,n,s){this._isHidden.set(!1,void 0);let r=this._templateRef.get();if(!r){r=this._objectPool.getUnusedObj(new Xnn(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(r,void 0);const o=this.viewModel.lastTemplateData.get().selections;o&&r.object.editor.setSelections(o)}r.object.render(e,n,t,s)}}var nin=function(i,e,t,n){var s=arguments.length,r=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r},iin=function(i,e){return function(t,n){e(t,n,i)}};let Iie=class extends se{constructor(e,t,n){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=n,this._dimension=Ft(this,void 0),this._viewModel=Ft(this,void 0),this._widgetImpl=we(this,s=>s.store.add(this._instantiationService.createInstance(Im(Tie),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))),this._register(xL(this._widgetImpl))}};Iie=nin([iin(2,ft)],Iie);function sin(i,e,t){return Ut.initialize(t||{}).createInstance(Eie,i,e)}function rin(i){return Ut.get(Hn).onCodeEditorAdd(t=>{i(t)})}function oin(i){return Ut.get(Hn).onDiffEditorAdd(t=>{i(t)})}function ain(){return Ut.get(Hn).listCodeEditors()}function lin(){return Ut.get(Hn).listDiffEditors()}function cin(i,e,t){return Ut.initialize(t||{}).createInstance(Lie,i,e)}function din(i,e){const t=Ut.initialize(e||{});return new Iie(i,{},t)}function uin(i){if(typeof i.id!="string"||typeof i.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Rn.registerCommand(i.id,i.run)}function hin(i){if(typeof i.id!="string"||typeof i.label!="string"||typeof i.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=Ne.deserialize(i.precondition),t=(s,...r)=>ao.runEditorCommand(s,r,e,(o,a,l)=>Promise.resolve(i.run(a,...l))),n=new _e;if(n.add(Rn.registerCommand(i.id,t)),i.contextMenuGroupId){const s={command:{id:i.id,title:i.label},when:e,group:i.contextMenuGroupId,order:i.contextMenuOrder||0};n.add(Ro.appendMenuItem(ct.EditorContext,s))}if(Array.isArray(i.keybindings)){const s=Ut.get(zn);if(!(s instanceof ZL))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const r=Ne.and(e,Ne.deserialize(i.keybindingContext));n.add(s.addDynamicKeybindings(i.keybindings.map(o=>({keybinding:o,command:i.id,when:r}))))}}return n}function gin(i){return K3e([i])}function K3e(i){const e=Ut.get(zn);return e instanceof ZL?e.addDynamicKeybindings(i.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:Ne.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),se.None)}function fin(i,e,t){const n=Ut.get(tr),s=n.getLanguageIdByMimeType(e)||e;return q3e(Ut.get(Is),n,i,s,t)}function pin(i,e){const t=Ut.get(tr),n=t.getLanguageIdByMimeType(e)||e||Ud;i.setLanguage(t.createById(n))}function min(i,e,t){i&&Ut.get(Kp).changeOne(e,i.uri,t)}function bin(i){Ut.get(Kp).changeAll(i,[])}function xin(i){return Ut.get(Kp).read(i)}function vin(i){return Ut.get(Kp).onMarkerChanged(i)}function _in(i){return Ut.get(Is).getModel(i)}function yin(){return Ut.get(Is).getModels()}function win(i){return Ut.get(Is).onModelAdded(i)}function Cin(i){return Ut.get(Is).onModelRemoved(i)}function Sin(i){return Ut.get(Is).onModelLanguageChanged(t=>{i({model:t.model,oldLanguage:t.oldLanguageId})})}function kin(i){return Ien(Ut.get(Is),i)}function Nin(i,e){const t=Ut.get(tr),n=Ut.get(tu);return mce.colorizeElement(n,t,i,e).then(()=>{n.registerEditorContainer(i)})}function Ein(i,e,t){const n=Ut.get(tr);return Ut.get(tu).registerEditorContainer(fi.document.body),mce.colorize(n,i,e,t)}function Lin(i,e,t=4){return Ut.get(tu).registerEditorContainer(fi.document.body),mce.colorizeModelLine(i,e,t)}function Din(i){const e=Gs.get(i);return e||{getInitialState:()=>AL,tokenize:(t,n,s)=>lae(i,s)}}function Tin(i,e){Gs.getOrCreate(e);const t=Din(e),n=Xc(i),s=[];let r=t.getInitialState();for(let o=0,a=n.length;o{var a;if(!n)return null;const r=(a=t.options)==null?void 0:a.selection;let o;return r&&typeof r.endLineNumber=="number"&&typeof r.endColumn=="number"?o=r:r&&(o={lineNumber:r.startLineNumber,column:r.startColumn}),await i.openCodeEditor(n,t.resource,o)?n:null})}function jin(){return{create:sin,getEditors:ain,getDiffEditors:lin,onDidCreateEditor:rin,onDidCreateDiffEditor:oin,createDiffEditor:cin,addCommand:uin,addEditorAction:hin,addKeybindingRule:gin,addKeybindingRules:K3e,createModel:fin,setModelLanguage:pin,setModelMarkers:min,getModelMarkers:xin,removeAllMarkers:bin,onDidChangeMarkers:vin,getModels:yin,getModel:_in,onDidCreateModel:win,onWillDisposeModel:Cin,onDidChangeModelLanguage:Sin,createWebWorker:kin,colorizeElement:Nin,colorize:Ein,colorizeModelLine:Lin,tokenize:Tin,defineTheme:Iin,setTheme:Ain,remeasureFonts:Rin,registerCommand:Min,registerLinkOpener:Pin,registerEditorOpener:Oin,AccessibilitySupport:Ete,ContentWidgetPositionPreference:Rte,CursorChangeReason:Mte,DefaultEndOfLine:Pte,EditorAutoIndentStrategy:jte,EditorOption:Fte,EndOfLinePreference:Bte,EndOfLineSequence:Hte,MinimapPosition:Zte,MinimapSectionHeaderStyle:Jte,MouseTargetType:ene,OverlayWidgetPositionPreference:ine,OverviewRulerLane:sne,GlyphMarginLane:Wte,RenderLineNumbersType:ane,RenderMinimap:lne,ScrollbarVisibility:dne,ScrollType:cne,TextEditorCursorBlinkingStyle:bne,TextEditorCursorStyle:xne,TrackedRangeStickiness:vne,WrappingIndent:_ne,InjectedTextCursorStops:Ute,PositionAffinity:one,ShowLightbulbIconMode:hne,TextDirection:mne,ConfigurationChangedEvent:NAe,BareFontInfo:mC,FontInfo:qF,TextModelResolvedOptions:sj,FindMatch:fR,ApplyUpdateResult:SA,EditorZoom:Tu,createMultiFileDiffEditor:din,EditorType:XP,EditorOptions:sl}}function Fin(i,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!i(t))return!1;return!0}function R4(i,e){return typeof i=="boolean"?i:e}function bCe(i,e){return typeof i=="string"?i:e}function Bin(i){const e={};for(const t of i)e[t]=!0;return e}function xCe(i,e=!1){e&&(i=i.map(function(n){return n.toLowerCase()}));const t=Bin(i);return e?function(n){return t[n.toLowerCase()]!==void 0&&t.hasOwnProperty(n.toLowerCase())}:function(n){return t[n]!==void 0&&t.hasOwnProperty(n)}}function Aie(i,e,t){e=e.replace(/@@/g,"");let n=0,s;do s=!1,e=e.replace(/@(\w+)/g,function(o,a){s=!0;let l="";if(typeof i[a]=="string")l=i[a];else if(i[a]&&i[a]instanceof RegExp)l=i[a].source;else throw i[a]===void 0?gs(i,"language definition does not contain attribute '"+a+"', used at: "+e):gs(i,"attribute reference '"+a+"' must be a string, used at: "+e);return Yy(l)?"":"(?:"+l+")"}),n++;while(s&&n<5);e=e.replace(/\x01/g,"@");const r=(i.ignoreCase?"i":"")+(i.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(Oen(i,e,c),r)),l)}return new RegExp(e,r)}function Hin(i,e,t,n){if(n<0)return i;if(n=100){n=n-100;const s=t.split(".");if(s.unshift(t),n=0&&(n.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")n.bracket=1;else if(t.bracket==="@close")n.bracket=-1;else throw gs(i,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw gs(i,"the next state must be a string value in rule: "+e);{let s=t.next;if(!/^(@pop|@push|@popall)$/.test(s)&&(s[0]==="@"&&(s=s.substr(1)),s.indexOf("$")<0&&!jen(i,Dv(i,s,"",[],""))))throw gs(i,"the next state '"+t.next+"' is not defined in rule: "+e);n.next=s}}return typeof t.goBack=="number"&&(n.goBack=t.goBack),typeof t.switchTo=="string"&&(n.switchTo=t.switchTo),typeof t.log=="string"&&(n.log=t.log),typeof t.nextEmbedded=="string"&&(n.nextEmbedded=t.nextEmbedded,i.usesEmbedded=!0),n}}else if(Array.isArray(t)){const n=[];for(let s=0,r=t.length;s0&&n[0]==="^",this.name=this.name+": "+n,this.regex=Aie(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")",!0)}setAction(e,t){this.action=Rie(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function G3e(i,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={languageId:i,includeLF:R4(e.includeLF,!1),noThrow:!1,maxStack:100,start:typeof e.start=="string"?e.start:null,ignoreCase:R4(e.ignoreCase,!1),unicode:R4(e.unicode,!1),tokenPostfix:bCe(e.tokenPostfix,"."+i),defaultToken:bCe(e.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},n=e;n.languageId=i,n.includeLF=t.includeLF,n.ignoreCase=t.ignoreCase,n.unicode=t.unicode,n.noThrow=t.noThrow,n.usesEmbedded=t.usesEmbedded,n.stateNames=e.tokenizer,n.defaultToken=t.defaultToken;function s(o,a,l){for(const c of l){let u=c.include;if(u){if(typeof u!="string")throw gs(t,"an 'include' attribute must be a string at: "+o);if(u[0]==="@"&&(u=u.substr(1)),!e.tokenizer[u])throw gs(t,"include target '"+u+"' is not defined at: "+o);s(o+"."+u,a,e.tokenizer[u])}else{const h=new Vin(o);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(h.setRegex(n,c[0]),c.length>=3)if(typeof c[1]=="string")h.setAction(n,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const g=c[1];g.next=c[2],h.setAction(n,g)}else throw gs(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: "+o);else h.setAction(n,c[1]);else{if(!c.regex)throw gs(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+o);c.name&&typeof c.name=="string"&&(h.name=c.name),c.matchOnlyAtStart&&(h.matchOnlyAtLineStart=R4(c.matchOnlyAtLineStart,!1)),h.setRegex(n,c.regex),h.setAction(n,c.action)}a.push(h)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw gs(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const o in e.tokenizer)if(e.tokenizer.hasOwnProperty(o)){t.start||(t.start=o);const a=e.tokenizer[o];t.tokenizer[o]=new Array,s("tokenizer."+o,t.tokenizer[o],a)}if(t.usesEmbedded=n.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw gs(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 r=[];for(const o of e.brackets){let a=o;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw gs(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")r.push({token:a.token+t.tokenPostfix,open:Pb(t,a.open),close:Pb(t,a.close)});else throw gs(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=r,t.noThrow=!0,t}function zin(i){_L.registerLanguage(i)}function Uin(){let i=[];return i=i.concat(_L.getLanguages()),i}function $in(i){return Ut.get(tr).languageIdCodec.encodeLanguageId(i)}function qin(i,e){return Ut.withServices(()=>{const n=Ut.get(tr).onDidRequestRichLanguageFeatures(s=>{s===i&&(n.dispose(),e())});return n})}function Kin(i,e){return Ut.withServices(()=>{const n=Ut.get(tr).onDidRequestBasicLanguageFeatures(s=>{s===i&&(n.dispose(),e())});return n})}function Gin(i,e){if(!Ut.get(tr).isRegisteredLanguageId(i))throw new Error(`Cannot set configuration for unknown language ${i}`);return Ut.get(As).register(i,e,100)}class Yin{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){if(typeof this._actual.tokenize=="function")return UM.adaptTokenize(this._languageId,this._actual,e,n);throw new Error("Not supported!")}tokenizeEncoded(e,t,n){const s=this._actual.tokenizeEncoded(e,n);return new oW(s.tokens,s.endState)}}class UM{constructor(e,t,n,s){this._languageId=e,this._actual=t,this._languageService=n,this._standaloneThemeService=s}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const n=[];let s=0;for(let r=0,o=e.length;r0&&r[o-1]===g)continue;let f=h.startIndex;c===0?f=0:f{const n=await Promise.resolve(e.create());return n?Qin(n)?Q3e(i,n):new jM(Ut.get(tr),Ut.get(tu),i,G3e(i,n),Ut.get(Zt)):null});return Gs.registerFactory(i,t)}function Jin(i,e){if(!Ut.get(tr).isRegisteredLanguageId(i))throw new Error(`Cannot set tokens provider for unknown language ${i}`);return Y3e(e)?wce(i,{create:()=>e}):Gs.register(i,Q3e(i,e))}function esn(i,e){const t=n=>new jM(Ut.get(tr),Ut.get(tu),i,G3e(i,n),Ut.get(Zt));return Y3e(e)?wce(i,{create:()=>e}):Gs.register(i,t(e))}function tsn(i,e){return Ut.get(lt).referenceProvider.register(i,e)}function nsn(i,e){return Ut.get(lt).renameProvider.register(i,e)}function isn(i,e){return Ut.get(lt).newSymbolNamesProvider.register(i,e)}function ssn(i,e){return Ut.get(lt).signatureHelpProvider.register(i,e)}function rsn(i,e){return Ut.get(lt).hoverProvider.register(i,{provideHover:async(n,s,r,o)=>{const a=n.getWordAtPosition(s);return Promise.resolve(e.provideHover(n,s,r,o)).then(l=>{if(l)return!l.range&&a&&(l.range=new z(s.lineNumber,a.startColumn,s.lineNumber,a.endColumn)),l.range||(l.range=new z(s.lineNumber,s.column,s.lineNumber,s.column)),l})}})}function osn(i,e){return Ut.get(lt).documentSymbolProvider.register(i,e)}function asn(i,e){return Ut.get(lt).documentHighlightProvider.register(i,e)}function lsn(i,e){return Ut.get(lt).linkedEditingRangeProvider.register(i,e)}function csn(i,e){return Ut.get(lt).definitionProvider.register(i,e)}function dsn(i,e){return Ut.get(lt).implementationProvider.register(i,e)}function usn(i,e){return Ut.get(lt).typeDefinitionProvider.register(i,e)}function hsn(i,e){return Ut.get(lt).codeLensProvider.register(i,e)}function gsn(i,e,t){return Ut.get(lt).codeActionProvider.register(i,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,documentation:t==null?void 0:t.documentation,provideCodeActions:(s,r,o,a)=>{const c=Ut.get(Kp).read({resource:s.uri}).filter(u=>z.areIntersectingOrTouching(u,r));return e.provideCodeActions(s,r,{markers:c,only:o.only,trigger:o.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function fsn(i,e){return Ut.get(lt).documentFormattingEditProvider.register(i,e)}function psn(i,e){return Ut.get(lt).documentRangeFormattingEditProvider.register(i,e)}function msn(i,e){return Ut.get(lt).onTypeFormattingEditProvider.register(i,e)}function bsn(i,e){return Ut.get(lt).linkProvider.register(i,e)}function xsn(i,e){return Ut.get(lt).completionProvider.register(i,e)}function vsn(i,e){return Ut.get(lt).colorProvider.register(i,e)}function _sn(i,e){return Ut.get(lt).foldingRangeProvider.register(i,e)}function ysn(i,e){return Ut.get(lt).declarationProvider.register(i,e)}function wsn(i,e){return Ut.get(lt).selectionRangeProvider.register(i,e)}function Csn(i,e){return Ut.get(lt).documentSemanticTokensProvider.register(i,e)}function Ssn(i,e){return Ut.get(lt).documentRangeSemanticTokensProvider.register(i,e)}function ksn(i,e){return Ut.get(lt).inlineCompletionsProvider.register(i,e)}function Nsn(i,e){return Ut.get(lt).inlayHintsProvider.register(i,e)}function Esn(){return{register:zin,getLanguages:Uin,onLanguage:qin,onLanguageEncountered:Kin,getEncodedLanguageId:$in,setLanguageConfiguration:Gin,setColorMap:Zin,registerTokensProviderFactory:wce,setTokensProvider:Jin,setMonarchTokensProvider:esn,registerReferenceProvider:tsn,registerRenameProvider:nsn,registerNewSymbolNameProvider:isn,registerCompletionItemProvider:xsn,registerSignatureHelpProvider:ssn,registerHoverProvider:rsn,registerDocumentSymbolProvider:osn,registerDocumentHighlightProvider:asn,registerLinkedEditingRangeProvider:lsn,registerDefinitionProvider:csn,registerImplementationProvider:dsn,registerTypeDefinitionProvider:usn,registerCodeLensProvider:hsn,registerCodeActionProvider:gsn,registerDocumentFormattingEditProvider:fsn,registerDocumentRangeFormattingEditProvider:psn,registerOnTypeFormattingEditProvider:msn,registerLinkProvider:bsn,registerColorProvider:vsn,registerFoldingRangeProvider:_sn,registerDeclarationProvider:ysn,registerSelectionRangeProvider:wsn,registerDocumentSemanticTokensProvider:Csn,registerDocumentRangeSemanticTokensProvider:Ssn,registerInlineCompletionsProvider:ksn,registerInlayHintsProvider:Nsn,DocumentHighlightKind:Ote,CompletionItemKind:Tte,CompletionItemTag:Ite,CompletionItemInsertTextRule:Dte,SymbolKind:fne,SymbolTag:pne,IndentAction:zte,CompletionTriggerKind:Ate,SignatureHelpTriggerKind:gne,InlayHintKind:$te,InlineCompletionTriggerKind:Gte,CodeActionTriggerType:Lte,NewSymbolNameTag:tne,NewSymbolNameTriggerKind:nne,PartialAcceptTriggerKind:rne,HoverVerbosityAction:Vte,InlineCompletionEndOfLifeReasonKind:qte,InlineCompletionHintStyle:Kte,FoldingRangeKind:lS,SelectedSuggestionInfo:T2e,EditDeltaInfo:HR}}sl.wrappingIndent.defaultValue=0;sl.glyphMargin.defaultValue=!1;sl.autoIndent.defaultValue=3;sl.overviewRulerLanes.defaultValue=2;pM.setFormatterSelector((i,e,t)=>Promise.resolve(i[0]));const ec=C3e();ec.editor=jin();ec.languages=Esn();const X3e=ec.CancellationTokenSource,h0=ec.Emitter,Z3e=ec.KeyCode,J3e=ec.KeyMod,vx=ec.Position,GD=ec.Range,e4e=ec.Selection,t4e=ec.SelectionDirection,Rh=ec.MarkerSeverity,OB=ec.MarkerTag,eV=ec.Uri,n4e=ec.Token,xp=ec.editor,at=ec.languages,WK=Ire(),xE=globalThis;(WK!=null&&WK.globalAPI||typeof xE.define=="function"&&xE.define.amd)&&(xE.monaco=ec);typeof xE.require<"u"&&typeof xE.require.config=="function"&&xE.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 Lsn=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:X3e,Emitter:h0,KeyCode:Z3e,KeyMod:J3e,MarkerSeverity:Rh,MarkerTag:OB,Position:vx,Range:GD,Selection:e4e,SelectionDirection:t4e,Token:n4e,Uri:eV,editor:xp,languages:at},Symbol.toStringTag,{value:"Module"}));let Cce=class{constructor(e,t,n){this._onDidChange=new h0,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}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 Sce={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}},kce={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},i4e=new Cce("css",Sce,kce),s4e=new Cce("scss",Sce,kce),r4e=new Cce("less",Sce,kce);function Nce(){return Dt(()=>import("./cssMode-BPLGavJr.js"),__vite__mapDeps([0,1]))}at.onLanguage("less",()=>{Nce().then(i=>i.setupMode(r4e))});at.onLanguage("scss",()=>{Nce().then(i=>i.setupMode(s4e))});at.onLanguage("css",()=>{Nce().then(i=>i.setupMode(i4e))});const o4e=Object.freeze(Object.defineProperty({__proto__:null,cssDefaults:i4e,lessDefaults:r4e,scssDefaults:s4e},Symbol.toStringTag,{value:"Module"}));let Dsn=class{constructor(e,t,n){this._onDidChange=new h0,this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}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 Tsn={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"},tV={format:Tsn,suggest:{},data:{useDefaultDataProvider:!0}};function nV(i){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:i===g2,documentFormattingEdits:i===g2,documentRangeFormattingEdits:i===g2}}const g2="html",vCe="handlebars",_Ce="razor",a4e=iV(g2,tV,nV(g2)),Isn=a4e.defaults,l4e=iV(vCe,tV,nV(vCe)),Asn=l4e.defaults,c4e=iV(_Ce,tV,nV(_Ce)),Rsn=c4e.defaults;function Msn(){return Dt(()=>import("./htmlMode-k3Yo1QBE.js"),__vite__mapDeps([2,1]))}function iV(i,e=tV,t=nV(i)){const n=new Dsn(i,e,t);let s;const r=at.onLanguage(i,async()=>{s=(await Msn()).setupMode(n)});return{defaults:n,dispose(){r.dispose(),s==null||s.dispose(),s=void 0}}}const d4e=Object.freeze(Object.defineProperty({__proto__:null,handlebarDefaults:Asn,handlebarLanguageService:l4e,htmlDefaults:Isn,htmlLanguageService:a4e,razorDefaults:Rsn,razorLanguageService:c4e,registerHTMLLanguageService:iV},Symbol.toStringTag,{value:"Module"}));let Psn=class{constructor(e,t,n){this._onDidChange=new h0,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}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 Osn={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},jsn={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},u4e=new Psn("json",Osn,jsn),Fsn=()=>h4e().then(i=>i.getWorker());function h4e(){return Dt(()=>import("./jsonMode-rox_nk1D.js"),__vite__mapDeps([3,1]))}at.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});at.onLanguage("json",()=>{h4e().then(i=>i.setupMode(u4e))});const g4e=Object.freeze(Object.defineProperty({__proto__:null,getWorker:Fsn,jsonDefaults:u4e},Symbol.toStringTag,{value:"Module"})),Bsn="5.9.3";var f4e=(i=>(i[i.None=0]="None",i[i.CommonJS=1]="CommonJS",i[i.AMD=2]="AMD",i[i.UMD=3]="UMD",i[i.System=4]="System",i[i.ES2015=5]="ES2015",i[i.ESNext=99]="ESNext",i))(f4e||{}),p4e=(i=>(i[i.None=0]="None",i[i.Preserve=1]="Preserve",i[i.React=2]="React",i[i.ReactNative=3]="ReactNative",i[i.ReactJSX=4]="ReactJSX",i[i.ReactJSXDev=5]="ReactJSXDev",i))(p4e||{}),m4e=(i=>(i[i.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",i[i.LineFeed=1]="LineFeed",i))(m4e||{}),b4e=(i=>(i[i.ES3=0]="ES3",i[i.ES5=1]="ES5",i[i.ES2015=2]="ES2015",i[i.ES2016=3]="ES2016",i[i.ES2017=4]="ES2017",i[i.ES2018=5]="ES2018",i[i.ES2019=6]="ES2019",i[i.ES2020=7]="ES2020",i[i.ESNext=99]="ESNext",i[i.JSON=100]="JSON",i[i.Latest=99]="Latest",i))(b4e||{}),x4e=(i=>(i[i.Classic=1]="Classic",i[i.NodeJs=2]="NodeJs",i))(x4e||{});class v4e{constructor(e,t,n,s,r){this._onDidChange=new h0,this._onDidExtraLibsChange=new h0,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(n),this.setInlayHintsOptions(s),this.setModeConfiguration(r),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 n;if(typeof t>"u"?n=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:n=t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:()=>{}};let s=1;return this._removedExtraLibs[n]&&(s=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(s=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:s},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let r=this._extraLibs[n];r&&r.version===s&&(delete this._extraLibs[n],this._removedExtraLibs[n]=s,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 n=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,s=t.content;let r=1;this._removedExtraLibs[n]&&(r=this._removedExtraLibs[n]+1),this._extraLibs[n]={content:s,version:r}}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 Hsn=Bsn,_4e={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},y4e=new v4e({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},_4e),w4e=new v4e({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},_4e),Wsn=()=>sV().then(i=>i.getTypeScriptWorker()),Vsn=()=>sV().then(i=>i.getJavaScriptWorker());function sV(){return Dt(()=>import("./tsMode-h_8MXSOk.js"),[])}at.onLanguage("typescript",()=>sV().then(i=>i.setupTypeScript(y4e)));at.onLanguage("javascript",()=>sV().then(i=>i.setupJavaScript(w4e)));const C4e=Object.freeze(Object.defineProperty({__proto__:null,JsxEmit:p4e,ModuleKind:f4e,ModuleResolutionKind:x4e,NewLineKind:m4e,ScriptTarget:b4e,getJavaScriptWorker:Vsn,getTypeScriptWorker:Wsn,javascriptDefaults:w4e,typescriptDefaults:y4e,typescriptVersion:Hsn},Symbol.toStringTag,{value:"Module"})),S4e={},VK={};class Ece{static getOrCreate(e){return VK[e]||(VK[e]=new Ece(e)),VK[e]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((t,n)=>{this._lazyLoadPromiseResolve=t,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,S4e[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}}function Rt(i){const e=i.id;S4e[e]=i,at.register(i);const t=Ece.getOrCreate(e);at.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),at.onLanguageEncountered(e,async()=>{const n=await t.load();at.setLanguageConfiguration(e,n.conf)})}Rt({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Dt(()=>import("./abap-DLDM7-KI.js"),[])});Rt({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Dt(()=>import("./apex-DNDY2TF8.js"),[])});Rt({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Dt(()=>import("./azcli-Y6nb8tq_.js"),[])});Rt({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Dt(()=>import("./bat-BwHxbl9M.js"),[])});Rt({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Dt(()=>import("./bicep-CFznDFnq.js"),[])});Rt({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Dt(()=>import("./cameligo-Bf6VGUru.js"),[])});Rt({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Dt(()=>import("./clojure-Dnu-v4kV.js"),[])});Rt({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Dt(()=>import("./coffee-Bd8akH9Z.js"),[])});Rt({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Dt(()=>import("./cpp-BbWJElDN.js"),[])});Rt({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Dt(()=>import("./cpp-BbWJElDN.js"),[])});Rt({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Dt(()=>import("./csharp-Co3qMtFm.js"),[])});Rt({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>Dt(()=>import("./csp-D-4FJmMZ.js"),[])});Rt({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Dt(()=>import("./css-DdJfP1eB.js"),[])});Rt({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Dt(()=>import("./cypher-cTPe9QuQ.js"),[])});Rt({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Dt(()=>import("./dart-BOtBlQCF.js"),[])});Rt({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Dt(()=>import("./dockerfile-BG73LgW2.js"),[])});Rt({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Dt(()=>import("./ecl-BEgZUVRK.js"),[])});Rt({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Dt(()=>import("./elixir-BkW5O-1t.js"),[])});Rt({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Dt(()=>import("./flow9-BeJ5waoc.js"),[])});Rt({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Dt(()=>import("./fsharp-PahG7c26.js"),[])});Rt({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Dt(()=>import("./freemarker2-BIs4Hajg.js"),[]).then(i=>i.TagAutoInterpolationDollar)});Rt({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Dt(()=>import("./freemarker2-BIs4Hajg.js"),[]).then(i=>i.TagAngleInterpolationDollar)});Rt({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Dt(()=>import("./freemarker2-BIs4Hajg.js"),[]).then(i=>i.TagBracketInterpolationDollar)});Rt({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Dt(()=>import("./freemarker2-BIs4Hajg.js"),[]).then(i=>i.TagAngleInterpolationBracket)});Rt({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Dt(()=>import("./freemarker2-BIs4Hajg.js"),[]).then(i=>i.TagBracketInterpolationBracket)});Rt({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Dt(()=>import("./freemarker2-BIs4Hajg.js"),[]).then(i=>i.TagAutoInterpolationDollar)});Rt({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Dt(()=>import("./freemarker2-BIs4Hajg.js"),[]).then(i=>i.TagAutoInterpolationBracket)});Rt({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Dt(()=>import("./go-acbASCJo.js"),[])});Rt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Dt(()=>import("./graphql-BxJiqAUM.js"),[])});Rt({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Dt(()=>import("./handlebars-CWaySR_i.js"),[])});Rt({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Dt(()=>import("./hcl-DtV1sZF8.js"),[])});Rt({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:()=>Dt(()=>import("./html-B_vQbAk9.js"),[])});Rt({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Dt(()=>import("./ini-Kd9XrMLS.js"),[])});Rt({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Dt(()=>import("./java-CXBNlu9o.js"),[])});Rt({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Dt(()=>import("./javascript-D1_HFFyG.js"),__vite__mapDeps([4,5]))});Rt({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Dt(()=>import("./julia-cl7-CwDS.js"),[])});Rt({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Dt(()=>import("./kotlin-s7OhZKlX.js"),[])});Rt({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Dt(()=>import("./less-9HpZscsL.js"),[])});Rt({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Dt(()=>import("./lexon-OrD6JF1K.js"),[])});Rt({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Dt(()=>import("./lua-Cyyb5UIc.js"),[])});Rt({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Dt(()=>import("./liquid-C_DzB6CA.js"),[])});Rt({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Dt(()=>import("./m3-B8OfTtLu.js"),[])});Rt({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Dt(()=>import("./markdown-BFxVWTOG.js"),[])});Rt({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Dt(()=>import("./mdx-8p8awGLG.js"),[])});Rt({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Dt(()=>import("./mips-CiqrrVzr.js"),[])});Rt({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Dt(()=>import("./msdax-DmeGPVcC.js"),[])});Rt({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Dt(()=>import("./mysql-C_tMU-Nz.js"),[])});Rt({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Dt(()=>import("./objective-c-BDtDVThU.js"),[])});Rt({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Dt(()=>import("./pascal-vHIfCaH5.js"),[])});Rt({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Dt(()=>import("./pascaligo-DtZ0uQbO.js"),[])});Rt({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Dt(()=>import("./perl-Ub6l9XKa.js"),[])});Rt({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Dt(()=>import("./pgsql-BlNEE0v7.js"),[])});Rt({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Dt(()=>import("./php-BBUBE1dy.js"),[])});Rt({id:"pla",extensions:[".pla"],loader:()=>Dt(()=>import("./pla-DSh2-awV.js"),[])});Rt({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Dt(()=>import("./postiats-CocnycG-.js"),[])});Rt({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Dt(()=>import("./powerquery-tScXyioY.js"),[])});Rt({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Dt(()=>import("./powershell-COWaemsV.js"),[])});Rt({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Dt(()=>import("./protobuf-Brw8urJB.js"),[])});Rt({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Dt(()=>import("./pug-8SOpv6rk.js"),[])});Rt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Dt(()=>import("./python-A86fUAQ6.js"),[])});Rt({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Dt(()=>import("./qsharp-Bw9ernYp.js"),[])});Rt({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Dt(()=>import("./r-j7ic8hl3.js"),[])});Rt({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Dt(()=>import("./razor-DcsVbuVT.js"),[])});Rt({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Dt(()=>import("./redis-Bu5POkcn.js"),[])});Rt({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Dt(()=>import("./redshift-Bs9aos_-.js"),[])});Rt({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Dt(()=>import("./restructuredtext-CqXO7rUv.js"),[])});Rt({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Dt(()=>import("./ruby-zBfavPgS.js"),[])});Rt({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Dt(()=>import("./rust-BzKRNQWT.js"),[])});Rt({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Dt(()=>import("./sb-BBc9UKZt.js"),[])});Rt({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:()=>Dt(()=>import("./scala-D9hQfWCl.js"),[])});Rt({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Dt(()=>import("./scheme-BPhDTwHR.js"),[])});Rt({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Dt(()=>import("./scss-CBJaRo0y.js"),[])});Rt({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Dt(()=>import("./shell-DiJ1NA_G.js"),[])});Rt({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Dt(()=>import("./solidity-Db0IVjzk.js"),[])});Rt({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Dt(()=>import("./sophia-CnS9iZB_.js"),[])});Rt({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Dt(()=>import("./sparql-CJmd_6j2.js"),[])});Rt({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Dt(()=>import("./sql-ClhHkBeG.js"),[])});Rt({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Dt(()=>import("./st-CHwy0fLd.js"),[])});Rt({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Dt(()=>import("./swift-Bqt4WxQ4.js"),[])});Rt({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Dt(()=>import("./systemverilog-Bs9z6M-B.js"),[])});Rt({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Dt(()=>import("./systemverilog-Bs9z6M-B.js"),[])});Rt({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Dt(()=>import("./tcl-Dm6ycUr_.js"),[])});Rt({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Dt(()=>import("./twig-Csy3S7wG.js"),[])});Rt({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Dt(()=>import("./typescript-DvHGjc3l.js"),[])});Rt({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>Dt(()=>import("./typespec-Btyra-wh.js"),[])});Rt({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Dt(()=>import("./vb-Db0cS2oM.js"),[])});Rt({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Dt(()=>import("./wgsl-BTesnYfV.js"),[])});Rt({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Dt(()=>import("./xml-Kir_yWKe.js"),[])});Rt({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Dt(()=>import("./yaml-BQQwmPJ-.js"),[])});var zsn=Object.defineProperty,Usn=(i,e,t)=>e in i?zsn(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Lt=(i,e,t)=>Usn(i,typeof e!="symbol"?e+"":e,t),M4,yCe,P4,zK,O4;function $sn(i){return i.method!==void 0}var wCe;(function(i){function e(t){return t}i.create=e})(wCe||(wCe={}));var Dh;(function(i){i.parseError=-32700,i.invalidRequest=-32600,i.methodNotFound=-32601,i.invalidParams=-32602,i.internalError=-32603;function e(r){return-32099<=r&&r<=-32e3}i.isServerError=e;function t(r){if(!e(r))throw new Error("Invalid range for a server error.");return r}i.serverError=t,i.unexpectedServerError=-32e3;function n(r){return!0}i.isApplicationError=n;function s(r){return r}i.applicationError=s,i.genericApplicationError=-320100})(Dh||(Dh={}));var Lce=class{constructor(){Lt(this,"listeners",new Set),Lt(this,"event",i=>(this.listeners.add(i),{dispose:()=>{this.listeners.delete(i)}}))}fire(i){this.listeners.forEach(e=>e(i))}},qsn=class{constructor(i){Lt(this,"_value"),Lt(this,"eventEmitter"),this._value=i,this.eventEmitter=new Lce}get value(){return this._value}set value(i){this._value!==i&&(this._value=i,this.eventEmitter.fire(i))}get onChange(){return this.eventEmitter.event}};function Ksn(i,e){const t=setTimeout(e,i);return{dispose:()=>clearTimeout(t)}}function UK(i,e,t){return i instanceof Set?(i.add(e),{dispose:()=>i.delete(e)}):(i.set(e,t),{dispose:()=>i.delete(e)})}var Gsn=class{constructor(){Lt(this,"_state","none"),Lt(this,"promise"),Lt(this,"resolve",()=>{}),Lt(this,"reject",()=>{}),this.promise=new Promise((i,e)=>{this.resolve=i,this.reject=e})}get state(){return this._state}},k4e=(M4=class{constructor(){Lt(this,"_unprocessedMessages",[]),Lt(this,"_messageListener"),Lt(this,"id",M4.id++),Lt(this,"_state",new qsn({state:"open"})),Lt(this,"state",this._state)}setListener(i){if(this._messageListener=i,!!i)for(;this._unprocessedMessages.length>0&&this._messageListener!==void 0;){const e=this._unprocessedMessages.shift();this._messageListener(e)}}send(i){return this._sendImpl(i)}_dispatchReceivedMessage(i){this._unprocessedMessages.length===0&&this._messageListener?this._messageListener(i):this._unprocessedMessages.push(i)}_onConnectionClosed(){this._state.value={state:"closed",error:void 0}}log(i){return new Ysn(this,i??new Qsn)}},Lt(M4,"id",0),M4),Ysn=class{constructor(i,e){Lt(this,"baseStream"),Lt(this,"logger"),this.baseStream=i,this.logger=e}get state(){return this.baseStream.state}setListener(i){if(i===void 0){this.baseStream.setListener(void 0);return}this.baseStream.setListener(e=>{this.logger.log(this.baseStream,"incoming",e),i(e)})}send(i){return this.logger.log(this.baseStream,"outgoing",i),this.baseStream.send(i)}toString(){return`StreamLogger/${this.baseStream.toString()}`}},Qsn=class{log(i,e,t){console.log(`${e==="incoming"?"<-":"->"} [${i.toString()}] ${JSON.stringify(t)}`)}},Xsn=class N4e{constructor(e){Lt(this,"connect"),this.connect=e}mapContext(e){return new N4e(t=>this.connect(t?Zsn(t,e):void 0))}};function Zsn(i,e){return{handleNotification:(t,n)=>i.handleNotification(t,e(n)),handleRequest:(t,n,s)=>i.handleRequest(t,n,e(s))}}var Jsn=class E4e{constructor(e,t,n){Lt(this,"_stream"),Lt(this,"_listener"),Lt(this,"_logger"),Lt(this,"_unprocessedResponses",new Map),Lt(this,"_lastUsedRequestId",0),this._stream=e,this._listener=t,this._logger=n,this._stream.setListener(s=>{$sn(s)?s.id===void 0?this._processNotification(s):this._processRequest(s):this._processResponse(s)})}static createChannel(e,t){let n=!1;return new Xsn(s=>{if(n)throw new Error(`A channel to the stream ${e} was already constructed!`);return n=!0,new E4e(e,s,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(s){this._logger&&this._logger.warn({text:`Exception was thrown while handling request: ${s}`,message:e,exception:s}),t={error:{code:Dh.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:Dh.methodNotFound,message:"This endpoint does not listen for requests or notifications.",data:void 0}};let n;"result"in t?n={jsonrpc:"2.0",id:e.id,result:t.result}:n={jsonrpc:"2.0",id:e.id,error:t.error},await this._stream.send(n)}_processResponse(e){const t=""+e.id,n=this._unprocessedResponses.get(t);if(!n){this._logger&&this._logger.debug({text:"Got an unexpected response message",message:e});return}this._unprocessedResponses.delete(t),n(e)}_newRequestId(){return this._lastUsedRequestId++}sendRequest(e,t,n){const s={jsonrpc:"2.0",id:this._newRequestId(),method:e.method,params:e.params||void 0};return n&&n(s.id),new Promise((r,o)=>{const a=""+s.id;this._unprocessedResponses.set(a,l=>{"result"in l?r({result:l.result}):(l.error||o(new Error("Response had neither 'result' nor 'error' field set.")),r({error:l.error}))}),this._stream.send(s).then(void 0,l=>{this._unprocessedResponses.delete(a),o(l)})})}sendNotification(e,t){const n={jsonrpc:"2.0",id:void 0,method:e.method,params:e.params||void 0};return this._stream.send(n)}toString(){return"StreamChannel/"+this._stream.toString()}},vE;(function(i){function e(){return{deserializeFromJson:s=>({hasErrors:!1,value:s}),serializeToJson:s=>s}}i.sAny=e;function t(){return{deserializeFromJson:s=>({hasErrors:!1,value:{}}),serializeToJson:s=>({})}}i.sEmptyObject=t;function n(){return{deserializeFromJson:s=>({hasErrors:!1,value:void 0}),serializeToJson:s=>null}}i.sVoidFromNull=n})(vE||(vE={}));const L4e=Symbol("OptionalMethodNotFound");var D4e=class{contextualize(i){return new ern(this,i)}},ern=class extends D4e{constructor(i,e){super(),Lt(this,"underylingTypedChannel"),Lt(this,"converters"),this.underylingTypedChannel=i,this.converters=e}async request(i,e,t){const n=await this.converters.getSendContext(t);return this.underylingTypedChannel.request(i,e,n)}async notify(i,e,t){const n=await this.converters.getSendContext(t);return this.underylingTypedChannel.notify(i,e,n)}registerNotificationHandler(i,e){return this.underylingTypedChannel.registerNotificationHandler(i,async(t,n)=>await e(t,await this.converters.getNewContext(n)))}registerRequestHandler(i,e){return this.underylingTypedChannel.registerRequestHandler(i,async(t,n,s)=>await e(t,n,await this.converters.getNewContext(s)))}},Mie=class T4e extends D4e{constructor(e,t={}){super(),Lt(this,"channelCtor"),Lt(this,"_requestSender"),Lt(this,"_handler",new Map),Lt(this,"_unknownNotificationHandler",new Set),Lt(this,"_timeout"),Lt(this,"sendExceptionDetails",!1),Lt(this,"_logger"),Lt(this,"listeningDeferred",new Gsn),Lt(this,"onListening",this.listeningDeferred.promise),Lt(this,"_requestDidErrorEventEmitter",new Lce),Lt(this,"onRequestDidError",this._requestDidErrorEventEmitter.event),this.channelCtor=e,this._logger=t.logger,this.sendExceptionDetails=!!t.sendExceptionDetails,this._timeout=Ksn(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 T4e(Jsn.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,n)=>this.handleRequest(e,t,n),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,n){const s=this._handler.get(e.method);if(!s)return this._logger&&this._logger.debug({text:`No request handler for "${e.method}".`,data:{requestObject:e}}),{error:{code:Dh.methodNotFound,message:`No request handler for "${e.method}".`,data:{method:e.method}}};if(s.kind!="request"){const o=`"${e.method}" is registered as notification, but was sent as request.`;return this._logger&&this._logger.debug({text:o,data:{requestObject:e}}),{error:{code:Dh.invalidRequest,message:o,data:{method:e.method}}}}const r=s.requestType.paramsSerializer.deserializeFromJson(e.params);if(r.hasErrors){const o=`Got invalid params: ${r.errorMessage}`;return this._logger&&this._logger.debug({text:o,data:{requestObject:e,errorMessage:r.errorMessage}}),{error:{code:Dh.invalidParams,message:o,data:{errors:r.errorMessage}}}}else{const o=r.value;let a;try{const l=await s.handler(o,t,n);if("error"in l||"errorMessage"in l){const c=l.error?s.requestType.errorSerializer.serializeToJson(l.error):void 0;a={error:{code:l.errorCode||Dh.genericApplicationError,message:l.errorMessage||"An error was returned",data:c}}}else a={result:s.requestType.resultSerializer.serializeToJson(l.ok)}}catch(l){l instanceof SCe?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:Dh.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 n=this._handler.get(e.method);if(!n){for(const o of this._unknownNotificationHandler)o(e);this._unknownNotificationHandler.size===0&&this._logger&&this._logger.debug({text:`Unhandled notification "${e.method}"`,data:{requestObject:e}});return}if(n.kind!="notification"){this._logger&&this._logger.debug({text:`"${e.method}" is registered as request, but was sent as notification.`,data:{requestObject:e}});return}const s=n.notificationType.paramsSerializer.deserializeFromJson(e.params);if(s.hasErrors){this._logger&&this._logger.debug({text:`Got invalid params: ${s}`,data:{requestObject:e,errorMessage:s.errorMessage}});return}const r=s.value;for(const o of n.handlers)try{o(r,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 UK(this._unknownNotificationHandler,e)}registerRequestHandler(e,t){if(this._handler.get(e.method))throw new Error(`Handler with method "${e.method}" already registered.`);return UK(this._handler,e.method,{kind:"request",requestType:e,handler:t})}registerNotificationHandler(e,t){let n=this._handler.get(e.method);if(!n)n={kind:"notification",notificationType:e,handlers:new Set},this._handler.set(e.method,n);else{if(n.kind!=="notification")throw new Error(`Method "${e.method}" was already registered as request handler.`);if(n.notificationType!==e)throw new Error(`Method "${e.method}" was registered for a different type.`)}return UK(n.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,n){if(!this.checkChannel(this._requestSender))throw new Error("Impossible");const s=e.paramsSerializer.serializeToJson(t);CCe(s);const r=await this._requestSender.sendRequest({method:e.method,params:s},n);if("error"in r){if(e.isOptional&&r.error.code===Dh.methodNotFound)return L4e;let o;if(r.error.data!==void 0){const l=e.errorSerializer.deserializeFromJson(r.error.data);if(l.hasErrors)throw new Error(l.errorMessage);o=l.value}else o=void 0;const a=new SCe(r.error.message,o,r.error.code);throw this._requestDidErrorEventEmitter.fire({error:a}),a}else{const o=e.resultSerializer.deserializeFromJson(r.result);if(o.hasErrors)throw new Error("Could not deserialize response: "+o.errorMessage+` + +${JSON.stringify(r,null,2)}`);return o.value}}async notify(e,t,n){if(!this.checkChannel(this._requestSender))throw new Error;const s=e.paramsSerializer.serializeToJson(t);CCe(s),this._requestSender.sendNotification({method:e.method,params:s},n)}};function CCe(i){if(i!==null&&Array.isArray(i)&&typeof i!="object")throw new Error("Invalid value! Only null, array and object is allowed.")}var SCe=class I4e extends Error{constructor(e,t,n=Dh.genericApplicationError){super(e),Lt(this,"data"),Lt(this,"code"),this.data=t,this.code=n,Object.setPrototypeOf(this,I4e.prototype)}},trn=class Pie{constructor(e,t,n,s,r=!1){Lt(this,"method"),Lt(this,"paramsSerializer"),Lt(this,"resultSerializer"),Lt(this,"errorSerializer"),Lt(this,"isOptional"),Lt(this,"kind","request"),this.method=e,this.paramsSerializer=t,this.resultSerializer=n,this.errorSerializer=s,this.isOptional=r}withMethod(e){return new Pie(e,this.paramsSerializer,this.resultSerializer,this.errorSerializer)}optional(){return new Pie(this.method,this.paramsSerializer,this.resultSerializer,this.errorSerializer,!0)}},nrn=class A4e{constructor(e,t){Lt(this,"method"),Lt(this,"paramsSerializer"),Lt(this,"kind","notification"),this.method=e,this.paramsSerializer=t}withMethod(e){return new A4e(e,this.paramsSerializer)}};function tn(i){return new trn((i||{}).method,vE.sAny(),vE.sAny(),vE.sAny())}function xr(i){return new nrn((i||{}).method,vE.sAny())}const irn=Symbol();var kCe=(yCe=irn,P4=class{constructor(i){Lt(this,"error"),Lt(this,yCe),this.error=i}},Lt(P4,"factory",i=>new P4(i)),P4);function srn(i){const e=NCe(i.server),t=NCe(i.client);return new rrn(i.tags||[],e,t)}function NCe(i){const e={};for(const[t,n]of Object.entries(i)){const s=n.method?n.method:t;e[t]=n.withMethod(s)}return e}var rrn=class R4e{constructor(e=[],t,n){Lt(this,"tags"),Lt(this,"server"),Lt(this,"client"),this.tags=e,this.server=t,this.client=n}_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,n,s){const r=this.buildCounterpart(e,n),o=this.registerHandlers(e,t,s,r);return{counterpart:r,dispose:()=>o.dispose()}}buildCounterpart(e,t){const n={};for(const[s,r]of Object.entries(t)){let o;r.kind==="request"?r.isOptional?o=async(a,l)=>{a===void 0&&(a={});try{return await e.request(r,a,l)}catch(c){if(c&&c.code===Dh.methodNotFound)return L4e;throw c}}:o=(a,l)=>(a===void 0&&(a={}),e.request(r,a,l)):o=(a,l)=>(a===void 0&&(a={}),e.notify(r,a,l)),n[s]=o}return n}registerHandlers(e,t,n,s){const r=[];for(const[o,a]of Object.entries(t))if(a.kind==="request"){let l=n[o];if(!l)continue;const c=this.createRequestHandler(s,l);r.push(e.registerRequestHandler(a,c))}else{const l=n[o];l&&r.push(e.registerNotificationHandler(a,(c,u)=>{l(c,{context:u,counterpart:s})}))}return{dispose:()=>r.forEach(o=>o.dispose())}}createRequestHandler(e,t){return async(n,s,r)=>{const o=await t(n,{context:r,counterpart:e,newErr:kCe.factory,requestId:s});return o instanceof kCe?o.error:{ok:o}}}static getServerFromStream(e,t,n,s){const r=Mie.fromTransport(t,n),{server:o}=e.getServer(r,s);return r.startListen(),{channel:r,server:o}}static registerServerToStream(e,t,n,s){const r=Mie.fromTransport(t,n),{client:o}=e.registerServer(r,s);return r.startListen(),{channel:r,client:o}}getServer(e,t){const{counterpart:n,dispose:s}=this.getInterface(e,this.client,this.server,t);return{server:n,dispose:s}}registerServer(e,t){const{counterpart:n,dispose:s}=this.getInterface(e,this.server,this.client,t);return{client:n,dispose:s}}withContext(){return new R4e(this.tags,this.server,this.client)}};let _E=(function(i){return i.Comment="comment",i.Imports="imports",i.Region="region",i})({}),jr=(function(i){return i[i.File=1]="File",i[i.Module=2]="Module",i[i.Namespace=3]="Namespace",i[i.Package=4]="Package",i[i.Class=5]="Class",i[i.Method=6]="Method",i[i.Property=7]="Property",i[i.Field=8]="Field",i[i.Constructor=9]="Constructor",i[i.Enum=10]="Enum",i[i.Interface=11]="Interface",i[i.Function=12]="Function",i[i.Variable=13]="Variable",i[i.Constant=14]="Constant",i[i.String=15]="String",i[i.Number=16]="Number",i[i.Boolean=17]="Boolean",i[i.Array=18]="Array",i[i.Object=19]="Object",i[i.Key=20]="Key",i[i.Null=21]="Null",i[i.EnumMember=22]="EnumMember",i[i.Struct=23]="Struct",i[i.Event=24]="Event",i[i.Operator=25]="Operator",i[i.TypeParameter=26]="TypeParameter",i})({}),M4e=(function(i){return i[i.Deprecated=1]="Deprecated",i})({}),ECe=(function(i){return i[i.Type=1]="Type",i[i.Parameter=2]="Parameter",i})({}),orn=(function(i){return i[i.None=0]="None",i[i.Full=1]="Full",i[i.Incremental=2]="Incremental",i})({}),qr=(function(i){return i[i.Text=1]="Text",i[i.Method=2]="Method",i[i.Function=3]="Function",i[i.Constructor=4]="Constructor",i[i.Field=5]="Field",i[i.Variable=6]="Variable",i[i.Class=7]="Class",i[i.Interface=8]="Interface",i[i.Module=9]="Module",i[i.Property=10]="Property",i[i.Unit=11]="Unit",i[i.Value=12]="Value",i[i.Enum=13]="Enum",i[i.Keyword=14]="Keyword",i[i.Snippet=15]="Snippet",i[i.Color=16]="Color",i[i.File=17]="File",i[i.Reference=18]="Reference",i[i.Folder=19]="Folder",i[i.EnumMember=20]="EnumMember",i[i.Constant=21]="Constant",i[i.Struct=22]="Struct",i[i.Event=23]="Event",i[i.Operator=24]="Operator",i[i.TypeParameter=25]="TypeParameter",i})({}),arn=(function(i){return i[i.Deprecated=1]="Deprecated",i})({}),lrn=(function(i){return i[i.PlainText=1]="PlainText",i[i.Snippet=2]="Snippet",i})({}),$K=(function(i){return i[i.Text=1]="Text",i[i.Read=2]="Read",i[i.Write=3]="Write",i})({}),km=(function(i){return i.Empty="",i.QuickFix="quickfix",i.Refactor="refactor",i.RefactorExtract="refactor.extract",i.RefactorInline="refactor.inline",i.RefactorRewrite="refactor.rewrite",i.Source="source",i.SourceOrganizeImports="source.organizeImports",i.SourceFixAll="source.fixAll",i})({}),jB=(function(i){return i.PlainText="plaintext",i.Markdown="markdown",i})({}),mb=(function(i){return i[i.Error=1]="Error",i[i.Warning=2]="Warning",i[i.Information=3]="Information",i[i.Hint=4]="Hint",i})({}),LCe=(function(i){return i[i.Unnecessary=1]="Unnecessary",i[i.Deprecated=2]="Deprecated",i})({}),Pj=(function(i){return i[i.Invoked=1]="Invoked",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.TriggerForIncompleteCompletions=3]="TriggerForIncompleteCompletions",i})({}),Oj=(function(i){return i[i.Invoked=1]="Invoked",i[i.TriggerCharacter=2]="TriggerCharacter",i[i.ContentChange=3]="ContentChange",i})({}),Oie=(function(i){return i[i.Invoked=1]="Invoked",i[i.Automatic=2]="Automatic",i})({}),crn=(function(i){return i.Relative="relative",i})({});var Un=class{constructor(i){this.method=i}};const kn={textDocumentImplementation:new Un("textDocument/implementation"),textDocumentTypeDefinition:new Un("textDocument/typeDefinition"),textDocumentDocumentColor:new Un("textDocument/documentColor"),textDocumentColorPresentation:new Un("textDocument/colorPresentation"),textDocumentFoldingRange:new Un("textDocument/foldingRange"),textDocumentDeclaration:new Un("textDocument/declaration"),textDocumentSelectionRange:new Un("textDocument/selectionRange"),textDocumentPrepareCallHierarchy:new Un("textDocument/prepareCallHierarchy"),textDocumentSemanticTokensFull:new Un("textDocument/semanticTokens/full"),textDocumentSemanticTokensFullDelta:new Un("textDocument/semanticTokens/full/delta"),textDocumentLinkedEditingRange:new Un("textDocument/linkedEditingRange"),workspaceWillCreateFiles:new Un("workspace/willCreateFiles"),workspaceWillRenameFiles:new Un("workspace/willRenameFiles"),workspaceWillDeleteFiles:new Un("workspace/willDeleteFiles"),textDocumentMoniker:new Un("textDocument/moniker"),textDocumentPrepareTypeHierarchy:new Un("textDocument/prepareTypeHierarchy"),textDocumentInlineValue:new Un("textDocument/inlineValue"),textDocumentInlayHint:new Un("textDocument/inlayHint"),textDocumentDiagnostic:new Un("textDocument/diagnostic"),textDocumentInlineCompletion:new Un("textDocument/inlineCompletion"),textDocumentWillSaveWaitUntil:new Un("textDocument/willSaveWaitUntil"),textDocumentCompletion:new Un("textDocument/completion"),textDocumentHover:new Un("textDocument/hover"),textDocumentSignatureHelp:new Un("textDocument/signatureHelp"),textDocumentDefinition:new Un("textDocument/definition"),textDocumentReferences:new Un("textDocument/references"),textDocumentDocumentHighlight:new Un("textDocument/documentHighlight"),textDocumentDocumentSymbol:new Un("textDocument/documentSymbol"),textDocumentCodeAction:new Un("textDocument/codeAction"),workspaceSymbol:new Un("workspace/symbol"),textDocumentCodeLens:new Un("textDocument/codeLens"),textDocumentDocumentLink:new Un("textDocument/documentLink"),textDocumentFormatting:new Un("textDocument/formatting"),textDocumentRangeFormatting:new Un("textDocument/rangeFormatting"),textDocumentRangesFormatting:new Un("textDocument/rangesFormatting"),textDocumentOnTypeFormatting:new Un("textDocument/onTypeFormatting"),textDocumentRename:new Un("textDocument/rename"),workspaceExecuteCommand:new Un("workspace/executeCommand"),workspaceDidCreateFiles:new Un("workspace/didCreateFiles"),workspaceDidRenameFiles:new Un("workspace/didRenameFiles"),workspaceDidDeleteFiles:new Un("workspace/didDeleteFiles"),workspaceDidChangeConfiguration:new Un("workspace/didChangeConfiguration"),textDocumentDidOpen:new Un("textDocument/didOpen"),textDocumentDidChange:new Un("textDocument/didChange"),textDocumentDidClose:new Un("textDocument/didClose"),textDocumentDidSave:new Un("textDocument/didSave"),textDocumentWillSave:new Un("textDocument/willSave"),workspaceDidChangeWatchedFiles:new Un("workspace/didChangeWatchedFiles")},$M=srn({server:{textDocumentImplementation:tn({method:"textDocument/implementation"}),textDocumentTypeDefinition:tn({method:"textDocument/typeDefinition"}),textDocumentDocumentColor:tn({method:"textDocument/documentColor"}),textDocumentColorPresentation:tn({method:"textDocument/colorPresentation"}),textDocumentFoldingRange:tn({method:"textDocument/foldingRange"}),textDocumentDeclaration:tn({method:"textDocument/declaration"}),textDocumentSelectionRange:tn({method:"textDocument/selectionRange"}),textDocumentPrepareCallHierarchy:tn({method:"textDocument/prepareCallHierarchy"}),callHierarchyIncomingCalls:tn({method:"callHierarchy/incomingCalls"}),callHierarchyOutgoingCalls:tn({method:"callHierarchy/outgoingCalls"}),textDocumentSemanticTokensFull:tn({method:"textDocument/semanticTokens/full"}),textDocumentSemanticTokensFullDelta:tn({method:"textDocument/semanticTokens/full/delta"}),textDocumentSemanticTokensRange:tn({method:"textDocument/semanticTokens/range"}),textDocumentLinkedEditingRange:tn({method:"textDocument/linkedEditingRange"}),workspaceWillCreateFiles:tn({method:"workspace/willCreateFiles"}),workspaceWillRenameFiles:tn({method:"workspace/willRenameFiles"}),workspaceWillDeleteFiles:tn({method:"workspace/willDeleteFiles"}),textDocumentMoniker:tn({method:"textDocument/moniker"}),textDocumentPrepareTypeHierarchy:tn({method:"textDocument/prepareTypeHierarchy"}),typeHierarchySupertypes:tn({method:"typeHierarchy/supertypes"}),typeHierarchySubtypes:tn({method:"typeHierarchy/subtypes"}),textDocumentInlineValue:tn({method:"textDocument/inlineValue"}),textDocumentInlayHint:tn({method:"textDocument/inlayHint"}),inlayHintResolve:tn({method:"inlayHint/resolve"}),textDocumentDiagnostic:tn({method:"textDocument/diagnostic"}),workspaceDiagnostic:tn({method:"workspace/diagnostic"}),textDocumentInlineCompletion:tn({method:"textDocument/inlineCompletion"}),initialize:tn({method:"initialize"}),shutdown:tn({method:"shutdown"}),textDocumentWillSaveWaitUntil:tn({method:"textDocument/willSaveWaitUntil"}),textDocumentCompletion:tn({method:"textDocument/completion"}),completionItemResolve:tn({method:"completionItem/resolve"}),textDocumentHover:tn({method:"textDocument/hover"}),textDocumentSignatureHelp:tn({method:"textDocument/signatureHelp"}),textDocumentDefinition:tn({method:"textDocument/definition"}),textDocumentReferences:tn({method:"textDocument/references"}),textDocumentDocumentHighlight:tn({method:"textDocument/documentHighlight"}),textDocumentDocumentSymbol:tn({method:"textDocument/documentSymbol"}),textDocumentCodeAction:tn({method:"textDocument/codeAction"}),codeActionResolve:tn({method:"codeAction/resolve"}),workspaceSymbol:tn({method:"workspace/symbol"}),workspaceSymbolResolve:tn({method:"workspaceSymbol/resolve"}),textDocumentCodeLens:tn({method:"textDocument/codeLens"}),codeLensResolve:tn({method:"codeLens/resolve"}),textDocumentDocumentLink:tn({method:"textDocument/documentLink"}),documentLinkResolve:tn({method:"documentLink/resolve"}),textDocumentFormatting:tn({method:"textDocument/formatting"}),textDocumentRangeFormatting:tn({method:"textDocument/rangeFormatting"}),textDocumentRangesFormatting:tn({method:"textDocument/rangesFormatting"}),textDocumentOnTypeFormatting:tn({method:"textDocument/onTypeFormatting"}),textDocumentRename:tn({method:"textDocument/rename"}),textDocumentPrepareRename:tn({method:"textDocument/prepareRename"}),workspaceExecuteCommand:tn({method:"workspace/executeCommand"}),workspaceDidChangeWorkspaceFolders:xr({method:"workspace/didChangeWorkspaceFolders"}),windowWorkDoneProgressCancel:xr({method:"window/workDoneProgress/cancel"}),workspaceDidCreateFiles:xr({method:"workspace/didCreateFiles"}),workspaceDidRenameFiles:xr({method:"workspace/didRenameFiles"}),workspaceDidDeleteFiles:xr({method:"workspace/didDeleteFiles"}),notebookDocumentDidOpen:xr({method:"notebookDocument/didOpen"}),notebookDocumentDidChange:xr({method:"notebookDocument/didChange"}),notebookDocumentDidSave:xr({method:"notebookDocument/didSave"}),notebookDocumentDidClose:xr({method:"notebookDocument/didClose"}),initialized:xr({method:"initialized"}),exit:xr({method:"exit"}),workspaceDidChangeConfiguration:xr({method:"workspace/didChangeConfiguration"}),textDocumentDidOpen:xr({method:"textDocument/didOpen"}),textDocumentDidChange:xr({method:"textDocument/didChange"}),textDocumentDidClose:xr({method:"textDocument/didClose"}),textDocumentDidSave:xr({method:"textDocument/didSave"}),textDocumentWillSave:xr({method:"textDocument/willSave"}),workspaceDidChangeWatchedFiles:xr({method:"workspace/didChangeWatchedFiles"}),setTrace:xr({method:"$/setTrace"}),cancelRequest:xr({method:"$/cancelRequest"}),progress:xr({method:"$/progress"})},client:{workspaceWorkspaceFolders:tn({method:"workspace/workspaceFolders"}).optional(),workspaceConfiguration:tn({method:"workspace/configuration"}).optional(),workspaceFoldingRangeRefresh:tn({method:"workspace/foldingRange/refresh"}).optional(),windowWorkDoneProgressCreate:tn({method:"window/workDoneProgress/create"}).optional(),workspaceSemanticTokensRefresh:tn({method:"workspace/semanticTokens/refresh"}).optional(),windowShowDocument:tn({method:"window/showDocument"}).optional(),workspaceInlineValueRefresh:tn({method:"workspace/inlineValue/refresh"}).optional(),workspaceInlayHintRefresh:tn({method:"workspace/inlayHint/refresh"}).optional(),workspaceDiagnosticRefresh:tn({method:"workspace/diagnostic/refresh"}).optional(),clientRegisterCapability:tn({method:"client/registerCapability"}).optional(),clientUnregisterCapability:tn({method:"client/unregisterCapability"}).optional(),windowShowMessageRequest:tn({method:"window/showMessageRequest"}).optional(),workspaceCodeLensRefresh:tn({method:"workspace/codeLens/refresh"}).optional(),workspaceApplyEdit:tn({method:"workspace/applyEdit"}).optional(),windowShowMessage:xr({method:"window/showMessage"}),windowLogMessage:xr({method:"window/logMessage"}),telemetryEvent:xr({method:"telemetry/event"}),textDocumentPublishDiagnostics:xr({method:"textDocument/publishDiagnostics"}),logTrace:xr({method:"$/logTrace"}),cancelRequest:xr({method:"$/cancelRequest"}),progress:xr({method:"$/progress"})}});function tw(i,e){if(i.textModel!==e)throw new Error(`Expected text model to be ${e}, but got ${i.textModel}`);return i}var Vr=(zK=class{constructor(){Lt(this,"_store",new Dce)}dispose(){this._store.dispose()}_register(i){if(i===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(i)}},Lt(zK,"None",Object.freeze({dispose(){}})),zK),Dce=(O4=class{constructor(){Lt(this,"_toDispose",new Set),Lt(this,"_isDisposed",!1)}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){if(this._toDispose.size!==0)try{for(const i of this._toDispose)i.dispose()}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?O4.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(i),i}},Lt(O4,"DISABLE_DISPOSED_WARNING",!1),O4);const P4e=new Map([[km.Empty,""],[km.QuickFix,"quickfix"],[km.Refactor,"refactor"],[km.RefactorExtract,"refactor.extract"],[km.RefactorInline,"refactor.inline"],[km.RefactorRewrite,"refactor.rewrite"],[km.Source,"source"],[km.SourceOrganizeImports,"source.organizeImports"],[km.SourceFixAll,"source.fixAll"]]);function drn(i){if(i)return P4e.get(i)??i}const urn=new Map([[at.CodeActionTriggerType.Invoke,Oie.Invoked],[at.CodeActionTriggerType.Auto,Oie.Automatic]]);function hrn(i){return urn.get(i)??Oie.Invoked}const O4e=new Map([[qr.Text,at.CompletionItemKind.Text],[qr.Method,at.CompletionItemKind.Method],[qr.Function,at.CompletionItemKind.Function],[qr.Constructor,at.CompletionItemKind.Constructor],[qr.Field,at.CompletionItemKind.Field],[qr.Variable,at.CompletionItemKind.Variable],[qr.Class,at.CompletionItemKind.Class],[qr.Interface,at.CompletionItemKind.Interface],[qr.Module,at.CompletionItemKind.Module],[qr.Property,at.CompletionItemKind.Property],[qr.Unit,at.CompletionItemKind.Unit],[qr.Value,at.CompletionItemKind.Value],[qr.Enum,at.CompletionItemKind.Enum],[qr.Keyword,at.CompletionItemKind.Keyword],[qr.Snippet,at.CompletionItemKind.Snippet],[qr.Color,at.CompletionItemKind.Color],[qr.File,at.CompletionItemKind.File],[qr.Reference,at.CompletionItemKind.Reference],[qr.Folder,at.CompletionItemKind.Folder],[qr.EnumMember,at.CompletionItemKind.EnumMember],[qr.Constant,at.CompletionItemKind.Constant],[qr.Struct,at.CompletionItemKind.Struct],[qr.Event,at.CompletionItemKind.Event],[qr.Operator,at.CompletionItemKind.Operator],[qr.TypeParameter,at.CompletionItemKind.TypeParameter]]);function grn(i){return i?O4e.get(i)??at.CompletionItemKind.Text:at.CompletionItemKind.Text}const j4e=new Map([[arn.Deprecated,at.CompletionItemTag.Deprecated]]);function frn(i){return j4e.get(i)}const prn=new Map([[at.CompletionTriggerKind.Invoke,Pj.Invoked],[at.CompletionTriggerKind.TriggerCharacter,Pj.TriggerCharacter],[at.CompletionTriggerKind.TriggerForIncompleteCompletions,Pj.TriggerForIncompleteCompletions]]);function mrn(i){return prn.get(i)??Pj.Invoked}const brn=new Map([[lrn.Snippet,at.CompletionItemInsertTextRule.InsertAsSnippet]]);function xrn(i){if(i)return brn.get(i)}const F4e=new Map([[jr.File,at.SymbolKind.File],[jr.Module,at.SymbolKind.Module],[jr.Namespace,at.SymbolKind.Namespace],[jr.Package,at.SymbolKind.Package],[jr.Class,at.SymbolKind.Class],[jr.Method,at.SymbolKind.Method],[jr.Property,at.SymbolKind.Property],[jr.Field,at.SymbolKind.Field],[jr.Constructor,at.SymbolKind.Constructor],[jr.Enum,at.SymbolKind.Enum],[jr.Interface,at.SymbolKind.Interface],[jr.Function,at.SymbolKind.Function],[jr.Variable,at.SymbolKind.Variable],[jr.Constant,at.SymbolKind.Constant],[jr.String,at.SymbolKind.String],[jr.Number,at.SymbolKind.Number],[jr.Boolean,at.SymbolKind.Boolean],[jr.Array,at.SymbolKind.Array],[jr.Object,at.SymbolKind.Object],[jr.Key,at.SymbolKind.Key],[jr.Null,at.SymbolKind.Null],[jr.EnumMember,at.SymbolKind.EnumMember],[jr.Struct,at.SymbolKind.Struct],[jr.Event,at.SymbolKind.Event],[jr.Operator,at.SymbolKind.Operator],[jr.TypeParameter,at.SymbolKind.TypeParameter]]);function B4e(i){return F4e.get(i)??at.SymbolKind.File}const vrn=new Map([[M4e.Deprecated,at.SymbolTag.Deprecated]]);function H4e(i){return vrn.get(i)}const _rn=new Map([[$K.Text,at.DocumentHighlightKind.Text],[$K.Read,at.DocumentHighlightKind.Read],[$K.Write,at.DocumentHighlightKind.Write]]);function yrn(i){return i?_rn.get(i)??at.DocumentHighlightKind.Text:at.DocumentHighlightKind.Text}const wrn=new Map([[_E.Comment,at.FoldingRangeKind.Comment],[_E.Imports,at.FoldingRangeKind.Imports],[_E.Region,at.FoldingRangeKind.Region]]);function Crn(i){if(i)return wrn.get(i)}const Srn=new Map([[Rh.Error,mb.Error],[Rh.Warning,mb.Warning],[Rh.Info,mb.Information],[Rh.Hint,mb.Hint]]);function krn(i){return Srn.get(i)??mb.Error}const Nrn=new Map([[mb.Error,Rh.Error],[mb.Warning,Rh.Warning],[mb.Information,Rh.Info],[mb.Hint,Rh.Hint]]);function Ern(i){return i?Nrn.get(i)??Rh.Error:Rh.Error}const W4e=new Map([[LCe.Unnecessary,OB.Unnecessary],[LCe.Deprecated,OB.Deprecated]]);function Lrn(i){return W4e.get(i)}const Drn=new Map([[at.SignatureHelpTriggerKind.Invoke,Oj.Invoked],[at.SignatureHelpTriggerKind.TriggerCharacter,Oj.TriggerCharacter],[at.SignatureHelpTriggerKind.ContentChange,Oj.ContentChange]]);function Trn(i){return Drn.get(i)??Oj.Invoked}function yE(i){if(i)return{id:i.command,title:i.title,arguments:i.arguments}}const Irn=new Map([[ECe.Type,at.InlayHintKind.Type],[ECe.Parameter,at.InlayHintKind.Parameter]]);function Arn(i){return i?Irn.get(i)??at.InlayHintKind.Type:at.InlayHintKind.Type}function g0(i,e){if("targetUri"in i){const t=e.bridge.translateBackRange({uri:i.targetUri},i.targetRange);return{uri:t.textModel.uri,range:t.range,originSelectionRange:i.originSelectionRange?e.bridge.translateBackRange({uri:i.targetUri},i.originSelectionRange).range:void 0,targetSelectionRange:i.targetSelectionRange?e.bridge.translateBackRange({uri:i.targetUri},i.targetSelectionRange).range:void 0}}else{const t=e.bridge.translateBackRange({uri:i.uri},i.range);return{uri:t.textModel.uri,range:t.range}}}function ea(i){return!i||i.length===0?{language:"*"}:i.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 Rrn(i,e){if(!e)return!0;const t=i.getLanguageId();if(i.uri.toString(!0),!e||e.length===0)return!0;for(const n of e)if(!(n.language&&n.language!=="*"&&n.language!==t))return!0;return!1}function jie(i){var t;const e={severity:Ern(i.severity),startLineNumber:i.range.start.line+1,startColumn:i.range.start.character+1,endLineNumber:i.range.end.line+1,endColumn:i.range.end.character+1,message:i.message,source:i.source,code:typeof i.code=="string"?i.code:(t=i.code)==null?void 0:t.toString()};return i.tags&&(e.tags=i.tags.map(n=>Lrn(n)).filter(n=>n!==void 0)),i.relatedInformation&&(e.relatedInformation=i.relatedInformation.map(n=>({resource:eV.parse(n.location.uri),startLineNumber:n.location.range.start.line+1,startColumn:n.location.range.start.character+1,endLineNumber:n.location.range.end.line+1,endColumn:n.location.range.end.character+1,message:n.message}))),e}var Mrn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{completion:{dynamicRegistration:!0,contextSupport:!0,completionItemKind:{valueSet:Array.from(O4e.keys())},completionItem:{tagSupport:{valueSet:Array.from(j4e.keys())},commitCharactersSupport:!0,deprecatedSupport:!0,preselectSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentCompletion,!0,e=>at.registerCompletionItemProvider(ea(e.documentSelector),new Prn(this._connection,e))))}},Prn=class{constructor(i,e){Lt(this,"resolveCompletionItem"),this._client=i,this._capabilities=e,e.resolveProvider&&(this.resolveCompletionItem=async(t,n)=>(V4e(t,await this._client.server.completionItemResolve(t._lspItem),this._client.bridge,t._translated,t._model),t))}get triggerCharacters(){return this._capabilities.triggerCharacters}async provideCompletionItems(i,e,t,n){const s=this._client.bridge.translate(i,e),r=await this._client.server.textDocumentCompletion({textDocument:s.textDocument,position:s.position,context:t.triggerCharacter?{triggerKind:mrn(t.triggerKind),triggerCharacter:t.triggerCharacter}:void 0});return r?{suggestions:(Array.isArray(r)?r:r.items).map(o=>({...Orn(o,this._client.bridge,s,i,e),_lspItem:o,_translated:s,_model:i}))}:{suggestions:[]}}};function Orn(i,e,t,n,s){let r=i.insertText||i.label,o;i.textEdit&&("range"in i.textEdit?(r=i.textEdit.newText,o=tw(e.translateBackRange(t.textDocument,i.textEdit.range),n).range):(r=i.textEdit.newText,o={insert:tw(e.translateBackRange(t.textDocument,i.textEdit.insert),n).range,replace:tw(e.translateBackRange(t.textDocument,i.textEdit.replace),n).range})),o||(o=GD.fromPositions(s,s));const a={label:i.label,kind:grn(i.kind),insertText:r,sortText:i.sortText,filterText:i.filterText,preselect:i.preselect,commitCharacters:i.commitCharacters,range:o};return V4e(a,i,e,t,n),a}function V4e(i,e,t,n,s){e.detail!==void 0&&(i.detail=e.detail),e.documentation!==void 0&&(i.documentation=jrn(e.documentation)),e.insertTextFormat!==void 0&&(i.insertTextRules=xrn(e.insertTextFormat)),e.tags&&e.tags.length>0&&(i.tags=e.tags.map(frn).filter(r=>r!==void 0)),e.additionalTextEdits&&e.additionalTextEdits.length>0&&(i.additionalTextEdits=e.additionalTextEdits.map(r=>({range:tw(t.translateBackRange(n.textDocument,r.range),s).range,text:r.newText}))),e.command&&(i.command=yE(e.command))}function jrn(i){if(i)return typeof i=="string"?i:{value:i.value,isTrusted:!0}}var Frn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{hover:{dynamicRegistration:!0,contentFormat:[jB.Markdown,jB.PlainText]}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentHover,!0,e=>at.registerHoverProvider(ea(e.documentSelector),new Brn(this._connection,e))))}},Brn=class{constructor(i,e){this._client=i,this._capabilities=e}async provideHover(i,e,t){const n=this._client.bridge.translate(i,e),s=await this._client.server.textDocumentHover({textDocument:n.textDocument,position:n.position});return!s||!s.contents?null:{contents:Hrn(s.contents),range:s.range?this._client.bridge.translateBackRange(n.textDocument,s.range).range:void 0}}};function Hrn(i){return Array.isArray(i)?i.map(e=>DCe(e)):[DCe(i)]}function DCe(i){return typeof i=="string"?{value:i,isTrusted:!0}:"kind"in i?{value:i.value,isTrusted:!0}:{value:`\`\`\`${i.language} +${i.value} +\`\`\``,isTrusted:!0}}var Wrn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{signatureHelp:{dynamicRegistration:!0,contextSupport:!0,signatureInformation:{documentationFormat:[jB.Markdown,jB.PlainText],parameterInformation:{labelOffsetSupport:!0},activeParameterSupport:!0}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentSignatureHelp,!0,e=>at.registerSignatureHelpProvider(ea(e.documentSelector),new Vrn(this._connection,e))))}},Vrn=class{constructor(i,e){Lt(this,"signatureHelpTriggerCharacters"),Lt(this,"signatureHelpRetriggerCharacters"),this._client=i,this._capabilities=e,this.signatureHelpTriggerCharacters=e.triggerCharacters,this.signatureHelpRetriggerCharacters=e.retriggerCharacters}async provideSignatureHelp(i,e,t,n){const s=this._client.bridge.translate(i,e),r=await this._client.server.textDocumentSignatureHelp({textDocument:s.textDocument,position:s.position,context:{triggerKind:Trn(n.triggerKind),triggerCharacter:n.triggerCharacter,isRetrigger:n.isRetrigger}});return r?{value:{signatures:r.signatures.map(o=>{var a;return{label:o.label,documentation:TCe(o.documentation),parameters:((a=o.parameters)==null?void 0:a.map(l=>({label:l.label,documentation:TCe(l.documentation)})))||[],activeParameter:o.activeParameter}}),activeSignature:r.activeSignature||0,activeParameter:r.activeParameter||0},dispose:()=>{}}:null}};function TCe(i){if(i)return typeof i=="string"?i:{value:i.value,isTrusted:!0}}var zrn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{definition:{dynamicRegistration:!0,linkSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentDefinition,!0,e=>at.registerDefinitionProvider(ea(e.documentSelector),new Urn(this._connection,e))))}},Urn=class{constructor(i,e){this._client=i,this._capabilities=e}async provideDefinition(i,e,t){const n=this._client.bridge.translate(i,e),s=await this._client.server.textDocumentDefinition({textDocument:n.textDocument,position:n.position});return s?Array.isArray(s)?s.map(r=>g0(r,this._client)):g0(s,this._client):null}},$rn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{declaration:{dynamicRegistration:!0,linkSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentDeclaration,!0,e=>at.registerDeclarationProvider(ea(e.documentSelector),new qrn(this._connection,e))))}},qrn=class{constructor(i,e){this._client=i,this._capabilities=e}async provideDeclaration(i,e,t){const n=this._client.bridge.translate(i,e),s=await this._client.server.textDocumentDeclaration({textDocument:n.textDocument,position:n.position});return s?Array.isArray(s)?s.map(r=>g0(r,this._client)):g0(s,this._client):null}},Krn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{typeDefinition:{dynamicRegistration:!0,linkSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentTypeDefinition,!0,e=>at.registerTypeDefinitionProvider(ea(e.documentSelector),new Grn(this._connection,e))))}},Grn=class{constructor(i,e){this._client=i,this._capabilities=e}async provideTypeDefinition(i,e,t){const n=this._client.bridge.translate(i,e),s=await this._client.server.textDocumentTypeDefinition({textDocument:n.textDocument,position:n.position});return s?Array.isArray(s)?s.map(r=>g0(r,this._client)):g0(s,this._client):null}},Yrn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{implementation:{dynamicRegistration:!0,linkSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentImplementation,!0,e=>at.registerImplementationProvider(ea(e.documentSelector),new Qrn(this._connection,e))))}},Qrn=class{constructor(i,e){this._client=i,this._capabilities=e}async provideImplementation(i,e,t){const n=this._client.bridge.translate(i,e),s=await this._client.server.textDocumentImplementation({textDocument:n.textDocument,position:n.position});return s?Array.isArray(s)?s.map(r=>g0(r,this._client)):g0(s,this._client):null}},Xrn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{references:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentReferences,!0,e=>at.registerReferenceProvider(ea(e.documentSelector),new Zrn(this._connection,e))))}},Zrn=class{constructor(i,e){this._client=i,this._capabilities=e}async provideReferences(i,e,t,n){const s=this._client.bridge.translate(i,e),r=await this._client.server.textDocumentReferences({textDocument:s.textDocument,position:s.position,context:{includeDeclaration:t.includeDeclaration}});return r?r.map(o=>{const a=this._client.bridge.translateBackRange({uri:o.uri},o.range);return{uri:a.textModel.uri,range:a.range}}):null}},Jrn=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{documentHighlight:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentDocumentHighlight,!0,e=>at.registerDocumentHighlightProvider(ea(e.documentSelector),new eon(this._connection,e))))}},eon=class{constructor(i,e){this._client=i,this._capabilities=e}async provideDocumentHighlights(i,e,t){const n=this._client.bridge.translate(i,e),s=await this._client.server.textDocumentDocumentHighlight({textDocument:n.textDocument,position:n.position});return s?s.map(r=>({range:this._client.bridge.translateBackRange(n.textDocument,r.range).range,kind:yrn(r.kind)})):null}},ton=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{documentSymbol:{dynamicRegistration:!0,hierarchicalDocumentSymbolSupport:!0,symbolKind:{valueSet:Array.from(F4e.keys())},tagSupport:{valueSet:[M4e.Deprecated]}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentDocumentSymbol,!0,e=>at.registerDocumentSymbolProvider(ea(e.documentSelector),new non(this._connection,e))))}},non=class{constructor(i,e){this._client=i,this._capabilities=e}async provideDocumentSymbols(i,e){const t=this._client.bridge.translate(i,new vx(1,1)),n=await this._client.server.textDocumentDocumentSymbol({textDocument:t.textDocument});return n?Array.isArray(n)&&n.length>0?"location"in n[0]?n.map(s=>ion(s,this._client)):n.map(s=>z4e(s,this._client,t.textDocument)):[]:null}};function z4e(i,e,t){var n,s;return{name:i.name,detail:i.detail||"",kind:B4e(i.kind),tags:((n=i.tags)==null?void 0:n.map(r=>H4e(r)).filter(r=>r!==void 0))||[],range:e.bridge.translateBackRange(t,i.range).range,selectionRange:e.bridge.translateBackRange(t,i.selectionRange).range,children:((s=i.children)==null?void 0:s.map(r=>z4e(r,e,t)))||[]}}function ion(i,e){var t;return{name:i.name,detail:"",kind:B4e(i.kind),tags:((t=i.tags)==null?void 0:t.map(n=>H4e(n)).filter(n=>n!==void 0))||[],range:e.bridge.translateBackRange({uri:i.location.uri},i.location.range).range,selectionRange:e.bridge.translateBackRange({uri:i.location.uri},i.location.range).range,children:[]}}var son=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{rename:{dynamicRegistration:!0,prepareSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentRename,!0,e=>at.registerRenameProvider(ea(e.documentSelector),new ron(this._connection,e))))}},ron=class{constructor(i,e){this._client=i,this._capabilities=e}async provideRenameEdits(i,e,t,n){const s=this._client.bridge.translate(i,e),r=await this._client.server.textDocumentRename({textDocument:s.textDocument,position:s.position,newName:t});return r?oon(r,this._client):null}async resolveRenameLocation(i,e,t){if(!this._capabilities.prepareProvider)return null;const n=this._client.bridge.translate(i,e),s=await this._client.server.textDocumentPrepareRename({textDocument:n.textDocument,position:n.position});if(!s)return null;if("range"in s&&"placeholder"in s)return{range:this._client.bridge.translateBackRange(n.textDocument,s.range).range,text:s.placeholder};if("defaultBehavior"in s)return null;if("start"in s&&"end"in s){const r=this._client.bridge.translateBackRange(n.textDocument,s).range;return{range:r,text:i.getValueInRange(r)}}return null}};function oon(i,e){const t=[];if(i.changes)for(const n in i.changes){const s=i.changes[n];for(const r of s){const o=e.bridge.translateBackRange({uri:n},r.range);t.push({resource:o.textModel.uri,versionId:void 0,textEdit:{range:o.range,text:r.newText}})}}if(i.documentChanges){for(const n of i.documentChanges)if("textDocument"in n){const s=n.textDocument.uri;for(const r of n.edits){const o=e.bridge.translateBackRange({uri:s},r.range);t.push({resource:o.textModel.uri,versionId:n.textDocument.version,textEdit:{range:o.range,text:r.newText}})}}}return{edits:t}}var aon=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{codeAction:{dynamicRegistration:!0,codeActionLiteralSupport:{codeActionKind:{valueSet:Array.from(P4e.keys())}},isPreferredSupport:!0,disabledSupport:!0,dataSupport:!0,resolveSupport:{properties:["edit"]}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentCodeAction,!0,e=>at.registerCodeActionProvider(ea(e.documentSelector),new lon(this._connection,e))))}},lon=class{constructor(i,e){Lt(this,"resolveCodeAction"),this._client=i,this._capabilities=e,e.resolveProvider&&(this.resolveCodeAction=async(t,n)=>{if(t._lspAction){const s=await this._client.server.codeActionResolve(t._lspAction);s.edit&&(t.edit=ICe(s.edit,this._client)),s.command&&(t.command=yE(s.command))}return t})}async provideCodeActions(i,e,t,n){const s=this._client.bridge.translate(i,e.getStartPosition()),r=await this._client.server.textDocumentCodeAction({textDocument:s.textDocument,range:this._client.bridge.translateRange(i,e),context:{diagnostics:t.markers.map(o=>({range:this._client.bridge.translateRange(i,GD.lift(o)),message:o.message,severity:krn(o.severity)})),triggerKind:hrn(t.trigger)}});return r?{actions:(Array.isArray(r)?r:[r]).map(o=>{var a;if("title"in o&&!("kind"in o)){const l=o;return{title:l.title,command:yE(l)}}else{const l=o;return{title:l.title,kind:drn(l.kind),isPreferred:l.isPreferred,disabled:(a=l.disabled)==null?void 0:a.reason,edit:l.edit?ICe(l.edit,this._client):void 0,command:yE(l.command),_lspAction:l}}}),dispose:()=>{}}:null}};function ICe(i,e){const t=[];if(i.changes)for(const n in i.changes){const s=i.changes[n];for(const r of s){const o=e.bridge.translateBackRange({uri:n},r.range);t.push({resource:o.textModel.uri,versionId:void 0,textEdit:{range:o.range,text:r.newText}})}}if(i.documentChanges){for(const n of i.documentChanges)if("textDocument"in n){const s=n.textDocument.uri;for(const r of n.edits){const o=e.bridge.translateBackRange({uri:s},r.range);t.push({resource:o.textModel.uri,versionId:n.textDocument.version??void 0,textEdit:{range:o.range,text:r.newText}})}}}return{edits:t}}var con=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{codeLens:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentCodeLens,!0,e=>at.registerCodeLensProvider(ea(e.documentSelector),new don(this._connection,e))))}},don=class{constructor(i,e){this._client=i,this._capabilities=e}async provideCodeLenses(i,e){const t=this._client.bridge.translate(i,new vx(1,1)),n=await this._client.server.textDocumentCodeLens({textDocument:t.textDocument});return n?{lenses:n.map(s=>({range:tw(this._client.bridge.translateBackRange(t.textDocument,s.range),i).range,command:yE(s.command),_lspCodeLens:s})),dispose:()=>{}}:null}async resolveCodeLens(i,e,t){if(!this._capabilities.resolveProvider||!e._lspCodeLens)return e;const n=await this._client.server.codeLensResolve(e._lspCodeLens);return n.command&&(e.command={id:n.command.command,title:n.command.title,arguments:n.command.arguments}),e}},uon=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{documentLink:{dynamicRegistration:!0,tooltipSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentDocumentLink,!0,e=>at.registerLinkProvider(ea(e.documentSelector),new hon(this._connection,e))))}},hon=class{constructor(i,e){this._client=i,this._capabilities=e}async provideLinks(i,e){const t=this._client.bridge.translate(i,new vx(1,1)),n=await this._client.server.textDocumentDocumentLink({textDocument:t.textDocument});return n?{links:n.map(s=>({range:this._client.bridge.translateBackRange(t.textDocument,s.range).range,url:s.target,tooltip:s.tooltip}))}:null}async resolveLink(i,e){return this._capabilities.resolveProvider,i}},gon=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{formatting:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentFormatting,!0,e=>at.registerDocumentFormattingEditProvider(ea(e.documentSelector),new fon(this._connection,e))))}},fon=class{constructor(i,e){this._client=i,this._capabilities=e}async provideDocumentFormattingEdits(i,e,t){const n=this._client.bridge.translate(i,new vx(1,1)),s=await this._client.server.textDocumentFormatting({textDocument:n.textDocument,options:{tabSize:e.tabSize,insertSpaces:e.insertSpaces}});return s?s.map(r=>({range:this._client.bridge.translateBackRange(n.textDocument,r.range).range,text:r.newText})):null}},pon=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{rangeFormatting:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentRangeFormatting,!0,e=>at.registerDocumentRangeFormattingEditProvider(ea(e.documentSelector),new mon(this._connection,e))))}},mon=class{constructor(i,e){this._client=i,this._capabilities=e}async provideDocumentRangeFormattingEdits(i,e,t,n){const s=this._client.bridge.translate(i,e.getStartPosition()),r=await this._client.server.textDocumentRangeFormatting({textDocument:s.textDocument,range:this._client.bridge.translateRange(i,e),options:{tabSize:t.tabSize,insertSpaces:t.insertSpaces}});return r?r.map(o=>({range:this._client.bridge.translateBackRange(s.textDocument,o.range).range,text:o.newText})):null}},bon=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{onTypeFormatting:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentOnTypeFormatting,!0,e=>at.registerOnTypeFormattingEditProvider(ea(e.documentSelector),new xon(this._connection,e))))}},xon=class{constructor(i,e){Lt(this,"autoFormatTriggerCharacters"),this._client=i,this._capabilities=e,this.autoFormatTriggerCharacters=[e.firstTriggerCharacter,...e.moreTriggerCharacter||[]]}async provideOnTypeFormattingEdits(i,e,t,n,s){const r=this._client.bridge.translate(i,e),o=await this._client.server.textDocumentOnTypeFormatting({textDocument:r.textDocument,position:r.position,ch:t,options:{tabSize:n.tabSize,insertSpaces:n.insertSpaces}});return o?o.map(a=>({range:this._client.bridge.translateBackRange(r.textDocument,a.range).range,text:a.newText})):null}},von=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{foldingRange:{dynamicRegistration:!0,rangeLimit:5e3,lineFoldingOnly:!1,foldingRangeKind:{valueSet:[_E.Comment,_E.Imports,_E.Region]}}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentFoldingRange,!0,e=>at.registerFoldingRangeProvider(ea(e.documentSelector),new _on(this._connection,e))))}},_on=class{constructor(i,e){this._client=i,this._capabilities=e}async provideFoldingRanges(i,e,t){const n=this._client.bridge.translate(i,new vx(1,1)),s=await this._client.server.textDocumentFoldingRange({textDocument:n.textDocument});return s?s.map(r=>({start:r.startLine+1,end:r.endLine+1,kind:Crn(r.kind)})):null}},yon=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{selectionRange:{dynamicRegistration:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentSelectionRange,!0,e=>at.registerSelectionRangeProvider(ea(e.documentSelector),new won(this._connection,e))))}},won=class{constructor(i,e){this._client=i,this._capabilities=e}async provideSelectionRanges(i,e,t){const n=this._client.bridge.translate(i,e[0]),s=await this._client.server.textDocumentSelectionRange({textDocument:n.textDocument,positions:e.map(r=>this._client.bridge.translate(i,r).position)});return s?s.map(r=>this.convertSelectionRange(r,n.textDocument)):null}convertSelectionRange(i,e){const t=[];let n=i;for(;n;)t.push({range:this._client.bridge.translateBackRange(e,n.range).range}),n=n.parent;return t}},Con=class extends Vr{constructor(i){super(),Lt(this,"_providers",new Set),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{inlayHint:{dynamicRegistration:!0,resolveSupport:{properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]}}},workspace:{inlayHint:{refreshSupport:!0}}})),this._register(this._connection.connection.registerRequestHandler($M.client.workspaceInlayHintRefresh,async()=>{for(const e of this._providers)e.refresh();return{ok:null}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentInlayHint,!0,e=>{const t=new Son(this._connection,e);this._providers.add(t);const n=at.registerInlayHintsProvider(ea(e.documentSelector),t);return{dispose:()=>{this._providers.delete(t),n.dispose()}}}))}},Son=class{constructor(i,e){Lt(this,"_onDidChangeInlayHints",new h0),Lt(this,"onDidChangeInlayHints",this._onDidChangeInlayHints.event),Lt(this,"resolveInlayHint"),this._client=i,this._capabilities=e,e.resolveProvider&&(this.resolveInlayHint=async(t,n)=>{const s=await this._client.server.inlayHintResolve(t._lspInlayHint);return s.tooltip&&(t.tooltip=Fie(s.tooltip)),s.label!==t._lspInlayHint.label&&(t.label=ACe(s.label)),s.textEdits&&(t.textEdits=s.textEdits.map(r=>({range:this._client.bridge.translateBackRange({uri:t._targetUri},r.range).range,text:r.newText}))),t})}refresh(){this._onDidChangeInlayHints.fire()}async provideInlayHints(i,e,t){const n=this._client.bridge.translate(i,e.getStartPosition()),s=await kon(async()=>await this._client.server.textDocumentInlayHint({textDocument:n.textDocument,range:this._client.bridge.translateRange(i,e)}));return s?{hints:s.map(r=>{var o;return{label:ACe(r.label),position:tw(this._client.bridge.translateBack(n.textDocument,r.position),i).position,kind:Arn(r.kind),tooltip:Fie(r.tooltip),paddingLeft:r.paddingLeft,paddingRight:r.paddingRight,textEdits:(o=r.textEdits)==null?void 0:o.map(a=>({range:tw(this._client.bridge.translateBackRange(n.textDocument,a.range),i).range,text:a.newText})),_lspInlayHint:r,_targetUri:n.textDocument.uri}}),dispose:()=>{}}:null}};async function kon(i){for(let e=3;;e--)try{return await i()}catch(t){if(t.message==="content modified"&&e>0)continue;throw t}}function ACe(i){return typeof i=="string"?i:i.map(e=>{const t={label:e.value,tooltip:Fie(e.tooltip),command:yE(e.command)};return e.location&&(t.location={uri:eV.parse(e.location.uri),range:new GD(e.location.range.start.line+1,e.location.range.start.character+1,e.location.range.end.line+1,e.location.range.end.character+1)}),t})}function Fie(i){if(i)return typeof i=="string"?i:{value:i.value,isTrusted:!0}}var Non=class extends Vr{constructor(i){super(),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{semanticTokens:{dynamicRegistration:!0,requests:{range:!0,full:{delta:!0}},tokenTypes:["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"],tokenModifiers:["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],formats:[crn.Relative],overlappingTokenSupport:!1,multilineTokenSupport:!0}}})),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentSemanticTokensFull,!0,e=>at.registerDocumentSemanticTokensProvider(ea(e.documentSelector),new Eon(this._connection,e))))}},Eon=class{constructor(i,e){this._client=i,this._capabilities=e}getLegend(){return{tokenTypes:this._capabilities.legend.tokenTypes,tokenModifiers:this._capabilities.legend.tokenModifiers}}releaseDocumentSemanticTokens(i){}async provideDocumentSemanticTokens(i,e,t){const n=this._client.bridge.translate(i,i.getPositionAt(0)),s=this._capabilities.full;if(e&&s&&typeof s=="object"&&s.delta){const o=await this._client.server.textDocumentSemanticTokensFullDelta({textDocument:n.textDocument,previousResultId:e});return o?"edits"in o?{resultId:o.resultId,edits:o.edits.map(a=>({start:a.start,deleteCount:a.deleteCount,data:a.data?new Uint32Array(a.data):void 0}))}:{resultId:o.resultId,data:new Uint32Array(o.data)}:null}const r=await this._client.server.textDocumentSemanticTokensFull({textDocument:n.textDocument});return r?{resultId:r.resultId,data:new Uint32Array(r.data)}:null}async provideDocumentSemanticTokensEdits(i,e,t){return this.provideDocumentSemanticTokens(i,e,t)}},Lon=class extends Vr{constructor(i){super(),Lt(this,"_diagnosticsMarkerOwner","lsp"),Lt(this,"_pullDiagnosticProviders",new Map),this._connection=i,this._register(this._connection.capabilities.addStaticClientCapabilities({textDocument:{publishDiagnostics:{relatedInformation:!0,tagSupport:{valueSet:[...W4e.keys()]},versionSupport:!0,codeDescriptionSupport:!0,dataSupport:!0},diagnostic:{dynamicRegistration:!0,relatedDocumentSupport:!0}}}));debugger;this._register(this._connection.connection.registerNotificationHandler($M.client.textDocumentPublishDiagnostics,e=>this._handlePublishDiagnostics(e))),this._register(this._connection.capabilities.registerCapabilityHandler(kn.textDocumentDiagnostic,!0,e=>{const t=new Dce;for(const n of xp.getModels())this._addPullDiagnosticProvider(n,e,t);return t.add(xp.onDidCreateModel(n=>{this._addPullDiagnosticProvider(n,e,t)})),t}))}_addPullDiagnosticProvider(i,e,t){if(i.getLanguageId(),!Rrn(i,e.documentSelector))return;const n=new Don(i,this._connection,this._diagnosticsMarkerOwner,e);this._pullDiagnosticProviders.set(i,n),t.add(n),t.add(i.onWillDispose(()=>{this._pullDiagnosticProviders.delete(i)}))}_handlePublishDiagnostics(i){const e=i.uri;try{const t=this._connection.bridge.translateBack({uri:e},{line:0,character:0}).textModel;if(!t||t.isDisposed())return;const n=i.diagnostics.map(s=>jie(s));xp.setModelMarkers(t,this._diagnosticsMarkerOwner,n)}catch(t){console.debug(`Could not set diagnostics for ${e}:`,t)}}},Don=class extends Vr{constructor(i,e,t,n){super(),Lt(this,"_updateHandle"),Lt(this,"_previousResultId"),this._model=i,this._connection=e,this._markerOwner=t,this._capability=n,this._register(this._model.onDidChangeContent(()=>{this._scheduleDiagnosticUpdate()})),this._scheduleDiagnosticUpdate()}_scheduleDiagnosticUpdate(){this._updateHandle!==void 0&&clearTimeout(this._updateHandle),this._updateHandle=window.setTimeout(()=>{this._updateHandle=void 0,this._requestDiagnostics()},500)}async _requestDiagnostics(){if(!this._model.isDisposed())try{const i=this._connection.bridge.translate(this._model,new vx(1,1)),e=await this._connection.server.textDocumentDiagnostic({textDocument:i.textDocument,identifier:this._capability.identifier,previousResultId:this._previousResultId});if(this._model.isDisposed())return;this._handleDiagnosticReport(e)}catch(i){console.error("Error requesting diagnostics:",i)}}_handleDiagnosticReport(i){if(i.kind==="full"){this._previousResultId=i.resultId;const e=i.items.map(t=>jie(t));xp.setModelMarkers(this._model,this._markerOwner,e),"relatedDocuments"in i&&i.relatedDocuments&&this._handleRelatedDocuments(i.relatedDocuments)}else i.kind==="unchanged"&&(this._previousResultId=i.resultId)}_handleRelatedDocuments(i){for(const[e,t]of Object.entries(i))try{const n=this._connection.bridge.translateBack({uri:e},{line:0,character:0}).textModel;if(!n||n.isDisposed())continue;if(t.kind==="full"){const s=t.items.map(r=>jie(r));xp.setModelMarkers(n,this._markerOwner,s)}}catch(n){console.debug(`Could not set related diagnostics for ${e}:`,n)}}dispose(){this._updateHandle!==void 0&&(clearTimeout(this._updateHandle),this._updateHandle=void 0),super.dispose()}},Ton=class{constructor(i,e,t,n){this.server=i,this.bridge=e,this.capabilities=t,this.connection=n}},Ion=class extends Vr{constructor(i){super(),Lt(this,"_staticCapabilities",new Set),Lt(this,"_dynamicFromStatic",Mon.create()),Lt(this,"_registrations",new Map),Lt(this,"_serverCapabilities"),this._connection=i,this._register(this._connection.registerRequestHandler($M.client.clientRegisterCapability,async e=>{for(const t of e.registrations){const n=MCe(t.method),s=new RCe(t.id,n,t.registerOptions,!1);this._registerCapabilityOptions(s)}return{ok:null}})),this._register(this._connection.registerRequestHandler($M.client.clientUnregisterCapability,async e=>{for(const t of e.unregisterations){const n=MCe(t.method),s=this._registrations.get(n),r=s==null?void 0:s.registrations.get(t.id);if(!r)throw new Error(`No registration for method ${t.method} with id ${t.id}`);r==null||r.handlerDisposables.forEach(o=>o.dispose()),s==null||s.registrations.delete(t.id)}return{ok:null}}))}_registerCapabilityOptions(i){let e=this._registrations.get(i.capability);if(e||(e=new PCe,this._registrations.set(i.capability,e)),e.registrations.has(i.id))throw new Error(`Handler for method ${i.capability.method} with id ${i.id} already registered`);e.registrations.set(i.id,i);for(const t of e.handlers)!t.handleStaticCapability&&i.isFromStatic||i.handlerDisposables.set(t,t.handler(i.options))}setServerCapabilities(i){if(this._serverCapabilities)throw new Error("Server capabilities already set");this._serverCapabilities=i;for(const e of Object.values(kn)){const t=this._dynamicFromStatic.getOptions(e,i);t&&this._registerCapabilityOptions(new RCe(e.method,e,t,!0))}}getClientCapabilities(){const i={};for(const e of this._staticCapabilities)$4e(i,e.cap);return i}addStaticClientCapabilities(i){const e={cap:i};return this._staticCapabilities.add(e),{dispose:()=>{this._staticCapabilities.delete(e)}}}registerCapabilityHandler(i,e,t){let n=this._registrations.get(i);n||(n=new PCe,this._registrations.set(i,n));const s=new Aon(i,e,t);n.handlers.add(s);for(const r of n.registrations.values())!s.handleStaticCapability&&r.isFromStatic||r.handlerDisposables.set(s,t(r.options));return{dispose:()=>{n.handlers.delete(s);for(const r of n.registrations.values()){const o=r.handlerDisposables.get(s);o&&(o.dispose(),r.handlerDisposables.delete(s))}}}}},Aon=class{constructor(i,e,t){this.capability=i,this.handleStaticCapability=e,this.handler=t}},RCe=class{constructor(i,e,t,n){Lt(this,"handlerDisposables",new Map),this.id=i,this.capability=e,this.options=t,this.isFromStatic=n}};const Ron=new Map([...Object.values(kn)].map(i=>[i.method,i]));function MCe(i){const e=Ron.get(i);if(!e)throw new Error(`No capability found for method ${i}`);return e}var PCe=class{constructor(){Lt(this,"handlers",new Set),Lt(this,"registrations",new Map)}},Mon=class U4e{constructor(){Lt(this,"_mappings",new Map)}static create(){const e=new U4e;return e.set(kn.textDocumentDidChange,t=>{if(t.textDocumentSync!==void 0)return typeof t.textDocumentSync=="object"?{syncKind:t.textDocumentSync.change??orn.None,documentSelector:null}:{syncKind:t.textDocumentSync,documentSelector:null}}),e.set(kn.textDocumentCompletion,t=>t.completionProvider),e.set(kn.textDocumentHover,t=>t.hoverProvider),e.set(kn.textDocumentSignatureHelp,t=>t.signatureHelpProvider),e.set(kn.textDocumentDefinition,t=>t.definitionProvider),e.set(kn.textDocumentReferences,t=>t.referencesProvider),e.set(kn.textDocumentDocumentHighlight,t=>t.documentHighlightProvider),e.set(kn.textDocumentDocumentSymbol,t=>t.documentSymbolProvider),e.set(kn.textDocumentCodeAction,t=>t.codeActionProvider),e.set(kn.textDocumentCodeLens,t=>t.codeLensProvider),e.set(kn.textDocumentDocumentLink,t=>t.documentLinkProvider),e.set(kn.textDocumentFormatting,t=>t.documentFormattingProvider),e.set(kn.textDocumentRangeFormatting,t=>t.documentRangeFormattingProvider),e.set(kn.textDocumentOnTypeFormatting,t=>t.documentOnTypeFormattingProvider),e.set(kn.textDocumentRename,t=>t.renameProvider),e.set(kn.textDocumentFoldingRange,t=>t.foldingRangeProvider),e.set(kn.textDocumentDeclaration,t=>t.declarationProvider),e.set(kn.textDocumentTypeDefinition,t=>t.typeDefinitionProvider),e.set(kn.textDocumentImplementation,t=>t.implementationProvider),e.set(kn.textDocumentDocumentColor,t=>t.colorProvider),e.set(kn.textDocumentSelectionRange,t=>t.selectionRangeProvider),e.set(kn.textDocumentLinkedEditingRange,t=>t.linkedEditingRangeProvider),e.set(kn.textDocumentPrepareCallHierarchy,t=>t.callHierarchyProvider),e.set(kn.textDocumentSemanticTokensFull,t=>t.semanticTokensProvider),e.set(kn.textDocumentInlayHint,t=>t.inlayHintProvider),e.set(kn.textDocumentInlineValue,t=>t.inlineValueProvider),e.set(kn.textDocumentDiagnostic,t=>t.diagnosticProvider),e.set(kn.textDocumentMoniker,t=>t.monikerProvider),e.set(kn.textDocumentPrepareTypeHierarchy,t=>t.typeHierarchyProvider),e.set(kn.workspaceSymbol,t=>t.workspaceSymbolProvider),e.set(kn.workspaceExecuteCommand,t=>t.executeCommandProvider),e}set(e,t){if(this._mappings.has(e.method))throw new Error(`Capability for method ${e.method} already registered`);this._mappings.set(e.method,t)}getOptions(e,t){const n=this._mappings.get(e.method);if(n)return n(t)}};function $4e(i,e){for(const t of Object.keys(e)){const n=e[t];if(n===void 0)continue;const s=i[t];if(s===void 0){i[t]=n;continue}if(typeof n!="object"||n===null){i[t]=n;continue}if(typeof s!="object"||s===null){i[t]=n;continue}$4e(s,n)}}var Pon=class extends Vr{constructor(i,e){super(),Lt(this,"_managedModels",new Map),Lt(this,"_managedModelsReverse",new Map),Lt(this,"_started",!1),this._server=i,this._capabilities=e,this._register(this._capabilities.addStaticClientCapabilities({textDocument:{synchronization:{dynamicRegistration:!0,willSave:!1,willSaveWaitUntil:!1,didSave:!1}}})),this._register(e.registerCapabilityHandler(kn.textDocumentDidChange,!0,t=>{if(this._started)return{dispose:()=>{}};this._started=!0,this._register(xp.onDidCreateModel(n=>{this._getOrCreateManagedModel(n)}));for(const n of xp.getModels())this._getOrCreateManagedModel(n);return{dispose:()=>{}}}))}_getOrCreateManagedModel(i){if(!this._started)throw new Error("Not started");const e=i.uri.toString(!0).toLowerCase();let t=this._managedModels.get(i);return t||(t=new Oon(i,this._server),this._managedModels.set(i,t),this._managedModelsReverse.set(e,i)),i.onWillDispose(()=>{t.dispose(),this._managedModels.delete(i),this._managedModelsReverse.delete(e)}),t}translateBack(i,e){const t=i.uri.toLowerCase(),n=this._managedModelsReverse.get(t);if(!n)throw new Error(`No text model for uri ${t}`);return{textModel:n,position:new vx(e.line+1,e.character+1)}}translateBackRange(i,e){const t=i.uri.toLowerCase(),n=this._managedModelsReverse.get(t);if(!n)throw new Error(`No text model for uri ${t}`);return{textModel:n,range:new GD(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}}translate(i,e){return{textDocument:{uri:i.uri.toString(!0)},position:{line:e.lineNumber-1,character:e.column-1}}}translateRange(i,e){return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}},Oon=class extends Vr{constructor(i,e){super(),this._textModel=i,this._api=e;const t=i.uri.toString(!0).toLowerCase();this._api.textDocumentDidOpen({textDocument:{languageId:i.getLanguageId(),uri:t,version:i.getVersionId(),text:i.getValue()}}),this._register(i.onDidChangeContent(n=>{const s=n.changes.map(r=>jon(r));this._api.textDocumentDidChange({textDocument:{uri:t,version:i.getVersionId()},contentChanges:s})})),this._register({dispose:()=>{this._api.textDocumentDidClose({textDocument:{uri:t}})}})}};function jon(i){return{range:Fon(i.range),rangeLength:i.rangeLength,text:i.text}}function Fon(i){return{start:{line:i.startLineNumber-1,character:i.startColumn-1},end:{line:i.endLineNumber-1,character:i.endColumn-1}}}var Bon=class{constructor(i){Lt(this,"_connection"),Lt(this,"_capabilitiesRegistry"),Lt(this,"_bridge"),Lt(this,"_initPromise");const e=Mie.fromTransport(i),t=$M.getServer(e,{});e.startListen(),this._capabilitiesRegistry=new Ion(e),this._bridge=new Pon(t.server,this._capabilitiesRegistry),this._connection=new Ton(t.server,this._bridge,this._capabilitiesRegistry,e),this.createFeatures(),this._initPromise=this._init()}async _init(){const i=await this._connection.server.initialize({processId:null,capabilities:this._capabilitiesRegistry.getClientCapabilities(),rootUri:null});this._connection.server.initialized({}),this._capabilitiesRegistry.setServerCapabilities(i.capabilities)}createFeatures(){const i=new Dce;return i.add(new Mrn(this._connection)),i.add(new Frn(this._connection)),i.add(new Wrn(this._connection)),i.add(new zrn(this._connection)),i.add(new $rn(this._connection)),i.add(new Krn(this._connection)),i.add(new Yrn(this._connection)),i.add(new Xrn(this._connection)),i.add(new Jrn(this._connection)),i.add(new ton(this._connection)),i.add(new son(this._connection)),i.add(new aon(this._connection)),i.add(new con(this._connection)),i.add(new uon(this._connection)),i.add(new gon(this._connection)),i.add(new pon(this._connection)),i.add(new bon(this._connection)),i.add(new von(this._connection)),i.add(new yon(this._connection)),i.add(new Con(this._connection)),i.add(new Non(this._connection)),i.add(new Lon(this._connection)),i}},Jk=null;typeof WebSocket<"u"?Jk=WebSocket:typeof MozWebSocket<"u"?Jk=MozWebSocket:typeof global<"u"?Jk=global.WebSocket||global.MozWebSocket:typeof window<"u"?Jk=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Jk=self.WebSocket||self.MozWebSocket);var Hon=Jk;function Won(i){return"host"in i?{address:`${i.forceTls?"wss":"ws"}://${i.host}:${i.port}`}:i}var Von=class Bie extends k4e{constructor(e){super(),Lt(this,"socket"),Lt(this,"errorEmitter",new Lce),Lt(this,"onError",this.errorEmitter),this.socket=e,e.onmessage=t=>{try{const n=t.data;if(typeof n=="string"){const s=JSON.parse(n);this._dispatchReceivedMessage(s)}else throw new Error("Not supported")}catch(n){this.errorEmitter.fire({error:n})}},e.onclose=t=>{this._onConnectionClosed()}}static connectTo(e){const t=new Hon(Won(e).address);return new Promise((n,s)=>{t.onerror=r=>{s(r)},t.onopen=()=>{n(new Bie(t))}})}static fromWebSocket(e){return new Bie(e)}close(){this.socket.close()}dispose(){this.close()}_sendImpl(e){const t=JSON.stringify(e);return new Promise((n,s)=>{this.socket.send(t,r=>{r?s(r):n()})})}toString(){return`${this.id}@${this.socket.url}`}},q4e=class extends k4e{constructor(i,e=void 0,t=void 0){super(),Lt(this,"_windowLike"),Lt(this,"_source"),Lt(this,"_loadingState"),Lt(this,"_disposed",!1),Lt(this,"_messageHandler",({data:n,source:s})=>{this._source&&s!==this._source||typeof n=="object"&&n&&this._dispatchReceivedMessage(n)}),this._windowLike=i,this._source=e,this._loadingState=t,this._windowLike.addEventListener("message",this._messageHandler)}async _sendImpl(i){if(this._disposed)throw new Error("Transport is disposed");this._loadingState&&!this._loadingState.loaded&&await this._loadingState.onLoaded,this._windowLike.postMessage(i)}toString(){return`${this.id}@${this._windowLike}`}dispose(){this._disposed||(this._disposed=!0,this._windowLike.removeEventListener("message",this._messageHandler))}};function zon(i){if(typeof window>"u")throw new Error("call this function from the main browser thread");return new q4e(i)}function Uon(i){if(typeof window>"u")throw new Error("call this function from the main browser thread");return new q4e(i.contentWindow,i.contentWindow,{loaded:window.document.readyState==="complete",onLoaded:new Promise(e=>{window.addEventListener("load",()=>e())})})}const $on=Object.freeze(Object.defineProperty({__proto__:null,MonacoLspClient:Bon,WebSocketTransport:Von,createTransportToIFrame:Uon,createTransportToWorker:zon},Symbol.toStringTag,{value:"Module"}));function qon(i,e){var n;const t=globalThis.MonacoEnvironment;if(t!=null&&t.createTrustedTypesPolicy)try{return t.createTrustedTypesPolicy(i,e)}catch(s){console.error(s);return}try{return(n=globalThis.trustedTypes)==null?void 0:n.createPolicy(i,e)}catch(s){console.error(s);return}}let FB;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?FB=globalThis.workerttPolicy:FB=qon("defaultWorkerFactory",{createScriptURL:i=>i});function Kon(i){const e=i.label,t=globalThis.MonacoEnvironment;if(t){if(typeof t.getWorker=="function")return t.getWorker("workerMain.js",e);if(typeof t.getWorkerUrl=="function"){const n=t.getWorkerUrl("workerMain.js",e);return new Worker(FB?FB.createScriptURL(n):n,{name:e,type:"module"})}}if(i.createWorker)return i.createWorker();throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function Gon(i){const e=Promise.resolve(Kon({label:i.label??"monaco-editor-worker",moduleId:i.moduleId,createWorker:i.createWorker})).then(t=>(t.postMessage("ignore"),t.postMessage(i.createData),t));return xp.createWebWorker({worker:e,host:i.host,keepIdleModels:i.keepIdleModels})}function K4e(){return Lsn}const qK=globalThis.MonacoEnvironment;qK!=null&&qK.globalAPI&&(globalThis.monaco=K4e());const rV=K4e();rV.languages.css=o4e;rV.languages.html=d4e;rV.languages.typescript=C4e;rV.languages.json=g4e;const Yon=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:X3e,Emitter:h0,KeyCode:Z3e,KeyMod:J3e,MarkerSeverity:Rh,MarkerTag:OB,Position:vx,Range:GD,Selection:e4e,SelectionDirection:t4e,Token:n4e,Uri:eV,createWebWorker:Gon,css:o4e,editor:xp,html:d4e,json:g4e,languages:at,lsp:$on,typescript:C4e},Symbol.toStringTag,{value:"Module"}));function Qon(i){return new Worker("/assets/editor.worker-DyuDvpVp.js",{name:i==null?void 0:i.name})}function Xon(i){return new Worker("/assets/json.worker-leyajbqV.js",{name:i==null?void 0:i.name})}self.MonacoEnvironment={getWorker(i,e){return e==="json"?new Xon:new Qon}};bre.config({monaco:Yon});const Zon=new V8e({defaultOptions:{queries:{staleTime:3e4,retry:1}}});async function Jon(){a6e.createRoot(document.getElementById("root")).render(d.jsx(L.StrictMode,{children:d.jsx(c8e,{children:d.jsx(KBe,{children:d.jsx(z8e,{client:Zon,children:d.jsxs(wBe,{defaultTheme:"system",storageKey:"eddi-theme",children:[d.jsx(Cpt,{}),d.jsx(_Be,{position:"bottom-right",richColors:!0,closeButton:!0})]})})})})}))}Jon();export{Rh as M,GD as R,eV as U,OB as a,Gon as c,xp as e,at as l,y4e as t}; diff --git a/src/main/resources/META-INF/resources/assets/index-DwjjPW4w.css b/src/main/resources/META-INF/resources/assets/index-DwjjPW4w.css new file mode 100644 index 0000000000..b308234753 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/index-DwjjPW4w.css @@ -0,0 +1 @@ +/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-divide-x-reverse:0}}}@layer theme{:root,:host{--font-sans:"Noto Sans Variable", "Noto Sans Arabic Variable", "Noto Sans Thai Variable", "Noto Sans Devanagari Variable", "Noto Sans JP Variable", "Noto Sans KR Variable", "Noto Sans SC Variable", "Noto Sans TC Variable", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-lime-500:oklch(76.8% .233 130.85);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-900:oklch(38% .189 293.745);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-900:oklch(38.1% .176 304.987);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-2xl:96rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--radius:.5rem;--color-primary:#f59e0b;--color-primary-foreground:#0c0a09;--color-secondary:#f5f5f4;--color-secondary-foreground:#1c1917;--color-accent:#fbbf24;--color-destructive:#dc2626;--color-destructive-foreground:#fff;--color-muted:#f5f5f4;--color-muted-foreground:#78716c;--color-background:#fafaf9;--color-foreground:#1c1917;--color-card:#fff;--color-card-foreground:#1c1917;--color-popover:#fff;--color-popover-foreground:#1c1917;--color-border:#e7e5e4;--color-input:#e7e5e4;--color-ring:#f59e0b;--color-sidebar:#1c1917;--color-sidebar-foreground:#d6d3d1;--color-sidebar-border:#292524;--color-sidebar-accent:#f59e0b}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}button,[role=button],a,select,label:has(input[type=checkbox]),label:has(input[type=radio]){cursor:pointer}body{font-family:var(--font-sans)}a:focus-visible,button:focus-visible,select:focus-visible,textarea:focus-visible,input:focus-visible,[tabindex]:focus-visible,[role=tab]:focus-visible,[role=radio]:focus-visible,[role=menuitem]:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px;border-radius:var(--radius)}.skip-to-main{z-index:9999;width:1px;height:1px;position:absolute;top:auto;left:-9999px;overflow:hidden}.skip-to-main:focus{background:var(--color-primary);width:auto;height:auto;color:var(--color-primary-foreground);border-radius:var(--radius);padding:.5rem 1.5rem;font-size:.875rem;font-weight:600;position:fixed;top:.5rem;left:50%;overflow:visible;transform:translate(-50%);box-shadow:0 4px 12px #0000004d}}@layer components{.prose pre{background-color:var(--color-muted);border:1px solid var(--color-border)}.prose code{color:var(--color-primary);font-weight:500}.prose a{color:var(--color-primary);text-decoration:underline}.tour-spotlight{pointer-events:none;border-radius:12px;transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:0 0 0 9999px #000000a6}.tour-spotlight:after{content:"";border:2px solid var(--color-primary);pointer-events:none;border-radius:14px;animation:2s ease-in-out infinite pulse-ring;position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px}@keyframes pulse-ring{0%,to{opacity:.4;transform:scale(1)}50%{opacity:.8;transform:scale(1.03)}}.tour-tooltip{animation:.25s ease-out tooltip-enter}@keyframes tooltip-enter{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.welcome-modal-backdrop{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#0009}.welcome-modal-card{-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:#18181bf2;border:1px solid #f59e0b26}.carousel-dot{transition:all .2s}.carousel-dot-active{background:var(--color-primary);transform:scale(1.2)}@keyframes fadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.cq-card-grid{grid-template-columns:1fr;gap:1rem;display:grid}@container main (min-width:32rem){.cq-card-grid{grid-template-columns:repeat(2,1fr)}}@container main (min-width:56rem){.cq-card-grid{grid-template-columns:repeat(3,1fr)}}@container main (min-width:76rem){.cq-card-grid{grid-template-columns:repeat(4,1fr)}}.cq-stat-grid{grid-template-columns:1fr;gap:1rem;display:grid}@container main (min-width:32rem){.cq-stat-grid{grid-template-columns:repeat(2,1fr)}}@container main (min-width:56rem){.cq-stat-grid{grid-template-columns:repeat(4,1fr)}}@keyframes pulse-border{0%,to{border-color:var(--color-primary)}50%{border-color:color-mix(in oklch,var(--color-primary) 40%,transparent)}}}@layer utilities{.\@container\/main{container:main/inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-4{inset:calc(var(--spacing) * -4)}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.-inset-s-\[31px\]{inset-inline-start:-31px}.inset-s-0{inset-inline-start:calc(var(--spacing) * 0)}.inset-s-1\.5{inset-inline-start:calc(var(--spacing) * 1.5)}.inset-s-1\/2{inset-inline-start:50%}.inset-s-2{inset-inline-start:calc(var(--spacing) * 2)}.inset-s-3{inset-inline-start:calc(var(--spacing) * 3)}.inset-s-14{inset-inline-start:calc(var(--spacing) * 14)}.start{inset-inline-start:var(--spacing)}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-2{inset-inline-start:calc(var(--spacing) * 2)}.start-2\.5{inset-inline-start:calc(var(--spacing) * 2.5)}.start-3{inset-inline-start:calc(var(--spacing) * 3)}.-end-1{inset-inline-end:calc(var(--spacing) * -1)}.-inset-e-0\.5{inset-inline-end:calc(var(--spacing) * -.5)}.end{inset-inline-end:var(--spacing)}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-2{inset-inline-end:calc(var(--spacing) * 2)}.end-4{inset-inline-end:calc(var(--spacing) * 4)}.inset-e-0{inset-inline-end:calc(var(--spacing) * 0)}.inset-e-1\.5{inset-inline-end:calc(var(--spacing) * 1.5)}.inset-e-2{inset-inline-end:calc(var(--spacing) * 2)}.inset-e-2\.5{inset-inline-end:calc(var(--spacing) * 2.5)}.inset-e-3{inset-inline-end:calc(var(--spacing) * 3)}.inset-e-4{inset-inline-end:calc(var(--spacing) * 4)}.-top-0\.5{top:calc(var(--spacing) * -.5)}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:calc(var(--spacing) * 0)}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[15\%\]{top:15%}.top-\[50\%\]{top:50%}.top-full{top:100%}.-bottom-4{bottom:calc(var(--spacing) * -4)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-full{bottom:100%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-9997{z-index:9997}.z-9999{z-index:9999}.z-10000{z-index:10000}.z-\[100\]{z-index:100}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-4{grid-column:span 4/span 4}.col-span-7{grid-column:span 7/span 7}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing) * 4)}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mx-1\.5{margin-inline:calc(var(--spacing) * 1.5)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-auto{margin-block:auto}.ms-0\.5{margin-inline-start:calc(var(--spacing) * .5)}.ms-1{margin-inline-start:calc(var(--spacing) * 1)}.ms-1\.5{margin-inline-start:calc(var(--spacing) * 1.5)}.ms-2{margin-inline-start:calc(var(--spacing) * 2)}.ms-3{margin-inline-start:calc(var(--spacing) * 3)}.ms-4{margin-inline-start:calc(var(--spacing) * 4)}.ms-5{margin-inline-start:calc(var(--spacing) * 5)}.ms-6{margin-inline-start:calc(var(--spacing) * 6)}.ms-8{margin-inline-start:calc(var(--spacing) * 8)}.ms-10{margin-inline-start:calc(var(--spacing) * 10)}.ms-11{margin-inline-start:calc(var(--spacing) * 11)}.ms-18{margin-inline-start:calc(var(--spacing) * 18)}.ms-22{margin-inline-start:calc(var(--spacing) * 22)}.ms-auto{margin-inline-start:auto}.me-0\.5{margin-inline-end:calc(var(--spacing) * .5)}.me-1{margin-inline-end:calc(var(--spacing) * 1)}.me-1\.5{margin-inline-end:calc(var(--spacing) * 1.5)}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.-mt-2{margin-top:calc(var(--spacing) * -2)}.-mt-\[2px\]{margin-top:-2px}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-32{height:calc(var(--spacing) * 32)}.h-40{height:calc(var(--spacing) * 40)}.h-64{height:calc(var(--spacing) * 64)}.h-\[70vh\]{height:70vh}.h-\[400px\]{height:400px}.h-\[calc\(100vh-\(--spacing\(16\)\)-\(--spacing\(12\)\)\)\]{height:calc(100vh - (calc(var(--spacing) * 16)) - (calc(var(--spacing) * 12)))}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-0{max-height:calc(var(--spacing) * 0)}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[120px\]{max-height:120px}.max-h-\[360px\]{max-height:360px}.max-h-\[400px\]{max-height:400px}.max-h-\[500px\]{max-height:500px}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-\[40px\]{min-height:40px}.min-h-\[44px\]{min-height:44px}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[380px\]{min-height:380px}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-\[420px\]{width:420px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-\[6rem\]{max-width:6rem}.max-w-\[75\%\]{max-width:75%}.max-w-\[80\%\]{max-width:80%}.max-w-\[85\%\]{max-width:85%}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[200px\]{max-width:200px}.max-w-\[300px\]{max-width:300px}.max-w-\[580px\]{max-width:580px}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-screen-2xl{max-width:var(--breakpoint-2xl)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-14{min-width:calc(var(--spacing) * 14)}.min-w-\[70px\]{min-width:70px}.min-w-\[120px\]{min-width:120px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-0\.5{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\[1\.01\]{scale:1.01}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform-\[translateX\(-50\%\)\]{transform:translate(-50%)}.transform-gpu{transform:translateZ(0) var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[fadeIn_300ms_ease-out\]{animation:.3s ease-out fadeIn}.animate-\[pulse-border_2s_ease-in-out_infinite\]{animation:2s ease-in-out infinite pulse-border}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_100px_120px\]{grid-template-columns:1fr 100px 120px}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 0) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 0) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.-space-x-1\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -1.5) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -1.5) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-1{row-gap:calc(var(--spacing) * 1)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--color-border)}:where(.divide-border\/50>:not(:last-child)){border-color:#e7e5e480}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/50>:not(:last-child)){border-color:color-mix(in oklab,var(--color-border) 50%,transparent)}}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:var(--radius)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.rounded-s-md{border-start-start-radius:var(--radius-md);border-end-start-radius:var(--radius-md)}.rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.rounded-e-md{border-start-end-radius:var(--radius-md);border-end-end-radius:var(--radius-md)}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-ee-md{border-end-end-radius:var(--radius-md)}.rounded-es-md{border-end-start-radius:var(--radius-md)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-0{border-inline-start-style:var(--tw-border-style);border-inline-start-width:0}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-e-0{border-inline-end-style:var(--tw-border-style);border-inline-end-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-accent{border-color:var(--color-accent)}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400\/30{border-color:#fcbb004d}@supports (color:color-mix(in lab,red,red)){.border-amber-400\/30{border-color:color-mix(in oklab,var(--color-amber-400) 30%,transparent)}}.border-amber-400\/40{border-color:#fcbb0066}@supports (color:color-mix(in lab,red,red)){.border-amber-400\/40{border-color:color-mix(in oklab,var(--color-amber-400) 40%,transparent)}}.border-amber-400\/50{border-color:#fcbb0080}@supports (color:color-mix(in lab,red,red)){.border-amber-400\/50{border-color:color-mix(in oklab,var(--color-amber-400) 50%,transparent)}}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500) 50%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border{border-color:var(--color-border)}.border-border\/30{border-color:#e7e5e44d}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,var(--color-border) 30%,transparent)}}.border-border\/50{border-color:#e7e5e480}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--color-border) 50%,transparent)}}.border-border\/60{border-color:#e7e5e499}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,var(--color-border) 60%,transparent)}}.border-current{border-color:currentColor}.border-destructive{border-color:var(--color-destructive)}.border-destructive\/20{border-color:#dc262633}@supports (color:color-mix(in lab,red,red)){.border-destructive\/20{border-color:color-mix(in oklab,var(--color-destructive) 20%,transparent)}}.border-destructive\/30{border-color:#dc26264d}@supports (color:color-mix(in lab,red,red)){.border-destructive\/30{border-color:color-mix(in oklab,var(--color-destructive) 30%,transparent)}}.border-destructive\/40{border-color:#dc262666}@supports (color:color-mix(in lab,red,red)){.border-destructive\/40{border-color:color-mix(in oklab,var(--color-destructive) 40%,transparent)}}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-gray-500\/20{border-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.border-gray-500\/20{border-color:color-mix(in oklab,var(--color-gray-500) 20%,transparent)}}.border-gray-500\/30{border-color:#6a72824d}@supports (color:color-mix(in lab,red,red)){.border-gray-500\/30{border-color:color-mix(in oklab,var(--color-gray-500) 30%,transparent)}}.border-indigo-500\/20{border-color:#625fff33}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/20{border-color:color-mix(in oklab,var(--color-indigo-500) 20%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-input{border-color:var(--color-input)}.border-muted{border-color:var(--color-muted)}.border-muted-foreground{border-color:var(--color-muted-foreground)}.border-muted-foreground\/20{border-color:#78716c33}@supports (color:color-mix(in lab,red,red)){.border-muted-foreground\/20{border-color:color-mix(in oklab,var(--color-muted-foreground) 20%,transparent)}}.border-muted-foreground\/30{border-color:#78716c4d}@supports (color:color-mix(in lab,red,red)){.border-muted-foreground\/30{border-color:color-mix(in oklab,var(--color-muted-foreground) 30%,transparent)}}.border-muted-foreground\/40{border-color:#78716c66}@supports (color:color-mix(in lab,red,red)){.border-muted-foreground\/40{border-color:color-mix(in oklab,var(--color-muted-foreground) 40%,transparent)}}.border-orange-500\/20{border-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/20{border-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-primary{border-color:var(--color-primary)}.border-primary\/15{border-color:#f59e0b26}@supports (color:color-mix(in lab,red,red)){.border-primary\/15{border-color:color-mix(in oklab,var(--color-primary) 15%,transparent)}}.border-primary\/20{border-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,var(--color-primary) 20%,transparent)}}.border-primary\/30{border-color:#f59e0b4d}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,var(--color-primary) 30%,transparent)}}.border-primary\/40{border-color:#f59e0b66}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,var(--color-primary) 40%,transparent)}}.border-primary\/50{border-color:#f59e0b80}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,var(--color-primary) 50%,transparent)}}.border-primary\/60{border-color:#f59e0b99}@supports (color:color-mix(in lab,red,red)){.border-primary\/60{border-color:color-mix(in oklab,var(--color-primary) 60%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-red-600\/40{border-color:#e4001466}@supports (color:color-mix(in lab,red,red)){.border-red-600\/40{border-color:color-mix(in oklab,var(--color-red-600) 40%,transparent)}}.border-rose-500\/20{border-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/20{border-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/30{border-color:color-mix(in oklab,var(--color-rose-500) 30%,transparent)}}.border-sidebar-accent{border-color:var(--color-sidebar-accent)}.border-sidebar-border{border-color:var(--color-sidebar-border)}.border-sidebar-border\/50{border-color:#29252480}@supports (color:color-mix(in lab,red,red)){.border-sidebar-border\/50{border-color:color-mix(in oklab,var(--color-sidebar-border) 50%,transparent)}}.border-sidebar-foreground\/30{border-color:#d6d3d14d}@supports (color:color-mix(in lab,red,red)){.border-sidebar-foreground\/30{border-color:color-mix(in oklab,var(--color-sidebar-foreground) 30%,transparent)}}.border-sky-400\/30{border-color:#00bcfe4d}@supports (color:color-mix(in lab,red,red)){.border-sky-400\/30{border-color:color-mix(in oklab,var(--color-sky-400) 30%,transparent)}}.border-sky-500\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/30{border-color:color-mix(in oklab,var(--color-sky-500) 30%,transparent)}}.border-sky-500\/40{border-color:#00a5ef66}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/40{border-color:color-mix(in oklab,var(--color-sky-500) 40%,transparent)}}.border-teal-500\/20{border-color:#00baa733}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/20{border-color:color-mix(in oklab,var(--color-teal-500) 20%,transparent)}}.border-teal-500\/30{border-color:#00baa74d}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/30{border-color:color-mix(in oklab,var(--color-teal-500) 30%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-t-primary{border-top-color:var(--color-primary)}.border-t-transparent{border-top-color:#0000}.border-b-amber-500\/20{border-bottom-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-b-amber-500\/20{border-bottom-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-b-indigo-500\/20{border-bottom-color:#625fff33}@supports (color:color-mix(in lab,red,red)){.border-b-indigo-500\/20{border-bottom-color:color-mix(in oklab,var(--color-indigo-500) 20%,transparent)}}.border-b-orange-500\/20{border-bottom-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.border-b-orange-500\/20{border-bottom-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.border-b-rose-500\/20{border-bottom-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.border-b-rose-500\/20{border-bottom-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.border-b-teal-500\/20{border-bottom-color:#00baa733}@supports (color:color-mix(in lab,red,red)){.border-b-teal-500\/20{border-bottom-color:color-mix(in oklab,var(--color-teal-500) 20%,transparent)}}.border-b-violet-500\/20{border-bottom-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-b-violet-500\/20{border-bottom-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.bg-\[\#4A154B\]{background-color:#4a154b}.bg-\[\#4A154B\]\/10{background-color:#4a154b1a}.bg-accent\/10{background-color:#fbbf241a}@supports (color:color-mix(in lab,red,red)){.bg-accent\/10{background-color:color-mix(in oklab,var(--color-accent) 10%,transparent)}}.bg-accent\/20{background-color:#fbbf2433}@supports (color:color-mix(in lab,red,red)){.bg-accent\/20{background-color:color-mix(in oklab,var(--color-accent) 20%,transparent)}}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\/50{background-color:#fffbeb80}@supports (color:color-mix(in lab,red,red)){.bg-amber-50\/50{background-color:color-mix(in oklab,var(--color-amber-50) 50%,transparent)}}.bg-amber-50\/80{background-color:#fffbebcc}@supports (color:color-mix(in lab,red,red)){.bg-amber-50\/80{background-color:color-mix(in oklab,var(--color-amber-50) 80%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-300\/60{background-color:#ffd23699}@supports (color:color-mix(in lab,red,red)){.bg-amber-300\/60{background-color:color-mix(in oklab,var(--color-amber-300) 60%,transparent)}}.bg-amber-400\/5{background-color:#fcbb000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/5{background-color:color-mix(in oklab,var(--color-amber-400) 5%,transparent)}}.bg-amber-400\/10{background-color:#fcbb001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/10{background-color:color-mix(in oklab,var(--color-amber-400) 10%,transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/30{background-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/30{background-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-amber-500\/90{background-color:#f99c00e6}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/90{background-color:color-mix(in oklab,var(--color-amber-500) 90%,transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-background{background-color:var(--color-background)}.bg-background\/20{background-color:#fafaf933}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,var(--color-background) 20%,transparent)}}.bg-background\/60{background-color:#fafaf999}@supports (color:color-mix(in lab,red,red)){.bg-background\/60{background-color:color-mix(in oklab,var(--color-background) 60%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/5{background-color:color-mix(in oklab,var(--color-blue-500) 5%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.bg-blue-500\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/15{background-color:color-mix(in oklab,var(--color-blue-500) 15%,transparent)}}.bg-blue-500\/50{background-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/50{background-color:color-mix(in oklab,var(--color-blue-500) 50%,transparent)}}.bg-blue-500\/80{background-color:#3080ffcc}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/80{background-color:color-mix(in oklab,var(--color-blue-500) 80%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-card{background-color:var(--color-card)}.bg-card\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,var(--color-card) 30%,transparent)}}.bg-card\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,var(--color-card) 50%,transparent)}}.bg-card\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-card\/80{background-color:color-mix(in oklab,var(--color-card) 80%,transparent)}}.bg-current{background-color:currentColor}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/80{background-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/80{background-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.bg-destructive{background-color:var(--color-destructive)}.bg-destructive\/5{background-color:#dc26260d}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/5{background-color:color-mix(in oklab,var(--color-destructive) 5%,transparent)}}.bg-destructive\/10{background-color:#dc26261a}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--color-destructive) 10%,transparent)}}.bg-destructive\/15{background-color:#dc262626}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/15{background-color:color-mix(in oklab,var(--color-destructive) 15%,transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/40{background-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/40{background-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.bg-emerald-500\/50{background-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/50{background-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-foreground\/5{background-color:#1c19170d}@supports (color:color-mix(in lab,red,red)){.bg-foreground\/5{background-color:color-mix(in oklab,var(--color-foreground) 5%,transparent)}}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-500\/10{background-color:#6a72821a}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\/10{background-color:color-mix(in oklab,var(--color-gray-500) 10%,transparent)}}.bg-gray-500\/15{background-color:#6a728226}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\/15{background-color:color-mix(in oklab,var(--color-gray-500) 15%,transparent)}}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500) 10%,transparent)}}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/80{background-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/80{background-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.bg-lime-500{background-color:var(--color-lime-500)}.bg-muted{background-color:var(--color-muted)}.bg-muted-foreground{background-color:var(--color-muted-foreground)}.bg-muted-foreground\/40{background-color:#78716c66}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab,var(--color-muted-foreground) 40%,transparent)}}.bg-muted-foreground\/50{background-color:#78716c80}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/50{background-color:color-mix(in oklab,var(--color-muted-foreground) 50%,transparent)}}.bg-muted-foreground\/60{background-color:#78716c99}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/60{background-color:color-mix(in oklab,var(--color-muted-foreground) 60%,transparent)}}.bg-muted\/20{background-color:#f5f5f433}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,var(--color-muted) 20%,transparent)}}.bg-muted\/30{background-color:#f5f5f44d}@supports (color:color-mix(in lab,red,red)){.bg-muted\/30{background-color:color-mix(in oklab,var(--color-muted) 30%,transparent)}}.bg-muted\/40{background-color:#f5f5f466}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,var(--color-muted) 40%,transparent)}}.bg-muted\/50{background-color:#f5f5f480}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.bg-muted\/60{background-color:#f5f5f499}@supports (color:color-mix(in lab,red,red)){.bg-muted\/60{background-color:color-mix(in oklab,var(--color-muted) 60%,transparent)}}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\/5{background-color:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/5{background-color:color-mix(in oklab,var(--color-orange-500) 5%,transparent)}}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500) 10%,transparent)}}.bg-orange-500\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/15{background-color:color-mix(in oklab,var(--color-orange-500) 15%,transparent)}}.bg-orange-500\/80{background-color:#fe6e00cc}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/80{background-color:color-mix(in oklab,var(--color-orange-500) 80%,transparent)}}.bg-pink-500{background-color:var(--color-pink-500)}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-popover{background-color:var(--color-popover)}.bg-primary{background-color:var(--color-primary)}.bg-primary\/5{background-color:#f59e0b0d}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,var(--color-primary) 5%,transparent)}}.bg-primary\/10{background-color:#f59e0b1a}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.bg-primary\/15{background-color:#f59e0b26}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,var(--color-primary) 15%,transparent)}}.bg-primary\/20{background-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--color-primary) 20%,transparent)}}.bg-primary\/30{background-color:#f59e0b4d}@supports (color:color-mix(in lab,red,red)){.bg-primary\/30{background-color:color-mix(in oklab,var(--color-primary) 30%,transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\/5{background-color:#ac4bff0d}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/5{background-color:color-mix(in oklab,var(--color-purple-500) 5%,transparent)}}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500) 10%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-600\/20{background-color:#e4001433}@supports (color:color-mix(in lab,red,red)){.bg-red-600\/20{background-color:color-mix(in oklab,var(--color-red-600) 20%,transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-500\/5{background-color:#ff23570d}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/5{background-color:color-mix(in oklab,var(--color-rose-500) 5%,transparent)}}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.bg-rose-500\/80{background-color:#ff2357cc}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/80{background-color:color-mix(in oklab,var(--color-rose-500) 80%,transparent)}}.bg-secondary{background-color:var(--color-secondary)}.bg-secondary\/10{background-color:#f5f5f41a}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/10{background-color:color-mix(in oklab,var(--color-secondary) 10%,transparent)}}.bg-secondary\/20{background-color:#f5f5f433}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/20{background-color:color-mix(in oklab,var(--color-secondary) 20%,transparent)}}.bg-secondary\/30{background-color:#f5f5f44d}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/30{background-color:color-mix(in oklab,var(--color-secondary) 30%,transparent)}}.bg-secondary\/50{background-color:#f5f5f480}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/50{background-color:color-mix(in oklab,var(--color-secondary) 50%,transparent)}}.bg-secondary\/80{background-color:#f5f5f4cc}@supports (color:color-mix(in lab,red,red)){.bg-secondary\/80{background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}.bg-sidebar{background-color:var(--color-sidebar)}.bg-sidebar-accent{background-color:var(--color-sidebar-accent)}.bg-sidebar-accent\/10{background-color:#f59e0b1a}@supports (color:color-mix(in lab,red,red)){.bg-sidebar-accent\/10{background-color:color-mix(in oklab,var(--color-sidebar-accent) 10%,transparent)}}.bg-sidebar-border{background-color:var(--color-sidebar-border)}.bg-sidebar-border\/10{background-color:#2925241a}@supports (color:color-mix(in lab,red,red)){.bg-sidebar-border\/10{background-color:color-mix(in oklab,var(--color-sidebar-border) 10%,transparent)}}.bg-sidebar-foreground\/30{background-color:#d6d3d14d}@supports (color:color-mix(in lab,red,red)){.bg-sidebar-foreground\/30{background-color:color-mix(in oklab,var(--color-sidebar-foreground) 30%,transparent)}}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-500\/5{background-color:#00a5ef0d}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/5{background-color:color-mix(in oklab,var(--color-sky-500) 5%,transparent)}}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500) 10%,transparent)}}.bg-sky-500\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/15{background-color:color-mix(in oklab,var(--color-sky-500) 15%,transparent)}}.bg-sky-500\/20{background-color:#00a5ef33}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/20{background-color:color-mix(in oklab,var(--color-sky-500) 20%,transparent)}}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-500\/5{background-color:#00baa70d}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/5{background-color:color-mix(in oklab,var(--color-teal-500) 5%,transparent)}}.bg-teal-500\/10{background-color:#00baa71a}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/10{background-color:color-mix(in oklab,var(--color-teal-500) 10%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-teal-500\/80{background-color:#00baa7cc}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/80{background-color:color-mix(in oklab,var(--color-teal-500) 80%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\/5{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/5{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/80{background-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/80{background-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-violet-500\/\[0\.02\]{background-color:#8d54ff05}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/\[0\.02\]{background-color:color-mix(in oklab,var(--color-violet-500) 2%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\/60{background-color:#fff9}@supports (color:color-mix(in lab,red,red)){.bg-white\/60{background-color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.bg-zinc-500\/10{background-color:#71717b1a}@supports (color:color-mix(in lab,red,red)){.bg-zinc-500\/10{background-color:color-mix(in oklab,var(--color-zinc-500) 10%,transparent)}}.bg-linear-to-b{--tw-gradient-position:to bottom}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-b{--tw-gradient-position:to bottom in oklab}}.bg-linear-to-b{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-amber-500{--tw-gradient-from:var(--color-amber-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-500\/10{--tw-gradient-from:#f99c001a}@supports (color:color-mix(in lab,red,red)){.from-amber-500\/10{--tw-gradient-from:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.from-amber-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-blue-500\/10{--tw-gradient-from:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.from-blue-500\/10{--tw-gradient-from:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.from-blue-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-card{--tw-gradient-from:var(--color-card);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-500\/10{--tw-gradient-from:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.from-emerald-500\/10{--tw-gradient-from:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.from-emerald-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary{--tw-gradient-from:var(--color-primary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary\/5{--tw-gradient-from:#f59e0b0d}@supports (color:color-mix(in lab,red,red)){.from-primary\/5{--tw-gradient-from:color-mix(in oklab, var(--color-primary) 5%, transparent)}}.from-primary\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary\/10{--tw-gradient-from:#f59e0b1a}@supports (color:color-mix(in lab,red,red)){.from-primary\/10{--tw-gradient-from:color-mix(in oklab, var(--color-primary) 10%, transparent)}}.from-primary\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-violet-500{--tw-gradient-from:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-violet-500\/10{--tw-gradient-from:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.from-violet-500\/10{--tw-gradient-from:color-mix(in oklab, var(--color-violet-500) 10%, transparent)}}.from-violet-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-primary{--tw-gradient-via:var(--color-primary);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-primary\/80{--tw-gradient-via:#f59e0bcc}@supports (color:color-mix(in lab,red,red)){.via-primary\/80{--tw-gradient-via:color-mix(in oklab, var(--color-primary) 80%, transparent)}}.via-primary\/80{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500\/5{--tw-gradient-to:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.to-blue-500\/5{--tw-gradient-to:color-mix(in oklab, var(--color-blue-500) 5%, transparent)}}.to-blue-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-cyan-600{--tw-gradient-to:var(--color-cyan-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500\/5{--tw-gradient-to:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.to-emerald-500\/5{--tw-gradient-to:color-mix(in oklab, var(--color-emerald-500) 5%, transparent)}}.to-emerald-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-600{--tw-gradient-to:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-600{--tw-gradient-to:var(--color-orange-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary\/5{--tw-gradient-to:#f59e0b0d}@supports (color:color-mix(in lab,red,red)){.to-primary\/5{--tw-gradient-to:color-mix(in oklab, var(--color-primary) 5%, transparent)}}.to-primary\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary\/60{--tw-gradient-to:#f59e0b99}@supports (color:color-mix(in lab,red,red)){.to-primary\/60{--tw-gradient-to:color-mix(in oklab, var(--color-primary) 60%, transparent)}}.to-primary\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-violet-500\/5{--tw-gradient-to:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.to-violet-500\/5{--tw-gradient-to:color-mix(in oklab, var(--color-violet-500) 5%, transparent)}}.to-violet-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-amber-500{fill:var(--color-amber-500)}.fill-current{fill:currentColor}.fill-emerald-500{fill:var(--color-emerald-500)}.fill-sidebar{fill:var(--color-sidebar)}.fill-sidebar-accent{fill:var(--color-sidebar-accent)}.p-0{padding:calc(var(--spacing) * 0)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-12{padding:calc(var(--spacing) * 12)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-14{padding-inline:calc(var(--spacing) * 14)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.ps-1{padding-inline-start:calc(var(--spacing) * 1)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-2\.5{padding-inline-start:calc(var(--spacing) * 2.5)}.ps-3{padding-inline-start:calc(var(--spacing) * 3)}.ps-5{padding-inline-start:calc(var(--spacing) * 5)}.ps-6{padding-inline-start:calc(var(--spacing) * 6)}.ps-7{padding-inline-start:calc(var(--spacing) * 7)}.ps-8{padding-inline-start:calc(var(--spacing) * 8)}.ps-9{padding-inline-start:calc(var(--spacing) * 9)}.ps-10{padding-inline-start:calc(var(--spacing) * 10)}.pe-1{padding-inline-end:calc(var(--spacing) * 1)}.pe-2{padding-inline-end:calc(var(--spacing) * 2)}.pe-3{padding-inline-end:calc(var(--spacing) * 3)}.pe-4{padding-inline-end:calc(var(--spacing) * 4)}.pe-6{padding-inline-end:calc(var(--spacing) * 6)}.pe-7{padding-inline-end:calc(var(--spacing) * 7)}.pe-8{padding-inline-end:calc(var(--spacing) * 8)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pe-14{padding-inline-end:calc(var(--spacing) * 14)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-end{text-align:end}.text-start{text-align:start}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#4A154B\]{color:#4a154b}.text-accent{color:var(--color-accent)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\/60{color:#f99c0099}@supports (color:color-mix(in lab,red,red)){.text-amber-500\/60{color:color-mix(in oklab,var(--color-amber-500) 60%,transparent)}}.text-amber-600{color:var(--color-amber-600)}.text-amber-600\/70{color:#dd7400b3}@supports (color:color-mix(in lab,red,red)){.text-amber-600\/70{color:color-mix(in oklab,var(--color-amber-600) 70%,transparent)}}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-amber-950{color:var(--color-amber-950)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-border{color:var(--color-border)}.text-card-foreground{color:var(--color-card-foreground)}.text-cyan-400{color:var(--color-cyan-400)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-destructive{color:var(--color-destructive)}.text-destructive-foreground{color:var(--color-destructive-foreground)}.text-destructive\/50{color:#dc262680}@supports (color:color-mix(in lab,red,red)){.text-destructive\/50{color:color-mix(in oklab,var(--color-destructive) 50%,transparent)}}.text-destructive\/70{color:#dc2626b3}@supports (color:color-mix(in lab,red,red)){.text-destructive\/70{color:color-mix(in oklab,var(--color-destructive) 70%,transparent)}}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-500\/50{color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.text-emerald-500\/50{color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.text-emerald-500\/60{color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.text-emerald-500\/60{color:color-mix(in oklab,var(--color-emerald-500) 60%,transparent)}}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-600\/70{color:#009767b3}@supports (color:color-mix(in lab,red,red)){.text-emerald-600\/70{color:color-mix(in oklab,var(--color-emerald-600) 70%,transparent)}}.text-emerald-700{color:var(--color-emerald-700)}.text-foreground{color:var(--color-foreground)}.text-foreground\/40{color:#1c191766}@supports (color:color-mix(in lab,red,red)){.text-foreground\/40{color:color-mix(in oklab,var(--color-foreground) 40%,transparent)}}.text-foreground\/60{color:#1c191799}@supports (color:color-mix(in lab,red,red)){.text-foreground\/60{color:color-mix(in oklab,var(--color-foreground) 60%,transparent)}}.text-foreground\/70{color:#1c1917b3}@supports (color:color-mix(in lab,red,red)){.text-foreground\/70{color:color-mix(in oklab,var(--color-foreground) 70%,transparent)}}.text-foreground\/80{color:#1c1917cc}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--color-foreground) 80%,transparent)}}.text-foreground\/90{color:#1c1917e6}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,var(--color-foreground) 90%,transparent)}}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-green-500{color:var(--color-green-500)}.text-indigo-400{color:var(--color-indigo-400)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-500\/50{color:#625fff80}@supports (color:color-mix(in lab,red,red)){.text-indigo-500\/50{color:color-mix(in oklab,var(--color-indigo-500) 50%,transparent)}}.text-indigo-600{color:var(--color-indigo-600)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-muted-foreground\/15{color:#78716c26}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/15{color:color-mix(in oklab,var(--color-muted-foreground) 15%,transparent)}}.text-muted-foreground\/20{color:#78716c33}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/20{color:color-mix(in oklab,var(--color-muted-foreground) 20%,transparent)}}.text-muted-foreground\/30{color:#78716c4d}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/30{color:color-mix(in oklab,var(--color-muted-foreground) 30%,transparent)}}.text-muted-foreground\/40{color:#78716c66}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,var(--color-muted-foreground) 40%,transparent)}}.text-muted-foreground\/50{color:#78716c80}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,var(--color-muted-foreground) 50%,transparent)}}.text-muted-foreground\/60{color:#78716c99}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--color-muted-foreground) 60%,transparent)}}.text-muted-foreground\/70{color:#78716cb3}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,var(--color-muted-foreground) 70%,transparent)}}.text-orange-400{color:var(--color-orange-400)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-pink-400{color:var(--color-pink-400)}.text-pink-500{color:var(--color-pink-500)}.text-pink-600{color:var(--color-pink-600)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-primary\/60{color:#f59e0b99}@supports (color:color-mix(in lab,red,red)){.text-primary\/60{color:color-mix(in oklab,var(--color-primary) 60%,transparent)}}.text-primary\/70{color:#f59e0bb3}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,var(--color-primary) 70%,transparent)}}.text-primary\/80{color:#f59e0bcc}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,var(--color-primary) 80%,transparent)}}.text-purple-400{color:var(--color-purple-400)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-red-300{color:var(--color-red-300)}.text-red-300\/80{color:#ffa3a3cc}@supports (color:color-mix(in lab,red,red)){.text-red-300\/80{color:color-mix(in oklab,var(--color-red-300) 80%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-rose-400{color:var(--color-rose-400)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.text-sidebar{color:var(--color-sidebar)}.text-sidebar-accent{color:var(--color-sidebar-accent)}.text-sidebar-foreground{color:var(--color-sidebar-foreground)}.text-sidebar-foreground\/30{color:#d6d3d14d}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/30{color:color-mix(in oklab,var(--color-sidebar-foreground) 30%,transparent)}}.text-sidebar-foreground\/40{color:#d6d3d166}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/40{color:color-mix(in oklab,var(--color-sidebar-foreground) 40%,transparent)}}.text-sidebar-foreground\/50{color:#d6d3d180}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/50{color:color-mix(in oklab,var(--color-sidebar-foreground) 50%,transparent)}}.text-sidebar-foreground\/60{color:#d6d3d199}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/60{color:color-mix(in oklab,var(--color-sidebar-foreground) 60%,transparent)}}.text-sidebar-foreground\/70{color:#d6d3d1b3}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/70{color:color-mix(in oklab,var(--color-sidebar-foreground) 70%,transparent)}}.text-sidebar-foreground\/80{color:#d6d3d1cc}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/80{color:color-mix(in oklab,var(--color-sidebar-foreground) 80%,transparent)}}.text-sky-400{color:var(--color-sky-400)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-teal-400{color:var(--color-teal-400)}.text-teal-500{color:var(--color-teal-500)}.text-teal-600{color:var(--color-teal-600)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-white{color:var(--color-white)}.text-zinc-400{color:var(--color-zinc-400)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-amber-600{accent-color:var(--color-amber-600)}.accent-primary{accent-color:var(--color-primary)}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/30{--tw-shadow-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:#f59e0b1a}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-primary) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/25{--tw-shadow-color:#f59e0b40}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-primary) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber-500\/20{--tw-ring-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.ring-amber-500\/20{--tw-ring-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.ring-border{--tw-ring-color:var(--color-border)}.ring-card{--tw-ring-color:var(--color-card)}.ring-destructive\/20{--tw-ring-color:#dc262633}@supports (color:color-mix(in lab,red,red)){.ring-destructive\/20{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.ring-emerald-500\/20{--tw-ring-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.ring-emerald-500\/20{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.ring-primary\/20{--tw-ring-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.ring-primary\/20{--tw-ring-color:color-mix(in oklab, var(--color-primary) 20%, transparent)}}.ring-primary\/30{--tw-ring-color:#f59e0b4d}@supports (color:color-mix(in lab,red,red)){.ring-primary\/30{--tw-ring-color:color-mix(in oklab, var(--color-primary) 30%, transparent)}}.ring-primary\/50{--tw-ring-color:#f59e0b80}@supports (color:color-mix(in lab,red,red)){.ring-primary\/50{--tw-ring-color:color-mix(in oklab, var(--color-primary) 50%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--color-background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-xl{--tw-blur:blur(var(--blur-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-\[max-height\]{transition-property:max-height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,opacity\]{transition-property:width,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\[animation-delay\:0ms\]{animation-delay:0s}.\[animation-delay\:150ms\]{animation-delay:.15s}.\[animation-delay\:300ms\]{animation-delay:.3s}.group-focus-within\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media(hover:hover){.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:bg-amber-500\/20:is(:where(.group):hover *){background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-amber-500\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.group-hover\:bg-primary\/20:is(:where(.group):hover *){background-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-primary\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-primary) 20%,transparent)}}.group-hover\:text-muted-foreground:is(:where(.group):hover *){color:var(--color-muted-foreground)}.group-hover\:text-primary:is(:where(.group):hover *){color:var(--color-primary)}.group-hover\:opacity-50:is(:where(.group):hover *){opacity:.5}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/item\:opacity-100:is(:where(.group\/item):hover *){opacity:1}}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.placeholder\:font-sans::placeholder{font-family:var(--font-sans)}.placeholder\:text-muted-foreground::placeholder{color:var(--color-muted-foreground)}.placeholder\:text-muted-foreground\/50::placeholder{color:#78716c80}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/50::placeholder{color:color-mix(in oklab,var(--color-muted-foreground) 50%,transparent)}}.placeholder\:text-muted-foreground\/60::placeholder{color:#78716c99}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/60::placeholder{color:color-mix(in oklab,var(--color-muted-foreground) 60%,transparent)}}.focus-within\:border-primary\/50:focus-within{border-color:#f59e0b80}@supports (color:color-mix(in lab,red,red)){.focus-within\:border-primary\/50:focus-within{border-color:color-mix(in oklab,var(--color-primary) 50%,transparent)}}.focus-within\:border-ring:focus-within{border-color:var(--color-ring)}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-ring:focus-within{--tw-ring-color:var(--color-ring)}@media(hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:-translate-y-1:hover{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-amber-500\/60:hover{border-color:#f99c0099}@supports (color:color-mix(in lab,red,red)){.hover\:border-amber-500\/60:hover{border-color:color-mix(in oklab,var(--color-amber-500) 60%,transparent)}}.hover\:border-border:hover{border-color:var(--color-border)}.hover\:border-border\/80:hover{border-color:#e7e5e4cc}@supports (color:color-mix(in lab,red,red)){.hover\:border-border\/80:hover{border-color:color-mix(in oklab,var(--color-border) 80%,transparent)}}.hover\:border-foreground\/30:hover{border-color:#1c19174d}@supports (color:color-mix(in lab,red,red)){.hover\:border-foreground\/30:hover{border-color:color-mix(in oklab,var(--color-foreground) 30%,transparent)}}.hover\:border-indigo-500\/50:hover{border-color:#625fff80}@supports (color:color-mix(in lab,red,red)){.hover\:border-indigo-500\/50:hover{border-color:color-mix(in oklab,var(--color-indigo-500) 50%,transparent)}}.hover\:border-muted-foreground\/40:hover{border-color:#78716c66}@supports (color:color-mix(in lab,red,red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab,var(--color-muted-foreground) 40%,transparent)}}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary\/20:hover{border-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,var(--color-primary) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:#f59e0b4d}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,var(--color-primary) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:#f59e0b66}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,var(--color-primary) 40%,transparent)}}.hover\:border-primary\/50:hover{border-color:#f59e0b80}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,var(--color-primary) 50%,transparent)}}.hover\:border-primary\/60:hover{border-color:#f59e0b99}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/60:hover{border-color:color-mix(in oklab,var(--color-primary) 60%,transparent)}}.hover\:border-red-500\/50:hover{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.hover\:border-red-500\/50:hover{border-color:color-mix(in oklab,var(--color-red-500) 50%,transparent)}}.hover\:border-sidebar-foreground\/30:hover{border-color:#d6d3d14d}@supports (color:color-mix(in lab,red,red)){.hover\:border-sidebar-foreground\/30:hover{border-color:color-mix(in oklab,var(--color-sidebar-foreground) 30%,transparent)}}.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-accent\/10:hover{background-color:#fbbf241a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/10:hover{background-color:color-mix(in oklab,var(--color-accent) 10%,transparent)}}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.hover\:bg-amber-600:hover{background-color:var(--color-amber-600)}.hover\:bg-amber-600\/30:hover{background-color:#dd74004d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-600\/30:hover{background-color:color-mix(in oklab,var(--color-amber-600) 30%,transparent)}}.hover\:bg-amber-700:hover{background-color:var(--color-amber-700)}.hover\:bg-background\/50:hover{background-color:#fafaf980}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/50:hover{background-color:color-mix(in oklab,var(--color-background) 50%,transparent)}}.hover\:bg-destructive\/10:hover{background-color:#dc26261a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab,var(--color-destructive) 10%,transparent)}}.hover\:bg-destructive\/20:hover{background-color:#dc262633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab,var(--color-destructive) 20%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:#dc2626e6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.hover\:bg-emerald-50:hover{background-color:var(--color-emerald-50)}.hover\:bg-emerald-500\/20:hover{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/20:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-foreground\/10:hover{background-color:#1c19171a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-foreground\/10:hover{background-color:color-mix(in oklab,var(--color-foreground) 10%,transparent)}}.hover\:bg-indigo-500\/10:hover{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/10:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.hover\:bg-muted:hover{background-color:var(--color-muted)}.hover\:bg-muted\/30:hover{background-color:#f5f5f44d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/30:hover{background-color:color-mix(in oklab,var(--color-muted) 30%,transparent)}}.hover\:bg-muted\/50:hover{background-color:#f5f5f480}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.hover\:bg-muted\/80:hover{background-color:#f5f5f4cc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/80:hover{background-color:color-mix(in oklab,var(--color-muted) 80%,transparent)}}.hover\:bg-primary\/5:hover{background-color:#f59e0b0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,var(--color-primary) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:#f59e0b1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:#f59e0b26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,var(--color-primary) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:#f59e0b33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,var(--color-primary) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:#f59e0be6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-secondary:hover{background-color:var(--color-secondary)}.hover\:bg-secondary\/30:hover{background-color:#f5f5f44d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/30:hover{background-color:color-mix(in oklab,var(--color-secondary) 30%,transparent)}}.hover\:bg-secondary\/50:hover{background-color:#f5f5f480}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/50:hover{background-color:color-mix(in oklab,var(--color-secondary) 50%,transparent)}}.hover\:bg-secondary\/70:hover{background-color:#f5f5f4b3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/70:hover{background-color:color-mix(in oklab,var(--color-secondary) 70%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:#f5f5f4cc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}.hover\:bg-sidebar-accent\/10:hover{background-color:#f59e0b1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-sidebar-accent\/10:hover{background-color:color-mix(in oklab,var(--color-sidebar-accent) 10%,transparent)}}.hover\:bg-sidebar-accent\/90:hover{background-color:#f59e0be6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-sidebar-accent\/90:hover{background-color:color-mix(in oklab,var(--color-sidebar-accent) 90%,transparent)}}.hover\:bg-sidebar-foreground\/50:hover{background-color:#d6d3d180}@supports (color:color-mix(in lab,red,red)){.hover\:bg-sidebar-foreground\/50:hover{background-color:color-mix(in oklab,var(--color-sidebar-foreground) 50%,transparent)}}.hover\:bg-violet-500\/20:hover{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-violet-500\/20:hover{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.hover\:bg-white\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/80:hover{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.hover\:text-accent:hover{color:var(--color-accent)}.hover\:text-amber-500:hover{color:var(--color-amber-500)}.hover\:text-amber-700:hover{color:var(--color-amber-700)}.hover\:text-destructive:hover{color:var(--color-destructive)}.hover\:text-foreground:hover{color:var(--color-foreground)}.hover\:text-foreground\/80:hover{color:#1c1917cc}@supports (color:color-mix(in lab,red,red)){.hover\:text-foreground\/80:hover{color:color-mix(in oklab,var(--color-foreground) 80%,transparent)}}.hover\:text-muted-foreground:hover{color:var(--color-muted-foreground)}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-primary\/80:hover{color:#f59e0bcc}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,var(--color-primary) 80%,transparent)}}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-secondary-foreground:hover{color:var(--color-secondary-foreground)}.hover\:text-sidebar-accent:hover{color:var(--color-sidebar-accent)}.hover\:text-sidebar-foreground:hover{color:var(--color-sidebar-foreground)}.hover\:text-sidebar-foreground\/60:hover{color:#d6d3d199}@supports (color:color-mix(in lab,red,red)){.hover\:text-sidebar-foreground\/60:hover{color:color-mix(in oklab,var(--color-sidebar-foreground) 60%,transparent)}}.hover\:text-sidebar-foreground\/70:hover{color:#d6d3d1b3}@supports (color:color-mix(in lab,red,red)){.hover\:text-sidebar-foreground\/70:hover{color:color-mix(in oklab,var(--color-sidebar-foreground) 70%,transparent)}}.hover\:text-sidebar-foreground\/80:hover{color:#d6d3d1cc}@supports (color:color-mix(in lab,red,red)){.hover\:text-sidebar-foreground\/80:hover{color:color-mix(in oklab,var(--color-sidebar-foreground) 80%,transparent)}}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-primary\/5:hover{--tw-shadow-color:#f59e0b0d}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-primary\/5:hover{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-primary) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.hover\:shadow-primary\/30:hover{--tw-shadow-color:#f59e0b4d}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-primary\/30:hover{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-primary) 30%, transparent) var(--tw-shadow-alpha), transparent)}}}.focus\:border-primary:focus{border-color:var(--color-primary)}.focus\:border-sidebar-accent:focus{border-color:var(--color-sidebar-accent)}.focus\:bg-destructive\/10:focus{background-color:#dc26261a}@supports (color:color-mix(in lab,red,red)){.focus\:bg-destructive\/10:focus{background-color:color-mix(in oklab,var(--color-destructive) 10%,transparent)}}.focus\:bg-secondary:focus{background-color:var(--color-secondary)}.focus\:bg-sidebar-accent\/10:focus{background-color:#f59e0b1a}@supports (color:color-mix(in lab,red,red)){.focus\:bg-sidebar-accent\/10:focus{background-color:color-mix(in oklab,var(--color-sidebar-accent) 10%,transparent)}}.focus\:opacity-100:focus{opacity:1}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-destructive:focus{--tw-ring-color:var(--color-destructive)}.focus\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.focus\:ring-primary\/30:focus{--tw-ring-color:#f59e0b4d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/30:focus{--tw-ring-color:color-mix(in oklab, var(--color-primary) 30%, transparent)}}.focus\:ring-primary\/50:focus{--tw-ring-color:#f59e0b80}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-primary) 50%, transparent)}}.focus\:ring-ring:focus{--tw-ring-color:var(--color-ring)}.focus\:ring-sidebar-accent:focus{--tw-ring-color:var(--color-sidebar-accent)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:ring-offset-1:focus{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-primary:focus-visible{--tw-ring-color:var(--color-primary)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\:translate-y-0:active{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:scale-\[0\.97\]:active{scale:.97}.active\:scale-\[0\.98\]:active{scale:.98}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.data-\[selected\=true\]\:bg-primary\/10[data-selected=true]{background-color:#f59e0b1a}@supports (color:color-mix(in lab,red,red)){.data-\[selected\=true\]\:bg-primary\/10[data-selected=true]{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.data-\[selected\=true\]\:text-primary[data-selected=true]{color:var(--color-primary)}@media(prefers-reduced-motion:no-preference){.motion-safe\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}@media not all and (min-width:80rem){.max-xl\:hidden{display:none}}@media not all and (min-width:64rem){.max-lg\:hidden{display:none}}@media(min-width:40rem){.sm\:inset-\[5vh_2\.5vw\]{top:5vh;right:2.5vw;bottom:5vh;left:2.5vw}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:mx-8{margin-inline:calc(var(--spacing) * 8)}.sm\:block{display:block}.sm\:grid{display:grid}.sm\:inline{display:inline}.sm\:inline-flex{display:inline-flex}.sm\:max-w-\[70\%\]{max-width:70%}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:items-start{align-items:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:gap-6{gap:calc(var(--spacing) * 6)}:where(.sm\:divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.sm\:divide-y-0>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(0px * var(--tw-divide-y-reverse));border-bottom-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)))}.sm\:rounded-xl{border-radius:var(--radius-xl)}.sm\:border{border-style:var(--tw-border-style);border-width:1px}.sm\:border-border{border-color:var(--color-border)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:p-8{padding:calc(var(--spacing) * 8)}}@media(min-width:48rem){.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-col{flex-direction:column}}@media(min-width:64rem){.lg\:inset-\[7\.5vh_5vw\]{top:7.5vh;right:5vw;bottom:7.5vh;left:5vw}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:flex-1{flex:1}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-col{flex-direction:column}.lg\:overflow-hidden{overflow:hidden}}.rtl\:transform-\[translateX\(50\%\)\]:where(:dir(rtl),[dir=rtl],[dir=rtl] *){transform:translate(50%)}.dark\:border-amber-700\/30:is(.dark *){border-color:#b750004d}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-700\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-amber-700) 30%,transparent)}}.dark\:border-amber-800:is(.dark *){border-color:var(--color-amber-800)}.dark\:border-sky-700\/30:is(.dark *){border-color:#0069a44d}@supports (color:color-mix(in lab,red,red)){.dark\:border-sky-700\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-sky-700) 30%,transparent)}}.dark\:bg-\[\#E01E5A\]\/10:is(.dark *){background-color:#e01e5a1a}.dark\:bg-amber-500:is(.dark *){background-color:var(--color-amber-500)}.dark\:bg-amber-500\/40:is(.dark *){background-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-500\/40:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.dark\:bg-amber-600\/90:is(.dark *){background-color:#dd7400e6}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-600\/90:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-600) 90%,transparent)}}.dark\:bg-amber-900\/10:is(.dark *){background-color:#7b33061a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-900) 10%,transparent)}}.dark\:bg-amber-900\/15:is(.dark *){background-color:#7b330626}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-900) 15%,transparent)}}.dark\:bg-amber-900\/30:is(.dark *){background-color:#7b33064d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-900) 30%,transparent)}}.dark\:bg-amber-950\/20:is(.dark *){background-color:#46190133}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-950\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-950) 20%,transparent)}}.dark\:bg-amber-950\/30:is(.dark *){background-color:#4619014d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-950\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-950) 30%,transparent)}}.dark\:bg-blue-900\/30:is(.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-900) 30%,transparent)}}.dark\:bg-emerald-600:is(.dark *){background-color:var(--color-emerald-600)}.dark\:bg-emerald-900\/30:is(.dark *){background-color:#004e3b4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-900) 30%,transparent)}}.dark\:bg-emerald-950\/50:is(.dark *){background-color:#002c2280}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-950\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-950) 50%,transparent)}}.dark\:bg-purple-900\/30:is(.dark *){background-color:#59168b4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-purple-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-purple-900) 30%,transparent)}}.dark\:bg-red-900\/30:is(.dark *){background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900) 30%,transparent)}}.dark\:bg-red-950\/50:is(.dark *){background-color:#46080980}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-950\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-red-950) 50%,transparent)}}.dark\:bg-sky-900\/15:is(.dark *){background-color:#024a7026}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-900\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-sky-900) 15%,transparent)}}.dark\:bg-sky-900\/30:is(.dark *){background-color:#024a704d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-sky-900) 30%,transparent)}}.dark\:bg-violet-900\/30:is(.dark *){background-color:#4d179a4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-violet-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-violet-900) 30%,transparent)}}.dark\:bg-white\/10:is(.dark *){background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-white\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.dark\:text-\[\#E01E5A\]:is(.dark *){color:#e01e5a}.dark\:text-amber-50:is(.dark *){color:var(--color-amber-50)}.dark\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\:text-amber-400:is(.dark *){color:var(--color-amber-400)}.dark\:text-amber-400\/60:is(.dark *){color:#fcbb0099}@supports (color:color-mix(in lab,red,red)){.dark\:text-amber-400\/60:is(.dark *){color:color-mix(in oklab,var(--color-amber-400) 60%,transparent)}}.dark\:text-amber-400\/70:is(.dark *){color:#fcbb00b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-amber-400\/70:is(.dark *){color:color-mix(in oklab,var(--color-amber-400) 70%,transparent)}}.dark\:text-blue-400:is(.dark *){color:var(--color-blue-400)}.dark\:text-cyan-400:is(.dark *){color:var(--color-cyan-400)}.dark\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\:text-emerald-400\/60:is(.dark *){color:#00d29499}@supports (color:color-mix(in lab,red,red)){.dark\:text-emerald-400\/60:is(.dark *){color:color-mix(in oklab,var(--color-emerald-400) 60%,transparent)}}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-indigo-400:is(.dark *){color:var(--color-indigo-400)}.dark\:text-orange-400:is(.dark *){color:var(--color-orange-400)}.dark\:text-pink-400:is(.dark *){color:var(--color-pink-400)}.dark\:text-purple-400:is(.dark *){color:var(--color-purple-400)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\:text-sky-400:is(.dark *){color:var(--color-sky-400)}.dark\:text-teal-400:is(.dark *){color:var(--color-teal-400)}.dark\:text-violet-400:is(.dark *){color:var(--color-violet-400)}@media(hover:hover){.dark\:hover\:bg-amber-600:is(.dark *):hover{background-color:var(--color-amber-600)}.dark\:hover\:bg-amber-800\/40:is(.dark *):hover{background-color:#953d0066}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-amber-800\/40:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-amber-800) 40%,transparent)}}.dark\:hover\:bg-amber-900\/20:is(.dark *):hover{background-color:#7b330633}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-amber-900\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-amber-900) 20%,transparent)}}.dark\:hover\:bg-amber-900\/50:is(.dark *):hover{background-color:#7b330680}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-amber-900\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-amber-900) 50%,transparent)}}.dark\:hover\:bg-amber-950\/40:is(.dark *):hover{background-color:#46190166}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-amber-950\/40:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-amber-950) 40%,transparent)}}.dark\:hover\:bg-emerald-700:is(.dark *):hover{background-color:var(--color-emerald-700)}.dark\:hover\:bg-emerald-950\/50:is(.dark *):hover{background-color:#002c2280}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-emerald-950\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-emerald-950) 50%,transparent)}}.dark\:hover\:bg-red-950\/50:is(.dark *):hover{background-color:#46080980}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-red-950\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-red-950) 50%,transparent)}}.dark\:hover\:text-amber-300:is(.dark *):hover{color:var(--color-amber-300)}}.\[\&_code\]\:rounded code{border-radius:var(--radius)}.\[\&_code\]\:bg-muted code{background-color:var(--color-muted)}.\[\&_code\]\:px-1 code{padding-inline:calc(var(--spacing) * 1)}.\[\&_code\]\:py-0\.5 code{padding-block:calc(var(--spacing) * .5)}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_hr\]\:border-border hr{border-color:var(--color-border)}.\[\&_li\]\:mb-0\.5 li{margin-bottom:calc(var(--spacing) * .5)}.\[\&_pre\]\:rounded-lg pre{border-radius:var(--radius-lg)}.\[\&_pre\]\:bg-muted pre{background-color:var(--color-muted)}.\[\&_pre\]\:p-3 pre{padding:calc(var(--spacing) * 3)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:h-4 svg{height:calc(var(--spacing) * 4)}.\[\&_svg\]\:w-4 svg{width:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_ul\]\:ms-4 ul{margin-inline-start:calc(var(--spacing) * 4)}.\[\&_ul\]\:list-disc ul{list-style-type:disc}}.dark{--color-background:#09090b;--color-foreground:#fafaf9;--color-card:#18181b;--color-card-foreground:#fafaf9;--color-popover:#18181b;--color-popover-foreground:#fafaf9;--color-border:#27272a;--color-input:#27272a;--color-secondary:#27272a;--color-secondary-foreground:#fafaf9;--color-muted:#27272a;--color-muted-foreground:#a1a1aa;--color-sidebar:#09090b;--color-sidebar-foreground:#d4d4d8;--color-sidebar-border:#18181b}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@font-face{font-family:Noto Sans Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-cyrillic-ext-wght-normal-DSNfmdVt.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Noto Sans Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-cyrillic-wght-normal-B2hlT84T.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Noto Sans Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-devanagari-wght-normal-Cv-Vwajv.woff2) format("woff2-variations");unicode-range:U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09}@font-face{font-family:Noto Sans Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-greek-ext-wght-normal-12T8GTDR.woff2) format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Noto Sans Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-greek-wght-normal-Ymb6dZNd.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Noto Sans Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-vietnamese-wght-normal-DLTJy58D.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Noto Sans Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-latin-ext-wght-normal-W1qJv59z.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Noto Sans Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-latin-wght-normal-BYSzYMf3.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Sans Arabic Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-arabic-arabic-wght-normal-BhzieyvS.woff2) format("woff2-variations");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1}@font-face{font-family:Noto Sans Arabic Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-arabic-math-wght-normal-pS2d8anF.woff2) format("woff2-variations");unicode-range:U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-208E,U+2090-209C,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF}@font-face{font-family:Noto Sans Arabic Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-arabic-symbols-wght-normal-BJ6p-EzA.woff2) format("woff2-variations");unicode-range:U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AD,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F7FF,U+1F800-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FA89,U+1FA8F-1FAC6,U+1FACE-1FADC,U+1FADF-1FAE9,U+1FAF0-1FAF8,U+1FB00-1FBFF}@font-face{font-family:Noto Sans Arabic Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-arabic-latin-ext-wght-normal-CIz31GGw.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Noto Sans Arabic Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-arabic-latin-wght-normal-BQEJrIpl.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Sans Thai Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-thai-thai-wght-normal-CtQSZ1tK.woff2) format("woff2-variations");unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}@font-face{font-family:Noto Sans Thai Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-thai-latin-ext-wght-normal-DH1q_yQ5.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Noto Sans Thai Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-thai-latin-wght-normal-Bi3VDbYN.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Sans Devanagari Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-devanagari-devanagari-wght-normal-DWI_L5Cu.woff2) format("woff2-variations");unicode-range:U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09}@font-face{font-family:Noto Sans Devanagari Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-devanagari-latin-ext-wght-normal-CLkupaxV.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Noto Sans Devanagari Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-devanagari-latin-wght-normal-Bxfr4UJH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-0-wght-normal-ChZwicxE.woff2) format("woff2-variations");unicode-range:U+25ee8,U+25f23,U+25f5c,U+25fd4,U+25fe0,U+25ffb,U+2600c,U+26017,U+26060,U+260ed,U+26222,U+2626a,U+26270,U+26286,U+2634c,U+26402,U+2667e,U+266b0,U+2671d,U+268dd,U+268ea,U+26951,U+2696f,U+26999,U+269dd,U+26a1e,U+26a58,U+26a8c,U+26ab7,U+26aff,U+26c29,U+26c73,U+26c9e,U+26cdd,U+26e40,U+26e65,U+26f94,U+26ff6-26ff8,U+270f4,U+2710d,U+27139,U+273da-273db,U+273fe,U+27410,U+27449,U+27614-27615,U+27631,U+27684,U+27693,U+2770e,U+27723,U+27752,U+278b2,U+27985,U+279b4,U+27a84,U+27bb3,U+27bbe,U+27bc7,U+27c3c,U+27cb8,U+27d73,U+27da0,U+27e10,U+27eaf,U+27fb7,U+2808a,U+280bb,U+28277,U+28282,U+282f3,U+283cd,U+2840c,U+28455,U+284dc,U+2856b,U+285c8-285c9,U+286d7,U+286fa,U+28946,U+28949,U+2896b,U+28987-28988,U+289ba-289bb,U+28a1e,U+28a29,U+28a43,U+28a71,U+28a99,U+28acd,U+28add,U+28ae4,U+28bc1,U+28bef,U+28cdd,U+28d10,U+28d71,U+28dfb,U+28e0f,U+28e17,U+28e1f,U+28e36,U+28e89,U+28eeb,U+28ef6,U+28f32,U+28ff8,U+292a0,U+292b1,U+29490,U+295cf,U+2967f,U+296f0,U+29719,U+29750,U+29810,U+298c6,U+29a72,U+29d4b,U+29ddb,U+29e15,U+29e3d,U+29e49,U+29e8a,U+29ec4,U+29edb,U+29ee9,U+29fce,U+29fd7,U+2a01a,U+2a02f,U+2a082,U+2a0f9,U+2a190,U+2a2b2,U+2a38c,U+2a437,U+2a5f1,U+2a602,U+2a61a,U+2a6b2,U+2a9e6,U+2b746,U+2b751,U+2b753,U+2b75a,U+2b75c,U+2b765,U+2b776-2b777,U+2b77c,U+2b782,U+2b789,U+2b78b,U+2b78e,U+2b794,U+2b7ac,U+2b7af,U+2b7bd,U+2b7c9,U+2b7cf,U+2b7d2,U+2b7d8,U+2b7f0,U+2b80d,U+2b817,U+2b81a,U+2d544,U+2e278,U+2e569,U+2e6ea,U+2f804,U+2f80f,U+2f815,U+2f818,U+2f81a,U+2f822,U+2f828,U+2f82c,U+2f833,U+2f83f,U+2f846,U+2f852,U+2f862,U+2f86d,U+2f873,U+2f877,U+2f884,U+2f899-2f89a,U+2f8a6,U+2f8ac,U+2f8b2,U+2f8b6,U+2f8d3,U+2f8db-2f8dc,U+2f8e1,U+2f8e5,U+2f8ea,U+2f8ed,U+2f8fc,U+2f903,U+2f90b,U+2f90f,U+2f91a,U+2f920-2f921,U+2f945,U+2f947,U+2f96c,U+2f995,U+2f9d0,U+2f9de-2f9df,U+2f9f4}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-1-wght-normal-CARGyt1_.woff2) format("woff2-variations");unicode-range:U+1f235-1f23b,U+1f240-1f248,U+1f250-1f251,U+2000b,U+20089-2008a,U+200a2,U+200a4,U+200b0,U+200f5,U+20158,U+201a2,U+20213,U+2032b,U+20371,U+20381,U+203f9,U+2044a,U+20509,U+2053f,U+205b1,U+205d6,U+20611,U+20628,U+206ec,U+2074f,U+207c8,U+20807,U+2083a,U+208b9,U+2090e,U+2097c,U+20984,U+2099d,U+20a64,U+20ad3,U+20b1d,U+20b9f,U+20bb7,U+20d45,U+20d58,U+20de1,U+20e64,U+20e6d,U+20e95,U+20f5f,U+21201,U+2123d,U+21255,U+21274,U+2127b,U+212d7,U+212e4,U+212fd,U+2131b,U+21336,U+21344,U+213c4,U+2146d-2146e,U+215d7,U+21647,U+216b4,U+21706,U+21742,U+218bd,U+219c3,U+21a1a,U+21c56,U+21d2d,U+21d45,U+21d62,U+21d78,U+21d92,U+21d9c,U+21da1,U+21db7,U+21de0,U+21e33-21e34,U+21f1e,U+21f76,U+21ffa,U+2217b,U+22218,U+2231e,U+223ad,U+22609,U+226f3,U+2285b,U+228ab,U+2298f,U+22ab8,U+22b46,U+22b4f-22b50,U+22ba6,U+22c1d,U+22c24,U+22de1,U+22e42,U+22feb,U+231b6,U+231c3-231c4,U+231f5,U+23372,U+233cc,U+233d0,U+233d2-233d3,U+233d5,U+233da,U+233df,U+233e4,U+233fe,U+2344a-2344b,U+23451,U+23465,U+234e4,U+2355a,U+23594,U+235c4,U+23638-2363a,U+23647,U+2370c,U+2371c,U+2373f,U+23763-23764,U+237e7,U+237f1,U+237ff,U+23824,U+2383d,U+23a98,U+23c7f,U+23cbe,U+23cfe,U+23d00,U+23d0e,U+23d40,U+23dd3,U+23df9-23dfa,U+23f7e,U+2404b,U+24096,U+24103,U+241c6,U+241fe,U+242ee,U+243bc,U+243d0,U+24629,U+246a5,U+247f1,U+24896,U+248e9,U+24a4d,U+24b56,U+24b6f,U+24c16,U+24d14,U+24e04,U+24e0e,U+24e37,U+24e6a,U+24e8b,U+24ff2,U+2504a,U+25055,U+25122,U+251a9,U+251cd,U+251e5,U+2521e,U+2524c,U+2542e,U+2548e,U+254d9,U+2550e,U+255a7,U+2567f,U+25771,U+257a9,U+257b4,U+25874,U+259c4,U+259cc,U+259d4,U+25ad7,U+25ae3-25ae4,U+25af1,U+25bb2,U+25c4b,U+25c64,U+25da1,U+25e2e,U+25e56,U+25e62,U+25e65,U+25ec2,U+25ed8}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-2-wght-normal-RseJrQYo.woff2) format("woff2-variations");unicode-range:U+ffd7,U+ffda-ffdc,U+ffe0-ffe2,U+ffe4,U+ffe6,U+ffe8-ffee,U+1f100-1f10c,U+1f110-1f16c,U+1f170-1f1ac,U+1f200-1f202,U+1f210-1f234}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-3-wght-normal--H5uv3v4.woff2) format("woff2-variations");unicode-range:U+fa10,U+fa12-fa6d,U+fb00-fb04,U+fe10-fe19,U+fe30-fe42,U+fe44-fe52,U+fe54-fe66,U+fe68-fe6b,U+ff02,U+ff04,U+ff07,U+ff51,U+ff5b,U+ff5d,U+ff5f-ff60,U+ff66,U+ff69,U+ff87,U+ffa1-ffbe,U+ffc2-ffc7,U+ffca-ffcf,U+ffd2-ffd6}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-4-wght-normal-Dc2VWjiv.woff2) format("woff2-variations");unicode-range:U+f92d-f959,U+f95b-f9f2,U+f9f4-fa0b,U+fa0e-fa0f}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-5-wght-normal-CeuaJ3GQ.woff2) format("woff2-variations");unicode-range:U+9e8b-9e8c,U+9e8e-9e8f,U+9e91-9e92,U+9e95-9e96,U+9e98,U+9e9b,U+9e9d-9e9e,U+9ea4-9ea5,U+9ea8-9eaa,U+9eac-9eb0,U+9eb3-9eb5,U+9eb8,U+9ebc-9ebf,U+9ec3,U+9ec6,U+9ec8,U+9ecb-9ecd,U+9ecf-9ed1,U+9ed4-9ed5,U+9ed8,U+9edb-9ee0,U+9ee4-9ee5,U+9ee7-9ee8,U+9eec-9ef2,U+9ef4-9ef9,U+9efb-9eff,U+9f02-9f03,U+9f07-9f09,U+9f0e-9f12,U+9f14-9f17,U+9f19-9f1b,U+9f1f-9f22,U+9f26,U+9f2a-9f2c,U+9f2f,U+9f31-9f32,U+9f34,U+9f37,U+9f39-9f3a,U+9f3c-9f3f,U+9f41,U+9f43-9f47,U+9f4a,U+9f4e-9f50,U+9f52-9f58,U+9f5a,U+9f5d-9f61,U+9f63,U+9f66-9f6a,U+9f6c-9f73,U+9f75-9f77,U+9f7a,U+9f7d,U+9f7f,U+9f8f-9f92,U+9f94-9f97,U+9f99,U+9f9c-9fa3,U+9fa5,U+9fb4,U+9fbc-9fc2,U+9fc4,U+9fc6,U+9fcc,U+f900-f92c}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-6-wght-normal-BETiiYWj.woff2) format("woff2-variations");unicode-range:U+9c3e,U+9c41,U+9c43-9c4a,U+9c4e-9c50,U+9c52-9c54,U+9c56,U+9c58,U+9c5a-9c61,U+9c63,U+9c65,U+9c67-9c6b,U+9c6d-9c6e,U+9c70,U+9c72,U+9c75-9c78,U+9c7a-9c7c,U+9ce6-9ce7,U+9ceb-9cec,U+9cf0,U+9cf2,U+9cf6-9cf7,U+9cf9,U+9d02-9d03,U+9d06-9d09,U+9d0b,U+9d0e,U+9d11-9d12,U+9d15,U+9d17-9d18,U+9d1b-9d1f,U+9d23,U+9d26,U+9d2a-9d2c,U+9d2f-9d30,U+9d32-9d34,U+9d3a,U+9d3c-9d3f,U+9d41-9d48,U+9d4a,U+9d50-9d54,U+9d59,U+9d5d-9d65,U+9d69-9d6c,U+9d6f-9d70,U+9d72-9d73,U+9d76-9d77,U+9d7a-9d7c,U+9d7e,U+9d83-9d84,U+9d86-9d87,U+9d89-9d8a,U+9d8d-9d8e,U+9d92-9d93,U+9d95-9d9a,U+9da1,U+9da4,U+9da9-9dac,U+9dae,U+9db1-9db2,U+9db5,U+9db8-9dbd,U+9dbf-9dc4,U+9dc6-9dc7,U+9dc9-9dca,U+9dcf,U+9dd3-9dd7,U+9dd9-9dda,U+9dde-9de0,U+9de3,U+9de5-9de7,U+9de9,U+9deb,U+9ded-9df0,U+9df3-9df4,U+9df8,U+9dfd-9dfe,U+9e02,U+9e07,U+9e0a,U+9e0d-9e0e,U+9e10-9e12,U+9e15-9e16,U+9e19-9e1f,U+9e75,U+9e79-9e7d,U+9e80-9e85,U+9e87-9e88}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-7-wght-normal-DPLqcl0u.woff2) format("woff2-variations");unicode-range:U+9ae5-9ae7,U+9ae9,U+9aeb-9aec,U+9aee-9aef,U+9af1-9af5,U+9af7,U+9af9-9afb,U+9afd,U+9aff-9b06,U+9b08-9b09,U+9b0b-9b0e,U+9b10,U+9b12,U+9b16,U+9b18-9b1d,U+9b1f-9b20,U+9b22-9b23,U+9b25-9b2f,U+9b32-9b35,U+9b37,U+9b39-9b3b,U+9b3d,U+9b43-9b44,U+9b48,U+9b4b-9b4f,U+9b51,U+9b55-9b58,U+9b5b,U+9b5e,U+9b61,U+9b63,U+9b65-9b66,U+9b68,U+9b6a-9b6f,U+9b72-9b79,U+9b7f-9b80,U+9b83-9b87,U+9b89-9b8b,U+9b8d,U+9b8f-9b94,U+9b96-9b97,U+9b9a,U+9b9d-9ba0,U+9ba6-9ba7,U+9ba9-9baa,U+9bac,U+9bb0-9bb2,U+9bb4,U+9bb7-9bb9,U+9bbb-9bbc,U+9bbe-9bc1,U+9bc6-9bc8,U+9bca,U+9bce-9bd2,U+9bd4,U+9bd7-9bd8,U+9bdd,U+9bdf,U+9be1-9be5,U+9be7,U+9bea-9beb,U+9bee-9bf3,U+9bf5,U+9bf7-9bfa,U+9bfd,U+9bff-9c00,U+9c02,U+9c04,U+9c06,U+9c08-9c0d,U+9c0f-9c16,U+9c18-9c1e,U+9c21-9c2a,U+9c2d-9c32,U+9c35-9c37,U+9c39-9c3a,U+9c3d}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-8-wght-normal-B-fyrhM6.woff2) format("woff2-variations");unicode-range:U+98eb,U+98ed-98ee,U+98f0-98f1,U+98f3,U+98f6,U+9902,U+9907-9909,U+9911-9912,U+9914-9918,U+991a-9922,U+9924,U+9926-9927,U+992b-992c,U+992e,U+9931-9935,U+9939-993e,U+9940-9942,U+9945-9949,U+994b-994e,U+9950-9952,U+9954-9955,U+9958-9959,U+995b-995c,U+995e-9960,U+9963,U+9997-9998,U+999b,U+999d-999f,U+99a3,U+99a5-99a6,U+99a8,U+99ad-99ae,U+99b0-99b2,U+99b5,U+99b9-99ba,U+99bc-99bd,U+99bf,U+99c1,U+99c3,U+99c8-99c9,U+99d1,U+99d3-99d5,U+99d8-99df,U+99e1-99e2,U+99e7,U+99ea-99ee,U+99f0-99f2,U+99f4-99f5,U+99f8-99f9,U+99fb-99fe,U+9a01-9a05,U+9a08,U+9a0a-9a0c,U+9a0f-9a11,U+9a16,U+9a1a,U+9a1e,U+9a20,U+9a22-9a24,U+9a27,U+9a2b,U+9a2d-9a2e,U+9a31,U+9a33,U+9a35-9a38,U+9a3e,U+9a40-9a45,U+9a47,U+9a4a-9a4e,U+9a51-9a52,U+9a54-9a58,U+9a5b,U+9a5d,U+9a5f,U+9a62,U+9a64-9a65,U+9a69-9a6c,U+9aaa,U+9aac-9ab0,U+9ab2,U+9ab4-9ab7,U+9ab9,U+9abb-9ac1,U+9ac3,U+9ac6,U+9ac8,U+9ace-9ad3,U+9ad5-9ad7,U+9adb-9adc,U+9ade-9ae0,U+9ae2-9ae4}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-9-wght-normal-mnr2cWCS.woff2) format("woff2-variations");unicode-range:U+971d,U+9721-9724,U+9728,U+972a,U+9730-9731,U+9733,U+9736,U+9738-9739,U+973b,U+973d-973e,U+9741-9744,U+9746-974a,U+974d-974f,U+9751,U+9755,U+9757-9758,U+975a-975c,U+9760-9761,U+9763-9764,U+9766-9768,U+976a-976b,U+976e,U+9771,U+9773,U+9776-977d,U+977f-9781,U+9785-9786,U+9789,U+978b,U+978f-9790,U+9795-9797,U+9799-979a,U+979c,U+979e-97a0,U+97a2-97a3,U+97a6,U+97a8,U+97ab-97ac,U+97ae,U+97b1-97b6,U+97b8-97ba,U+97bc,U+97be-97bf,U+97c1,U+97c3-97ce,U+97d0-97d1,U+97d4,U+97d7-97d9,U+97db-97de,U+97e0-97e1,U+97e4,U+97e6,U+97ed-97ef,U+97f1-97f2,U+97f4-97f8,U+97fa,U+9804,U+9807,U+980a,U+980c-980f,U+9814,U+9816-9817,U+9819-981a,U+981c,U+981e,U+9820-9821,U+9823-9826,U+982b,U+982e-9830,U+9832-9835,U+9837,U+9839,U+983d-983e,U+9844,U+9846-9847,U+984a-984b,U+984f,U+9851-9853,U+9856-9857,U+9859-985b,U+9862-9863,U+9865-9866,U+986a-986c,U+986f-9871,U+9873-9875,U+98aa-98ab,U+98ad-98ae,U+98b0-98b1,U+98b4,U+98b6-98b8,U+98ba-98bc,U+98bf,U+98c2-98c8,U+98cb-98cc,U+98ce,U+98dc,U+98de,U+98e0-98e1,U+98e3,U+98e5-98e7,U+98e9-98ea}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-10-wght-normal-DtPkCCyJ.woff2) format("woff2-variations");unicode-range:U+944a,U+944c,U+9452-9453,U+9455,U+9459-945c,U+945e-9463,U+9468,U+946a-946b,U+946d-9472,U+9475,U+9477,U+947c-947f,U+9481,U+9483-9485,U+9578-9579,U+957e-957f,U+9582,U+9584,U+9586-9588,U+958a,U+958c-958f,U+9592,U+9594,U+9596,U+9598-9599,U+959d-95a1,U+95a4,U+95a6-95a9,U+95ab-95ad,U+95b1,U+95b4,U+95b6,U+95b9-95bf,U+95c3,U+95c6,U+95c8-95cd,U+95d0-95d6,U+95d9-95da,U+95dc-95e2,U+95e4-95e6,U+95e8,U+961d-961e,U+9621-9622,U+9624-9626,U+9628,U+962c,U+962e-962f,U+9631,U+9633-9634,U+9637-963a,U+963c-963d,U+9641-9642,U+964b-964c,U+964f,U+9652,U+9654,U+9656-9658,U+965c-965f,U+9661,U+9666,U+966a,U+966c,U+966e,U+9672,U+9674,U+9677,U+967b-967c,U+967e-967f,U+9681-9684,U+9689,U+968b,U+968d,U+9691,U+9695-9698,U+969a,U+969d,U+969f,U+96a4-96aa,U+96ae-96b4,U+96b6,U+96b8-96bb,U+96bd,U+96c1,U+96c9-96cb,U+96cd-96ce,U+96d2,U+96d5-96d6,U+96d8-96da,U+96dc-96df,U+96e9,U+96ef,U+96f1,U+96f9-96fa,U+9702-9706,U+9708-9709,U+970d-970f,U+9711,U+9713-9714,U+9716,U+9719-971b}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-11-wght-normal-Dkj9SGze.woff2) format("woff2-variations");unicode-range:U+92bc-92bd,U+92bf-92c3,U+92c5-92c8,U+92cb-92d0,U+92d2-92d3,U+92d5,U+92d7-92d9,U+92dc-92dd,U+92df-92e1,U+92e3-92e5,U+92e7-92ea,U+92ec,U+92ee,U+92f0,U+92f2,U+92f7-92fb,U+92ff-9300,U+9302,U+9304,U+9308,U+930d,U+930f-9311,U+9314-9315,U+9318-931a,U+931c-931f,U+9321-9325,U+9327-932b,U+932e,U+9333-9337,U+933a-933b,U+9344,U+9347-934a,U+934d,U+9350-9352,U+9354-9358,U+935a,U+935c,U+935e,U+9360,U+9364-9365,U+9367,U+9369-936d,U+936f-9371,U+9373-9374,U+9376,U+937a,U+937d-9382,U+9388,U+938a-938b,U+938d,U+938f,U+9392,U+9394-9395,U+9397-9398,U+939a-939b,U+939e,U+93a1,U+93a3-93a4,U+93a6,U+93a8-93a9,U+93ab-93ad,U+93b0,U+93b4-93b6,U+93b9-93bb,U+93c1,U+93c3-93cd,U+93d0-93d1,U+93d3,U+93d6-93d9,U+93dc-93df,U+93e2,U+93e4-93e8,U+93f1,U+93f5,U+93f7-93fb,U+93fd,U+9401-9404,U+9407-9409,U+940d-9410,U+9413-9417,U+9419-941a,U+941f,U+9421,U+942b,U+942e-942f,U+9431-9434,U+9436,U+9438,U+943a-943b,U+943d,U+943f,U+9441,U+9443-9445,U+9448}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-12-wght-normal-CZgOv4iD.woff2) format("woff2-variations");unicode-range:U+9143,U+9146-914c,U+914f,U+9153,U+9156-915b,U+9161,U+9163-9165,U+9167,U+9169,U+916d,U+9172-9174,U+9179-917b,U+9181-9183,U+9185-9187,U+9189-918b,U+918e,U+9191,U+9193-9195,U+9197-9198,U+919e,U+91a1-91a2,U+91a6,U+91a8,U+91aa-91b6,U+91ba-91bd,U+91bf-91c6,U+91c9,U+91cb,U+91d0,U+91d3-91d4,U+91d6-91d7,U+91d9-91db,U+91de-91df,U+91e1,U+91e4-91e6,U+91e9-91ea,U+91ec-91f1,U+91f5-91f7,U+91f9,U+91fb-91fd,U+91ff-9201,U+9204-9207,U+9209-920a,U+920c,U+920e,U+9210-9218,U+921c-921e,U+9223-9226,U+9228-9229,U+922c,U+922e-9230,U+9233,U+9235-923a,U+923c,U+923e-9240,U+9242-9243,U+9245-924b,U+924d-9251,U+9256-925a,U+925c-925e,U+9260-9261,U+9264-9269,U+926e-9270,U+9275-9279,U+927b-927f,U+9288-928a,U+928d-928e,U+9291-9293,U+9295-9297,U+9299,U+929b-929c,U+929f-92a0,U+92a4-92a5,U+92a7-92a8,U+92ab,U+92af,U+92b2-92b3,U+92b6-92bb}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-13-wght-normal-B3bKCuev.woff2) format("woff2-variations");unicode-range:U+8f52-8f55,U+8f57-8f58,U+8f5c-8f5e,U+8f61-8f66,U+8f9c-8f9d,U+8f9f-8fa2,U+8fa4-8fa8,U+8fad-8faf,U+8fb4-8fb8,U+8fbe,U+8fc0-8fc2,U+8fc6,U+8fc8,U+8fca-8fcb,U+8fcd,U+8fd0,U+8fd2-8fd3,U+8fd5,U+8fda,U+8fe0,U+8fe2-8fe5,U+8fe8-8fea,U+8fed-8fef,U+8ff1,U+8ff4-8ff6,U+8ff8-8ffb,U+8ffe,U+9002,U+9004-9005,U+9008,U+900b-900e,U+9011,U+9013,U+9015-9016,U+9018,U+901b,U+901e,U+9021,U+9027-902a,U+902c-902d,U+902f,U+9033-9037,U+9039,U+903c,U+903e-903f,U+9041,U+9043-9044,U+9049,U+904c,U+904f-9052,U+9056,U+9058,U+905b-905e,U+9062,U+9066-9068,U+906c,U+906f-9070,U+9072,U+9074,U+9076,U+9079,U+9080-9083,U+9085,U+9087-9088,U+908b-908c,U+908e-9090,U+9095,U+9097-9099,U+909b,U+90a0-90a2,U+90a5,U+90a8,U+90af-90b6,U+90bd-90be,U+90c3-90c5,U+90c7-90c9,U+90cc,U+90d2,U+90d5,U+90d7-90d9,U+90db-90df,U+90e2,U+90e4-90e5,U+90eb,U+90ef-90f0,U+90f2,U+90f4,U+90f6,U+90fe-9100,U+9102,U+9104-9106,U+9108,U+910d,U+9110,U+9112,U+9114-911a,U+911c,U+911e,U+9120,U+9122-9123,U+9125,U+9127,U+9129,U+912d-9132,U+9134,U+9136-9137,U+9139-913a,U+913c-913d}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-14-wght-normal-DbDHiDFQ.woff2) format("woff2-variations");unicode-range:U+8dc0,U+8dc2,U+8dc5-8dc8,U+8dca-8dcc,U+8dce-8dcf,U+8dd1,U+8dd4-8dd7,U+8dd9-8ddb,U+8ddf,U+8de3-8de5,U+8de7,U+8dea-8dec,U+8df0-8df2,U+8df4,U+8dfc-8dfd,U+8dff,U+8e01,U+8e04-8e06,U+8e08-8e09,U+8e0b-8e0c,U+8e10-8e11,U+8e14,U+8e16,U+8e1d-8e23,U+8e26-8e27,U+8e30-8e31,U+8e33-8e39,U+8e3d,U+8e40-8e42,U+8e44,U+8e47-8e50,U+8e54-8e55,U+8e59,U+8e5b-8e64,U+8e69,U+8e6c-8e6d,U+8e6f-8e72,U+8e75-8e77,U+8e79-8e7c,U+8e81-8e85,U+8e89,U+8e8b,U+8e90-8e95,U+8e98-8e9b,U+8e9d-8e9e,U+8ea1-8ea2,U+8ea7,U+8ea9-8eaa,U+8eac-8eb1,U+8eb3,U+8eb5-8eb6,U+8eba-8ebb,U+8ebe,U+8ec0-8ec1,U+8ec3-8ec8,U+8ecb,U+8ecf,U+8ed1,U+8ed4,U+8edb-8edc,U+8ee3,U+8ee8,U+8eeb,U+8eed-8eee,U+8ef0-8ef1,U+8ef7,U+8ef9-8efc,U+8efe,U+8f00,U+8f02,U+8f05,U+8f07-8f08,U+8f0a,U+8f0f-8f10,U+8f12-8f13,U+8f15-8f19,U+8f1b-8f1c,U+8f1e-8f21,U+8f23,U+8f25-8f28,U+8f2b-8f2f,U+8f33-8f37,U+8f39-8f3b,U+8f3e,U+8f40-8f43,U+8f45-8f47,U+8f49-8f4a,U+8f4c-8f4f,U+8f51}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-15-wght-normal-BHvX48uZ.woff2) format("woff2-variations");unicode-range:U+8b2d,U+8b30,U+8b37,U+8b3c,U+8b3e,U+8b41-8b46,U+8b48-8b49,U+8b4c-8b4f,U+8b51-8b54,U+8b56,U+8b59,U+8b5b,U+8b5e-8b5f,U+8b63,U+8b69,U+8b6b-8b6d,U+8b6f,U+8b71,U+8b74,U+8b76,U+8b78-8b79,U+8b7c-8b81,U+8b84-8b85,U+8b8a-8b8f,U+8b92-8b96,U+8b99-8b9a,U+8b9c-8ba0,U+8c38-8c3a,U+8c3d-8c3f,U+8c41,U+8c45,U+8c47-8c49,U+8c4b-8c4c,U+8c4e-8c51,U+8c53-8c55,U+8c57-8c59,U+8c5b,U+8c5d,U+8c62-8c64,U+8c66,U+8c68-8c69,U+8c6b-8c6d,U+8c73,U+8c75-8c76,U+8c78,U+8c7a-8c7c,U+8c7e,U+8c82,U+8c85-8c87,U+8c89-8c8b,U+8c8d-8c8e,U+8c90,U+8c92-8c94,U+8c98-8c99,U+8c9b-8c9c,U+8c9f,U+8ca4,U+8cad-8cae,U+8cb2-8cb3,U+8cb6,U+8cb9-8cba,U+8cbd,U+8cc1-8cc2,U+8cc4-8cc6,U+8cc8-8cc9,U+8ccb,U+8ccd-8ccf,U+8cd2,U+8cd5-8cd6,U+8cd9-8cda,U+8cdd,U+8ce1,U+8ce3-8ce4,U+8ce6,U+8ce8,U+8cec,U+8cef-8cf2,U+8cf4-8cf5,U+8cf7-8cf8,U+8cfa-8cfb,U+8cfd-8cff,U+8d01,U+8d03-8d04,U+8d07,U+8d09-8d0b,U+8d0d-8d10,U+8d12-8d14,U+8d16-8d17,U+8d1b-8d1d,U+8d65,U+8d67,U+8d69,U+8d6b-8d6e,U+8d71,U+8d73,U+8d76,U+8d7f,U+8d81-8d82,U+8d84,U+8d88,U+8d8d,U+8d90-8d91,U+8d95,U+8d99,U+8d9e-8da0,U+8da6,U+8da8,U+8dab-8dac,U+8daf,U+8db2,U+8db5,U+8db7,U+8db9-8dbc,U+8dbe}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-16-wght-normal-CIRRqAST.woff2) format("woff2-variations");unicode-range:U+8973-8975,U+8977,U+897a-897e,U+8980,U+8983,U+8988-898a,U+898d,U+8990,U+8993-8995,U+8998,U+899b-899c,U+899f-89a1,U+89a5-89a6,U+89a9,U+89ac,U+89af-89b0,U+89b2,U+89b4-89b7,U+89ba,U+89bc-89bd,U+89bf-89c1,U+89d4-89d8,U+89da,U+89dc-89dd,U+89e5,U+89e7,U+89e9,U+89eb,U+89ed,U+89f1,U+89f3-89f4,U+89f6,U+89f8-89f9,U+89fd,U+89ff,U+8a01,U+8a04-8a05,U+8a07,U+8a0c,U+8a0f-8a12,U+8a14-8a16,U+8a1b,U+8a1d-8a1e,U+8a20-8a22,U+8a24-8a26,U+8a2b-8a2c,U+8a2f,U+8a35-8a37,U+8a3b,U+8a3d-8a3e,U+8a40-8a41,U+8a43,U+8a45-8a49,U+8a4d-8a4e,U+8a51-8a54,U+8a56-8a58,U+8a5b-8a5d,U+8a61-8a62,U+8a65,U+8a67,U+8a6c-8a6d,U+8a75-8a77,U+8a79-8a7c,U+8a7e-8a80,U+8a82-8a86,U+8a8b,U+8a8f-8a92,U+8a96-8a97,U+8a99-8a9a,U+8a9f,U+8aa1,U+8aa3,U+8aa5-8aaa,U+8aae-8aaf,U+8ab3,U+8ab6-8ab7,U+8abb-8abc,U+8abe,U+8ac2-8ac4,U+8ac6,U+8ac8-8aca,U+8acc-8acd,U+8ad0-8ad1,U+8ad3-8ad5,U+8ad7,U+8ada-8ae2,U+8ae4,U+8ae7,U+8aeb-8aec,U+8aee,U+8af0-8af1,U+8af3-8af7,U+8afa,U+8afc,U+8aff,U+8b01-8b02,U+8b04-8b07,U+8b0a-8b0d,U+8b0f-8b11,U+8b14,U+8b16,U+8b1a,U+8b1c,U+8b1e-8b20,U+8b26,U+8b28,U+8b2b-8b2c}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-17-wght-normal-Cypgkvf4.woff2) format("woff2-variations");unicode-range:U+87e2-87e6,U+87ea-87ed,U+87ef,U+87f1,U+87f3,U+87f5-87f8,U+87fa-87fb,U+87fe-87ff,U+8801,U+8803,U+8805-8807,U+8809-880b,U+880d-8816,U+8818-881c,U+881e-881f,U+8821-8822,U+8827-8828,U+882d-882e,U+8830-8832,U+8835-8836,U+8839-883c,U+8841-8845,U+8848-884b,U+884d-884e,U+8851-8852,U+8855-8856,U+8858-885a,U+885c,U+885e-8860,U+8862,U+8864,U+8869,U+886b,U+886e-886f,U+8871-8872,U+8875,U+8877,U+8879,U+887b,U+887d-887e,U+8880-8882,U+8888,U+888d,U+8892,U+8897-889c,U+889e-88a0,U+88a2,U+88a4,U+88a8,U+88aa,U+88ae,U+88b0-88b1,U+88b5,U+88b7,U+88ba,U+88bc-88c0,U+88c3-88c4,U+88c6,U+88ca-88ce,U+88d1-88d4,U+88d8-88d9,U+88db,U+88dd-88e1,U+88e7-88e8,U+88ef-88f2,U+88f4-88f5,U+88f7,U+88f9,U+88fc,U+8901-8902,U+8904,U+8906,U+890a,U+890c-890f,U+8913,U+8915-8916,U+8918-891a,U+891c-891e,U+8920,U+8925-8928,U+892a-892b,U+8930-8932,U+8935-893b,U+893e,U+8940-8946,U+8949,U+894c-894d,U+894f,U+8952,U+8956-8957,U+895a-895c,U+895e,U+8960-8964,U+8966,U+896a-896b,U+896d-8970}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-18-wght-normal-DhyYlhdC.woff2) format("woff2-variations");unicode-range:U+8655-8659,U+865b,U+865d-8664,U+8667,U+8669,U+866c,U+866f,U+8671,U+8675-8677,U+867a-867b,U+867d,U+8687-8689,U+868b-868d,U+8691,U+8693,U+8695-8696,U+8698,U+869a,U+869c-869d,U+86a1,U+86a3-86a4,U+86a6-86ab,U+86ad,U+86af-86b1,U+86b3-86b9,U+86bf-86c1,U+86c3-86c6,U+86c9,U+86cb,U+86ce,U+86d1-86d2,U+86d4-86d5,U+86d7,U+86da,U+86dc,U+86de-86e0,U+86e3-86e7,U+86e9,U+86ec-86ed,U+86ef,U+86f8-86fe,U+8700,U+8703-870b,U+870d-8714,U+8719-871a,U+871e-871f,U+8721-8723,U+8725,U+8728-8729,U+872e-872f,U+8731-8732,U+8734,U+8737,U+8739-8740,U+8743,U+8745,U+8749,U+874b-874e,U+8751,U+8753,U+8755,U+8757-8759,U+875d,U+875f-8761,U+8763-8766,U+8768,U+876a,U+876e-876f,U+8771-8772,U+8774,U+8778,U+877b-877c,U+877f,U+8782-8789,U+878b-878c,U+878e,U+8790,U+8793,U+8795,U+8797-8799,U+879e-87a0,U+87a2-87a3,U+87a7,U+87ab-87af,U+87b1,U+87b3,U+87b5,U+87bb,U+87bd-87c1,U+87c4,U+87c6-87cb,U+87ce,U+87d0,U+87d2,U+87d5-87d6,U+87d9-87da,U+87dc,U+87df-87e0}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-19-wght-normal-Cm6ySjN8.woff2) format("woff2-variations");unicode-range:U+84b4,U+84b9-84bb,U+84bd-84c2,U+84c6-84ca,U+84cc-84d1,U+84d3,U+84d6,U+84d9-84da,U+84dc,U+84e7,U+84ea,U+84ec,U+84ef-84f2,U+84f4,U+84f7,U+84fa-84fd,U+84ff-8500,U+8502-8503,U+8506-8507,U+850c,U+850e,U+8510,U+8514-8515,U+8517-8518,U+851a-851c,U+851e-851f,U+8521-8525,U+8527,U+852a-852c,U+852f,U+8532-8534,U+8536,U+853e-8541,U+8543,U+8546,U+8548,U+854a-854b,U+854f-8553,U+8555-855a,U+855c-8564,U+8569-856b,U+856d,U+856f,U+8577,U+8579-857b,U+857d-8581,U+8585-8586,U+8588-858c,U+858f-8591,U+8593,U+8597-8598,U+859b-859d,U+859f-85a0,U+85a2,U+85a4-85a5,U+85a7-85a8,U+85ad-85b0,U+85b4,U+85b6-85ba,U+85bc-85bf,U+85c1-85c2,U+85c7,U+85c9-85cb,U+85ce-85d0,U+85d5,U+85d8-85da,U+85dc,U+85df-85e1,U+85e5-85e6,U+85e8,U+85ed,U+85f3-85f4,U+85f6-85f7,U+85f9-85fa,U+85fc,U+85fe-8600,U+8602,U+8604-8606,U+860a-860b,U+860d-860e,U+8610-8613,U+8616-861b,U+861e,U+8621-8622,U+8624,U+8627,U+8629,U+862f-8630,U+8636,U+8638-863a,U+863c-863d,U+863f-8642,U+8646,U+864d,U+8652-8654}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-20-wght-normal-FgfhxZU_.woff2) format("woff2-variations");unicode-range:U+82e8,U+82ea,U+82ed,U+82ef,U+82f3-82f4,U+82f6-82f7,U+82f9,U+82fb,U+82fd-82fe,U+8300-8301,U+8303,U+8306-8308,U+830a-830c,U+8316-8318,U+831b,U+831d-831f,U+8321-8323,U+832b-8335,U+8337,U+833a,U+833c-833d,U+8340,U+8342-8347,U+834a,U+834d-8351,U+8353-8357,U+835a,U+8362-8363,U+8370,U+8373,U+8375,U+8378,U+837c-837d,U+837f-8380,U+8382,U+8384-8387,U+838a,U+838d-838e,U+8392-8396,U+8398-83a0,U+83a2,U+83a6-83ad,U+83b1,U+83b5,U+83bd-83c1,U+83c7,U+83c9,U+83ce-83d1,U+83d4,U+83d6,U+83d8,U+83dd,U+83df-83e1,U+83e5,U+83e8,U+83ea-83eb,U+83f0,U+83f2,U+83f4,U+83f6-83f9,U+83fb-83fd,U+8401,U+8403-8404,U+8406-8407,U+840a-840b,U+840d,U+840f,U+8411,U+8413,U+8415,U+8417,U+8419,U+8420,U+8422,U+842a,U+842f,U+8431,U+8435,U+8438-8439,U+843c,U+8445-8448,U+844a,U+844d-844f,U+8451-8452,U+8456,U+8458-845a,U+845c,U+845f-8462,U+8464-8467,U+8469-846b,U+846d-8470,U+8473-8474,U+8476-847a,U+847c-847d,U+8481-8482,U+8484-8485,U+848b,U+8490,U+8492-8493,U+8495,U+8497,U+849c,U+849e-849f,U+84a1,U+84a6,U+84a8-84aa,U+84ad,U+84af,U+84b1}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-21-wght-normal-Ur8WYMVQ.woff2) format("woff2-variations");unicode-range:U+814a,U+814c,U+8151-8153,U+8157,U+815f-8161,U+8165-8169,U+816d-816f,U+8171,U+8173-8174,U+8177,U+8180-8186,U+8188,U+818a-818b,U+818e,U+8190,U+8193,U+8195-8196,U+8198,U+819b,U+819e,U+81a0,U+81a2,U+81a4,U+81a9,U+81ae,U+81b0,U+81b2,U+81b4-81b5,U+81b8,U+81ba-81bb,U+81bd-81be,U+81c0-81c3,U+81c5-81c6,U+81c8-81cb,U+81cd-81cf,U+81d1,U+81d5-81db,U+81dd-81e1,U+81e4-81e5,U+81e7,U+81eb-81ec,U+81ef-81f2,U+81f5-81f6,U+81f8-81fb,U+81fd-8205,U+8209-820b,U+820d,U+820f,U+8212-8214,U+8216,U+8219-821d,U+8221-8222,U+8228-8229,U+822b,U+822e,U+8232-8235,U+8237-8238,U+823a,U+823c,U+8240,U+8243-8246,U+8249,U+824b,U+824e-824f,U+8251,U+8256-825a,U+825c-825d,U+825f-8260,U+8262-8264,U+8267-8268,U+826a-826b,U+826d-826e,U+8271,U+8274,U+8277,U+8279,U+827b,U+827d-8281,U+8283-8284,U+8287,U+8289-828a,U+828d-828e,U+8291-8294,U+8296,U+8298-829b,U+829f-82a1,U+82a3-82a4,U+82a7-82ac,U+82ae,U+82b0,U+82b2,U+82b4,U+82b7,U+82ba-82bc,U+82be-82bf,U+82c5-82c6,U+82d0,U+82d2-82d3,U+82d5,U+82d9-82da,U+82dc,U+82de-82e4,U+82e7}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-22-wght-normal-BACXhehE.woff2) format("woff2-variations");unicode-range:U+7f77-7f79,U+7f7d-7f80,U+7f82-7f83,U+7f86-7f88,U+7f8b-7f8d,U+7f8f-7f91,U+7f94,U+7f96-7f97,U+7f9a,U+7f9c-7f9d,U+7fa1-7fa3,U+7fa6,U+7faa,U+7fad-7faf,U+7fb2,U+7fb4,U+7fb6,U+7fb8-7fb9,U+7fbc,U+7fbf-7fc0,U+7fc3,U+7fc5-7fc6,U+7fc8,U+7fca,U+7fce-7fcf,U+7fd5,U+7fdb,U+7fdf,U+7fe1,U+7fe3,U+7fe5-7fe6,U+7fe8-7fe9,U+7feb-7fec,U+7fee-7ff0,U+7ff2-7ff3,U+7ff9-7ffa,U+7ffd-7fff,U+8002,U+8004,U+8006-8008,U+800a-800f,U+8011-8014,U+8016,U+8018-8019,U+801c-8021,U+8024,U+8026,U+8028,U+802c,U+802e,U+8030,U+8034-8035,U+8037,U+8039-8040,U+8043-8044,U+8046,U+804a,U+8052,U+8058,U+805a,U+805f-8060,U+8062,U+8064,U+8066,U+8068,U+806d,U+806f-8073,U+8075-8076,U+8079,U+807b,U+807d-8081,U+8084-8088,U+808b,U+808e,U+8093,U+8099-809a,U+809c,U+809e,U+80a4,U+80a6-80a7,U+80ab-80ad,U+80b1,U+80b8-80b9,U+80c4-80c5,U+80c8,U+80ca,U+80cd,U+80cf,U+80d2,U+80d4-80db,U+80dd,U+80e0,U+80e4-80e6,U+80ed-80f3,U+80f5-80f7,U+80f9-80fc,U+80fe,U+8101,U+8103,U+8109,U+810b,U+810d,U+8116-8118,U+811b-811c,U+811e,U+8120,U+8123-8124,U+8127,U+8129,U+812b-812c,U+812f-8130,U+8135,U+8139-813a,U+813c-813e,U+8141,U+8145-8147}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-23-wght-normal-BguN3TwY.woff2) format("woff2-variations");unicode-range:U+7d57,U+7d59-7d5d,U+7d63,U+7d65,U+7d67,U+7d6a,U+7d6e,U+7d70,U+7d72-7d73,U+7d78,U+7d7a-7d7b,U+7d7d,U+7d7f,U+7d81-7d83,U+7d85-7d86,U+7d88-7d89,U+7d8b-7d8d,U+7d8f,U+7d91,U+7d93,U+7d96-7d97,U+7d9b-7da0,U+7da2-7da3,U+7da6-7da7,U+7daa-7dac,U+7dae-7db0,U+7db3,U+7db5-7db9,U+7dbd,U+7dc0,U+7dc2-7dc7,U+7dcc-7dce,U+7dd0,U+7dd5-7dd9,U+7ddc-7dde,U+7de1-7de6,U+7dea-7ded,U+7df1-7df2,U+7df5-7df6,U+7df9-7dfa,U+7e00,U+7e05,U+7e08-7e0b,U+7e10-7e12,U+7e15,U+7e17,U+7e1c-7e1d,U+7e1f-7e23,U+7e27-7e28,U+7e2c-7e2d,U+7e2f,U+7e31-7e33,U+7e35-7e37,U+7e39-7e3b,U+7e3d,U+7e3f,U+7e43-7e48,U+7e4e,U+7e50,U+7e52,U+7e56,U+7e58-7e5a,U+7e5d-7e5f,U+7e61-7e62,U+7e65-7e67,U+7e69-7e6b,U+7e6d-7e6f,U+7e73,U+7e75,U+7e78-7e79,U+7e7b-7e7f,U+7e81-7e83,U+7e86-7e8a,U+7e8c-7e8e,U+7e90-7e96,U+7e98,U+7e9a-7e9f,U+7f38,U+7f3a-7f3f,U+7f43-7f45,U+7f47,U+7f4c-7f50,U+7f52-7f55,U+7f58,U+7f5b-7f5d,U+7f5f,U+7f61,U+7f63-7f69,U+7f6b,U+7f6d,U+7f71}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-24-wght-normal-CXEahOPk.woff2) format("woff2-variations");unicode-range:U+7bc8,U+7bca-7bcc,U+7bcf,U+7bd4,U+7bd6-7bd7,U+7bd9-7bdb,U+7bdd,U+7be5-7be6,U+7be8-7bea,U+7bf0,U+7bf2-7bfa,U+7bfc,U+7bfe,U+7c00-7c04,U+7c06-7c07,U+7c09,U+7c0b-7c0f,U+7c11-7c14,U+7c17,U+7c19,U+7c1b,U+7c1e-7c20,U+7c23,U+7c25-7c28,U+7c2a-7c2c,U+7c2f,U+7c31,U+7c33-7c34,U+7c36-7c3a,U+7c3d-7c3e,U+7c40,U+7c42-7c43,U+7c45-7c46,U+7c4a,U+7c4c,U+7c4f-7c5f,U+7c61,U+7c63-7c65,U+7c67,U+7c69,U+7c6c-7c70,U+7c72,U+7c75,U+7c79,U+7c7b-7c7e,U+7c81-7c83,U+7c86-7c87,U+7c8d,U+7c8f-7c90,U+7c94,U+7c9e,U+7ca0-7ca2,U+7ca4-7ca6,U+7ca8,U+7cab,U+7cad-7cae,U+7cb0-7cb3,U+7cb6-7cb7,U+7cb9-7cbd,U+7cbf-7cc0,U+7cc2,U+7cc4-7cc5,U+7cc7-7cca,U+7ccd-7ccf,U+7cd2-7cd5,U+7cd7-7cda,U+7cdc-7cdd,U+7cdf-7ce0,U+7ce2,U+7ce6,U+7ce9,U+7ceb,U+7cef,U+7cf2,U+7cf4-7cf6,U+7cf9-7cfa,U+7cfe,U+7d02-7d03,U+7d06-7d0a,U+7d0f,U+7d11-7d13,U+7d15-7d16,U+7d1c-7d1e,U+7d23,U+7d26,U+7d2a,U+7d2c-7d2e,U+7d31-7d32,U+7d35,U+7d3c-7d41,U+7d43,U+7d45,U+7d47-7d48,U+7d4b,U+7d4d-7d4f,U+7d51,U+7d53,U+7d55-7d56}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-25-wght-normal-VS5EnqV2.woff2) format("woff2-variations");unicode-range:U+7a17-7a19,U+7a1b,U+7a1e-7a21,U+7a27,U+7a2b,U+7a2d,U+7a2f-7a31,U+7a34-7a35,U+7a37-7a3b,U+7a3e,U+7a43-7a49,U+7a4c,U+7a4e,U+7a50,U+7a55-7a57,U+7a59,U+7a5c-7a5d,U+7a5f-7a63,U+7a65,U+7a67,U+7a69-7a6a,U+7a6d,U+7a70,U+7a75,U+7a78-7a79,U+7a7d-7a7e,U+7a80,U+7a82,U+7a84-7a86,U+7a88,U+7a8a-7a8b,U+7a90-7a91,U+7a94-7a98,U+7a9e,U+7aa0,U+7aa3,U+7aa9,U+7aac,U+7ab0,U+7ab3,U+7ab5-7ab6,U+7ab9-7abf,U+7ac3,U+7ac5-7aca,U+7acc-7acf,U+7ad1-7ad3,U+7ad5,U+7ada-7adb,U+7add,U+7adf,U+7ae1-7ae2,U+7ae6-7aed,U+7af0-7af1,U+7af4,U+7af8,U+7afa-7afb,U+7afd-7afe,U+7b02,U+7b04,U+7b06-7b08,U+7b0a-7b0b,U+7b0f,U+7b12,U+7b14,U+7b18-7b19,U+7b1e-7b1f,U+7b23,U+7b25,U+7b27-7b2b,U+7b2d-7b31,U+7b33-7b36,U+7b3b,U+7b3d,U+7b3f-7b41,U+7b45,U+7b47,U+7b4c-7b50,U+7b53,U+7b55,U+7b5d,U+7b60,U+7b64-7b66,U+7b69-7b6a,U+7b6c-7b75,U+7b77,U+7b79-7b7a,U+7b7f,U+7b84,U+7b86,U+7b89,U+7b8d-7b92,U+7b96,U+7b98-7ba0,U+7ba5,U+7bac-7bad,U+7baf-7bb0,U+7bb2,U+7bb4-7bb6,U+7bba-7bbd,U+7bc1-7bc2,U+7bc5-7bc6}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-26-wght-normal-Bu8z50LX.woff2) format("woff2-variations");unicode-range:U+7851-7852,U+785c,U+785e,U+7860-7861,U+7863-7864,U+7868,U+786a,U+786e-786f,U+7872,U+7874,U+787a,U+787c,U+787e,U+7886-7887,U+788a,U+788c-788f,U+7893-7895,U+7898,U+789a,U+789d-789f,U+78a1,U+78a3-78a4,U+78a8-78aa,U+78ac-78ad,U+78af-78b3,U+78b5,U+78bb-78bf,U+78c5-78cc,U+78ce,U+78d1-78d6,U+78da-78db,U+78df-78e1,U+78e4,U+78e6-78e7,U+78ea,U+78ec,U+78f2-78f4,U+78f6-78f7,U+78f9-78fb,U+78fd-7901,U+7906-7907,U+790c,U+7910-7912,U+7919-791c,U+791e-7920,U+7925-792e,U+7930-7931,U+7934-7935,U+793b,U+793d,U+793f,U+7941-7942,U+7944-7946,U+794a-794b,U+794f,U+7951,U+7954-7955,U+7957-7958,U+795a-795c,U+795f-7960,U+7962,U+7967,U+7969,U+796b,U+7972,U+7977,U+7979-797c,U+797e-7980,U+798a-798e,U+7991,U+7993-7996,U+7998,U+799b-799d,U+79a1,U+79a6-79ab,U+79ae-79b1,U+79b3-79b4,U+79b8-79bb,U+79bd-79be,U+79c2,U+79c4,U+79c7-79ca,U+79cc-79cd,U+79cf,U+79d4-79d6,U+79da,U+79dd-79e3,U+79e5,U+79e7,U+79ea-79ed,U+79f1,U+79f8,U+79fc,U+7a02-7a03,U+7a05,U+7a07-7a0a,U+7a0c-7a0d,U+7a11,U+7a15}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-27-wght-normal-jmtCcHJ0.woff2) format("woff2-variations");unicode-range:U+768c-768e,U+7690,U+7693,U+7695-7696,U+7699-76a8,U+76aa,U+76ad,U+76af-76b0,U+76b4,U+76b6-76ba,U+76bd,U+76c1-76c3,U+76c5,U+76c8-76c9,U+76cb-76ce,U+76d2,U+76d4,U+76d6,U+76d9,U+76dc,U+76de,U+76e0-76e1,U+76e5-76e8,U+76ea-76ec,U+76f0-76f1,U+76f6,U+76f9,U+76fb-76fc,U+7700,U+7704,U+7706-7708,U+770a,U+770e,U+7712,U+7714-7715,U+7717,U+7719-771c,U+7722,U+7724-7726,U+7728,U+772d-772f,U+7734-7739,U+773d-773e,U+7742,U+7745-7747,U+774a,U+774d-774f,U+7752,U+7756-7758,U+775a-775c,U+775e-7760,U+7762,U+7764-7765,U+7767,U+776a-776c,U+7770,U+7772-7774,U+7779-777a,U+777c-7780,U+7784,U+778b-778e,U+7794-7796,U+779a,U+779e-77a0,U+77a2,U+77a4-77a5,U+77a7,U+77a9-77aa,U+77ae-77b1,U+77b5-77b7,U+77b9,U+77bb-77bf,U+77c3,U+77c7,U+77c9,U+77cd,U+77d1-77d2,U+77d5,U+77d7,U+77d9-77da,U+77dc,U+77de-77e0,U+77e3-77e4,U+77e6-77e7,U+77e9-77ea,U+77ec,U+77ee,U+77f0-77f1,U+77f4,U+77f8,U+77fb-77fc,U+7805-7806,U+7809,U+780c-780e,U+7811-7812,U+7819,U+781d,U+7820-7823,U+7826-7827,U+782c-782e,U+7830,U+7835,U+7837,U+783a,U+783f,U+7843-7845,U+7847-7848,U+784c,U+784e-784f}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-28-wght-normal-DQNwlFIU.woff2) format("woff2-variations");unicode-range:U+7511-7513,U+7515-7517,U+751c,U+751e,U+7520-7522,U+7524,U+7526-7527,U+7529-752c,U+752f,U+7536,U+7538-7539,U+753c-7540,U+7543-7544,U+7546-754b,U+754d-7550,U+7552,U+7557,U+755a-755b,U+755d-755f,U+7561-7562,U+7564,U+7566-7567,U+7569,U+756b-756d,U+756f,U+7571-7572,U+7574-757e,U+7581-7582,U+7585-7587,U+7589-758c,U+758f-7590,U+7592-7595,U+7599-759a,U+759c-759d,U+75a2-75a5,U+75b0-75b1,U+75b3-75b5,U+75b7-75b8,U+75ba,U+75bd,U+75bf-75c4,U+75c6,U+75ca,U+75cc-75cf,U+75d3-75d4,U+75d7-75d8,U+75dc-75e1,U+75e3-75e4,U+75e7,U+75ec,U+75ee-75f3,U+75f9,U+75fc,U+75fe-7604,U+7607-760c,U+760f,U+7612-7613,U+7615-7616,U+7618-7619,U+761b-7629,U+762d,U+7630,U+7632-7635,U+7638-763c,U+7640-7641,U+7643-764b,U+764e,U+7655,U+7658-7659,U+765c,U+765f,U+7661-7662,U+7664-7665,U+7667-766a,U+766c-7672,U+7674,U+7676,U+7678,U+7680-7683,U+7685,U+7688,U+768b}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-29-wght-normal-BnPJOTuS.woff2) format("woff2-variations");unicode-range:U+736c,U+736e-7371,U+7375,U+7377-737c,U+7380-7381,U+7383,U+7385-7386,U+738a,U+738e,U+7390,U+7393-7398,U+739c,U+739e-73a0,U+73a2,U+73a5-73a6,U+73a8,U+73aa-73ab,U+73ad,U+73b3,U+73b5,U+73b7,U+73b9-73bd,U+73bf,U+73c5-73c6,U+73c9-73cc,U+73ce-73cf,U+73d2-73d3,U+73d6,U+73d9,U+73dd-73de,U+73e1,U+73e3-73e7,U+73e9-73ea,U+73ee,U+73f1,U+73f4-73f5,U+73f7-73fb,U+73fd,U+73ff-7401,U+7404-7405,U+7407,U+740a,U+7411,U+7413,U+741a-741b,U+7421,U+7424,U+7426,U+7428-7431,U+7433,U+7439-743a,U+743f-7441,U+7443-7444,U+7446-7447,U+744b,U+744d,U+7451-7453,U+7455,U+7457,U+7459-745a,U+745c-745d,U+745f,U+7462-7464,U+7466-746b,U+746d-7473,U+7476,U+747e,U+7480-7481,U+7485-7489,U+748b,U+748f-7492,U+7497-749a,U+749c,U+749e-74a3,U+74a5-74a6,U+74a8-74ab,U+74ae-74af,U+74b1-74b2,U+74b5,U+74b9-74bb,U+74bd,U+74bf,U+74c8-74ca,U+74cc,U+74cf-74d0,U+74d3-74d4,U+74d6,U+74d8,U+74da-74db,U+74de-74e0,U+74e3-74e4,U+74e7-74eb,U+74ee-74f2,U+74f4,U+74f7-74f8,U+74fa-74fc,U+74ff,U+7501,U+7503-7506,U+750c-750e}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-30-wght-normal-Bj8BZBgx.woff2) format("woff2-variations");unicode-range:U+7166,U+7168,U+716c,U+7179,U+7180,U+7184-7185,U+7187-7188,U+718c,U+718f,U+7192,U+7194-7196,U+7199-719b,U+71a0,U+71a2,U+71a8,U+71ac,U+71ae-71b0,U+71b2-71b3,U+71b9-71ba,U+71be-71c1,U+71c4,U+71c9,U+71cb-71cc,U+71ce,U+71d0,U+71d2-71d4,U+71d6-71d7,U+71d9-71da,U+71dc,U+71df-71e0,U+71e6-71e7,U+71ec-71ee,U+71f4-71f5,U+71f8-71f9,U+71fc,U+71fe-7200,U+7207-7209,U+720d,U+7210,U+7213,U+7215,U+7217,U+721a,U+721d,U+721f,U+7224,U+7228,U+722b,U+722d,U+722f-7230,U+7232,U+7234,U+7238-7239,U+723b-723c,U+723e-7243,U+7245-7246,U+724b,U+724e-7250,U+7252-7253,U+7255-7258,U+725a,U+725c,U+725e,U+7260,U+7263,U+7268,U+726b,U+726e-726f,U+7271,U+7274,U+7277-7278,U+727b-727c,U+727e-7282,U+7284,U+7287,U+7289,U+728d-728e,U+7292-7293,U+7296,U+729b,U+72a2,U+72a7-72a8,U+72ad-72ae,U+72b0-72b2,U+72b4,U+72b9,U+72be,U+72c0-72c1,U+72c3-72c4,U+72c6-72c7,U+72c9,U+72cc,U+72ce,U+72d2,U+72d5-72d6,U+72d8,U+72df-72e2,U+72e5,U+72f3-72f4,U+72f7,U+72f9-72fb,U+72fd-72fe,U+7302,U+7304-7305,U+7307,U+730a-730b,U+730d,U+7312-7313,U+7316-7319,U+731c-731e,U+7322,U+7324,U+7327-7329,U+732c,U+732f,U+7331-7337,U+7339-733b,U+733d-733e,U+7343,U+734d-7350,U+7352,U+7356-7358,U+735d-7360,U+7366-736b}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-31-wght-normal-Commwwo1.woff2) format("woff2-variations");unicode-range:U+6f58-6f5b,U+6f5d-6f5e,U+6f60-6f62,U+6f66,U+6f68,U+6f6c-6f6d,U+6f6f,U+6f74,U+6f78,U+6f7a,U+6f7c-6f7e,U+6f80,U+6f82-6f83,U+6f86-6f88,U+6f8b-6f8e,U+6f90-6f94,U+6f96-6f98,U+6f9a,U+6f9d,U+6f9f-6fa1,U+6fa3,U+6fa5-6fa8,U+6fae-6fb1,U+6fb3,U+6fb5-6fb7,U+6fb9,U+6fbc,U+6fbe,U+6fc2,U+6fc5-6fca,U+6fd4-6fd5,U+6fd8,U+6fda-6fdb,U+6fde-6fe0,U+6fe4,U+6fe8-6fe9,U+6feb-6fec,U+6fee,U+6ff0,U+6ff3,U+6ff5-6ff6,U+6ff9-6ffa,U+6ffc-6ffe,U+7000-7001,U+7005-7007,U+7009-700b,U+700d,U+700f,U+7011,U+7015,U+7017-7018,U+701a-701b,U+701d-7020,U+7023,U+7026,U+7028,U+702f-7030,U+7032,U+7034,U+7037,U+7039-703a,U+703c,U+703e,U+7043-7044,U+7047-704c,U+704e,U+7051,U+7054-7055,U+705d-705e,U+7064-7065,U+7069,U+706c,U+706e,U+7075-7076,U+707e,U+7081,U+7085-7086,U+7094-7098,U+709b,U+709f,U+70a4,U+70ab-70ac,U+70ae-70b1,U+70b3-70b4,U+70b7,U+70bb,U+70ca-70cb,U+70d1,U+70d3-70d6,U+70d8-70d9,U+70dc-70dd,U+70df,U+70e4,U+70ec,U+70f1,U+70fa,U+70fd,U+7103-7108,U+710b-710c,U+710f,U+7114,U+7119,U+711c,U+711e,U+7120,U+712b,U+712d-7131,U+7138,U+7141,U+7145-7147,U+7149-714b,U+7150-7153,U+7155-7157,U+715a,U+715c,U+715e,U+7160,U+7162,U+7164-7165}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-32-wght-normal-CRZDfOIz.woff2) format("woff2-variations");unicode-range:U+6d7c,U+6d80-6d82,U+6d85,U+6d87,U+6d89-6d8a,U+6d8c-6d8e,U+6d91-6d98,U+6d9c,U+6daa-6dac,U+6dae,U+6db4-6db5,U+6db7-6db9,U+6dbd,U+6dbf,U+6dc2,U+6dc4-6dc8,U+6dca,U+6dcc,U+6dce-6dd0,U+6dd2,U+6dd5-6dd6,U+6dd8-6ddb,U+6ddd-6de0,U+6de2,U+6de4-6de6,U+6de8-6dea,U+6dec,U+6dee-6df0,U+6df2,U+6df4,U+6df6,U+6df8-6dfa,U+6dfc,U+6e00,U+6e04,U+6e0a,U+6e17,U+6e19,U+6e1d-6e20,U+6e22-6e25,U+6e27,U+6e2b,U+6e2d-6e2e,U+6e32,U+6e34,U+6e36,U+6e38-6e3c,U+6e42-6e45,U+6e48-6e49,U+6e4b-6e4f,U+6e51-6e54,U+6e57,U+6e5b-6e5f,U+6e62-6e63,U+6e68,U+6e6b,U+6e6e,U+6e72-6e73,U+6e76,U+6e7b,U+6e7d,U+6e82,U+6e89,U+6e8c-6e8d,U+6e8f,U+6e93,U+6e98-6e99,U+6e9f-6ea0,U+6ea5,U+6ea7,U+6eaa-6eab,U+6ead-6eaf,U+6eb1-6eb4,U+6eb7,U+6ebb-6ebd,U+6ebf-6ec4,U+6ec7-6eca,U+6ecc-6ecf,U+6ed3-6ed5,U+6ed9-6edb,U+6ee6,U+6eeb-6eef,U+6ef7-6ef9,U+6efb,U+6efd-6eff,U+6f04,U+6f08-6f0a,U+6f0c-6f0d,U+6f10-6f11,U+6f13,U+6f15-6f16,U+6f18,U+6f1a-6f1b,U+6f25-6f26,U+6f29-6f2a,U+6f2d,U+6f2f-6f33,U+6f35-6f36,U+6f38,U+6f3b-6f3c,U+6f3e-6f3f,U+6f41,U+6f45,U+6f4f,U+6f51-6f53,U+6f57}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-33-wght-normal-BnYdH6SQ.woff2) format("woff2-variations");unicode-range:U+6b85,U+6b89,U+6b8d,U+6b95,U+6b97-6b98,U+6b9b,U+6b9e-6ba0,U+6ba2-6ba4,U+6ba8-6bb3,U+6bb7-6bb9,U+6bbc-6bbe,U+6bc0,U+6bc3-6bc4,U+6bc6-6bc9,U+6bcb-6bcc,U+6bcf,U+6bd3,U+6bd6-6bd8,U+6bda,U+6bdf,U+6be1,U+6be3,U+6be6-6be7,U+6beb-6bec,U+6bee,U+6bf1,U+6bf3,U+6bf7,U+6bf9,U+6bff,U+6c02,U+6c04-6c05,U+6c08-6c0a,U+6c0d-6c0e,U+6c10,U+6c12-6c14,U+6c19,U+6c1b,U+6c1f,U+6c24,U+6c26-6c28,U+6c2c,U+6c2e,U+6c33,U+6c35-6c36,U+6c3a-6c3b,U+6c3e-6c40,U+6c4a-6c4b,U+6c4d,U+6c4f,U+6c52,U+6c54-6c55,U+6c59,U+6c5b-6c5e,U+6c62,U+6c67-6c68,U+6c6a-6c6b,U+6c6d,U+6c6f,U+6c73-6c74,U+6c76,U+6c78-6c79,U+6c7b,U+6c7e,U+6c81-6c87,U+6c89,U+6c8c-6c8d,U+6c90,U+6c92-6c95,U+6c97-6c98,U+6c9a-6c9c,U+6c9f,U+6caa-6cae,U+6cb0-6cb2,U+6cb4,U+6cba,U+6cbd-6cbe,U+6cc2,U+6cc5-6cc6,U+6ccd,U+6ccf-6cd4,U+6cd6-6cd7,U+6cd9-6cdd,U+6ce0,U+6ce7,U+6ce9-6cef,U+6cf1-6cf2,U+6cf4,U+6cfb,U+6d00-6d01,U+6d04,U+6d07,U+6d0a,U+6d0c,U+6d0e-6d0f,U+6d11,U+6d13,U+6d19-6d1a,U+6d1f,U+6d24,U+6d26-6d28,U+6d2b,U+6d2e-6d2f,U+6d31,U+6d33-6d36,U+6d38-6d39,U+6d3c-6d3d,U+6d3f,U+6d57-6d5b,U+6d5e-6d61,U+6d64-6d65,U+6d67,U+6d6c,U+6d6f-6d70,U+6d79}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-34-wght-normal-CGJbTgpI.woff2) format("woff2-variations");unicode-range:U+69dd-69de,U+69e2-69e3,U+69e5,U+69e7-69eb,U+69ed-69ef,U+69f1-69f6,U+69f9,U+69fe-6a01,U+6a03,U+6a05,U+6a0a,U+6a0c,U+6a0f,U+6a11-6a15,U+6a17,U+6a1a-6a1b,U+6a1d-6a20,U+6a22-6a24,U+6a28,U+6a2e,U+6a30,U+6a32-6a38,U+6a3b,U+6a3e-6a3f,U+6a44-6a4a,U+6a4e,U+6a50-6a52,U+6a54-6a56,U+6a5b,U+6a61-6a62,U+6a64,U+6a66-6a67,U+6a6a-6a6b,U+6a71-6a73,U+6a78,U+6a7a,U+6a7e-6a7f,U+6a81,U+6a83-6a84,U+6a86-6a87,U+6a89,U+6a8b,U+6a8d,U+6a90-6a91,U+6a94,U+6a97,U+6a9b,U+6a9d-6aa3,U+6aa5,U+6aaa-6aac,U+6aae-6ab1,U+6ab3-6ab4,U+6ab8,U+6abb,U+6abd-6abf,U+6ac1-6ac3,U+6ac6,U+6ac8-6ac9,U+6acc,U+6ad0-6ad1,U+6ad3-6ad6,U+6ada-6adf,U+6ae2,U+6ae4,U+6ae7-6ae8,U+6aea,U+6aec,U+6af0-6af3,U+6af8,U+6afa,U+6afc-6afd,U+6b02-6b03,U+6b06-6b07,U+6b09-6b0b,U+6b0f-6b12,U+6b16-6b17,U+6b1b,U+6b1d-6b1f,U+6b23-6b24,U+6b28,U+6b2b-6b2c,U+6b2f,U+6b35-6b39,U+6b3b,U+6b3d,U+6b3f,U+6b43,U+6b46-6b47,U+6b49-6b4a,U+6b4d-6b4e,U+6b50,U+6b52,U+6b54,U+6b56,U+6b58-6b59,U+6b5b,U+6b5d,U+6b5f-6b61,U+6b65,U+6b67,U+6b6b-6b6c,U+6b6e,U+6b70,U+6b72,U+6b75,U+6b77-6b7a,U+6b7d-6b84}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-35-wght-normal-C7HufUhC.woff2) format("woff2-variations");unicode-range:U+6855,U+6857-6859,U+685b,U+685d,U+685f,U+6863,U+6867,U+686b,U+686e-6872,U+6874-6875,U+6877,U+6879-687c,U+687e-687f,U+6882-6884,U+6886,U+6888,U+688d-6890,U+6894,U+6896,U+6898-689c,U+689f-68a3,U+68a5-68a7,U+68a9-68ab,U+68ad-68af,U+68b2-68b5,U+68b9-68bc,U+68c3,U+68c5-68c6,U+68c8-68ca,U+68cc-68cd,U+68cf-68d1,U+68d3-68d9,U+68dc-68dd,U+68e0-68e1,U+68e3-68e5,U+68e7-68e8,U+68ea-68ed,U+68ef-68f1,U+68f5-68f7,U+68f9,U+68fb-68fd,U+6900-6901,U+6903-6904,U+6906-690c,U+690f-6911,U+6913,U+6916-6917,U+6919-691b,U+6921-6923,U+6925-6926,U+6928,U+692a,U+6930-6931,U+6933-6936,U+6938-6939,U+693b,U+693d,U+6942,U+6945-6946,U+6949,U+694e,U+6954,U+6957,U+6959,U+695b-695e,U+6961-6966,U+6968-696c,U+696e-6974,U+6977-697b,U+697e-6981,U+6986,U+698d,U+6991-6992,U+6994-6996,U+6998,U+699c,U+69a0-69a1,U+69a5-69a8,U+69ab,U+69ad,U+69af-69b2,U+69b4,U+69b7-69b8,U+69ba-69bc,U+69be-69c1,U+69c3,U+69c5,U+69c7-69c8,U+69ca,U+69ce-69d1,U+69d3,U+69d6-69d7,U+69d9}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-36-wght-normal-Dyc832Mi.woff2) format("woff2-variations");unicode-range:U+667e-6680,U+6683-6684,U+6688,U+668b-668e,U+6690,U+6692,U+6698-669d,U+669f-66a0,U+66a2,U+66a4,U+66ad,U+66b1-66b3,U+66b5,U+66b8-66b9,U+66bb-66bc,U+66be-66c4,U+66c6,U+66c8-66c9,U+66cc,U+66ce-66cf,U+66d4,U+66da-66db,U+66dd,U+66df-66e0,U+66e6,U+66e8-66e9,U+66eb-66ec,U+66ee,U+66f5,U+66f7,U+66fa-66fc,U+6701,U+6705,U+6707,U+670c,U+670e-6710,U+6712-6716,U+6719,U+671c,U+671e,U+6720,U+6722,U+6725-6726,U+672e,U+6733,U+6735-6738,U+673e-673f,U+6741,U+6743,U+6745-6748,U+674c-674d,U+6753-6755,U+6759,U+675d-675e,U+6760,U+6762-6764,U+6766,U+676a,U+676c,U+676e,U+6770,U+6772-6774,U+6776-6777,U+677b-677c,U+6780-6781,U+6784-6785,U+6787,U+6789,U+678b-678c,U+678e-678f,U+6791-6793,U+6796,U+6798-6799,U+679b,U+67a1,U+67a4,U+67a6,U+67a9,U+67b0-67b5,U+67b7-67b9,U+67bb-67be,U+67c0-67c3,U+67c5-67c6,U+67c8-67c9,U+67ce,U+67d2,U+67d7-67d9,U+67db-67de,U+67e1-67e2,U+67e4,U+67e6-67e7,U+67e9,U+67ec,U+67ee-67f0,U+67f2,U+67f6-67f7,U+67f9-67fa,U+67fc,U+67fe,U+6801-6802,U+6805,U+6810,U+6814,U+6818-6819,U+681d,U+681f,U+6822,U+6827-6829,U+682b-682d,U+682f-6834,U+683b,U+683e-6840,U+6844-6846,U+6849-684a,U+684c-684e,U+6852-6854}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-37-wght-normal-BA1uUhJR.woff2) format("woff2-variations");unicode-range:U+64d2,U+64d4-64d5,U+64d7-64d8,U+64da,U+64e0-64e1,U+64e3-64e5,U+64e7,U+64e9-64ea,U+64ed,U+64ef-64f2,U+64f4-64f7,U+64fa-64fb,U+64fd-6501,U+6504-6505,U+6508-650a,U+650f,U+6513-6514,U+6516,U+6518-6519,U+651b-651f,U+6522,U+6524,U+6526,U+6529-652c,U+652e,U+6531-6532,U+6534-6538,U+653a,U+653c-653d,U+6543-6544,U+6547-6549,U+654d-654e,U+6550,U+6552,U+6554-6556,U+6558,U+655d-6560,U+6567,U+656b,U+6572,U+6578,U+657a,U+657d,U+6581-6585,U+6588,U+658a,U+658c,U+6592,U+6595,U+6598,U+659b,U+659d,U+659f-65a1,U+65a3-65a6,U+65ab,U+65ae,U+65b2-65b5,U+65b7-65b8,U+65be-65bf,U+65c1-65c4,U+65c6,U+65c8-65c9,U+65cc,U+65ce,U+65d0,U+65d2,U+65d4,U+65d6,U+65d8-65d9,U+65db,U+65df-65e1,U+65e3,U+65f0-65f2,U+65f4-65f5,U+65f9,U+65fb-65fc,U+65fe-6600,U+6603-6604,U+6608-660a,U+660d,U+6611-6612,U+6615-6616,U+661c-661e,U+6621-6624,U+6626,U+6629-662c,U+662e,U+6630-6631,U+6633-6637,U+6639-663b,U+663f-6641,U+6644-6646,U+6648-664a,U+664c,U+664e-664f,U+6651,U+6657-6665,U+6667-6668,U+666a-666d,U+6670,U+6673,U+6675,U+6677-6679,U+667b-667c}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-38-wght-normal-6T50SRVw.woff2) format("woff2-variations");unicode-range:U+62cf,U+62d1,U+62d4-62d6,U+62da,U+62dc,U+62ea,U+62ee-62ef,U+62f1-62f2,U+62f4-62f5,U+62fc-62fd,U+62ff,U+6302-6304,U+6308-630d,U+6310,U+6313,U+6316,U+6318,U+631b,U+6327,U+6329-632a,U+632d,U+6332,U+6335-6336,U+6339-633c,U+633e,U+6341-6344,U+6346,U+634a-634e,U+6350,U+6352-6354,U+6358-6359,U+635b,U+6365-6366,U+6369,U+636b-636d,U+6371-6372,U+6374-6378,U+637a,U+637c-637d,U+637f-6380,U+6382,U+6384,U+6387,U+6389-638a,U+638e-6390,U+6394-6396,U+6399-639a,U+639e,U+63a0,U+63a3-63a4,U+63a6,U+63a9,U+63ab-63af,U+63b5,U+63bd-63be,U+63c0-63c1,U+63c4-63c6,U+63c8,U+63ce,U+63d1-63d6,U+63dc,U+63e0,U+63e3,U+63e5,U+63e9-63ed,U+63f2-63f3,U+63f5-63f9,U+6406,U+6409-640a,U+640f-6410,U+6412-6414,U+6416-6418,U+641e,U+6420,U+6422,U+6424-6426,U+6428-642a,U+642f-6430,U+6434-6436,U+643d,U+643f,U+644b,U+644e-644f,U+6451-6454,U+645a-645d,U+645f-6461,U+6463,U+6467,U+646d,U+6473-6474,U+6476,U+6478-6479,U+647b,U+647d,U+6485,U+6487-6488,U+648f-6491,U+6493,U+6495,U+6498-649b,U+649d-649f,U+64a1,U+64a3,U+64a6,U+64a8-64a9,U+64ac,U+64b3,U+64bb-64bf,U+64c2,U+64c4-64c5,U+64c7,U+64c9-64cc,U+64ce,U+64d0-64d1}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-39-wght-normal-CN8CV109.woff2) format("woff2-variations");unicode-range:U+6117,U+6119,U+611c,U+611e,U+6120-6122,U+6127-6128,U+612a-612c,U+6130-6131,U+6134-6137,U+6139-613a,U+613c-613f,U+6141-6142,U+6144-6147,U+6149-614a,U+614d,U+6153,U+6158-615a,U+615d-6160,U+6164-6165,U+616b-616c,U+616f,U+6171-6175,U+6177-6178,U+617b-6181,U+6183-6184,U+6187,U+618a-618b,U+618d,U+6192-6194,U+6196-619a,U+619c-619d,U+619f-61a0,U+61a5,U+61a8,U+61aa-61ae,U+61b8-61ba,U+61bc,U+61be,U+61c0-61c3,U+61c6,U+61c8,U+61ca-61cf,U+61d5,U+61dc-61df,U+61e1-61e3,U+61e5-61e9,U+61ec-61ed,U+61ef,U+61f4-61f7,U+61fa,U+61fc-6201,U+6203-6204,U+6207-620a,U+620d-620e,U+6213-6215,U+621b-621e,U+6220-6223,U+6227,U+6229-622b,U+622e,U+6230-6233,U+6236,U+6239,U+623d-623e,U+6241-6244,U+6246,U+6248,U+624c,U+624e,U+6250-6252,U+6254,U+6256,U+6258,U+625a-625c,U+625e,U+6260-6261,U+6263-6264,U+6268,U+626d,U+626f,U+6273,U+627a-627e,U+6282-6283,U+6285,U+6289,U+628d-6290,U+6292-6294,U+6296,U+6299,U+629b,U+62a6,U+62a8,U+62ac,U+62b3,U+62b6-62b7,U+62ba-62bb,U+62be-62bf,U+62c2,U+62c4,U+62c6-62c8,U+62ca,U+62ce}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-40-wght-normal-Ac3ANHeE.woff2) format("woff2-variations");unicode-range:U+5f6c-5f6d,U+5f6f,U+5f72-5f75,U+5f78,U+5f7a,U+5f7d-5f7f,U+5f82-5f83,U+5f87-5f89,U+5f8d,U+5f8f,U+5f91,U+5f96,U+5f99,U+5f9c-5f9d,U+5fa0,U+5fa2,U+5fa4,U+5fa7-5fa8,U+5fab-5fad,U+5faf-5fb1,U+5fb5,U+5fb7-5fb8,U+5fbc-5fbd,U+5fc4,U+5fc7-5fc9,U+5fcb,U+5fd0-5fd4,U+5fdd-5fde,U+5fe1-5fe2,U+5fe4,U+5fe8-5fea,U+5fec-5ff3,U+5ff6,U+5ff8,U+5ffa-5ffd,U+5fff,U+6007,U+600a,U+600d-6010,U+6013-6015,U+6017-601b,U+601f,U+6021-6022,U+6024,U+6026,U+6029,U+602b,U+602d,U+6031,U+6033,U+6035,U+603a,U+6040-6043,U+6046-604a,U+604c-604d,U+6051,U+6054-6057,U+6059-605a,U+605d,U+605f-6064,U+6067,U+606a-606c,U+6070-6071,U+6077,U+607e-607f,U+6081-6086,U+6088-608e,U+6091-6093,U+6095-6098,U+609a-609b,U+609d-609e,U+60a2,U+60a4-60a5,U+60a7-60a8,U+60b0-60b1,U+60b3-60b5,U+60b7-60b8,U+60bb,U+60bd-60be,U+60c2,U+60c4,U+60c6-60cb,U+60ce-60cf,U+60d3-60d5,U+60d8-60d9,U+60db,U+60dd-60df,U+60e1-60e2,U+60e5,U+60ee,U+60f0-60f2,U+60f4-60f8,U+60fa-60fd,U+6100,U+6102-6103,U+6106-6108,U+610a,U+610c-610e,U+6110-6114,U+6116}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-41-wght-normal-B-bcLJUI.woff2) format("woff2-variations");unicode-range:U+5d9b,U+5d9d,U+5d9f-5da0,U+5da2,U+5da4,U+5da7,U+5dab-5dac,U+5dae,U+5db0,U+5db2,U+5db4,U+5db7-5db9,U+5dbc-5dbd,U+5dc3,U+5dc7,U+5dc9,U+5dcb-5dce,U+5dd0-5dd3,U+5dd6-5dd9,U+5ddb,U+5de0,U+5de2,U+5de4,U+5de9,U+5df2,U+5df5,U+5df8-5df9,U+5dfd,U+5dff-5e00,U+5e07,U+5e0b,U+5e0d,U+5e11-5e12,U+5e14-5e15,U+5e18-5e1b,U+5e1f-5e20,U+5e25,U+5e28,U+5e2e,U+5e32,U+5e35-5e37,U+5e3e,U+5e40,U+5e43-5e44,U+5e47,U+5e49,U+5e4b,U+5e4e,U+5e50-5e51,U+5e54,U+5e56-5e58,U+5e5b-5e5c,U+5e5e-5e5f,U+5e62,U+5e64,U+5e68,U+5e6a-5e6e,U+5e70,U+5e75-5e77,U+5e7a,U+5e7f-5e80,U+5e87,U+5e8b,U+5e8e,U+5e96,U+5e99-5e9a,U+5ea0,U+5ea2,U+5ea4-5ea5,U+5ea8,U+5eaa,U+5eac,U+5eb1,U+5eb3,U+5eb8-5eb9,U+5ebd-5ebf,U+5ec1-5ec2,U+5ec6,U+5ec8,U+5ecb-5ecc,U+5ece-5ed6,U+5ed9-5ee2,U+5ee5,U+5ee8-5ee9,U+5eeb-5eec,U+5ef0-5ef1,U+5ef3-5ef4,U+5ef8-5ef9,U+5efc-5f00,U+5f02-5f03,U+5f06-5f09,U+5f0b-5f0e,U+5f11,U+5f16-5f17,U+5f19,U+5f1b-5f1e,U+5f21-5f24,U+5f27-5f29,U+5f2b-5f30,U+5f34,U+5f36,U+5f38,U+5f3a-5f3d,U+5f3f-5f41,U+5f44-5f45,U+5f47-5f48,U+5f4a,U+5f4c-5f4e,U+5f50-5f51,U+5f54,U+5f56-5f58,U+5f5b-5f5d,U+5f60,U+5f63-5f65,U+5f67,U+5f6a}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-42-wght-normal-C4xWUztV.woff2) format("woff2-variations");unicode-range:U+5bbc,U+5bc0-5bc1,U+5bc3,U+5bc7,U+5bc9,U+5bcd-5bd0,U+5bd3-5bd4,U+5bd6-5bda,U+5bde,U+5be0-5be2,U+5be4-5be6,U+5be8,U+5beb-5bec,U+5bef-5bf1,U+5bf3-5bf6,U+5bfd,U+5c03,U+5c05,U+5c07-5c09,U+5c0c-5c0d,U+5c12-5c14,U+5c17,U+5c19,U+5c1e-5c20,U+5c22-5c24,U+5c26,U+5c28-5c2e,U+5c30,U+5c32,U+5c35-5c36,U+5c38-5c39,U+5c46,U+5c4d-5c50,U+5c53,U+5c59-5c5c,U+5c5f-5c63,U+5c67-5c69,U+5c6c-5c70,U+5c74-5c76,U+5c79-5c7d,U+5c87-5c88,U+5c8a,U+5c8c,U+5c8f,U+5c91-5c92,U+5c94,U+5c9d,U+5c9f-5ca0,U+5ca2-5ca3,U+5ca6-5ca8,U+5caa-5cab,U+5cad,U+5cb1-5cb2,U+5cb4-5cb7,U+5cba-5cbc,U+5cbe,U+5cc5,U+5cc7,U+5cc9,U+5ccb,U+5cd0,U+5cd2,U+5cd7,U+5cd9,U+5cdd,U+5ce6,U+5ce8-5cea,U+5ced-5cee,U+5cf1-5cf2,U+5cf4-5cf5,U+5cfa-5cfb,U+5cfd,U+5d01,U+5d06,U+5d0b,U+5d0d,U+5d10-5d12,U+5d14-5d15,U+5d17-5d1b,U+5d1d,U+5d1f-5d20,U+5d22-5d24,U+5d26-5d27,U+5d2b,U+5d31,U+5d34,U+5d39,U+5d3d,U+5d3f,U+5d42-5d43,U+5d46-5d48,U+5d4a-5d4b,U+5d4e,U+5d51-5d53,U+5d55,U+5d59,U+5d5c,U+5d5f-5d62,U+5d64,U+5d69-5d6a,U+5d6c-5d6d,U+5d6f-5d70,U+5d73,U+5d76,U+5d79-5d7a,U+5d7e-5d7f,U+5d81-5d84,U+5d87-5d88,U+5d8a,U+5d8c,U+5d90,U+5d92-5d95,U+5d97,U+5d99}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-43-wght-normal-DAb0Sc5Y.woff2) format("woff2-variations");unicode-range:U+598b-598e,U+5992,U+5995,U+5997,U+599b,U+599d,U+599f,U+59a3-59a4,U+59a7,U+59ad-59b0,U+59b2-59b3,U+59b7,U+59ba,U+59bc,U+59be,U+59c1,U+59c3-59c4,U+59c6,U+59c8,U+59ca,U+59cd,U+59d2,U+59d9-59da,U+59dd-59df,U+59e3-59e5,U+59e7-59e8,U+59ec,U+59ee-59ef,U+59f1-59f2,U+59f4,U+59f6-59f8,U+5a00,U+5a03-5a04,U+5a09,U+5a0c-5a0e,U+5a11-5a13,U+5a17,U+5a1a-5a1c,U+5a1e-5a1f,U+5a23-5a25,U+5a27-5a28,U+5a2a,U+5a2d,U+5a30,U+5a35-5a36,U+5a40-5a41,U+5a44-5a45,U+5a47-5a49,U+5a4c,U+5a50,U+5a55,U+5a5e,U+5a62-5a63,U+5a65,U+5a67,U+5a6a,U+5a6c-5a6d,U+5a77,U+5a7a-5a7b,U+5a7e,U+5a84,U+5a8b,U+5a90,U+5a93,U+5a96,U+5a99,U+5a9c,U+5a9e-5aa0,U+5aa2,U+5aa7,U+5aac,U+5ab1-5ab3,U+5ab5,U+5ab8,U+5aba-5abf,U+5ac2,U+5ac4,U+5ac6,U+5ac8,U+5acb,U+5acf-5ad0,U+5ad6-5ad7,U+5ada,U+5adc,U+5ae0-5ae1,U+5ae3,U+5ae5-5ae6,U+5ae9-5aea,U+5aee,U+5af0,U+5af5-5af6,U+5afa-5afb,U+5afd,U+5b00-5b01,U+5b08,U+5b0b,U+5b16-5b17,U+5b19,U+5b1b,U+5b1d,U+5b21,U+5b25,U+5b2a,U+5b2c-5b2d,U+5b30,U+5b32,U+5b34,U+5b36,U+5b38,U+5b3e,U+5b40-5b41,U+5b43,U+5b45,U+5b4b-5b4c,U+5b51-5b52,U+5b56,U+5b5a-5b5c,U+5b5e-5b5f,U+5b65,U+5b68-5b69,U+5b6e-5b71,U+5b73,U+5b75-5b76,U+5b7a,U+5b7c-5b84,U+5b86,U+5b8a-5b8b,U+5b8d-5b8e,U+5b90-5b91,U+5b93-5b94,U+5b96,U+5ba5-5ba6,U+5ba8-5ba9,U+5bac-5bad,U+5baf,U+5bb1-5bb2,U+5bb7-5bb8,U+5bba}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-44-wght-normal-DyPSHqCN.woff2) format("woff2-variations");unicode-range:U+57b3,U+57b8,U+57bd,U+57c0,U+57c3,U+57c6-57c8,U+57cc,U+57cf,U+57d2-57d7,U+57dc-57de,U+57e0-57e1,U+57e3-57e4,U+57e6-57e7,U+57e9,U+57ed,U+57f0,U+57f4-57f6,U+57f8,U+57fb,U+57fd-57ff,U+5803-5804,U+5808-580d,U+5819,U+581b,U+581d-5821,U+5826-5827,U+582d,U+582f-5830,U+5832,U+5835,U+5839,U+583d,U+583f-5840,U+5849,U+584b-584d,U+584f-5852,U+5855,U+5858-5859,U+585f,U+5861-5862,U+5864,U+5867-5868,U+586d,U+5870,U+5872,U+5878-5879,U+587c,U+587f-5881,U+5885,U+5887-588d,U+588f-5890,U+5894,U+5896,U+5898,U+589d-589e,U+58a0-58a2,U+58a6,U+58a9-58ab,U+58ae,U+58b1-58b3,U+58b8-58bc,U+58be,U+58c2-58c5,U+58c8,U+58cd-58ce,U+58d0-58da,U+58dc-58e2,U+58e4-58e5,U+58e9,U+58ec,U+58ef,U+58f3-58f4,U+58f7,U+58f9,U+58fb-58fd,U+5902,U+5905-5906,U+590a-590d,U+5910,U+5912-5914,U+5918-5919,U+591b,U+591d,U+591f,U+5921,U+5923-5925,U+5928,U+592c-592d,U+592f-5930,U+5932-5933,U+5935-5936,U+5938-5939,U+593d-593f,U+5943,U+5946,U+594e,U+5950,U+5952-5953,U+5955,U+5957-595b,U+595d-5961,U+5963,U+5967,U+5969,U+596b-596d,U+596f,U+5972,U+5975-5976,U+5978-5979,U+597b-597c,U+5981}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-45-wght-normal-BF-EckBd.woff2) format("woff2-variations");unicode-range:U+5616-5617,U+5619,U+561b,U+5620,U+5628,U+562c,U+562f-5639,U+563b-563d,U+563f-5641,U+5643-5644,U+5646-5647,U+5649,U+564b,U+564d-5650,U+5653-5654,U+565e,U+5660-5664,U+5666,U+5669-566d,U+566f,U+5671-5672,U+5675-5676,U+5678,U+567a,U+5680,U+5684-5688,U+568a-568c,U+568f,U+5694-5695,U+5699-569a,U+569d-56a0,U+56a5-56a9,U+56ab-56ae,U+56b1-56b4,U+56b6-56b7,U+56bc,U+56be,U+56c0,U+56c2-56c3,U+56c5,U+56c8-56d1,U+56d3,U+56d7-56d9,U+56dc-56dd,U+56df,U+56e1,U+56e4-56e8,U+56eb,U+56ed-56ee,U+56f1,U+56f6-56f7,U+56f9,U+56ff-5704,U+5707-570a,U+570c-570d,U+5711,U+5713,U+5715-5716,U+5718,U+571a-571d,U+5720-5726,U+5729-572a,U+572c,U+572e-572f,U+5733-5734,U+5737-5738,U+573b,U+573d-573f,U+5745-5746,U+574c-574f,U+5751-5752,U+5759,U+575f,U+5761-5762,U+5764-5765,U+5767-5769,U+576b,U+576d-5771,U+5773-5775,U+5777,U+5779-577c,U+577e-577f,U+5781,U+5783,U+5788-5789,U+578c,U+5793-5795,U+5797,U+5799-579a,U+579c-57a1,U+57a4,U+57a7-57aa,U+57ac,U+57ae,U+57b0}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-46-wght-normal-BmRwgAv-.woff2) format("woff2-variations");unicode-range:U+543f-5440,U+5443-5444,U+5447,U+544c-544f,U+5455,U+545e,U+5462,U+5464,U+5466-5467,U+5469,U+546b-546e,U+5470-5471,U+5474-5477,U+547b,U+547f-5481,U+5483-5486,U+5488-548b,U+548d-5492,U+5495-5496,U+549c,U+549f-54a2,U+54a4,U+54a6-54af,U+54b1,U+54b7-54bc,U+54be-54bf,U+54c2-54c4,U+54c6-54c8,U+54ca,U+54cd-54ce,U+54d8,U+54e0,U+54e2,U+54e5-54e6,U+54e8-54ea,U+54ec-54ef,U+54f1,U+54f3,U+54f6,U+54fc-5501,U+5505,U+5508-5509,U+550c-550f,U+5514-5516,U+5527,U+552a-552b,U+552e,U+5532-5533,U+5535-5536,U+5538-5539,U+553b-553d,U+5540-5541,U+5544-5545,U+5547,U+5549-554a,U+554c-554d,U+5550-5551,U+5556-5558,U+555a-555e,U+5560-5561,U+5563-5564,U+5566,U+557b-5583,U+5586-5588,U+558a,U+558e-558f,U+5591-5594,U+5597,U+5599,U+559e-559f,U+55a3-55a4,U+55a8-55a9,U+55ac-55ae,U+55b2,U+55bf,U+55c1,U+55c3-55c4,U+55c6-55c7,U+55c9,U+55cb-55cc,U+55ce,U+55d1-55d4,U+55d7-55d8,U+55da-55db,U+55dd-55df,U+55e2,U+55e4,U+55e9,U+55ec,U+55ee,U+55f1,U+55f6-55f9,U+55fd-55ff,U+5605,U+5607-5608,U+560a,U+560d-5612}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-47-wght-normal-0LM1TynG.woff2) format("woff2-variations");unicode-range:U+528d,U+5291-5298,U+529a,U+529c,U+52a4-52a7,U+52ab-52ad,U+52af-52b0,U+52b5-52b8,U+52ba-52be,U+52c0-52c1,U+52c4-52c6,U+52c8,U+52ca,U+52cc-52cd,U+52cf-52d2,U+52d4,U+52d6-52d7,U+52db-52dc,U+52de,U+52e0-52e1,U+52e3,U+52e5-52e6,U+52e8-52ea,U+52ec,U+52f0-52f1,U+52f3-52fb,U+5300-5301,U+5303,U+5306-5308,U+530a-530d,U+530f-5311,U+5313,U+5315,U+5318-531f,U+5321,U+5323-5325,U+5327-532d,U+532f-5333,U+5335,U+5338,U+533c-533e,U+5340,U+5342,U+5345-5346,U+5349,U+534b-534c,U+5359,U+535b,U+535e,U+5361,U+5363-5367,U+5369,U+536c-536e,U+5372,U+5377,U+5379-537b,U+537d-537f,U+5382-5383,U+5387-5389,U+538e,U+5393-5394,U+5396,U+5398-5399,U+539d,U+53a0-53a1,U+53a4-53a6,U+53a9-53ab,U+53ad-53b0,U+53b2,U+53b4-53b8,U+53ba,U+53bd,U+53c0-53c1,U+53c3-53c5,U+53cf,U+53d2-53d3,U+53d5,U+53da-53db,U+53dd-53e0,U+53e2,U+53e6-53e8,U+53ed-53ee,U+53f4-53f5,U+53fa,U+5401-5403,U+540b,U+540f,U+5412-5413,U+541a,U+541d-541e,U+5421,U+5424,U+5427-542a,U+542c-542f,U+5431,U+5433-5436,U+543c-543d}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-48-wght-normal-DrhQr74m.woff2) format("woff2-variations");unicode-range:U+50dd-50df,U+50e1-50e6,U+50e8-50e9,U+50ed-50f6,U+50f9-50fb,U+50fe,U+5101-5103,U+5106-5109,U+510b-510e,U+5110,U+5112,U+5114-511e,U+5121,U+5123,U+5127-5128,U+512c-512d,U+512f,U+5131,U+5133-5135,U+5137-513c,U+513f-5142,U+5147,U+514a,U+514c,U+514f,U+5152-5155,U+5157-5158,U+515f-5160,U+5162,U+5164,U+5166-5167,U+5169-516a,U+516e,U+5173-5174,U+5179,U+517b,U+517e,U+5180,U+5182-5184,U+5189,U+518b-518c,U+518e-5191,U+5193,U+5195-5196,U+5198,U+519d,U+51a1-51a4,U+51a6,U+51a9-51ab,U+51ad,U+51b0-51b3,U+51b5,U+51b8,U+51ba,U+51bc-51bf,U+51c2-51c3,U+51c5,U+51c8-51cb,U+51cf,U+51d1-51d6,U+51d8,U+51de-51e0,U+51e2,U+51e5,U+51e7,U+51e9,U+51ec-51ee,U+51f2-51f5,U+51f7,U+51fe,U+5201-5202,U+5204-5205,U+520b,U+520e,U+5212-5216,U+5218,U+5222,U+5226-5228,U+522a-522b,U+522e,U+5231-5233,U+5235,U+523c,U+5244-5245,U+5249,U+524b-524c,U+524f,U+5254-5255,U+5257-5258,U+525a,U+525c-5261,U+5266,U+5269,U+526c,U+526e,U+5271,U+5273-5274,U+5277-5279,U+527d,U+527f-5280,U+5282-5285,U+5288-528a,U+528c}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-49-wght-normal-6kT-KCCt.woff2) format("woff2-variations");unicode-range:U+4f57-4f58,U+4f5a-4f5b,U+4f5d-4f5f,U+4f63-4f64,U+4f69-4f6a,U+4f6c,U+4f6e-4f71,U+4f76-4f7e,U+4f81-4f85,U+4f88-4f8a,U+4f8c,U+4f8e-4f90,U+4f92-4f94,U+4f96-4f9a,U+4f9e-4fa0,U+4fab,U+4fad,U+4faf,U+4fb2,U+4fb7,U+4fb9,U+4fbb-4fbe,U+4fc0-4fc1,U+4fc4-4fc6,U+4fc8-4fc9,U+4fcb-4fd4,U+4fd8,U+4fda-4fdc,U+4fdf-4fe0,U+4fe2,U+4fe4-4fe6,U+4fef-4ff2,U+4ff6,U+4ffc-5002,U+5004-5007,U+500a,U+500c,U+500e-5011,U+5013-5014,U+5016-5018,U+501a-501e,U+5021-5023,U+5025-502a,U+502c-502e,U+5030,U+5032-5033,U+5035,U+5039,U+503b,U+5040-5043,U+5045-5048,U+504a,U+504c,U+504e,U+5050-5053,U+5055-5057,U+5059-505a,U+505f-5060,U+5062-5063,U+5066-5067,U+506a,U+506c-506d,U+5070-5072,U+5077-5078,U+5080-5081,U+5083-5086,U+5088,U+508a,U+508e-5090,U+5092-5096,U+509a-509c,U+509e-50a3,U+50aa,U+50ad,U+50af-50b4,U+50b9-50bb,U+50bd,U+50c0,U+50c2-50c4,U+50c7,U+50c9-50ca,U+50cc,U+50ce,U+50d0-50d1,U+50d3-50d4,U+50d6,U+50d8-50d9,U+50dc}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-50-wght-normal-Cw6P8USA.woff2) format("woff2-variations");unicode-range:U+4093,U+4103,U+4105,U+4148,U+414f,U+4163,U+41b4,U+41bf,U+41e6,U+41ee,U+41f3,U+4207,U+420e,U+4264,U+4293,U+42c6,U+42d6,U+42dd,U+4302,U+432b,U+4343,U+43ee,U+43f0,U+4408,U+440c,U+4417,U+441c,U+4422,U+4453,U+445b,U+4476,U+447a,U+4491,U+44b3,U+44be,U+44d4,U+4508,U+450d,U+4525,U+4543,U+457a,U+459d,U+45b8,U+45be,U+45e5,U+45ea,U+460f-4610,U+4641,U+4665,U+46a1,U+46ae-46af,U+470c,U+471f,U+4764,U+47e6,U+47fd,U+4816,U+481e,U+4844,U+484e,U+48b5,U+49b0,U+49e7,U+49fa,U+4a04,U+4a29,U+4abc,U+4b38,U+4b3b,U+4b7e,U+4bc2,U+4bca,U+4bd2,U+4be8,U+4c17,U+4c20,U+4c38,U+4cc4,U+4cd1,U+4ce1,U+4d07,U+4d77,U+4e02,U+4e04-4e05,U+4e0c,U+4e0f-4e12,U+4e15,U+4e17,U+4e19,U+4e1e-4e1f,U+4e23-4e24,U+4e28-4e2c,U+4e2e-4e31,U+4e35-4e37,U+4e3f-4e42,U+4e44,U+4e47-4e48,U+4e4d-4e4e,U+4e51,U+4e55-4e56,U+4e58,U+4e5a-4e5c,U+4e62-4e63,U+4e68-4e69,U+4e74-4e75,U+4e79,U+4e7f,U+4e82,U+4e85,U+4e8a,U+4e8d-4e8e,U+4e96-4e99,U+4e9d-4ea0,U+4ea2,U+4ea5-4ea6,U+4ea8,U+4eaf-4eb0,U+4eb3,U+4eb6,U+4eb9,U+4ebb-4ebc,U+4ec2-4ec4,U+4ec6-4ec8,U+4ecd,U+4ed0,U+4ed7,U+4eda-4edb,U+4edd-4ee2,U+4ee8,U+4eeb,U+4eed,U+4eef,U+4ef1,U+4ef3,U+4ef5,U+4ef7,U+4efc-4f00,U+4f02-4f03,U+4f08-4f09,U+4f0b-4f0d,U+4f12,U+4f15-4f17,U+4f19,U+4f1c,U+4f2b,U+4f2e,U+4f30-4f31,U+4f33,U+4f35-4f37,U+4f39,U+4f3b,U+4f3e,U+4f40,U+4f42-4f43,U+4f48-4f49,U+4f4b-4f4c,U+4f52,U+4f54,U+4f56}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-51-wght-normal-Cqxu35Xk.woff2) format("woff2-variations");unicode-range:U+3395-339b,U+339e-33a0,U+33a2-33ff,U+3402,U+3405-3406,U+3427,U+342c,U+342e,U+3468,U+346a,U+3488,U+3492,U+34b5,U+34bc,U+34c1,U+34c7,U+34db,U+351f,U+353e,U+355d-355e,U+3563,U+356e,U+35a6,U+35a8,U+35c5,U+35da,U+35de,U+35f4,U+3605,U+3614,U+364a,U+3691,U+3696,U+3699,U+36cf,U+3761-3762,U+376b-376c,U+3775,U+378d,U+37c1,U+37e2,U+37e8,U+37f4,U+37fd,U+3800,U+382f,U+3836,U+3840,U+385c,U+3861,U+38a1,U+38ad,U+38fa,U+3917,U+391a,U+396f,U+39a4,U+39b8,U+3a5c,U+3a6e,U+3a73,U+3a85,U+3ac4,U+3acb,U+3ad6-3ad7,U+3aea,U+3af3,U+3b0e,U+3b1a,U+3b1c,U+3b22,U+3b35,U+3b6d,U+3b77,U+3b87-3b88,U+3b8d,U+3ba4,U+3bb6,U+3bc3,U+3bcd,U+3bf0,U+3bf3,U+3c0f,U+3c26,U+3cc3,U+3cd2,U+3d11,U+3d1e,U+3d31,U+3d4e,U+3d64,U+3d9a,U+3dc0,U+3dcc,U+3dd4,U+3e05,U+3e3f-3e40,U+3e60,U+3e66,U+3e68,U+3e83,U+3e8a,U+3e94,U+3eda,U+3f57,U+3f72,U+3f75,U+3f77,U+3fae,U+3fb1,U+3fc9,U+3fd7,U+3fdc,U+4039,U+4058}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-52-wght-normal-DYmSQol3.woff2) format("woff2-variations");unicode-range:U+32b5-332b,U+332d-3394}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-53-wght-normal-DwAVKRqn.woff2) format("woff2-variations");unicode-range:U+31c8-31e3,U+31f0-321e,U+3220-3230,U+3232-32b4}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-54-wght-normal-DkswS7jl.woff2) format("woff2-variations");unicode-range:U+3028-303f,U+3094-3096,U+309f-30a0,U+30ee,U+30f7-30fa,U+30ff,U+3105-312f,U+3131-3163,U+3165-318e,U+3190-31bb,U+31c0-31c7}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-55-wght-normal-BYcCjSG_.woff2) format("woff2-variations");unicode-range:U+2f14-2fd5,U+2ff0-2ffb,U+3004,U+3013,U+3016-301b,U+301e,U+3020-3027}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-56-wght-normal-k2E-xsGo.woff2) format("woff2-variations");unicode-range:U+25e4-25e6,U+2601-2603,U+2609,U+260e-260f,U+2616-2617,U+261c-261f,U+262f,U+2641,U+2660,U+2662-2664,U+2666-2668,U+266d-266e,U+2672-267d,U+26bd-26be,U+2702,U+271a,U+273d,U+2740,U+2756,U+2776-2793,U+27a1,U+2934-2935,U+29bf,U+29fa-29fb,U+2b05-2b07,U+2b1a,U+2b95,U+2e3a-2e3b,U+2e80-2e99,U+2e9b-2ef3,U+2f00-2f13}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-57-wght-normal-Dcyw3o92.woff2) format("woff2-variations");unicode-range:U+24d1-24ff,U+2503-2513,U+2515-2516,U+2518-251b,U+251d-2522,U+2524-259f,U+25a2-25ab,U+25b1,U+25b7,U+25c0-25c1,U+25c9-25ca,U+25cc,U+25d0-25d3,U+25e2-25e3}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-58-wght-normal-C-mIssxc.woff2) format("woff2-variations");unicode-range:U+2105,U+2109-210a,U+210f,U+2116,U+2121,U+2126-2127,U+212b,U+212e,U+2135,U+213b,U+2194-2199,U+21b8-21b9,U+21c4-21c6,U+21cb-21cc,U+21d0,U+21e6-21e9,U+21f5,U+2202-2203,U+2205-2206,U+2208-220b,U+220f,U+2211,U+2213,U+2215,U+221a,U+221d,U+2220,U+2223,U+2225-2226,U+2228,U+222a-222e,U+2234-2237,U+223d,U+2243,U+2245,U+2248,U+224c,U+2260,U+2262,U+2264-2265,U+226e-226f,U+2272-2273,U+2276-2277,U+2283-2287,U+228a-228b,U+2295-2299,U+22a0,U+22a5,U+22bf,U+22da-22db,U+22ef,U+2305-2307,U+2318,U+2329-232a,U+23b0-23b1,U+23be-23cc,U+23ce,U+23da-23db,U+2423,U+2469-24d0}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-59-wght-normal-DUxkCIOP.woff2) format("woff2-variations");unicode-range:U+a1-a4,U+a6-a7,U+aa,U+ac-ad,U+b5-b6,U+b8-ba,U+bc-c8,U+ca-cc,U+ce-d5,U+d9-db,U+dd-df,U+e6,U+ee,U+f0,U+f5,U+f7,U+f9,U+fb,U+fe-102,U+110-113,U+11a-11b,U+128-12b,U+143-144,U+147-148,U+14c,U+14e-14f,U+152-153,U+168-16d,U+192,U+1a0-1a1,U+1af,U+1cd-1dc,U+1f8-1f9,U+251,U+261,U+2bb,U+2c7,U+2c9,U+2ea-2eb,U+304,U+307,U+30c,U+1e3e-1e3f,U+1ea0-1ebe,U+1ec0-1ec6,U+1ec8-1ef9,U+2011-2012,U+2016,U+2018-201a,U+201e,U+2021,U+2030,U+2033,U+2035,U+2042,U+2047,U+2051,U+2074,U+20a9,U+20ab-20ac,U+20dd-20de,U+2100}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-60-wght-normal-B1SQjyhM.woff2) format("woff2-variations");unicode-range:U+2227,U+26a0,U+2713,U+301f,U+4ff8,U+5239,U+526a,U+54fa,U+5740,U+5937,U+5993,U+59fb,U+5a3c,U+5c41,U+6028,U+626e,U+646f,U+647a,U+64b0,U+64e2,U+65a7,U+66fe,U+6727,U+6955,U+6bef,U+6f23,U+724c,U+767c,U+7a83,U+7ac4,U+7b67,U+8000,U+8471,U+8513,U+8599,U+86db,U+8718,U+87f2,U+88f3,U+8ad2,U+8e2a,U+8fa3,U+95a5,U+9798,U+9910,U+9957,U+9bab,U+9c3b,U+9daf,U+ff95}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-61-wght-normal-DqwoqK_H.woff2) format("woff2-variations");unicode-range:U+a8,U+2032,U+2261,U+2282,U+3090,U+30f1,U+339c,U+535c,U+53d9,U+56a2,U+56c1,U+5806,U+589f,U+59d0,U+5a7f,U+60e0,U+639f,U+65af,U+68fa,U+69ae,U+6d1b,U+6ef2,U+71fb,U+725d,U+7262,U+75bc,U+7768,U+7940,U+79bf,U+7bed,U+7d68,U+7dfb,U+814b,U+8207,U+83e9,U+8494,U+8526,U+8568,U+85ea,U+86d9,U+87ba,U+8861,U+887f,U+8fe6,U+9059,U+9061,U+916a,U+976d,U+97ad,U+9ece}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-62-wght-normal-Dvl1bj2o.woff2) format("woff2-variations");unicode-range:U+2d9,U+21d4,U+301d,U+515c,U+52fe,U+5420,U+5750,U+5766,U+5954,U+5b95,U+5f8a,U+5f98,U+620c,U+621f,U+641c,U+66d9,U+676d,U+6775,U+67f5,U+694a,U+6a02,U+6a3a,U+6a80,U+6c23,U+6c72,U+6dcb,U+6faa,U+707c,U+71c8,U+7422,U+74e2,U+7791,U+7825,U+7a14,U+7a1c,U+7c95,U+7fc1,U+82a5,U+82db,U+8304,U+853d,U+8cd3,U+8de8,U+8f0c,U+8f3f,U+9091,U+91c7,U+929a,U+98af,U+9913}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-63-wght-normal-pZDrjPWR.woff2) format("woff2-variations");unicode-range:U+2ca-2cb,U+2229,U+2468,U+2669,U+266f,U+273f,U+4ec0,U+4f60,U+4fb6,U+5347,U+540e,U+543b,U+5b0c,U+5d4c,U+5f14,U+5f9e,U+6155,U+62d0,U+6602,U+6666,U+66f3,U+67a2,U+67ca,U+69cc,U+6d29,U+6d9b,U+6e3e,U+6f81,U+7109,U+73c0,U+73c2,U+7425,U+7435-7436,U+7525,U+7554,U+785d,U+786b,U+7ae3,U+7b94,U+7d18,U+81bf,U+8511,U+8549,U+9075,U+9640,U+98e2,U+9e9f,U+ff96}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-64-wght-normal-DGBgUuRb.woff2) format("woff2-variations");unicode-range:U+2467,U+4ece,U+4ed4,U+4f91,U+4fae,U+534d,U+53c9,U+54b3,U+586b,U+5944,U+5b78,U+5df7,U+5f77,U+6101,U+6167-6168,U+61a4,U+62d9,U+698a,U+699b,U+6a59,U+6cc4,U+6e07,U+7099,U+75d2,U+77ad,U+7953,U+7984,U+7a92,U+7baa,U+7dbb,U+817f,U+82ad,U+85e9,U+868a,U+8caa,U+8f44,U+9017,U+907c,U+908a,U+92f3,U+936e,U+9435,U+978d,U+9838,U+9a28,U+9b41,U+9ba8,U+9c57,U+9eb9}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-65-wght-normal-ZWzDwZG9.woff2) format("woff2-variations");unicode-range:U+b1,U+309b,U+4e5e,U+51f1,U+5506,U+55c5,U+58cc,U+59d1,U+5c51,U+5ef7,U+6284,U+62d7,U+6689,U+673d,U+6a2b,U+6a8e,U+6a9c,U+6d63,U+6dd1,U+70b8,U+7235,U+72db,U+72f8,U+7560,U+7c9b,U+7ce7,U+7e1e,U+80af,U+82eb,U+8463,U+8499,U+85dd,U+86ee,U+8a60,U+8a6e,U+8c79,U+8e87,U+8e8a,U+8f5f,U+9010,U+918d,U+9190,U+965b,U+97fb,U+9ab8,U+9bad,U+9d3b,U+9d5c,U+9dfa,U+9e93}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-66-wght-normal-C9Pvbzcq.woff2) format("woff2-variations");unicode-range:U+2020,U+3003,U+3231,U+4e9b,U+4f3d,U+4f47,U+51b6,U+51dc,U+53e1,U+5bc5,U+602f,U+60bc,U+61c9,U+633d,U+637b,U+6492,U+65fa,U+660f,U+66f0,U+6703,U+681e,U+6876,U+6893,U+6912,U+698e,U+6c7d,U+714c,U+7169,U+71d5,U+725f,U+72d7,U+745b,U+74dc,U+75e2,U+7891,U+7897,U+7dcb,U+810a,U+8218,U+8339,U+840e,U+852d,U+8823,U+8a0a,U+9089,U+919c,U+971c,U+9ad9,U+ff4a,U+ff5a}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-67-wght-normal-BmPiBD9j.woff2) format("woff2-variations");unicode-range:U+2466,U+2600,U+4eab,U+4fe3,U+4ff5,U+51a5,U+51f0,U+536f,U+53d4,U+53f1,U+54a5,U+559d,U+55e3,U+58fa,U+5962,U+59ea,U+5c16,U+5cef,U+5d16,U+5f10,U+5fd6,U+6190,U+6216,U+634f,U+63bb,U+66d6,U+6756,U+6bc5,U+6e26,U+727d,U+731f,U+76f2,U+7729,U+7a7f,U+7aff,U+7c9f,U+818f,U+8236,U+82b9,U+8338,U+85aa,U+88b4,U+8b33,U+904d,U+93a7,U+96cc,U+96eb,U+9aed,U+9b8e,U+fa11}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-68-wght-normal-BM7y9lVd.woff2) format("woff2-variations");unicode-range:U+251c,U+2523,U+4e14,U+545f,U+54bd,U+553e,U+55dc,U+56da,U+589c,U+5b55,U+5bb5,U+5ce1,U+5df4,U+5eb6,U+5ec9,U+6191,U+62f7,U+6357,U+64a5,U+6591,U+65bc,U+6897,U+6e1a,U+7063,U+711a,U+721b,U+722c,U+75b9,U+75d5,U+75fa,U+7766,U+7aae,U+7b48,U+7b8b,U+7d21,U+7e55,U+7f75,U+842c,U+8910,U+8a63,U+8b39,U+8b5a,U+8cdc,U+8d74,U+907d,U+91e7,U+9306,U+96bc,U+98f4,U+9ac4}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-69-wght-normal-DjC_tZTr.woff2) format("woff2-variations");unicode-range:U+2003,U+2312,U+266c,U+4f86,U+51ea,U+5243,U+5256,U+541f,U+5841,U+59dc,U+5df3,U+601c,U+60e7,U+632b,U+638c,U+64ad,U+6881,U+697c,U+69cd,U+6c50,U+6d2a,U+6fc1,U+7027,U+7058,U+70f9,U+714e,U+7345,U+751a,U+760d,U+764c,U+77db,U+7d79,U+7e8f,U+80ce,U+814e,U+81fc,U+8247,U+8278,U+85a9,U+8a03,U+90ed,U+9784,U+9801,U+984e,U+99b3,U+9bc9,U+9bdb,U+9be8,U+9e78,U+ff6b}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-70-wght-normal-BhDpOk5L.woff2) format("woff2-variations");unicode-range:U+266b,U+3006,U+5176,U+5197,U+51a8,U+51c6,U+52f2,U+5614,U+5875,U+5a2f,U+5b54,U+5ce0,U+5dba,U+5deb,U+5e63,U+5f59,U+5fcc,U+6068,U+6367,U+68b6,U+6a0b,U+6b64,U+6e15,U+6eba,U+7272,U+72a0,U+7947,U+7985,U+79e6,U+79e9,U+7a3d,U+7a9f,U+7aaf,U+7b95,U+7f60,U+7f9e,U+7fe0,U+8098,U+80ba,U+8106,U+82d4,U+831c,U+87f9,U+8a1f,U+8acf,U+90c1,U+920d,U+9756,U+fe43,U+ff94}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-71-wght-normal-BeAYbG_b.woff2) format("woff2-variations");unicode-range:U+af,U+2465,U+2517,U+33a1,U+4f10,U+50c5,U+51b4,U+5384,U+5606,U+5bb0,U+5cac,U+5ee3,U+618e,U+61f2,U+62c9,U+66ab,U+66f9,U+6816,U+6960,U+6b3e,U+6f20,U+7078,U+72d0,U+73ed,U+7ad9,U+7b1b,U+7be4,U+7d62,U+7f51,U+80b4,U+80f4,U+8154,U+85fb,U+865c,U+8702,U+895f,U+8aed,U+8b90,U+8ced,U+8fbf,U+91d8,U+9418,U+9583,U+9591,U+9813,U+982c,U+9bd6,U+ff46,U+ff7f,U+ff88}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-72-wght-normal-t74baR93.woff2) format("woff2-variations");unicode-range:U+4e91,U+508d,U+50e7,U+514e,U+51f6,U+5446,U+5504,U+584a,U+59a8,U+59d3,U+5a46,U+5ac9,U+6020,U+60a6,U+6148,U+621a,U+6234,U+64c1,U+6523,U+675c,U+67d1,U+6953,U+6ccc,U+6df5,U+6e13,U+6f06,U+723a,U+7325,U+74e6,U+758e,U+75ab,U+75d9,U+7a40,U+8096,U+82fa,U+8587,U+8594,U+8a6b,U+8ab9,U+8b17,U+8b83,U+937c,U+963b,U+9673,U+96db,U+9ce9,U+9f4b,U+ff67,U+ff82,U+ff93}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-73-wght-normal-CwrK-6j-.woff2) format("woff2-variations");unicode-range:U+221e,U+2514,U+51f9,U+5270,U+5449,U+5824,U+59a5,U+5a29,U+5d07,U+5e16,U+60e3,U+614c,U+6276,U+643e,U+64ab,U+6562,U+6681,U+670b,U+6734,U+67af,U+6a3d,U+6b05,U+6dc0,U+6e4a,U+7259,U+732a,U+7409,U+78a7,U+7a6b,U+8015,U+809b,U+817a,U+830e,U+837b,U+85ab,U+8a23,U+8a93,U+8b00,U+8b19,U+8b21,U+8cbf,U+8fb0,U+901d,U+91b8,U+9320,U+932c,U+9688,U+96f6,U+9df2,U+ff6a}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-74-wght-normal-iogpiswj.woff2) format("woff2-variations");unicode-range:U+2002,U+2025,U+4f8d,U+51e1,U+51f8,U+5507,U+5598,U+58f1,U+5983,U+59ac,U+5c3c,U+5de7,U+5e7d,U+5eca,U+5f61,U+606d,U+60f9,U+636e,U+64ec,U+67da,U+67ff,U+6813,U+68f2,U+693f,U+6b6a,U+6bbb,U+6ef4,U+7092,U+717d,U+7261,U+73c8,U+7432,U+7483,U+76fe,U+7709,U+78d0,U+81a3,U+81b3,U+82af,U+8305,U+8309,U+8870,U+88fe,U+8cd1,U+8d66,U+906e,U+971e,U+9812,U+ff79,U+ff90}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-75-wght-normal-DYpRVFfS.woff2) format("woff2-variations");unicode-range:U+2464,U+2501,U+2640,U+2642,U+339d,U+4f0e,U+5091,U+50b5,U+5132,U+51cc,U+558b,U+55aa,U+585e,U+5bee,U+5dfe,U+60b6,U+62b9,U+6349,U+6566,U+6590,U+6842,U+689d,U+6a58,U+6c70,U+6ff1,U+7815,U+7881,U+7aaa,U+7bc7,U+7def,U+7fa8,U+8017,U+8036,U+8061,U+821f,U+8429,U+8ce0,U+8e74,U+9019,U+90ca,U+9162,U+932f,U+93ae,U+9644,U+990c,U+9cf3,U+ff56,U+ff6e,U+ff7e,U+ff85}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-76-wght-normal-HKTYIip9.woff2) format("woff2-variations");unicode-range:U+2266-2267,U+4f2f,U+5208,U+5451,U+546a,U+5589,U+576a,U+5815,U+5a9a,U+5b9b,U+5c3a,U+5efb,U+5faa,U+6109,U+6643,U+6652,U+695a,U+69fd,U+6b86,U+6bb4,U+6daf,U+7089,U+70cf,U+7a00,U+7a4f,U+7b39,U+7d33,U+80e1,U+828b,U+82a6,U+86cd,U+8c8c,U+8cca,U+8df3,U+9077,U+9175,U+91dc,U+925b,U+9262,U+9271,U+92ed,U+9855,U+9905,U+9d28,U+ff3f,U+ff58,U+ff68,U+ff6d,U+ff9c}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-77-wght-normal-zMwvLrLX.woff2) format("woff2-variations");unicode-range:U+2207,U+25ef,U+309c,U+4e4f,U+5146,U+51dd,U+5351,U+540a,U+5629,U+5eb5,U+5f04,U+5f13,U+60dc,U+6212,U+63b4,U+642c,U+6627,U+66a6,U+66c7,U+66fd,U+674e,U+6b96,U+6c4e,U+6df3,U+6e67,U+6f84,U+72fc,U+733f,U+7c97,U+7db1,U+7e4d,U+816b,U+82d1,U+84cb,U+854e,U+8607,U+86c7,U+871c,U+8776,U+8a89,U+8fc4,U+91a4,U+9285,U+9685,U+9903,U+9b31,U+9f13,U+ff42,U+ff74,U+ff91}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-78-wght-normal-CJFvkh-5.woff2) format("woff2-variations");unicode-range:U+4e32,U+51db,U+53a8,U+53ea,U+5609,U+5674,U+5a92,U+5e7e,U+6115,U+611a,U+62cc,U+62ed,U+63c9,U+64b9,U+64e6,U+65cb,U+6606,U+6731,U+683d,U+6afb,U+7460,U+771e,U+78ef,U+7b26,U+7b51,U+7cde,U+7d10,U+7d2f,U+7d46,U+80de,U+819c,U+84b2,U+85cd,U+865a,U+8ecc,U+9022,U+90b8,U+9192,U+9675,U+96b7,U+99ff,U+ff44,U+ff55,U+ff6c,U+ff73,U+ff75,U+ff86,U+ff8d,U+ff92,U+ffe3}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-79-wght-normal-YT6TNXn0.woff2) format("woff2-variations");unicode-range:U+25b3,U+30f5,U+4eae,U+4f46,U+4f51,U+5203,U+52ff,U+55a7,U+564c,U+565b,U+57f9,U+5805,U+5b64,U+5e06,U+5f70,U+5f90,U+60e8,U+6182,U+62f3,U+62fe,U+63aa,U+64a4,U+65d7,U+673a,U+6851,U+68cb,U+68df,U+6d1e,U+6e58,U+6e9d,U+77b3,U+7832,U+7c3f,U+7db4,U+7f70,U+80aa,U+80c6,U+8105,U+819d,U+8276,U+8679,U+8986,U+8c9d,U+8fc5,U+916c,U+9665,U+9699,U+96c0,U+9a19,U+ff8b}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-80-wght-normal-C8rE7JRr.woff2) format("woff2-variations");unicode-range:U+2463,U+25a1,U+4ef0,U+5076,U+5098,U+51fd,U+5302,U+5448,U+54c9,U+570b,U+583a,U+5893,U+58a8,U+58ee,U+5949,U+5bdb,U+5f26,U+5f81,U+6052,U+6170,U+61c7,U+631f,U+635c,U+664b,U+69fb,U+6f01,U+7070,U+722a,U+745e,U+755c,U+76c6,U+78c1,U+79e4,U+7bb8,U+7d0b,U+81a8,U+82d7,U+8b5c,U+8f14,U+8fb1,U+8fbb,U+9283,U+9298,U+9a30,U+ff03,U+ff50,U+ff59,U+ff7b,U+ff8e-ff8f}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-81-wght-normal-C3e5dWMK.woff2) format("woff2-variations");unicode-range:U+2010,U+2502,U+25b6,U+4f3a,U+514b,U+5265,U+52c3,U+5339,U+53ec,U+54c0,U+55b0,U+5854,U+5b8f,U+5cb3,U+5e84,U+60da,U+6247,U+6249,U+628a,U+62cd,U+65ac,U+6838,U+690e,U+6cf0,U+6f02,U+6f2c,U+6f70,U+708a,U+7434,U+75be,U+77ef,U+7c60,U+7c98,U+7d1b,U+7e2b,U+80a5,U+81e3,U+820c,U+8210,U+8475,U+862d,U+8650,U+8997,U+906d,U+91c8,U+9700,U+9727,U+9df9,U+ff3a,U+ff9a}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-82-wght-normal-BjuKihWA.woff2) format("woff2-variations");unicode-range:U+2103,U+5049,U+52b1,U+5320,U+5553,U+572d,U+58c7,U+5b5d,U+5bc2,U+5de3,U+5e61,U+5f80,U+61a9,U+67d0,U+67f4,U+6c88,U+6ca1,U+6ce5,U+6d78,U+6e9c,U+6f54,U+731b,U+73b2,U+74a7,U+74f6,U+75e9,U+7b20,U+7c8b,U+7f72,U+809d,U+8108,U+82b3,U+82bd,U+84b8,U+84c4,U+88c2,U+8ae6,U+8ef8,U+902e,U+9065,U+9326,U+935b,U+938c,U+9676,U+9694,U+96f7,U+9ed9,U+ff48,U+ff4c,U+ff81}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-83-wght-normal-CdGQgLIl.woff2) format("woff2-variations");unicode-range:U+2500,U+3008-3009,U+4ead,U+4f0f,U+4fca,U+53eb,U+543e,U+57a2,U+5cf0,U+5e8f,U+5fe0,U+61b2,U+62d8,U+6442,U+64b2,U+6589,U+659c,U+67f1,U+68c4,U+6cb8,U+6d12,U+6de1,U+6fe1,U+70c8,U+723d,U+73e0,U+7656,U+773a,U+7948,U+7b87,U+7c92,U+7d3a,U+7e1b,U+7e4a,U+819a,U+8358,U+83c5,U+84bc,U+864e,U+8912,U+8c9e,U+8d05,U+92fc,U+9396,U+98fd,U+99d2,U+ff64,U+ff7a,U+ff83}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-84-wght-normal-BqzEfM_o.woff2) format("woff2-variations");unicode-range:U+3014-3015,U+4e3c,U+5036,U+5075,U+533f,U+53e9,U+5531,U+5642,U+5984,U+59e6,U+5a01,U+5b6b,U+5c0b,U+5f25,U+6069,U+60a0,U+614e,U+62b5,U+62d2-62d3,U+6597,U+660c,U+674f,U+67cf,U+6841,U+6905,U+6cf3,U+6d32,U+6d69,U+6f64,U+716e,U+7761,U+7b52,U+7be0,U+7dbf,U+7de9,U+7f36,U+81d3,U+8302,U+8389,U+846c,U+84ee,U+8a69,U+9038,U+9d8f,U+ff47,U+ff4b,U+ff76,U+ff9b}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-85-wght-normal-CPi4u8zn.woff2) format("woff2-variations");unicode-range:U+25c7,U+3007,U+504f,U+507d,U+51a0,U+52a3,U+5410,U+5510,U+559a,U+5782,U+582a,U+5c0a,U+5c3f,U+5c48,U+5f6b,U+6176,U+622f,U+6279,U+62bd,U+62dd,U+65ed,U+67b6,U+6817,U+6850,U+6d6a,U+6deb,U+6ea2,U+6edd,U+6f5c,U+72e9,U+73a9,U+7573,U+76bf,U+7950,U+7956,U+7f8a,U+7ffc,U+80a2,U+80c3,U+83ca,U+8a02,U+8a13,U+8df5,U+9375,U+983b,U+99b4,U+ff4e,U+ff71,U+ff89,U+ff97}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-86-wght-normal-B0MkLvt0.woff2) format("woff2-variations");unicode-range:U+24,U+2022,U+2212,U+221f,U+2665,U+4ecf,U+5100,U+51cd,U+52d8,U+5378,U+53f6,U+574a,U+5982,U+5996,U+5c1a,U+5e1d,U+5f84,U+609f,U+61a7,U+61f8,U+6398,U+63ee,U+6676,U+6691,U+6eb6,U+7126,U+71e5,U+7687,U+7965,U+7d17,U+80a1,U+8107,U+8266,U+85a6,U+8987,U+8ca2,U+8cab,U+8e0a,U+9042,U+95c7,U+9810,U+9867,U+98fc,U+ff52-ff54,U+ff61,U+ff77,U+ff98-ff99}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-87-wght-normal-D5BdgnTn.woff2) format("woff2-variations");unicode-range:U+b0,U+226a,U+2462,U+4e39,U+4fc3,U+4fd7,U+50be,U+50da,U+5200,U+5211,U+54f2,U+5618,U+596a,U+5b22,U+5bb4,U+5d50,U+60a3,U+63fa,U+658e,U+65e8,U+6669,U+6795,U+679d,U+67a0,U+6b3a,U+6e09,U+757f,U+7cd6,U+7dbe,U+7ffb,U+83cc,U+83f1,U+840c,U+845b,U+8846,U+8972,U+8a34,U+8a50,U+8a87,U+8edf,U+8ff0,U+90a6,U+9154,U+95a3,U+9663,U+9686,U+96c7,U+ff3c,U+ff7c,U+ff8a}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-88-wght-normal-CyIWoFtM.woff2) format("woff2-variations");unicode-range:U+25bd,U+4e59,U+4ec1,U+4ff3,U+515a,U+518a,U+525b,U+5375,U+552f,U+57a3,U+5b9c,U+5c3d,U+5e3d,U+5e7b,U+5f0a,U+6094,U+6458,U+654f,U+67f3,U+6b8a,U+6bd2,U+6c37,U+6ce1,U+6e56,U+6e7f,U+6ed1,U+6ede,U+6f0f,U+70ad,U+7267,U+7363,U+786c,U+7a42,U+7db2,U+7f85,U+8178,U+829d,U+8896,U+8c5a,U+8cb0,U+8ce2,U+8ed2,U+9047,U+9177,U+970a,U+9ea6,U+ff1b,U+ff31,U+ff39,U+ff80}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-89-wght-normal-B-qGeNph.woff2) format("woff2-variations");unicode-range:U+a5,U+4e80,U+4f34,U+4f73,U+4f75,U+511f,U+5192,U+52aa,U+53c8,U+570f,U+57cb,U+596e,U+5d8b,U+5f66,U+5fd9,U+62db,U+62f6,U+6328,U+633f,U+63a7,U+6469,U+6bbf,U+6c41,U+6c57,U+6d44,U+6dbc,U+706f,U+72c2,U+72ed,U+7551,U+75f4,U+7949,U+7e26,U+7fd4,U+8150,U+8af8,U+8b0e,U+8b72,U+8ca7,U+934b,U+9a0e,U+9a12,U+9b42,U+ff41,U+ff43,U+ff45,U+ff49,U+ff4f,U+ff62-ff63}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-90-wght-normal-sQganGqO.woff2) format("woff2-variations");unicode-range:U+4e18,U+4fb5,U+5104,U+52c7,U+5353,U+5374,U+53e5,U+587e,U+594f,U+5a20,U+5de1,U+5f18,U+5fcd,U+6291,U+62ab,U+6355,U+6392,U+63da,U+63e1,U+656c,U+6687,U+68b0-68b1,U+68d2,U+68da,U+6b27,U+6cbc,U+7159,U+7344,U+73cd,U+76df,U+790e,U+7cf8,U+8102,U+88c1,U+8aa0,U+8e0f,U+9178,U+92ad,U+9670,U+96c5,U+9cf4,U+9db4,U+ff3e,U+ff6f,U+ff72,U+ff78,U+ff7d,U+ff84,U+ff8c}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-91-wght-normal-BZRsdRL6.woff2) format("woff2-variations");unicode-range:U+60,U+2200,U+226b,U+2461,U+517c,U+526f,U+5800,U+5b97,U+5bf8,U+5c01,U+5d29,U+5e4c,U+5e81,U+6065,U+61d0,U+667a,U+6696,U+6843,U+6c99,U+6d99,U+6ec5,U+6f22,U+6f6e,U+6fa4,U+6fef,U+71c3,U+72d9,U+7384,U+78e8,U+7a1a,U+7a32,U+7a3c,U+7adc,U+7ca7,U+7d2b,U+7dad,U+7e4b,U+80a9,U+8170,U+81ed,U+820e,U+8a17,U+8afe,U+90aa,U+914e,U+963f,U+99c4,U+9eba,U+9f3b,U+ff38}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-92-wght-normal-Bfqhr8vr.woff2) format("woff2-variations");unicode-range:U+2460,U+4e5f,U+4e7e,U+4ed9,U+501f,U+502b,U+5968,U+5974,U+5ac1,U+5b99,U+5ba3,U+5be7,U+5be9,U+5c64,U+5cb8,U+5ec3,U+5f1f,U+616e,U+6297,U+62e0,U+62ec,U+6368,U+642d,U+65e6,U+6717,U+676f,U+6b04,U+732e,U+7652,U+76ca,U+76d7,U+7802,U+7e70,U+7f6a,U+8133,U+81e8,U+866b,U+878d,U+88f8,U+8a5e,U+8cdb,U+8d08,U+907a,U+90e1,U+96f2,U+9f8d,U+ff35,U+ff37,U+ff40,U+ff9d}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-93-wght-normal-ChR3IuHk.woff2) format("woff2-variations");unicode-range:U+21d2,U+25ce,U+300a-300b,U+4e89,U+4e9c,U+4ea1,U+5263,U+53cc,U+5426,U+5869,U+5947,U+598a,U+5999,U+5e55,U+5e72,U+5e79,U+5fae,U+5fb9,U+602a,U+6163,U+624d,U+6749,U+6c5a,U+6cbf,U+6d45,U+6dfb,U+6e7e,U+708e,U+725b,U+7763,U+79c0,U+7bc4,U+7c89,U+7e01,U+7e2e,U+8010,U+8033,U+8c6a,U+8cc3,U+8f1d,U+8f9b,U+8fb2,U+907f,U+90f7,U+9707,U+9818,U+9b3c,U+ff0a,U+ff4d}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-94-wght-normal-CTW0oM41.woff2) format("woff2-variations");unicode-range:U+2015,U+2190,U+4e43,U+5019,U+5247,U+52e7,U+5438,U+54b2,U+55ab,U+57f7,U+5bd2,U+5e8a,U+5ef6,U+6016,U+60b2,U+6162,U+6319,U+6551,U+6607,U+66b4,U+675f,U+67d4,U+6b20,U+6b53,U+6ce3,U+719f,U+75b2,U+770b,U+7720,U+77ac,U+79d2,U+7af9,U+7d05,U+7dca,U+8056,U+80f8,U+81f3,U+8352,U+885d,U+8a70,U+8aa4,U+8cbc,U+900f,U+9084,U+91e3,U+9451,U+96c4,U+99c6,U+9ad4,U+ff70}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-95-wght-normal-cEmZK7kl.woff2) format("woff2-variations");unicode-range:U+2193,U+25b2,U+4e4b,U+516d,U+51c4,U+529f,U+52c9,U+5360,U+5442,U+5857,U+5915,U+59eb,U+5a9b,U+5c3b,U+6012,U+61b6,U+62b1,U+6311,U+6577,U+65e2,U+65ec,U+6613,U+6790,U+6cb9,U+7372,U+76ae,U+7d5e,U+7fcc,U+88ab,U+88d5,U+8caf,U+8ddd,U+8ecd,U+8f38,U+8f9e,U+8feb,U+9063,U+90f5,U+93e1,U+968a,U+968f,U+98fe,U+9ec4,U+ff1d,U+ff27,U+ff2a,U+ff36,U+ff3b,U+ff3d,U+ffe5}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-96-wght-normal-Bww_3Upk.woff2) format("woff2-variations");unicode-range:U+4e03,U+4f38,U+50b7,U+5264,U+5348,U+5371,U+585a,U+58ca,U+5951,U+59b9,U+59d4,U+5b98,U+5f8b,U+6388,U+64cd,U+65e7,U+6803,U+6b6f,U+6d66,U+6e0b,U+6ecb,U+6fc3,U+72ac,U+773c,U+77e2,U+7968,U+7a74,U+7dba,U+7dd1,U+7e3e,U+808c,U+811a,U+8179,U+8239,U+8584,U+8a0e,U+8a72,U+8b66,U+8c46,U+8f29,U+90a3,U+9234,U+96f0,U+9769,U+9774,U+9aa8,U+ff26,U+ff28,U+ff9e-ff9f}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-97-wght-normal-DEi73Ic_.woff2) format("woff2-variations");unicode-range:U+7e,U+b4,U+25c6,U+2661,U+4e92,U+4eee,U+4ffa,U+5144,U+5237,U+5287,U+52b4,U+58c1,U+5bff,U+5c04,U+5c06,U+5e95,U+5f31,U+5f93,U+63c3,U+640d,U+6557,U+6614,U+662f,U+67d3,U+690d,U+6bba,U+6e6f,U+72af,U+732b,U+7518,U+7ae0,U+7ae5,U+7af6,U+822a,U+89e6,U+8a3a,U+8a98,U+8cb8,U+8de1,U+8e8d,U+95d8,U+961c,U+96a3,U+96ea,U+9bae,U+ff20,U+ff22,U+ff29,U+ff2b-ff2c}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-98-wght-normal-BE30qkDG.woff2) format("woff2-variations");unicode-range:U+25cb,U+4e71,U+4f59,U+50d5,U+520a,U+5217,U+5230,U+523a-523b,U+541b,U+5439,U+5747,U+59c9,U+5bdf,U+5c31,U+5de8,U+5e7c,U+5f69,U+6050,U+60d1,U+63cf,U+663c,U+67c4,U+6885,U+6c38,U+6d6e,U+6db2,U+6df7,U+6e2c,U+6f5f,U+7532,U+76e3-76e4,U+7701,U+793c,U+79f0,U+7a93,U+7d00,U+7de0,U+7e54,U+8328,U+8840,U+969c,U+96e8,U+9811,U+9aea,U+9b5a,U+ff24,U+ff2e,U+ff57}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-99-wght-normal-Cj5IF6EZ.woff2) format("woff2-variations");unicode-range:U+2191,U+505c,U+52e4,U+5305,U+535a,U+56e0,U+59bb,U+5acc,U+5b09,U+5b87,U+5c90,U+5df1,U+5e2d,U+5e33,U+5f3e,U+6298,U+6383,U+653b,U+6697,U+6804,U+6a39,U+6cca,U+6e90,U+6f2b,U+702c,U+7206,U+7236,U+7559,U+7565,U+7591,U+75c7,U+75db,U+7b4b,U+7bb1,U+7d99,U+7fbd,U+8131,U+885b,U+8b1d,U+8ff7,U+9003,U+9045,U+96a0,U+9732,U+990a,U+99d0,U+9e97,U+9f62,U+ff25,U+ff2d}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-100-wght-normal-IGIcweVU.woff2) format("woff2-variations");unicode-range:U+4e08,U+4f9d,U+5012,U+514d,U+51b7,U+5275,U+53ca,U+53f8,U+5584,U+57fc,U+5b9d,U+5bfa,U+5c3e,U+5f01,U+5fb4,U+5fd7,U+606f,U+62e1,U+6563,U+6674,U+6cb3,U+6d3e,U+6d74,U+6e1b,U+6e2f,U+718a,U+7247,U+79d8,U+7d14,U+7d66,U+7d71,U+7df4,U+7e41,U+80cc,U+8155,U+83d3,U+8a95,U+8ab2,U+8ad6,U+8ca1,U+9000,U+9006,U+9678,U+97d3,U+9808,U+98ef,U+9a5a,U+9b45,U+ff23,U+ff30}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-101-wght-normal-Dls8jqVU.woff2) format("woff2-variations");unicode-range:U+25bc,U+3012,U+4ef2,U+4f0a,U+516b,U+5373,U+539a,U+53b3,U+559c,U+56f0,U+5727,U+5742,U+5965,U+59ff,U+5bc6,U+5dfb,U+5e45,U+5ead,U+5fb3,U+6211,U+6253,U+639b,U+63a8,U+6545,U+6575,U+6628,U+672d,U+68a8,U+6bdb,U+6d25,U+707d,U+767e,U+7834,U+7b46,U+7bc9,U+8074,U+82e6,U+8349,U+8a2a,U+8d70,U+8da3,U+8fce,U+91cc,U+967d,U+97ff,U+9996,U+ff1c,U+ff2f,U+ff32,U+ff34}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-102-wght-normal-CKMRrjm1.woff2) format("woff2-variations");unicode-range:U+3d,U+5e,U+25cf,U+4e0e,U+4e5d,U+4e73,U+4e94,U+4f3c,U+5009,U+5145,U+51ac,U+5238,U+524a,U+53f3,U+547c,U+5802,U+5922,U+5a66,U+5c0e,U+5de6,U+5fd8,U+5feb,U+6797,U+685c,U+6b7b,U+6c5f-6c60,U+6cc9,U+6ce2,U+6d17,U+6e21,U+7167,U+7642,U+76db,U+8001,U+821e,U+8857,U+89d2,U+8b1b,U+8b70,U+8cb4,U+8cde,U+8f03,U+8f2a,U+968e,U+9b54,U+9e7f,U+9ebb,U+ff05,U+ff33}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-103-wght-normal-Cf0qKmex.woff2) format("woff2-variations");unicode-range:U+500d,U+5074,U+50cd,U+5175,U+52e2,U+5352,U+5354,U+53f2,U+5409,U+56fa,U+5a18,U+5b88,U+5bdd,U+5ca9,U+5f92,U+5fa9,U+60a9,U+623f,U+6483,U+653f,U+666f,U+66ae,U+66f2,U+6a21,U+6b66,U+6bcd,U+6d5c,U+796d,U+7a4d,U+7aef,U+7b56,U+7b97,U+7c4d,U+7e04,U+7fa9,U+8377,U+83dc,U+83ef,U+8535,U+8863,U+88cf,U+88dc,U+8907,U+8acb,U+90ce,U+91dd,U+ff0b,U+ff0d,U+ff19,U+ff65}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-104-wght-normal-DU15_Tmk.woff2) format("woff2-variations");unicode-range:U+4e01,U+4e21,U+4e38,U+52a9,U+547d,U+592e,U+5931,U+5b63,U+5c40,U+5dde,U+5e78,U+5efa,U+5fa1,U+604b,U+6075,U+62c5,U+632f,U+6a19,U+6c0f,U+6c11,U+6c96,U+6e05,U+70ba,U+71b1,U+7387,U+7403,U+75c5,U+77ed,U+795d,U+7b54,U+7cbe,U+7d19,U+7fa4,U+8089,U+81f4,U+8208,U+8336,U+8457,U+8a33,U+8c4a,U+8ca0,U+8ca8,U+8cc0,U+9014,U+964d,U+9803,U+983c,U+98db,U+ff17,U+ff21}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-105-wght-normal-CTXm1m1e.woff2) format("woff2-variations");unicode-range:U+25,U+25a0,U+4e26,U+4f4e,U+5341,U+56f2,U+5bbf,U+5c45,U+5c55,U+5c5e,U+5dee,U+5e9c,U+5f7c,U+6255,U+627f,U+62bc,U+65cf,U+661f,U+666e,U+66dc,U+67fb,U+6975,U+6a4b,U+6b32,U+6df1,U+6e29,U+6fc0,U+738b,U+7686,U+7a76,U+7a81,U+7c73,U+7d75,U+7dd2,U+82e5,U+82f1,U+85ac,U+888b,U+899a,U+8a31,U+8a8c,U+8ab0,U+8b58,U+904a,U+9060,U+9280,U+95b2,U+984d,U+9ce5,U+ff18}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-106-wght-normal-COtgWfsA.woff2) format("woff2-variations");unicode-range:U+30f6,U+50ac,U+5178,U+51e6,U+5224,U+52dd,U+5883,U+5897,U+590f,U+5a5a,U+5bb3,U+5c65,U+5e03,U+5e2b,U+5e30,U+5eb7,U+6271,U+63f4,U+64ae,U+6574,U+672b,U+679a,U+6a29-6a2a,U+6ca2,U+6cc1,U+6d0b,U+713c,U+74b0,U+7981,U+7a0b,U+7bc0,U+7d1a,U+7d61,U+7fd2,U+822c,U+8996,U+89aa,U+8cac,U+8cbb,U+8d77,U+8def,U+9020,U+9152,U+9244,U+9662,U+967a,U+96e3,U+9759,U+ff16}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-107-wght-normal-BMH1cYUp.woff2) format("woff2-variations");unicode-range:U+23,U+3c,U+2192,U+4e45,U+4efb,U+4f50,U+4f8b,U+4fc2,U+5024,U+5150,U+5272,U+5370,U+53bb,U+542b,U+56db,U+56e3,U+57ce,U+5bc4,U+5bcc,U+5f71,U+60aa,U+6238,U+6280,U+629c,U+6539,U+66ff,U+670d,U+677e-677f,U+6839,U+69cb,U+6b4c,U+6bb5,U+6e96,U+6f14,U+72ec,U+7389,U+7814,U+79cb,U+79d1,U+79fb,U+7a0e,U+7d0d,U+85e4,U+8d64,U+9632,U+96e2,U+9805,U+99ac,U+ff1e}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-108-wght-normal-1F5IhFoa.woff2) format("woff2-variations");unicode-range:U+2605-2606,U+301c,U+4e57,U+4fee,U+5065,U+52df,U+533b,U+5357,U+57df,U+58eb,U+58f0,U+591c,U+592a-592b,U+5948,U+5b85,U+5d0e,U+5ea7,U+5ff5,U+6025,U+63a1,U+63a5,U+63db,U+643a,U+65bd,U+671d,U+68ee,U+6982,U+6b73,U+6bd4,U+6d88,U+7570,U+7b11,U+7d76,U+8077,U+8217,U+8c37,U+8c61,U+8cc7,U+8d85,U+901f,U+962a,U+9802,U+9806,U+9854,U+98f2,U+9928,U+99c5,U+9ed2}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-109-wght-normal-XZ0efpq6.woff2) format("woff2-variations");unicode-range:U+266a,U+4f11,U+533a,U+5343,U+534a,U+53cd,U+5404,U+56f3,U+5b57-5b58,U+5bae,U+5c4a,U+5e0c,U+5e2f,U+5eab,U+5f35,U+5f79,U+614b,U+6226,U+629e,U+65c5,U+6625,U+6751,U+6821,U+6b69,U+6b8b,U+6bce,U+6c42,U+706b,U+7c21,U+7cfb,U+805e,U+80b2,U+82b8,U+843d,U+8853,U+88c5,U+8a3c,U+8a66,U+8d8a,U+8fba,U+9069,U+91cf,U+9752,U+975e,U+9999,U+ff0f-ff10,U+ff14-ff15}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-110-wght-normal-CeHeZFeT.woff2) format("woff2-variations");unicode-range:U+40,U+4e86,U+4e95,U+4f01,U+4f1d,U+4fbf,U+5099,U+5171,U+5177,U+53cb,U+53ce,U+53f0,U+5668,U+5712,U+5ba4,U+5ca1,U+5f85,U+60f3,U+653e,U+65ad,U+65e9,U+6620,U+6750,U+6761,U+6b62,U+6b74,U+6e08,U+6e80,U+7248,U+7531,U+7533,U+753a,U+77f3,U+798f,U+7f6e,U+8449,U+88fd,U+89b3,U+8a55,U+8ac7,U+8b77,U+8db3,U+8efd,U+8fd4,U+9031-9032,U+9580,U+9589,U+96d1,U+985e}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-111-wght-normal-DyRaOVPC.woff2) format("woff2-variations");unicode-range:U+2b,U+d7,U+300e-300f,U+4e07,U+4e8c,U+512a,U+5149,U+518d,U+5236,U+52b9,U+52d9,U+5468,U+578b,U+57fa,U+5b8c,U+5ba2,U+5c02,U+5de5,U+5f37,U+5f62,U+623b,U+63d0,U+652f,U+672a,U+6848,U+6d41,U+7136,U+7537,U+754c,U+76f4,U+79c1,U+7ba1,U+7d44,U+7d4c,U+7dcf,U+7dda,U+7de8,U+82b1,U+897f,U+8ca9,U+8cfc,U+904e,U+9664,U+982d,U+9858,U+98a8,U+9a13,U+ff13,U+ff5c}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-112-wght-normal-CnVx-8lB.woff2) format("woff2-variations");unicode-range:U+4e16,U+4e3b,U+4ea4,U+4ee4,U+4f4d,U+4f4f,U+4f55,U+4f9b,U+5317,U+5358,U+53c2,U+53e4,U+548c,U+571f,U+59cb,U+5cf6,U+5e38,U+63a2,U+63b2,U+6559,U+662d,U+679c,U+6c7a,U+72b6,U+7523,U+767d,U+770c,U+7a2e,U+7a3f,U+7a7a,U+7b2c,U+7b49,U+7d20,U+7d42,U+8003,U+8272,U+8a08,U+8aac,U+8cb7,U+8eab,U+8ee2,U+9054-9055,U+90fd,U+914d,U+91cd,U+969b,U+97f3,U+984c,U+ff06}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-113-wght-normal-CtbyXo_h.woff2) format("woff2-variations");unicode-range:U+26,U+5f,U+2026,U+203b,U+4e09,U+4eac,U+4ed5,U+4fa1,U+5143,U+5199,U+5207,U+539f,U+53e3,U+53f7,U+5411,U+5473,U+5546,U+55b6,U+5929,U+597d,U+5bb9,U+5c11,U+5c4b,U+5ddd,U+5f97,U+5fc5,U+6295,U+6301,U+6307,U+671b,U+76f8,U+78ba,U+795e,U+7d30,U+7d39,U+7d9a,U+89e3,U+8a00,U+8a73,U+8a8d,U+8a9e,U+8aad,U+8abf,U+8cea,U+8eca,U+8ffd,U+904b,U+9650,U+ff11-ff12}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-114-wght-normal-DCIM4jZs.woff2) format("woff2-variations");unicode-range:U+3e,U+3005,U+4e0d,U+4e88,U+4ecb,U+4ee3,U+4ef6,U+4fdd,U+4fe1,U+500b,U+50cf,U+5186,U+5316,U+53d7,U+540c,U+544a,U+54e1,U+5728,U+58f2,U+5973,U+5b89,U+5c71,U+5e02,U+5e97,U+5f15,U+5fc3,U+5fdc,U+601d,U+611b,U+611f,U+671f,U+6728,U+6765,U+683c,U+6b21,U+6ce8,U+6d3b,U+6d77,U+7530,U+7740,U+7acb,U+7d50,U+826f,U+8f09,U+8fbc,U+9001,U+9053,U+91ce,U+9762,U+98df}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-115-wght-normal-CDBMNWew.woff2) format("woff2-variations");unicode-range:U+7c,U+3080,U+4ee5,U+5148,U+516c,U+521d,U+5225,U+529b,U+52a0,U+53ef,U+56de,U+56fd,U+5909,U+591a,U+5b66,U+5b9f,U+5bb6,U+5bfe,U+5e73,U+5e83,U+5ea6,U+5f53,U+6027,U+610f,U+6210,U+6240,U+660e,U+66f4,U+66f8,U+6709,U+6771,U+697d,U+69d8,U+6a5f,U+6c34,U+6cbb,U+73fe,U+756a,U+7684,U+771f,U+793a,U+7f8e,U+898f,U+8a2d,U+8a71,U+8fd1,U+9078,U+9577,U+96fb,U+ff5e}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-116-wght-normal-RqS7_mFx.woff2) format("woff2-variations");unicode-range:U+a9,U+3010-3011,U+30e2,U+4e0b,U+4eca,U+4ed6,U+4ed8,U+4f53,U+4f5c,U+4f7f,U+53d6,U+540d,U+54c1,U+5730,U+5916,U+5b50,U+5c0f,U+5f8c,U+624b,U+6570,U+6587,U+6599,U+691c,U+696d,U+6cd5,U+7269,U+7279,U+7406,U+767a-767b,U+77e5,U+7d04,U+7d22,U+8005,U+80fd,U+81ea,U+8868,U+8981,U+89a7,U+901a,U+9023,U+90e8,U+91d1,U+9332,U+958b,U+96c6,U+9ad8,U+ff1a,U+ff1f}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-117-wght-normal-D73BPRww.woff2) format("woff2-variations");unicode-range:U+4e,U+a0,U+3000,U+300c-300d,U+4e00,U+4e0a,U+4e2d,U+4e8b,U+4eba,U+4f1a,U+5165,U+5168,U+5185,U+51fa,U+5206,U+5229,U+524d,U+52d5,U+5408,U+554f,U+5831,U+5834,U+5927,U+5b9a,U+5e74,U+5f0f,U+60c5,U+65b0,U+65b9,U+6642,U+6700,U+672c,U+682a,U+6b63,U+6c17,U+7121,U+751f,U+7528,U+753b,U+76ee,U+793e,U+884c,U+898b,U+8a18,U+9593,U+95a2,U+ff01,U+ff08-ff09}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-118-wght-normal-U5v7NshZ.woff2) format("woff2-variations");unicode-range:U+21-22,U+27-2a,U+2c-3b,U+3f,U+41-4d,U+4f-5d,U+61-7b,U+7d,U+ab,U+ae,U+b2-b3,U+b7,U+bb,U+c9,U+cd,U+d6,U+d8,U+dc,U+e0-e5,U+e7-ed,U+ef,U+f1-f4,U+f6,U+f8,U+fa,U+fc-fd,U+103,U+14d,U+1b0,U+300-301,U+1ebf,U+1ec7,U+2013-2014,U+201c-201d,U+2039-203a,U+203c,U+2048-2049,U+2113,U+2122,U+65e5,U+6708,U+70b9}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-119-wght-normal-D3TauSHf.woff2) format("woff2-variations");unicode-range:U+20,U+2027,U+3001-3002,U+3041-307f,U+3081-308f,U+3091-3093,U+3099-309a,U+309d-309e,U+30a1-30e1,U+30e3-30ed,U+30ef-30f0,U+30f2-30f4,U+30fb-30fe,U+ff0c,U+ff0e}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-cyrillic-wght-normal-BQJ6xfwZ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-vietnamese-wght-normal-CFXlG5tS.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-latin-ext-wght-normal-pB8enYeX.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Noto Sans JP Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-jp-latin-wght-normal-JmuruAaA.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-0-wght-normal-D06yvloL.woff2) format("woff2-variations");unicode-range:U+f9ca-fa0b,U+ff03-ff05,U+ff07,U+ff0a-ff0b,U+ff0d-ff19,U+ff1b,U+ff1d,U+ff20-ff5b,U+ff5d,U+ffe0-ffe3,U+ffe5-ffe6}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-1-wght-normal-Bqp_kP4o.woff2) format("woff2-variations");unicode-range:U+f92f-f980,U+f982-f9c9}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-2-wght-normal-BlW3AcBF.woff2) format("woff2-variations");unicode-range:U+d723-d728,U+d72a-d733,U+d735-d748,U+d74a-d74f,U+d752-d753,U+d755-d757,U+d75a-d75f,U+d762-d764,U+d766-d768,U+d76a-d76b,U+d76d-d76f,U+d771-d787,U+d789-d78b,U+d78d-d78f,U+d791-d797,U+d79a,U+d79c,U+d79e-d7a3,U+f900-f909,U+f90b-f92e}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-3-wght-normal-DZIqdvJw.woff2) format("woff2-variations");unicode-range:U+d679-d68b,U+d68e-d69e,U+d6a0,U+d6a2-d6a7,U+d6a9-d6c3,U+d6c6-d6c7,U+d6c9-d6cb,U+d6cd-d6d3,U+d6d5-d6d6,U+d6d8-d6e3,U+d6e5-d6e7,U+d6e9-d6fb,U+d6fd-d717,U+d719-d71f,U+d721-d722}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-4-wght-normal-MlF4wjtz.woff2) format("woff2-variations");unicode-range:U+d5bc-d5c7,U+d5ca-d5cb,U+d5cd-d5cf,U+d5d1-d5d7,U+d5d9-d5da,U+d5dc,U+d5de-d5e3,U+d5e6-d5e7,U+d5e9-d5eb,U+d5ed-d5f6,U+d5f8,U+d5fa-d5ff,U+d602-d603,U+d605-d607,U+d609-d60f,U+d612-d613,U+d616-d61b,U+d61d-d637,U+d63a-d63b,U+d63d-d63f,U+d641-d647,U+d64a-d64c,U+d64e-d653,U+d656-d657,U+d659-d65b,U+d65d-d666,U+d668,U+d66a-d678}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-5-wght-normal-D2ndBBlz.woff2) format("woff2-variations");unicode-range:U+d507,U+d509-d50b,U+d50d-d513,U+d515-d53b,U+d53e-d53f,U+d541-d543,U+d545-d54c,U+d54e,U+d550,U+d552-d557,U+d55a-d55b,U+d55d-d55f,U+d561-d564,U+d566-d567,U+d56a,U+d56c,U+d56e-d573,U+d576-d577,U+d579-d583,U+d585-d586,U+d58a-d5a4,U+d5a6-d5bb}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-6-wght-normal-CJnF25Ox.woff2) format("woff2-variations");unicode-range:U+d464-d477,U+d47a-d47b,U+d47d-d47f,U+d481-d487,U+d489-d48a,U+d48c,U+d48e-d4e7,U+d4e9-d503,U+d505-d506}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-7-wght-normal-CImCbZMD.woff2) format("woff2-variations");unicode-range:U+d3bf-d3c7,U+d3ca-d3cf,U+d3d1-d3eb,U+d3ee-d3ef,U+d3f1-d3f3,U+d3f5-d3fb,U+d3fd-d400,U+d402-d45b,U+d45d-d463}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-8-wght-normal-CstSMSR0.woff2) format("woff2-variations");unicode-range:U+d2ff,U+d302-d304,U+d306-d30b,U+d30f,U+d311-d313,U+d315-d31b,U+d31e,U+d322-d324,U+d326-d327,U+d32a-d32b,U+d32d-d32f,U+d331-d337,U+d339-d33c,U+d33e-d37b,U+d37e-d37f,U+d381-d383,U+d385-d38b,U+d38e-d390,U+d392-d397,U+d39a-d39b,U+d39d-d39f,U+d3a1-d3a7,U+d3a9-d3aa,U+d3ac,U+d3ae-d3b3,U+d3b5-d3b7,U+d3b9-d3bb,U+d3bd-d3be}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-9-wght-normal-Dc1zs_Pa.woff2) format("woff2-variations");unicode-range:U+d257-d27f,U+d281-d29b,U+d29d-d29f,U+d2a1-d2ab,U+d2ad-d2b7,U+d2ba-d2bb,U+d2bd-d2bf,U+d2c1-d2c7,U+d2c9-d2ef,U+d2f2-d2f3,U+d2f5-d2f7,U+d2f9-d2fe}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-10-wght-normal-D44PZdTN.woff2) format("woff2-variations");unicode-range:U+d1b4,U+d1b6-d1f3,U+d1f5-d22b,U+d22e-d22f,U+d231-d233,U+d235-d23b,U+d23d-d240,U+d242-d256}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-11-wght-normal-DnDO1vGF.woff2) format("woff2-variations");unicode-range:U+d105-d12f,U+d132-d133,U+d135-d137,U+d139-d13f,U+d141-d142,U+d144,U+d146-d14b,U+d14e-d14f,U+d151-d153,U+d155-d15b,U+d15e-d187,U+d189-d19f,U+d1a2-d1a3,U+d1a5-d1a7,U+d1a9-d1af,U+d1b2-d1b3}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-12-wght-normal-gICIGsXI.woff2) format("woff2-variations");unicode-range:U+d04b-d04f,U+d051-d057,U+d059-d06b,U+d06d-d06f,U+d071-d073,U+d075-d07b,U+d07e-d0a3,U+d0a6-d0a7,U+d0a9-d0ab,U+d0ad-d0b3,U+d0b6,U+d0b8,U+d0ba-d0bf,U+d0c2-d0c3,U+d0c5-d0c7,U+d0c9-d0cf,U+d0d2,U+d0d6-d0db,U+d0de-d0df,U+d0e1-d0e3,U+d0e5-d0eb,U+d0ee-d0f0,U+d0f2-d104}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-13-wght-normal-olvHB9I9.woff2) format("woff2-variations");unicode-range:U+cfa2-cfc3,U+cfc5-cfdf,U+cfe2-cfe3,U+cfe5-cfe7,U+cfe9-cff4,U+cff6-cffb,U+cffd-cfff,U+d001-d003,U+d005-d017,U+d019-d033,U+d036-d037,U+d039-d03b,U+d03d-d04a}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-14-wght-normal-BtTu50RG.woff2) format("woff2-variations");unicode-range:U+cef0-cef3,U+cef6,U+cef9-ceff,U+cf01-cf03,U+cf05-cf07,U+cf09-cf0f,U+cf11-cf12,U+cf14-cf1b,U+cf1d-cf1f,U+cf21-cf2f,U+cf31-cf53,U+cf56-cf57,U+cf59-cf5b,U+cf5d-cf63,U+cf66,U+cf68,U+cf6a-cf6f,U+cf71-cf84,U+cf86-cf8b,U+cf8d-cfa1}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-15-wght-normal-CxFswjwr.woff2) format("woff2-variations");unicode-range:U+ce3c-ce57,U+ce5a-ce5b,U+ce5d-ce5f,U+ce61-ce67,U+ce6a,U+ce6c,U+ce6e-ce73,U+ce76-ce77,U+ce79-ce7b,U+ce7d-ce83,U+ce85-ce88,U+ce8a-ce8f,U+ce91-ce93,U+ce95-ce97,U+ce99-ce9f,U+cea2,U+cea4-ceab,U+cead-cee3,U+cee6-cee7,U+cee9-ceeb,U+ceed-ceef}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-16-wght-normal-D7pAhItn.woff2) format("woff2-variations");unicode-range:U+cd92-cd93,U+cd96-cd97,U+cd99-cd9b,U+cd9d-cda3,U+cda6-cda8,U+cdaa-cdaf,U+cdb1-cdc3,U+cdc5-cdcb,U+cdcd-cde7,U+cde9-ce03,U+ce05-ce1f,U+ce22-ce34,U+ce36-ce3b}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-17-wght-normal-CcMq9J3c.woff2) format("woff2-variations");unicode-range:U+ccef-cd07,U+cd0a-cd0b,U+cd0d-cd1a,U+cd1c,U+cd1e-cd2b,U+cd2d-cd5b,U+cd5d-cd77,U+cd79-cd91}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-18-wght-normal-B_Xt9mRz.woff2) format("woff2-variations");unicode-range:U+cc3f-cc43,U+cc46-cc47,U+cc49-cc4b,U+cc4d-cc53,U+cc55-cc58,U+cc5a-cc5f,U+cc61-cc97,U+cc9a-cc9b,U+cc9d-cc9f,U+cca1-cca7,U+ccaa,U+ccac,U+ccae-ccb3,U+ccb6-ccb7,U+ccb9-ccbb,U+ccbd-cccf,U+ccd1-cce3,U+cce5-ccee}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-19-wght-normal-DicL0vd6.woff2) format("woff2-variations");unicode-range:U+cb91-cbd3,U+cbd5-cbe3,U+cbe5-cc0b,U+cc0e-cc0f,U+cc11-cc13,U+cc15-cc1b,U+cc1d-cc20,U+cc23-cc27,U+cc2a-cc2b,U+cc2d,U+cc2f,U+cc31-cc37,U+cc3a,U+cc3c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-20-wght-normal-PxcBBeNg.woff2) format("woff2-variations");unicode-range:U+caf4-cb47,U+cb4a-cb90}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-21-wght-normal-CuThq_3_.woff2) format("woff2-variations");unicode-range:U+ca4a-ca4b,U+ca4e-ca4f,U+ca51-ca53,U+ca55-ca5b,U+ca5d-ca60,U+ca62-ca83,U+ca85-cabb,U+cabe-cabf,U+cac1-cac3,U+cac5-cacb,U+cacd-cad0,U+cad2,U+cad4-cad8,U+cada-caf3}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-22-wght-normal-D-9XnguA.woff2) format("woff2-variations");unicode-range:U+c996-c997,U+c99a-c99c,U+c99e-c9bf,U+c9c2-c9c3,U+c9c5-c9c7,U+c9c9-c9cf,U+c9d2,U+c9d4,U+c9d7-c9d8,U+c9db,U+c9de-c9df,U+c9e1-c9e3,U+c9e5-c9e6,U+c9e8-c9eb,U+c9ee-c9f0,U+c9f2-c9f7,U+c9f9-ca0b,U+ca0d-ca28,U+ca2a-ca49}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-23-wght-normal-CsoKTgIH.woff2) format("woff2-variations");unicode-range:U+c8e9-c8f4,U+c8f6-c8fb,U+c8fe-c8ff,U+c901-c903,U+c905-c90b,U+c90e-c910,U+c912-c917,U+c919-c92b,U+c92d-c94f,U+c951-c953,U+c955-c96b,U+c96d-c973,U+c975-c987,U+c98a-c98b,U+c98d-c98f,U+c991-c995}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-24-wght-normal-CVm75uzf.woff2) format("woff2-variations");unicode-range:U+c841-c84b,U+c84d-c86f,U+c872-c873,U+c875-c877,U+c879-c87f,U+c882-c884,U+c887-c88a,U+c88d-c8c3,U+c8c5-c8df,U+c8e1-c8e8}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-25-wght-normal-pcUlc7hZ.woff2) format("woff2-variations");unicode-range:U+c779-c77b,U+c77e-c782,U+c786,U+c78b,U+c78d,U+c78f,U+c792-c793,U+c795,U+c797,U+c799-c79f,U+c7a2,U+c7a7-c7ab,U+c7ae-c7bb,U+c7bd-c7c0,U+c7c2-c7c7,U+c7c9-c7dc,U+c7de-c7ff,U+c802-c803,U+c805-c807,U+c809,U+c80b-c80f,U+c812,U+c814,U+c817-c81b,U+c81e-c81f,U+c821-c823,U+c825-c82e,U+c830-c837,U+c839-c83b,U+c83d-c840}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-26-wght-normal-gwaK2bp7.woff2) format("woff2-variations");unicode-range:U+c6bb-c6bf,U+c6c2,U+c6c4,U+c6c6-c6cb,U+c6ce-c6cf,U+c6d1-c6d3,U+c6d5-c6db,U+c6dd-c6df,U+c6e1-c6e7,U+c6e9-c6eb,U+c6ed-c6ef,U+c6f1-c6f8,U+c6fa-c703,U+c705-c707,U+c709-c70b,U+c70d-c716,U+c718,U+c71a-c71f,U+c722-c723,U+c725-c727,U+c729-c734,U+c736-c73b,U+c73e-c73f,U+c741-c743,U+c745-c74b,U+c74e-c750,U+c752-c757,U+c759-c773,U+c776-c777}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-27-wght-normal-BYvOljic.woff2) format("woff2-variations");unicode-range:U+c5f5-c5fb,U+c5fe,U+c602-c605,U+c607,U+c609-c60f,U+c611-c61a,U+c61c-c623,U+c626-c627,U+c629-c62b,U+c62d,U+c62f-c632,U+c636,U+c638,U+c63a-c63f,U+c642-c643,U+c645-c647,U+c649-c652,U+c656-c65b,U+c65d-c65f,U+c661-c663,U+c665-c677,U+c679-c67b,U+c67d-c693,U+c696-c697,U+c699-c69b,U+c69d-c6a3,U+c6a6,U+c6a8,U+c6aa-c6af,U+c6b2-c6b3,U+c6b5-c6b7,U+c6b9-c6ba}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-28-wght-normal-COQop0OG.woff2) format("woff2-variations");unicode-range:U+c517-c527,U+c52a-c52b,U+c52d-c52f,U+c531-c538,U+c53a,U+c53c,U+c53e-c543,U+c546-c547,U+c54b,U+c54d-c552,U+c556,U+c55a-c55b,U+c55d,U+c55f,U+c562-c563,U+c565-c567,U+c569-c56f,U+c572,U+c574,U+c576-c57b,U+c57e-c57f,U+c581-c583,U+c585-c586,U+c588-c58b,U+c58e,U+c590,U+c592-c596,U+c599-c5b3,U+c5b6-c5b7,U+c5ba,U+c5be-c5c3,U+c5ca-c5cb,U+c5cd,U+c5cf,U+c5d2-c5d3,U+c5d5-c5d7,U+c5d9-c5df,U+c5e1-c5e2,U+c5e4,U+c5e6-c5eb,U+c5ef,U+c5f1-c5f3}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-29-wght-normal-Bwniia0r.woff2) format("woff2-variations");unicode-range:U+c475-c4ef,U+c4f2-c4f3,U+c4f5-c4f7,U+c4f9-c4ff,U+c502-c50b,U+c50d-c516}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-30-wght-normal-BNXqYhtq.woff2) format("woff2-variations");unicode-range:U+c3d0-c3d7,U+c3da-c3db,U+c3dd-c3de,U+c3e1-c3ec,U+c3ee-c3f3,U+c3f5-c42b,U+c42d-c463,U+c466-c474}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-31-wght-normal-BoAdonrH.woff2) format("woff2-variations");unicode-range:U+c32b-c367,U+c36a-c36b,U+c36d-c36f,U+c371-c377,U+c37a-c37b,U+c37e-c383,U+c385-c387,U+c389-c3cf}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-32-wght-normal-BREiG6LA.woff2) format("woff2-variations");unicode-range:U+c26a-c26b,U+c26d-c26f,U+c271-c273,U+c275-c27b,U+c27e-c287,U+c289-c28f,U+c291-c297,U+c299-c29a,U+c29c-c2a3,U+c2a5-c2a7,U+c2a9-c2ab,U+c2ad-c2b3,U+c2b6,U+c2b8,U+c2ba-c2bb,U+c2bd-c2db,U+c2de-c2df,U+c2e1-c2e2,U+c2e5-c2ea,U+c2ee,U+c2f0,U+c2f2-c2f5,U+c2f7,U+c2fa-c2fb,U+c2fd-c2ff,U+c301-c307,U+c309-c30c,U+c30e-c312,U+c315-c323,U+c325-c328,U+c32a}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-33-wght-normal-DMSZNpMD.woff2) format("woff2-variations");unicode-range:U+c1bc-c1c3,U+c1c5-c1df,U+c1e1-c1fb,U+c1fd-c203,U+c205-c20c,U+c20e,U+c210-c217,U+c21a-c21b,U+c21d-c21e,U+c221-c227,U+c229-c22a,U+c22c,U+c22e,U+c230,U+c233-c24f,U+c251-c257,U+c259-c269}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-34-wght-normal-Dn9wUbC5.woff2) format("woff2-variations");unicode-range:U+c101-c11b,U+c11f,U+c121-c123,U+c125-c12b,U+c12e,U+c132-c137,U+c13a-c13b,U+c13d-c13f,U+c141-c147,U+c14a,U+c14c-c153,U+c155-c157,U+c159-c15b,U+c15d-c166,U+c169-c16f,U+c171-c177,U+c179-c18b,U+c18e-c18f,U+c191-c193,U+c195-c19b,U+c19d-c19e,U+c1a0,U+c1a2-c1a4,U+c1a6-c1bb}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-35-wght-normal-CNljDv8x.woff2) format("woff2-variations");unicode-range:U+c049-c057,U+c059-c05b,U+c05d-c05f,U+c061-c067,U+c069-c08f,U+c091-c0ab,U+c0ae-c0af,U+c0b1-c0b3,U+c0b5,U+c0b7-c0bb,U+c0be,U+c0c2-c0c7,U+c0ca-c0cb,U+c0cd-c0cf,U+c0d1-c0d7,U+c0d9-c0da,U+c0dc,U+c0de-c0e3,U+c0e5-c0eb,U+c0ed-c0f3,U+c0f6,U+c0f8,U+c0fa-c0ff}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-36-wght-normal-BQ3DsEFp.woff2) format("woff2-variations");unicode-range:U+bfa7-bfaf,U+bfb1-bfc4,U+bfc6-bfcb,U+bfce-bfcf,U+bfd1-bfd3,U+bfd5-bfdb,U+bfdd-c048}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-37-wght-normal-D0Nod484.woff2) format("woff2-variations");unicode-range:U+bf07,U+bf09-bf3f,U+bf41-bf4f,U+bf52-bf54,U+bf56-bfa6}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-38-wght-normal-D7aEX-Z7.woff2) format("woff2-variations");unicode-range:U+be56,U+be58,U+be5c-be5f,U+be62-be63,U+be65-be67,U+be69-be74,U+be76-be7b,U+be7e-be7f,U+be81-be8e,U+be90,U+be92-bea7,U+bea9-becf,U+bed2-bed3,U+bed5-bed6,U+bed9-bee3,U+bee6-bf06}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-39-wght-normal-QVs81SbT.woff2) format("woff2-variations");unicode-range:U+bdb0-bdd3,U+bdd5-bdef,U+bdf1-be0b,U+be0d-be0f,U+be11-be13,U+be15-be43,U+be46-be47,U+be49-be4b,U+be4d-be53}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-40-wght-normal-B6XNibcs.woff2) format("woff2-variations");unicode-range:U+bd03,U+bd06,U+bd08,U+bd0a-bd0f,U+bd11-bd22,U+bd25-bd47,U+bd49-bd58,U+bd5a-bd7f,U+bd82-bd83,U+bd85-bd87,U+bd8a-bd8f,U+bd91-bd92,U+bd94,U+bd96-bd98,U+bd9a-bdaf}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-41-wght-normal-CrDDFHLC.woff2) format("woff2-variations");unicode-range:U+bc4e-bc83,U+bc86-bc87,U+bc89-bc8b,U+bc8d-bc93,U+bc96,U+bc98,U+bc9b-bc9f,U+bca2-bca3,U+bca5-bca7,U+bca9-bcb2,U+bcb4-bcbb,U+bcbe-bcbf,U+bcc1-bcc3,U+bcc5-bccc,U+bcce-bcd0,U+bcd2-bcd4,U+bcd6-bcf3,U+bcf7,U+bcf9-bcfb,U+bcfd-bd02}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-42-wght-normal-_xElrv31.woff2) format("woff2-variations");unicode-range:U+bb90-bba3,U+bba5-bbab,U+bbad-bbbf,U+bbc1-bbf7,U+bbfa-bbfb,U+bbfd-bbfe,U+bc01-bc07,U+bc09-bc0a,U+bc0e,U+bc10,U+bc12-bc13,U+bc17,U+bc19-bc1a,U+bc1e,U+bc20-bc23,U+bc26,U+bc28,U+bc2a-bc2c,U+bc2e-bc2f,U+bc32-bc33,U+bc35-bc37,U+bc39-bc3f,U+bc41-bc42,U+bc44,U+bc46-bc48,U+bc4a-bc4d}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-43-wght-normal-D4Z4qIjx.woff2) format("woff2-variations");unicode-range:U+bae6-bafb,U+bafd-bb17,U+bb19-bb33,U+bb37,U+bb39-bb3a,U+bb3d-bb43,U+bb45-bb46,U+bb48,U+bb4a-bb4f,U+bb51-bb53,U+bb55-bb57,U+bb59-bb62,U+bb64-bb8f}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-44-wght-normal-BOzNPFw1.woff2) format("woff2-variations");unicode-range:U+ba30-ba37,U+ba3a-ba3b,U+ba3d-ba3f,U+ba41-ba47,U+ba49-ba4a,U+ba4c,U+ba4e-ba53,U+ba56-ba57,U+ba59-ba5b,U+ba5d-ba63,U+ba65-ba66,U+ba68-ba6f,U+ba71-ba73,U+ba75-ba77,U+ba79-ba84,U+ba86,U+ba88-baa7,U+baaa,U+baad-baaf,U+bab1-bab7,U+baba,U+babc,U+babe-bae5}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-45-wght-normal-HgLQPnZe.woff2) format("woff2-variations");unicode-range:U+b96e-b973,U+b976-b977,U+b979-b97b,U+b97d-b983,U+b986,U+b988,U+b98a-b98d,U+b98f-b9ab,U+b9ae-b9af,U+b9b1-b9b3,U+b9b5-b9bb,U+b9be,U+b9c0,U+b9c2-b9c7,U+b9ca-b9cb,U+b9cd,U+b9d2-b9d7,U+b9da,U+b9dc,U+b9df-b9e0,U+b9e2,U+b9e6-b9e7,U+b9e9-b9f3,U+b9f6,U+b9f8,U+b9fb-ba2f}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-46-wght-normal-B8aQM0KO.woff2) format("woff2-variations");unicode-range:U+b8bf-b8cb,U+b8cd-b8e0,U+b8e2-b8e7,U+b8ea-b8eb,U+b8ed-b8ef,U+b8f1-b8f7,U+b8fa,U+b8fc,U+b8fe-b903,U+b905-b917,U+b919-b91f,U+b921-b93b,U+b93d-b957,U+b95a-b95b,U+b95d-b95f,U+b961-b967,U+b969-b96c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-47-wght-normal-CisIuWX8.woff2) format("woff2-variations");unicode-range:U+b80d-b80f,U+b811-b817,U+b81a,U+b81c-b823,U+b826-b827,U+b829-b82b,U+b82d-b833,U+b836,U+b83a-b83f,U+b841-b85b,U+b85e-b85f,U+b861-b863,U+b865-b86b,U+b86e,U+b870,U+b872-b8af,U+b8b1-b8be}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-48-wght-normal-Ds0KCpXR.woff2) format("woff2-variations");unicode-range:U+b74d-b75f,U+b761-b763,U+b765-b774,U+b776-b77b,U+b77e-b77f,U+b781-b783,U+b785-b78b,U+b78e,U+b792-b796,U+b79a-b79b,U+b79d-b7a7,U+b7aa,U+b7ae-b7b3,U+b7b6-b7c8,U+b7ca-b7eb,U+b7ee-b7ef,U+b7f1-b7f3,U+b7f5-b7fb,U+b7fe,U+b802-b806,U+b80a-b80b}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-49-wght-normal-BC5F4RRq.woff2) format("woff2-variations");unicode-range:U+b6a7-b6aa,U+b6ac-b6b0,U+b6b2-b6ef,U+b6f1-b727,U+b72a-b72b,U+b72d-b72e,U+b731-b737,U+b739-b73a,U+b73c-b743,U+b745-b74c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-50-wght-normal-C8Hs8Bel.woff2) format("woff2-variations");unicode-range:U+b605-b60f,U+b612-b617,U+b619-b624,U+b626-b69b,U+b69e-b6a3,U+b6a5-b6a6}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-51-wght-normal-DYiiYWHC.woff2) format("woff2-variations");unicode-range:U+b55f,U+b562-b583,U+b585-b59f,U+b5a2-b5a3,U+b5a5-b5a7,U+b5a9-b5b2,U+b5b5-b5ba,U+b5bd-b604}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-52-wght-normal-RCgHYf1C.woff2) format("woff2-variations");unicode-range:U+b4a5-b4b6,U+b4b8-b4bf,U+b4c1-b4c7,U+b4c9-b4db,U+b4de-b4df,U+b4e1-b4e2,U+b4e5-b4eb,U+b4ee,U+b4f0,U+b4f2-b513,U+b516-b517,U+b519-b51a,U+b51d-b523,U+b526,U+b528,U+b52b-b52f,U+b532-b533,U+b535-b537,U+b539-b53f,U+b541-b544,U+b546-b54b,U+b54d-b54f,U+b551-b55b,U+b55d-b55e}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-53-wght-normal-D_jDj1TO.woff2) format("woff2-variations");unicode-range:U+b3f8-b3fb,U+b3fd-b40f,U+b411-b417,U+b419-b41b,U+b41d-b41f,U+b421-b427,U+b42a-b42b,U+b42d-b44f,U+b452-b453,U+b455-b457,U+b459-b45f,U+b462-b464,U+b466-b46b,U+b46d-b47f,U+b481-b4a3}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-54-wght-normal-Dh8YqAZX.woff2) format("woff2-variations");unicode-range:U+b342-b353,U+b356-b357,U+b359-b35b,U+b35d-b35e,U+b360-b363,U+b366,U+b368,U+b36a-b36d,U+b36f,U+b372-b373,U+b375-b377,U+b379-b37f,U+b381-b382,U+b384,U+b386-b38b,U+b38d-b3c3,U+b3c6-b3c7,U+b3c9-b3ca,U+b3cd-b3d3,U+b3d6,U+b3d8,U+b3da-b3f7}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-55-wght-normal-Bb2kolOu.woff2) format("woff2-variations");unicode-range:U+b27c-b283,U+b285-b28f,U+b292-b293,U+b295-b297,U+b29a-b29f,U+b2a1-b2a4,U+b2a7-b2a9,U+b2ab,U+b2ad-b2c7,U+b2ca-b2cb,U+b2cd-b2cf,U+b2d1-b2d7,U+b2da,U+b2dc,U+b2de-b2e3,U+b2e7,U+b2e9-b2ea,U+b2ef-b2f3,U+b2f6,U+b2f8,U+b2fa-b2fb,U+b2fd-b2fe,U+b302-b303,U+b305-b307,U+b309-b30f,U+b312,U+b316-b31b,U+b31d-b341}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-56-wght-normal-C-IXS01q.woff2) format("woff2-variations");unicode-range:U+b1d6-b1e7,U+b1e9-b1fc,U+b1fe-b203,U+b206-b207,U+b209-b20b,U+b20d-b213,U+b216-b21f,U+b221-b257,U+b259-b273,U+b275-b27b}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-57-wght-normal-B8WEhlXz.woff2) format("woff2-variations");unicode-range:U+b120-b122,U+b126-b127,U+b129-b12b,U+b12d-b133,U+b136,U+b138,U+b13a-b13f,U+b142-b143,U+b145-b14f,U+b151-b153,U+b156-b157,U+b159-b177,U+b17a-b17b,U+b17d-b17f,U+b181-b187,U+b189-b18c,U+b18e-b191,U+b195-b1a7,U+b1a9-b1cb,U+b1cd-b1d5}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-58-wght-normal-CPkb-af3.woff2) format("woff2-variations");unicode-range:U+b05f-b07b,U+b07e-b07f,U+b081-b083,U+b085-b08b,U+b08d-b097,U+b09b,U+b09d-b09f,U+b0a2-b0a7,U+b0aa,U+b0b0,U+b0b2,U+b0b6-b0b7,U+b0b9-b0bb,U+b0bd-b0c3,U+b0c6-b0c7,U+b0ca-b0cf,U+b0d1-b0df,U+b0e1-b0e4,U+b0e6-b107,U+b10a-b10b,U+b10d-b10f,U+b111-b112,U+b114-b117,U+b119-b11a,U+b11c-b11f}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-59-wght-normal-C4laA72l.woff2) format("woff2-variations");unicode-range:U+afac-afb7,U+afba-afbb,U+afbd-afbf,U+afc1-afc6,U+afca-afcc,U+afce-afd3,U+afd5-afe7,U+afe9-afef,U+aff1-b00b,U+b00d-b00f,U+b011-b013,U+b015-b01b,U+b01d-b027,U+b029-b043,U+b045-b047,U+b049,U+b04b,U+b04d-b052,U+b055-b056,U+b058-b05c,U+b05e}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-60-wght-normal-DriWx1rc.woff2) format("woff2-variations");unicode-range:U+af03-af07,U+af09-af2b,U+af2e-af33,U+af35-af3b,U+af3e-af40,U+af44-af47,U+af4a-af5c,U+af5e-af63,U+af65-af7f,U+af81-afab}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-61-wght-normal-C9Nbt4dY.woff2) format("woff2-variations");unicode-range:U+ae56-ae5b,U+ae5e-ae60,U+ae62-ae64,U+ae66-ae67,U+ae69-ae6b,U+ae6d-ae83,U+ae85-aebb,U+aebf,U+aec1-aec3,U+aec5-aecb,U+aece,U+aed0,U+aed2-aed7,U+aed9-aef3,U+aef5-af02}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-62-wght-normal-Brkp78oR.woff2) format("woff2-variations");unicode-range:U+ad9c-ada3,U+ada5-adbf,U+adc1-adc3,U+adc5-adc7,U+adc9-add2,U+add4-addb,U+addd-addf,U+ade1-ade3,U+ade5-adf7,U+adfa-adfb,U+adfd-adff,U+ae02-ae07,U+ae0a,U+ae0c,U+ae0e-ae13,U+ae15-ae2f,U+ae31-ae33,U+ae35-ae37,U+ae39-ae3f,U+ae42,U+ae44,U+ae46-ae49,U+ae4b,U+ae4f,U+ae51-ae53,U+ae55}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-63-wght-normal-Cc2PlhZU.woff2) format("woff2-variations");unicode-range:U+ace2-ace3,U+ace5-ace6,U+ace9-acef,U+acf2,U+acf4,U+acf7-acfb,U+acfe-acff,U+ad01-ad03,U+ad05-ad0b,U+ad0d-ad10,U+ad12-ad1b,U+ad1d-ad33,U+ad35-ad48,U+ad4a-ad4f,U+ad51-ad6b,U+ad6e-ad6f,U+ad71-ad72,U+ad77-ad7c,U+ad7e,U+ad80,U+ad82-ad87,U+ad89-ad8b,U+ad8d-ad8f,U+ad91-ad9b}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-64-wght-normal-KNqhDR8m.woff2) format("woff2-variations");unicode-range:U+ac25-ac2c,U+ac2e,U+ac30,U+ac32-ac37,U+ac39-ac3f,U+ac41-ac4c,U+ac4e-ac6f,U+ac72-ac73,U+ac75-ac76,U+ac79-ac7f,U+ac82,U+ac84-ac88,U+ac8a-ac8b,U+ac8d-ac8f,U+ac91-ac93,U+ac95-ac9b,U+ac9d-ac9e,U+aca1-aca7,U+acab,U+acad-acaf,U+acb1-acb7,U+acba-acbb,U+acbe-acc0,U+acc2-acc3,U+acc5-acdf}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-65-wght-normal-FHC1ZHx-.woff2) format("woff2-variations");unicode-range:U+99df,U+99ed,U+99f1,U+99ff,U+9a01,U+9a08,U+9a0e-9a0f,U+9a19,U+9a2b,U+9a30,U+9a36-9a37,U+9a40,U+9a43,U+9a45,U+9a4d,U+9a55,U+9a57,U+9a5a-9a5b,U+9a5f,U+9a62,U+9a65,U+9a69-9a6a,U+9aa8,U+9ab8,U+9ad3,U+9ae5,U+9aee,U+9b1a,U+9b27,U+9b2a,U+9b31,U+9b3c,U+9b41-9b45,U+9b4f,U+9b54,U+9b5a,U+9b6f,U+9b8e,U+9b91,U+9b9f,U+9bab,U+9bae,U+9bc9,U+9bd6,U+9be4,U+9be8,U+9c0d,U+9c10,U+9c12,U+9c15,U+9c25,U+9c32,U+9c3b,U+9c47,U+9c49,U+9c57,U+9ce5,U+9ce7,U+9ce9,U+9cf3-9cf4,U+9cf6,U+9d09,U+9d1b,U+9d26,U+9d28,U+9d3b,U+9d51,U+9d5d,U+9d60-9d61,U+9d6c,U+9d72,U+9da9,U+9daf,U+9db4,U+9dc4,U+9dd7,U+9df2,U+9df8-9dfa,U+9e1a,U+9e1e,U+9e75,U+9e79,U+9e7d,U+9e7f,U+9e92-9e93,U+9e97,U+9e9d,U+9e9f,U+9ea5,U+9eb4-9eb5,U+9ebb,U+9ebe,U+9ec3,U+9ecd-9ece,U+9ed4,U+9ed8,U+9edb-9edc,U+9ede,U+9ee8,U+9ef4,U+9f07-9f08,U+9f0e,U+9f13,U+9f20,U+9f3b,U+9f4a-9f4b,U+9f4e,U+9f52,U+9f5f,U+9f61,U+9f67,U+9f6a,U+9f6c,U+9f77,U+9f8d,U+9f90,U+9f95,U+9f9c,U+ac02-ac03,U+ac05-ac06,U+ac09-ac0f,U+ac17-ac18,U+ac1b,U+ac1e-ac1f,U+ac21-ac23}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-66-wght-normal-IxdJCmlc.woff2) format("woff2-variations");unicode-range:U+96a7-96a8,U+96aa,U+96b1,U+96b7,U+96bb,U+96c0-96c1,U+96c4-96c5,U+96c7,U+96c9,U+96cb-96ce,U+96d5-96d6,U+96d9,U+96db-96dc,U+96e2-96e3,U+96e8-96ea,U+96ef-96f0,U+96f2,U+96f6-96f7,U+96f9,U+96fb,U+9700,U+9706-9707,U+9711,U+9713,U+9716,U+9719,U+971c,U+971e,U+9727,U+9730,U+9732,U+9739,U+973d,U+9742,U+9744,U+9748,U+9756,U+975c,U+9761,U+9769,U+976d,U+9774,U+9777,U+977a,U+978b,U+978d,U+978f,U+97a0,U+97a8,U+97ab,U+97ad,U+97c6,U+97cb,U+97dc,U+97f6,U+97fb,U+97ff-9803,U+9805-9806,U+9808,U+980a,U+980c,U+9810-9813,U+9817-9818,U+982d,U+9830,U+9838-9839,U+983b,U+9846,U+984c-984e,U+9854,U+9858,U+985a,U+985e,U+9865,U+9867,U+986b,U+986f,U+98af,U+98b1,U+98c4,U+98c7,U+98db-98dc,U+98e1-98e2,U+98ed-98ef,U+98f4,U+98fc-98fe,U+9903,U+9909-990a,U+990c,U+9910,U+9913,U+9918,U+991e,U+9920,U+9928,U+9945,U+9949,U+994b-994d,U+9951-9952,U+9954,U+9957,U+9996,U+999d,U+99a5,U+99a8,U+99ac-99ae,U+99b1,U+99b3-99b4,U+99b9,U+99c1,U+99d0-99d2,U+99d5,U+99d9,U+99dd}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-67-wght-normal-CWhGYJ2i.woff2) format("woff2-variations");unicode-range:U+920d,U+9210-9212,U+9217,U+921e,U+9234,U+923a,U+923f-9240,U+9245,U+9249,U+9257,U+925b,U+925e,U+9262,U+9264-9266,U+9283,U+9285,U+9291,U+9293,U+9296,U+9298,U+929c,U+92b3,U+92b6-92b7,U+92b9,U+92cc,U+92cf,U+92d2,U+92e4,U+92ea,U+92f8,U+92fc,U+9304,U+9310,U+9318,U+931a,U+931e-9322,U+9324,U+9326,U+9328,U+932b,U+932e-932f,U+9348,U+934a-934b,U+934d,U+9354,U+935b,U+936e,U+9375,U+937c,U+937e,U+938c,U+9394,U+9396,U+939a,U+93a3,U+93a7,U+93ac-93ad,U+93b0,U+93c3,U+93d1,U+93de,U+93e1,U+93e4,U+93f6,U+9404,U+9418,U+9425,U+942b,U+9435,U+9438,U+9444,U+9451-9452,U+945b,U+947d,U+947f,U+9583,U+9589,U+958f,U+9591-9592,U+9594,U+9598,U+95a3-95a5,U+95a8,U+95ad,U+95b1,U+95bb-95bc,U+95c7,U+95ca,U+95d4-95d6,U+95dc,U+95e1-95e2,U+961c,U+9621,U+962a,U+962e,U+9632,U+963b,U+963f-9640,U+9642,U+9644,U+964b-964d,U+9650,U+965b-965f,U+9662-9664,U+966a,U+9670,U+9673,U+9675-9678,U+967d,U+9685-9686,U+968a-968b,U+968d-968e,U+9694-9695,U+9698-9699,U+969b-969c,U+96a3}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-68-wght-normal-BrksQ5yZ.woff2) format("woff2-variations");unicode-range:U+8fa8,U+8fad,U+8faf-8fb2,U+8fc2,U+8fc5,U+8fce,U+8fd4,U+8fe6,U+8fea-8feb,U+8fed,U+8ff0,U+8ff2,U+8ff7,U+8ff9,U+8ffd,U+9000-9003,U+9005-9006,U+9008,U+900b,U+900d,U+900f-9011,U+9014-9015,U+9017,U+9019,U+901d-9023,U+902e,U+9031-9032,U+9035,U+9038,U+903c,U+903e,U+9041-9042,U+9047,U+904a-904b,U+904d-904e,U+9050-9051,U+9054-9055,U+9059,U+905c-905e,U+9060-9061,U+9063,U+9069,U+906d-906f,U+9072,U+9075,U+9077-9078,U+907a,U+907c-907d,U+907f-9084,U+9087-9088,U+908a,U+908f,U+9091,U+9095,U+9099,U+90a2-90a3,U+90a6,U+90a8,U+90aa,U+90af-90b1,U+90b5,U+90b8,U+90c1,U+90ca,U+90de,U+90e1,U+90ed,U+90f5,U+9102,U+9112,U+9115,U+9119,U+9127,U+912d,U+9132,U+9149-914e,U+9152,U+9162,U+9169-916a,U+916c,U+9175,U+9177-9178,U+9187,U+9189,U+918b,U+918d,U+9192,U+919c,U+91ab-91ac,U+91ae-91af,U+91b1,U+91b4-91b5,U+91c0,U+91c7,U+91c9,U+91cb,U+91cf-91d0,U+91d7-91d8,U+91dc-91dd,U+91e3,U+91e7,U+91ea,U+91f5}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-69-wght-normal-BReeBVHk.woff2) format("woff2-variations");unicode-range:U+8c6a-8c6b,U+8c79-8c7a,U+8c82,U+8c8a,U+8c8c,U+8c9d-8c9e,U+8ca0-8ca2,U+8ca7-8cac,U+8caf-8cb0,U+8cb3-8cb4,U+8cb6-8cb8,U+8cbb-8cbd,U+8cbf-8cc4,U+8cc7-8cc8,U+8cca,U+8cd1,U+8cd3,U+8cda,U+8cdc,U+8cde,U+8ce0,U+8ce2-8ce4,U+8ce6,U+8cea,U+8ced,U+8cf4,U+8cfb-8cfd,U+8d04-8d05,U+8d07-8d08,U+8d0a,U+8d0d,U+8d13,U+8d16,U+8d64,U+8d66,U+8d6b,U+8d70,U+8d73-8d74,U+8d77,U+8d85,U+8d8a,U+8d99,U+8da3,U+8da8,U+8db3,U+8dba,U+8dbe,U+8dc6,U+8dcb-8dcc,U+8dcf,U+8ddb,U+8ddd,U+8de1,U+8de3,U+8de8,U+8df3,U+8e0a,U+8e0f-8e10,U+8e1e,U+8e2a,U+8e30,U+8e35,U+8e42,U+8e44,U+8e47-8e4a,U+8e59,U+8e5f-8e60,U+8e74,U+8e76,U+8e81,U+8e87,U+8e8a,U+8e8d,U+8eaa-8eac,U+8ec0,U+8ecb-8ecc,U+8ed2,U+8edf,U+8eeb,U+8ef8,U+8efb,U+8efe,U+8f03,U+8f05,U+8f09,U+8f12-8f15,U+8f1b-8f1f,U+8f26-8f27,U+8f29-8f2a,U+8f2f,U+8f33,U+8f38-8f39,U+8f3b,U+8f3e-8f3f,U+8f44-8f45,U+8f49,U+8f4d-8f4e,U+8f5d,U+8f5f,U+8f62,U+8f9b-8f9c,U+8fa3,U+8fa6}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-70-wght-normal-BSMUUut2.woff2) format("woff2-variations");unicode-range:U+8941,U+8944,U+895f,U+8964,U+896a,U+8972,U+8981,U+8983,U+8986-8987,U+898f,U+8993,U+8996,U+89a1,U+89a9-89aa,U+89b2,U+89ba,U+89bd,U+89c0,U+89d2,U+89e3,U+89f4,U+89f8,U+8a02-8a03,U+8a08,U+8a0a,U+8a0c,U+8a0e,U+8a13,U+8a16-8a17,U+8a1b,U+8a1d,U+8a1f,U+8a23,U+8a25,U+8a2a,U+8a2d,U+8a31,U+8a34,U+8a36,U+8a3a-8a3b,U+8a50,U+8a54-8a55,U+8a5b,U+8a5e,U+8a60,U+8a62-8a63,U+8a66,U+8a6d-8a6e,U+8a70,U+8a72-8a73,U+8a75,U+8a79,U+8a85,U+8a87,U+8a8c-8a8d,U+8a93,U+8a95,U+8a98,U+8aa0-8aa1,U+8aa3-8aa6,U+8aa8,U+8aaa,U+8ab0,U+8ab2,U+8ab9,U+8abc,U+8abe-8abf,U+8ac2,U+8ac4,U+8ac7,U+8acb,U+8acd,U+8acf,U+8ad2,U+8ad6,U+8adb-8adc,U+8ae1,U+8ae6-8ae7,U+8aea-8aeb,U+8aed-8aee,U+8af1,U+8af6-8af8,U+8afa,U+8afe,U+8b00-8b02,U+8b04,U+8b0e,U+8b10,U+8b14,U+8b16-8b17,U+8b19-8b1b,U+8b1d,U+8b20,U+8b28,U+8b2b-8b2c,U+8b33,U+8b39,U+8b41,U+8b49,U+8b4e-8b4f,U+8b58,U+8b5a,U+8b5c,U+8b66,U+8b6c,U+8b6f-8b70,U+8b74,U+8b77,U+8b7d,U+8b80,U+8b8a,U+8b90,U+8b92-8b93,U+8b96,U+8b9a,U+8c37,U+8c3f,U+8c41,U+8c46,U+8c48,U+8c4a,U+8c4c,U+8c55,U+8c5a,U+8c61}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-71-wght-normal-D9VPS-IJ.woff2) format("woff2-variations");unicode-range:U+858f,U+8591,U+8594,U+859b,U+85a6,U+85a8-85aa,U+85af-85b0,U+85ba,U+85c1,U+85c9,U+85cd-85cf,U+85d5,U+85dc-85dd,U+85e4-85e5,U+85e9-85ea,U+85f7,U+85fa-85fb,U+85ff,U+8602,U+8606-8607,U+860a,U+8616-8617,U+861a,U+862d,U+863f,U+864e,U+8650,U+8654-8655,U+865b-865c,U+865e-865f,U+8667,U+8679,U+868a,U+868c,U+8693,U+86a3-86a4,U+86a9,U+86c7,U+86cb,U+86d4,U+86d9,U+86db,U+86df,U+86e4,U+86ed,U+86fe,U+8700,U+8702-8703,U+8708,U+8718,U+871a,U+871c,U+874e,U+8755,U+8757,U+875f,U+8766,U+8768,U+8774,U+8776,U+8778,U+8782,U+878d,U+879f,U+87a2,U+87b3,U+87ba,U+87c4,U+87e0,U+87ec,U+87ef,U+87f2,U+87f9,U+87fb,U+87fe,U+8805,U+881f,U+8822-8823,U+8831,U+8836,U+883b,U+8840,U+8846,U+884d,U+8852-8853,U+8857,U+8859,U+885b,U+885d,U+8861-8863,U+8868,U+886b,U+8870,U+8872,U+8877,U+887e-887f,U+8881-8882,U+8888,U+888b,U+888d,U+8892,U+8896-8897,U+889e,U+88ab,U+88b4,U+88c1-88c2,U+88cf,U+88d4-88d5,U+88d9,U+88dc-88dd,U+88df,U+88e1,U+88e8,U+88f3-88f5,U+88f8,U+88fd,U+8907,U+8910,U+8912-8913,U+8918-8919,U+8925,U+892a,U+8936,U+8938,U+893b}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-72-wght-normal-CYbqUrRD.woff2) format("woff2-variations");unicode-range:U+82a6,U+82a9,U+82ac-82af,U+82b3,U+82b7-82b9,U+82bb-82bd,U+82bf,U+82d1-82d2,U+82d4-82d5,U+82d7,U+82db,U+82de-82df,U+82e1,U+82e5-82e7,U+82fd-82fe,U+8301-8305,U+8309,U+8317,U+8328,U+832b,U+832f,U+8331,U+8334-8336,U+8338-8339,U+8340,U+8347,U+8349-834a,U+834f,U+8351-8352,U+8373,U+8377,U+837b,U+8389-838a,U+838e,U+8396,U+8398,U+839e,U+83a2,U+83a9-83ab,U+83bd,U+83c1,U+83c5,U+83c9-83ca,U+83cc,U+83d3,U+83d6,U+83dc,U+83e9,U+83eb,U+83ef-83f2,U+83f4,U+83f9,U+83fd,U+8403-8404,U+840a,U+840c-840e,U+8429,U+842c,U+8431,U+8438,U+843d,U+8449,U+8457,U+845b,U+8461,U+8463,U+8466,U+846b-846c,U+846f,U+8475,U+847a,U+8490,U+8494,U+8499,U+849c,U+84a1,U+84b2,U+84b8,U+84bb-84bc,U+84bf-84c0,U+84c2,U+84c4,U+84c6,U+84c9,U+84cb,U+84cd,U+84d1,U+84da,U+84ec,U+84ee,U+84f4,U+84fc,U+8511,U+8513-8514,U+8517-8518,U+851a,U+851e,U+8521,U+8523,U+8525,U+852c-852d,U+852f,U+853d,U+853f,U+8541,U+8543,U+8549,U+854e,U+8553,U+8559,U+8563,U+8568-856a,U+856d,U+8584,U+8587}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-73-wght-normal-Dq-lIKz-.woff2) format("woff2-variations");unicode-range:U+8033,U+8036,U+803d,U+803f,U+8043,U+8046,U+804a,U+8056,U+8058,U+805a,U+805e,U+806f-8070,U+8072-8073,U+8077,U+807d-807f,U+8084-8087,U+8089,U+808b-808c,U+8096,U+809b,U+809d,U+80a1-80a2,U+80a5,U+80a9-80aa,U+80af,U+80b1-80b2,U+80b4,U+80ba,U+80c3-80c4,U+80cc,U+80ce,U+80da-80db,U+80de,U+80e1,U+80e4-80e5,U+80f1,U+80f4,U+80f8,U+80fd,U+8102,U+8105-8108,U+810a,U+8118,U+811a-811b,U+8123,U+8129,U+812b,U+812f,U+8139,U+813e,U+814b,U+814e,U+8150-8151,U+8154-8155,U+8165-8166,U+816b,U+8170-8171,U+8178-817a,U+817f-8180,U+8188,U+818a,U+818f,U+819a,U+819c-819d,U+81a0,U+81a3,U+81a8,U+81b3,U+81b5,U+81ba,U+81bd-81c0,U+81c2,U+81c6,U+81cd,U+81d8,U+81df,U+81e3,U+81e5,U+81e7-81e8,U+81ed,U+81f3-81f4,U+81fa-81fc,U+81fe,U+8205,U+8208,U+820a,U+820c-820d,U+8212,U+821b-821c,U+821e-821f,U+8221,U+822a-822c,U+8235-8237,U+8239,U+8240,U+8245,U+8247,U+8259,U+8264,U+8266,U+826e-826f,U+8271,U+8276,U+8278,U+827e,U+828b,U+828d-828e,U+8292,U+8299-829a,U+829d,U+829f,U+82a5}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-74-wght-normal-Dsmj0w4F.woff2) format("woff2-variations");unicode-range:U+7d2f-7d30,U+7d33,U+7d35,U+7d39-7d3a,U+7d42-7d46,U+7d50,U+7d5e,U+7d61-7d62,U+7d66,U+7d68,U+7d6a,U+7d6e,U+7d71-7d73,U+7d76,U+7d79,U+7d7f,U+7d8e-7d8f,U+7d93,U+7d9c,U+7da0,U+7da2,U+7dac-7dad,U+7db1-7db2,U+7db4-7db5,U+7db8,U+7dba-7dbb,U+7dbd-7dbf,U+7dc7,U+7dca-7dcb,U+7dd6,U+7dd8,U+7dda,U+7ddd-7dde,U+7de0-7de1,U+7de3,U+7de8-7de9,U+7dec,U+7def,U+7df4,U+7dfb,U+7e09-7e0a,U+7e15,U+7e1b,U+7e1d-7e1f,U+7e21,U+7e23,U+7e2b,U+7e2e-7e2f,U+7e31,U+7e37,U+7e3d-7e3e,U+7e43,U+7e46-7e47,U+7e52,U+7e54-7e55,U+7e5e,U+7e61,U+7e69-7e6b,U+7e6d,U+7e70,U+7e79,U+7e7c,U+7e82,U+7e8c,U+7e8f,U+7e93,U+7e96,U+7e98,U+7e9b-7e9c,U+7f36,U+7f38,U+7f3a,U+7f4c,U+7f50,U+7f54-7f55,U+7f6a-7f6b,U+7f6e,U+7f70,U+7f72,U+7f75,U+7f77,U+7f79,U+7f85,U+7f88,U+7f8a,U+7f8c,U+7f94,U+7f9a,U+7f9e,U+7fa4,U+7fa8-7fa9,U+7fb2,U+7fb8-7fb9,U+7fbd,U+7fc1,U+7fc5,U+7fca,U+7fcc,U+7fce,U+7fd2,U+7fd4-7fd5,U+7fdf-7fe1,U+7fe9,U+7feb,U+7ff0,U+7ff9,U+7ffc,U+8000-8001,U+8003,U+8006,U+8009,U+800c,U+8010,U+8015,U+8017-8018,U+802d}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-75-wght-normal-JM9JBG-M.woff2) format("woff2-variations");unicode-range:U+7a49,U+7a4d-7a4e,U+7a57,U+7a61-7a62,U+7a69,U+7a6b,U+7a70,U+7a74,U+7a76,U+7a79,U+7a7d,U+7a7f,U+7a81,U+7a84,U+7a88,U+7a92-7a93,U+7a95,U+7a98,U+7a9f,U+7aa9-7aaa,U+7aae-7aaf,U+7aba,U+7ac4-7ac5,U+7ac7,U+7aca,U+7ad7,U+7ad9,U+7add,U+7adf-7ae0,U+7ae3,U+7ae5,U+7aea,U+7aed,U+7aef,U+7af6,U+7af9-7afa,U+7aff,U+7b0f,U+7b11,U+7b19,U+7b1b,U+7b1e,U+7b20,U+7b26,U+7b2d,U+7b39,U+7b46,U+7b49,U+7b4b-7b4d,U+7b4f-7b52,U+7b54,U+7b56,U+7b60,U+7b6c,U+7b6e,U+7b75,U+7b7d,U+7b87,U+7b8b,U+7b8f,U+7b94-7b95,U+7b97,U+7b9a,U+7b9d,U+7ba1,U+7bad,U+7bb1,U+7bb4,U+7bb8,U+7bc0-7bc1,U+7bc4,U+7bc6-7bc7,U+7bc9,U+7bd2,U+7be0,U+7be4,U+7be9,U+7c07,U+7c12,U+7c1e,U+7c21,U+7c27,U+7c2a-7c2b,U+7c3d-7c3f,U+7c43,U+7c4c-7c4d,U+7c60,U+7c64,U+7c6c,U+7c73,U+7c83,U+7c89,U+7c92,U+7c95,U+7c97-7c98,U+7c9f,U+7ca5,U+7ca7,U+7cae,U+7cb1-7cb3,U+7cb9,U+7cbe,U+7cca,U+7cd6,U+7cde-7ce0,U+7ce7,U+7cfb,U+7cfe,U+7d00,U+7d02,U+7d04-7d08,U+7d0a-7d0b,U+7d0d,U+7d10,U+7d14,U+7d17-7d1b,U+7d20-7d21,U+7d2b-7d2c,U+7d2e}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-76-wght-normal-BRcUMWZ8.woff2) format("woff2-variations");unicode-range:U+7704,U+7708-7709,U+770b,U+771e,U+7720,U+7729,U+7737-7738,U+773a,U+773c,U+7740,U+774d,U+775b,U+7761,U+7763,U+7766,U+776b,U+7779,U+777e-777f,U+778b,U+7791,U+779e,U+77a5,U+77ac-77ad,U+77b0,U+77b3,U+77bb-77bc,U+77bf,U+77d7,U+77db-77dc,U+77e2-77e3,U+77e9,U+77ed-77ef,U+7802,U+7812,U+7825-7827,U+782c,U+7832,U+7834,U+7845,U+784f,U+785d,U+786b-786c,U+786f,U+787c,U+7881,U+7887,U+788c-788e,U+7891,U+7897,U+78a3,U+78a7,U+78a9,U+78ba-78bc,U+78c1,U+78c5,U+78ca-78cb,U+78ce,U+78d0,U+78e8,U+78ec,U+78ef,U+78f5,U+78fb,U+7901,U+790e,U+7916,U+792a-792c,U+793a,U+7940-7941,U+7947-7949,U+7950,U+7956-7957,U+795a-795d,U+7960,U+7965,U+7968,U+796d,U+797a,U+797f,U+7981,U+798d-798e,U+7991,U+79a6-79a7,U+79aa,U+79ae,U+79b1,U+79b3,U+79b9,U+79bd-79c1,U+79c9-79cb,U+79d2,U+79d5,U+79d8,U+79df,U+79e4,U+79e6-79e7,U+79e9,U+79fb,U+7a00,U+7a05,U+7a08,U+7a0b,U+7a0d,U+7a14,U+7a17,U+7a19-7a1a,U+7a1c,U+7a1f-7a20,U+7a2e,U+7a31,U+7a36-7a37,U+7a3b-7a3d,U+7a3f-7a40,U+7a46}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-77-wght-normal-q_AHRG0H.woff2) format("woff2-variations");unicode-range:U+7482-7483,U+7487,U+7489,U+748b,U+7498,U+749c,U+749e-749f,U+74a1,U+74a3,U+74a5,U+74a7-74a8,U+74aa,U+74b0,U+74b2,U+74b5,U+74b9,U+74bd,U+74bf,U+74c6,U+74ca,U+74cf,U+74d4,U+74d8,U+74da,U+74dc,U+74e0,U+74e2-74e3,U+74e6,U+74ee,U+74f7,U+7501,U+7504,U+7511,U+7515,U+7518,U+751a-751b,U+7523,U+7525-7526,U+752b-752c,U+7531,U+7533,U+7538,U+753a,U+7547,U+754c,U+754f,U+7551,U+7553-7554,U+7559,U+755b-755d,U+7562,U+7565-7566,U+756a,U+756f-7570,U+7575-7576,U+7578,U+757a,U+757f,U+7586-7587,U+758a-758b,U+758e-758f,U+7591,U+759d,U+75a5,U+75ab,U+75b1-75b3,U+75b5,U+75b8-75b9,U+75bc-75be,U+75c2,U+75c5,U+75c7,U+75cd,U+75d2,U+75d4-75d5,U+75d8-75d9,U+75db,U+75e2,U+75f0,U+75f2,U+75f4,U+75fa,U+75fc,U+7600,U+760d,U+7619,U+761f-7622,U+7624,U+7626,U+763b,U+7642,U+764c,U+764e,U+7652,U+7656,U+7661,U+7664,U+7669,U+766c,U+7670,U+7672,U+7678,U+7686-7687,U+768e,U+7690,U+7693,U+76ae,U+76ba,U+76bf,U+76c2-76c3,U+76c6,U+76c8,U+76ca,U+76d2,U+76d6,U+76db-76dc,U+76de-76df,U+76e1,U+76e3-76e4,U+76e7,U+76f2,U+76fc,U+76fe,U+7701}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-78-wght-normal-CxH4Pb6I.woff2) format("woff2-variations");unicode-range:U+7230,U+7232,U+7235,U+723a-723b,U+723d-723e,U+7240,U+7246-7248,U+724c,U+7252,U+7258-7259,U+725b,U+725d,U+725f,U+7261-7262,U+7267,U+7272,U+727d,U+7280-7281,U+72a2,U+72a7,U+72ac,U+72af,U+72c0,U+72c2,U+72c4,U+72ce,U+72d0,U+72d7,U+72d9,U+72e1,U+72e9,U+72f8-72f9,U+72fc-72fd,U+730a,U+7316,U+731b-731d,U+7325,U+7329-732b,U+7336-7337,U+733e-733f,U+7344-7345,U+7350,U+7352,U+7357,U+7368,U+736a,U+7370,U+7372,U+7375,U+7378,U+737a-737b,U+7384,U+7386-7387,U+7389,U+738e,U+7394,U+7396-7398,U+739f,U+73a7,U+73a9,U+73ad,U+73b2-73b3,U+73b9,U+73c0,U+73c2,U+73c9-73ca,U+73cc-73cd,U+73cf,U+73d6,U+73d9,U+73dd-73de,U+73e0,U+73e3-73e6,U+73e9-73ea,U+73ed,U+73f7,U+73f9,U+73fd-73fe,U+7401,U+7403,U+7405,U+7407,U+7409,U+7413,U+741b,U+7420-7422,U+7425-7426,U+7428,U+742a-742c,U+742e-7430,U+7433-7436,U+7438,U+743a,U+743f-7441,U+7443-7444,U+744b,U+7455,U+7457,U+7459-745c,U+745e-7460,U+7462,U+7464-7465,U+7468-746a,U+746f,U+747e}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-79-wght-normal-Bdi4I7EA.woff2) format("woff2-variations");unicode-range:U+6f8d-6f8e,U+6f90,U+6f94,U+6f97,U+6fa3-6fa4,U+6fa7,U+6fae-6faf,U+6fb1,U+6fb3,U+6fb9,U+6fbe,U+6fc0-6fc3,U+6fca,U+6fd5,U+6fda,U+6fdf-6fe1,U+6fe4,U+6fe9,U+6feb-6fec,U+6fef,U+6ff1,U+6ffe,U+7001,U+7005-7006,U+7009,U+700b,U+700f,U+7011,U+7015,U+7018,U+701a-701f,U+7023,U+7027-7028,U+702f,U+7037,U+703e,U+704c,U+7050-7051,U+7058,U+705d,U+7070,U+7078,U+707c-707d,U+7085,U+708a,U+708e,U+7092,U+7098-709a,U+70a1,U+70a4,U+70ab-70ad,U+70af,U+70b3,U+70b7-70b9,U+70c8,U+70cb,U+70cf,U+70d8-70d9,U+70dd,U+70df,U+70f1,U+70f9,U+70fd,U+7104,U+7109,U+710c,U+7119-711a,U+711e,U+7126,U+7130,U+7136,U+7147,U+7149-714a,U+714c,U+714e,U+7150,U+7156,U+7159,U+715c,U+715e,U+7164-7167,U+7169,U+716c,U+716e,U+717d,U+7184,U+7189-718a,U+718f,U+7192,U+7194,U+7199,U+719f,U+71a2,U+71ac,U+71b1,U+71b9-71ba,U+71be,U+71c1,U+71c3,U+71c8-71c9,U+71ce,U+71d0,U+71d2,U+71d4-71d5,U+71df,U+71e5-71e7,U+71ed-71ee,U+71fb-71fc,U+71fe-7200,U+7206,U+7210,U+721b,U+722a,U+722c-722d}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-80-wght-normal-C5D21FTw.woff2) format("woff2-variations");unicode-range:U+6d5a,U+6d5c,U+6d63,U+6d66,U+6d69-6d6a,U+6d6c,U+6d6e,U+6d74,U+6d78-6d79,U+6d7f,U+6d85,U+6d87-6d89,U+6d8c-6d8e,U+6d91,U+6d93,U+6d95,U+6daf,U+6db2,U+6db5,U+6dc0,U+6dc3-6dc7,U+6dcb,U+6dcf,U+6dd1,U+6dd8-6dda,U+6dde,U+6de1,U+6de8,U+6dea-6deb,U+6dee,U+6df1,U+6df3,U+6df5,U+6df7-6dfb,U+6e17,U+6e19-6e1b,U+6e1f-6e21,U+6e23-6e26,U+6e2b-6e2d,U+6e32,U+6e34,U+6e36,U+6e38,U+6e3a,U+6e3c-6e3e,U+6e43-6e44,U+6e4a,U+6e4d,U+6e56,U+6e58,U+6e5b-6e5c,U+6e5e-6e5f,U+6e67,U+6e6b,U+6e6e-6e6f,U+6e72-6e73,U+6e7a,U+6e90,U+6e96,U+6e9c-6e9d,U+6e9f,U+6ea2,U+6ea5,U+6eaa-6eab,U+6eaf,U+6eb1,U+6eb6,U+6eba,U+6ec2,U+6ec4-6ec5,U+6ec9,U+6ecb-6ecc,U+6ece,U+6ed1,U+6ed3-6ed4,U+6eef,U+6ef4,U+6ef8,U+6efe-6eff,U+6f01-6f02,U+6f06,U+6f0f,U+6f11,U+6f14-6f15,U+6f20,U+6f22-6f23,U+6f2b-6f2c,U+6f31-6f32,U+6f38,U+6f3f,U+6f41,U+6f51,U+6f54,U+6f57-6f58,U+6f5a-6f5b,U+6f5e-6f5f,U+6f62,U+6f64,U+6f6d-6f6e,U+6f70,U+6f7a,U+6f7c-6f7e,U+6f81,U+6f84,U+6f88}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-81-wght-normal-DZCTVH03.woff2) format("woff2-variations");unicode-range:U+6ada-6adb,U+6af6,U+6afb,U+6b04,U+6b0a,U+6b0c,U+6b12,U+6b16,U+6b20-6b21,U+6b23,U+6b32,U+6b3a,U+6b3d-6b3e,U+6b46-6b47,U+6b4e,U+6b50,U+6b5f,U+6b61-6b62,U+6b64-6b66,U+6b6a,U+6b72,U+6b77-6b78,U+6b7b,U+6b7f,U+6b83-6b84,U+6b86,U+6b89-6b8a,U+6b96,U+6b98,U+6b9e,U+6bae-6baf,U+6bb2,U+6bb5,U+6bb7,U+6bba,U+6bbc,U+6bbf,U+6bc1,U+6bc5-6bc6,U+6bcb,U+6bcf,U+6bd2-6bd3,U+6bd6-6bd8,U+6bdb,U+6beb-6bec,U+6c08,U+6c0f,U+6c13,U+6c23,U+6c37-6c38,U+6c3e,U+6c40-6c42,U+6c4e,U+6c50,U+6c55,U+6c57,U+6c5a,U+6c5d-6c60,U+6c68,U+6c6a,U+6c6d,U+6c70,U+6c72,U+6c76,U+6c7a,U+6c7d-6c7e,U+6c81-6c83,U+6c85-6c88,U+6c8c,U+6c90,U+6c92-6c96,U+6c99-6c9b,U+6cab,U+6cae,U+6cb3,U+6cb8-6cb9,U+6cbb-6cbf,U+6cc1-6cc2,U+6cc4,U+6cc9-6cca,U+6ccc,U+6cd3,U+6cd7,U+6cdb,U+6ce1-6ce3,U+6ce5,U+6ce8,U+6ceb,U+6cee-6cf0,U+6cf3,U+6d0b-6d0c,U+6d11,U+6d17,U+6d19,U+6d1b,U+6d1e,U+6d25,U+6d27,U+6d29,U+6d32,U+6d35-6d36,U+6d38-6d39,U+6d3b,U+6d3d-6d3e,U+6d41,U+6d59}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-82-wght-normal-CJo3UUYg.woff2) format("woff2-variations");unicode-range:U+67f0-67f1,U+67f3-67f6,U+67fb,U+67fe,U+6812-6813,U+6816-6817,U+6821-6822,U+682f,U+6838-6839,U+683d,U+6840-6843,U+6848,U+684e,U+6850-6851,U+6853-6854,U+686d,U+6876,U+687f,U+6881,U+6885,U+688f,U+6893-6894,U+6897,U+689d,U+689f,U+68a1-68a2,U+68a7-68a8,U+68ad,U+68af-68b1,U+68b3,U+68b5-68b6,U+68c4-68c5,U+68c9,U+68cb,U+68cd,U+68d2,U+68d5,U+68d7-68d8,U+68da,U+68df-68e0,U+68e7-68e8,U+68ee,U+68f2,U+68f9-68fa,U+6900,U+6905,U+690d-690e,U+6912,U+6927,U+6930,U+693d,U+693f,U+694a,U+6953-6955,U+6957,U+6959-695a,U+695e,U+6960-6963,U+6968,U+696b,U+696d-696f,U+6975,U+6977-6979,U+6995,U+699b-699c,U+69a5,U+69a7,U+69ae,U+69b4,U+69bb,U+69c1,U+69c3,U+69cb-69cd,U+69d0,U+69e8,U+69ea,U+69fb,U+69fd,U+69ff,U+6a02,U+6a0a,U+6a11,U+6a13,U+6a17,U+6a19,U+6a1e-6a1f,U+6a21,U+6a23,U+6a35,U+6a38-6a3a,U+6a3d,U+6a44,U+6a48,U+6a4b,U+6a52-6a53,U+6a58-6a59,U+6a5f,U+6a61,U+6a6b,U+6a80,U+6a84,U+6a89,U+6a8d-6a8e,U+6a97,U+6a9c,U+6aa3,U+6ab3,U+6abb,U+6ac2-6ac3,U+6ad3}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-83-wght-normal-McHuBf-B.woff2) format("woff2-variations");unicode-range:U+6607,U+6609-660a,U+660c,U+660f-6611,U+6613-6615,U+661e,U+6620,U+6627-6628,U+662d,U+6630-6631,U+6634,U+6636,U+663a-663b,U+6641,U+6643-6644,U+6649,U+664b,U+664f,U+6659,U+665b,U+665d-665f,U+6664-6669,U+666b,U+666e-666f,U+6673-6674,U+6676-6678,U+6684,U+6687-6689,U+668e,U+6690-6691,U+6696-6698,U+669d,U+66a0,U+66a2,U+66ab,U+66ae,U+66b2-66b4,U+66b9,U+66bb,U+66be,U+66c4,U+66c6-66c7,U+66c9,U+66d6,U+66d9,U+66dc-66dd,U+66e0,U+66e6,U+66f0,U+66f2-66f4,U+66f7,U+66f9-66fa,U+66fc,U+66fe-66ff,U+6703,U+670b,U+670d,U+6714-6715,U+6717,U+671b,U+671d-671f,U+6726-6727,U+672a-672b,U+672d-672e,U+6731,U+6736,U+673a,U+673d,U+6746,U+6749,U+674e-6751,U+6753,U+6756,U+675c,U+675e-675f,U+676d,U+676f-6770,U+6773,U+6775,U+6777,U+677b,U+677e-677f,U+6787,U+6789,U+678b,U+678f-6790,U+6793,U+6795,U+679a,U+679d,U+67af-67b0,U+67b3,U+67b6-67b8,U+67be,U+67c4,U+67cf-67d4,U+67da,U+67dd,U+67e9,U+67ec,U+67ef}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-84-wght-normal-DLV_AXtC.woff2) format("woff2-variations");unicode-range:U+6392,U+6396,U+6398,U+639b,U+63a0-63a2,U+63a5,U+63a7-63aa,U+63c0,U+63c4,U+63c6,U+63cf,U+63d6,U+63da-63db,U+63e1,U+63ed-63ee,U+63f4,U+63f6-63f7,U+640d,U+640f,U+6414,U+6416-6417,U+641c,U+6422,U+642c-642d,U+643a,U+643e,U+6458,U+6460,U+6469,U+646f,U+6478-647a,U+6488,U+6491-6493,U+649a,U+649e,U+64a4-64a5,U+64ab,U+64ad-64ae,U+64b0,U+64b2,U+64bb,U+64c1,U+64c4-64c5,U+64c7,U+64ca,U+64cd-64ce,U+64d2,U+64d4,U+64d8,U+64da,U+64e1-64e2,U+64e5-64e7,U+64ec,U+64f2,U+64f4,U+64fa,U+64fe,U+6500,U+6504,U+6518,U+651d,U+6523,U+652a-652c,U+652f,U+6536-6539,U+653b,U+653e,U+6548,U+654d-654f,U+6551,U+6556-6557,U+655e,U+6562-6563,U+6566,U+656c-656d,U+6572,U+6574-6575,U+6577-6578,U+657e,U+6582-6583,U+6585,U+658c,U+6590-6591,U+6597,U+6599,U+659b-659c,U+659f,U+65a1,U+65a4-65a5,U+65a7,U+65ab-65ac,U+65af,U+65b7,U+65bc-65bd,U+65c1,U+65c5,U+65cb-65cc,U+65cf,U+65d2,U+65d7,U+65e0,U+65e3,U+65e6,U+65e8-65e9,U+65ec-65ed,U+65f1,U+65f4,U+65fa-65fd,U+65ff,U+6606}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-85-wght-normal-BlAw-6qA.woff2) format("woff2-variations");unicode-range:U+614c,U+6153,U+6155,U+6158-6159,U+615d,U+615f,U+6162-6164,U+6167-6168,U+616b,U+616e,U+6170,U+6176-6177,U+617d-617e,U+6181-6182,U+618a,U+618e,U+6190-6191,U+6194,U+6198-619a,U+61a4,U+61a7,U+61a9,U+61ab-61ac,U+61ae,U+61b2,U+61b6,U+61ba,U+61be,U+61c3,U+61c7-61cb,U+61e6,U+61f2,U+61f6-61f8,U+61fa,U+61fc,U+61ff-6200,U+6207-6208,U+620a,U+620c-620e,U+6212,U+6216,U+621a,U+621f,U+6221,U+622a,U+622e,U+6230-6231,U+6234,U+6236,U+623e-623f,U+6241,U+6247-6249,U+624d,U+6253,U+6258,U+626e,U+6271,U+6276,U+6279,U+627c,U+627f-6280,U+6284,U+6289-628a,U+6291-6292,U+6295,U+6297-6298,U+629b,U+62ab,U+62b1,U+62b5,U+62b9,U+62bc-62bd,U+62c2,U+62c7-62c9,U+62cc-62cd,U+62cf-62d0,U+62d2-62d4,U+62d6-62d9,U+62db-62dc,U+62ec-62ef,U+62f1,U+62f3,U+62f7,U+62fe-62ff,U+6301,U+6307,U+6309,U+6311,U+632b,U+632f,U+633a-633b,U+633d-633e,U+6349,U+634c,U+634f-6350,U+6355,U+6367-6368,U+636e,U+6372,U+6377,U+637a-637b,U+637f,U+6383,U+6388-6389,U+638c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-86-wght-normal-B7E1-Ec0.woff2) format("woff2-variations");unicode-range:U+5f11,U+5f13-5f15,U+5f17-5f18,U+5f1b,U+5f1f,U+5f26-5f27,U+5f29,U+5f31,U+5f35,U+5f3a,U+5f3c,U+5f48,U+5f4a,U+5f4c,U+5f4e,U+5f56-5f57,U+5f59,U+5f5b,U+5f62,U+5f66-5f67,U+5f69-5f6d,U+5f70-5f71,U+5f77,U+5f79,U+5f7c,U+5f7f-5f81,U+5f85,U+5f87,U+5f8a-5f8b,U+5f90-5f92,U+5f98-5f99,U+5f9e,U+5fa0-5fa1,U+5fa8-5faa,U+5fae,U+5fb5,U+5fb9,U+5fbd,U+5fc5,U+5fcc-5fcd,U+5fd6-5fd9,U+5fe0,U+5feb,U+5ff5,U+5ffd,U+5fff,U+600f,U+6012,U+6016,U+601c,U+6020-6021,U+6025,U+6028,U+602a,U+602f,U+6041-6043,U+604d,U+6050,U+6052,U+6055,U+6059,U+605d,U+6062-6065,U+6068-606a,U+606c-606d,U+606f-6070,U+6085,U+6089,U+608c-608d,U+6094,U+6096,U+609a-609b,U+609f-60a0,U+60a3-60a4,U+60a7,U+60b0,U+60b2-60b4,U+60b6,U+60b8,U+60bc-60bd,U+60c7,U+60d1,U+60da,U+60dc,U+60df-60e1,U+60f0-60f1,U+60f6,U+60f9-60fb,U+6101,U+6106,U+6108-6109,U+610d-610e,U+6115,U+611a,U+6127,U+6130,U+6134,U+6137,U+613c,U+613e-613f,U+6142,U+6144,U+6147-6148,U+614a-614b}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-87-wght-normal-CBZPTWsE.woff2) format("woff2-variations");unicode-range:U+5c40,U+5c45-5c46,U+5c48,U+5c4b,U+5c4d-5c4e,U+5c51,U+5c5b,U+5c60,U+5c62,U+5c64-5c65,U+5c6c,U+5c6f,U+5c79,U+5c90-5c91,U+5ca1,U+5ca9,U+5cab-5cac,U+5cb1,U+5cb3,U+5cb5,U+5cb7-5cb8,U+5cba,U+5cbe,U+5cc0,U+5cd9,U+5ce0,U+5ce8,U+5cef-5cf0,U+5cf4,U+5cf6,U+5cfb,U+5cfd,U+5d07,U+5d0d-5d0e,U+5d11,U+5d14,U+5d16-5d17,U+5d19,U+5d27,U+5d29,U+5d4b-5d4c,U+5d50,U+5d69,U+5d6c,U+5d6f,U+5d87,U+5d8b,U+5d9d,U+5da0,U+5da2,U+5daa,U+5db8,U+5dba,U+5dbc-5dbd,U+5dcd,U+5dd2,U+5dd6,U+5de1-5de2,U+5de5-5de8,U+5deb,U+5dee,U+5df1-5df4,U+5df7,U+5dfd-5dfe,U+5e03,U+5e06,U+5e11,U+5e16,U+5e19,U+5e1b,U+5e1d,U+5e25,U+5e2b,U+5e2d,U+5e33,U+5e36,U+5e38,U+5e3d,U+5e3f-5e40,U+5e44-5e45,U+5e47,U+5e4c,U+5e55,U+5e5f,U+5e61-5e63,U+5e72,U+5e77-5e79,U+5e7b-5e7e,U+5e84,U+5e87,U+5e8a,U+5e8f,U+5e95,U+5e97,U+5e9a,U+5e9c,U+5ea0,U+5ea7,U+5eab,U+5ead,U+5eb5-5eb8,U+5ebe,U+5ec2,U+5ec8-5eca,U+5ed0,U+5ed3,U+5ed6,U+5eda-5edb,U+5edf-5ee0,U+5ee2-5ee3,U+5eec,U+5ef3,U+5ef6-5ef7,U+5efa-5efb,U+5f01,U+5f04,U+5f0a}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-88-wght-normal-_V-zytEf.woff2) format("woff2-variations");unicode-range:U+59be,U+59c3,U+59c6,U+59c9,U+59cb,U+59d0-59d1,U+59d3-59d4,U+59d9-59da,U+59dc-59dd,U+59e6,U+59e8,U+59ea,U+59ec,U+59ee,U+59f8,U+59fb,U+59ff,U+5a01,U+5a03,U+5a11,U+5a18,U+5a1b-5a1c,U+5a1f-5a20,U+5a25,U+5a29,U+5a36,U+5a3c,U+5a41,U+5a46,U+5a49,U+5a5a,U+5a62,U+5a66,U+5a92,U+5a9a-5a9b,U+5aa4,U+5ac1-5ac2,U+5ac4,U+5ac9,U+5acc,U+5ae1,U+5ae6,U+5ae9,U+5b05,U+5b09,U+5b0b-5b0c,U+5b16,U+5b2a,U+5b40,U+5b43,U+5b51,U+5b54-5b55,U+5b58,U+5b5a,U+5b5c-5b5d,U+5b5f,U+5b63-5b64,U+5b69,U+5b6b,U+5b70-5b71,U+5b75,U+5b7a,U+5b7c,U+5b85,U+5b87-5b88,U+5b8b,U+5b8f,U+5b93,U+5b95-5b99,U+5b9b-5b9c,U+5ba2-5ba6,U+5bac,U+5bae,U+5bb0,U+5bb3-5bb5,U+5bb8-5bb9,U+5bbf-5bc0,U+5bc2-5bc7,U+5bcc,U+5bd0,U+5bd2-5bd4,U+5bd7,U+5bde-5bdf,U+5be1-5be2,U+5be4-5be9,U+5beb-5bec,U+5bee-5bef,U+5bf5-5bf6,U+5bf8,U+5bfa,U+5c01,U+5c04,U+5c07-5c0b,U+5c0d-5c0e,U+5c16,U+5c19,U+5c24,U+5c28,U+5c31,U+5c38-5c3c,U+5c3e-5c3f}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-89-wght-normal-D3Fd3_EL.woff2) format("woff2-variations");unicode-range:U+5703-5704,U+5708,U+570d,U+5712-5713,U+5716,U+5718,U+572d,U+573b,U+5740,U+5742,U+5747,U+574a,U+574d-574e,U+5750-5751,U+5761,U+5764,U+5766,U+576a,U+576e,U+5770,U+5775,U+577c,U+5782,U+5788,U+578b,U+5793,U+57a0,U+57a2-57a3,U+57c3,U+57c7-57c8,U+57cb,U+57df-57e0,U+57f0,U+57f4,U+57f7,U+57f9-57fa,U+57fc,U+5800,U+5802,U+5805-5806,U+5808-580a,U+581e,U+5821,U+5824,U+5827,U+582a,U+582f-5831,U+5835,U+583a,U+584a-584b,U+584f,U+5851,U+5854,U+5857-5858,U+585a,U+585e,U+5861-5862,U+5864,U+5875,U+5879,U+587c,U+587e,U+5883,U+5885,U+5889,U+5893,U+589c,U+589e-589f,U+58a8-58a9,U+58ae,U+58b3,U+58ba-58bb,U+58be,U+58c1,U+58c5,U+58c7,U+58ce,U+58d1,U+58d3,U+58d5,U+58d8-58d9,U+58de-58df,U+58e4,U+58ec,U+58ef,U+58f9-58fb,U+58fd,U+590f,U+5914-5915,U+5919,U+5922,U+592d-592e,U+5931,U+5937,U+593e,U+5944,U+5947-5949,U+594e-5951,U+5954-5955,U+5957,U+595a,U+5960,U+5962,U+5967,U+596a-596e,U+5974,U+5978,U+5982-5984,U+598a,U+5993,U+5996-5997,U+5999,U+59a5,U+59a8,U+59ac,U+59b9,U+59bb}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-90-wght-normal-lqvjLFoO.woff2) format("woff2-variations");unicode-range:U+539a,U+53a0,U+53a5-53a6,U+53ad,U+53bb,U+53c3,U+53c8-53cb,U+53cd,U+53d4,U+53d6-53d7,U+53db,U+53e1-53e3,U+53e5,U+53e9-53ed,U+53f1,U+53f3,U+53f8,U+5403-5404,U+540a,U+540e-5411,U+541b,U+541d,U+541f-5420,U+5426,U+5429,U+542b,U+5433,U+5438-5439,U+543b-543c,U+543e,U+5442,U+5448,U+544a,U+5451,U+5468,U+546a,U+5471,U+5473,U+5475,U+547b-547d,U+5480,U+5486,U+548e,U+5490,U+54a4,U+54a8,U+54ab-54ac,U+54b3,U+54b8,U+54bd,U+54c0,U+54c4,U+54c8-54c9,U+54e1,U+54e5,U+54e8,U+54ed-54ee,U+54f2,U+54fa,U+5504,U+5506-5507,U+550e,U+5510,U+551c,U+552f,U+5531,U+5535,U+553e,U+5544,U+5546,U+554f,U+5553,U+5556,U+555e,U+5563,U+557c,U+5580,U+5584,U+5586-5587,U+5589-558a,U+5598-559a,U+559c-559d,U+55a7,U+55a9-55ac,U+55ae,U+55c5,U+55c7,U+55d4,U+55da,U+55dc,U+55df,U+55e3-55e4,U+55fd-55fe,U+5606,U+5609,U+5614,U+5617,U+562f,U+5632,U+5634,U+5636,U+5653,U+5668,U+566b,U+5674,U+5686,U+56a5,U+56ac,U+56ae,U+56b4,U+56bc,U+56ca,U+56cd,U+56d1,U+56da-56db,U+56de,U+56e0,U+56f0,U+56f9-56fa}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-91-wght-normal-DsGtjSva.woff2) format("woff2-variations");unicode-range:U+516e,U+5175-5178,U+517c,U+5180,U+5186,U+518a,U+518d,U+5192,U+5195,U+5197,U+51a0,U+51a5,U+51aa,U+51ac,U+51b6-51b7,U+51bd,U+51c4,U+51c6,U+51c9,U+51cb-51cd,U+51dc-51de,U+51e1,U+51f0-51f1,U+51f6,U+51f8-51f9,U+51fd,U+5200,U+5203,U+5207-5208,U+520a,U+520e,U+5211,U+5217,U+521d,U+5224-5225,U+522a,U+522e,U+5230,U+5236-523b,U+5243,U+5247,U+524a-524c,U+5254,U+5256,U+525b,U+525d,U+5261,U+5269-526a,U+526f,U+5272,U+5275,U+527d,U+527f,U+5283,U+5287-5289,U+528d,U+5291-5292,U+529f,U+52a3-52a4,U+52a9-52ab,U+52be,U+52c1,U+52c3,U+52c5,U+52c7,U+52c9,U+52cd,U+52d2,U+52d6,U+52d8-52d9,U+52db,U+52dd-52df,U+52e2-52e4,U+52f3,U+52f5,U+52f8,U+52fa-52fb,U+52fe-52ff,U+5305,U+5308,U+530d,U+530f-5310,U+5315,U+5319,U+5320-5321,U+5323,U+532a,U+532f,U+5339,U+533f-5341,U+5343-5344,U+5347-534a,U+534d,U+5351-5354,U+535a,U+535c,U+535e,U+5360,U+5366,U+5368,U+536f-5371,U+5374-5375,U+5377,U+537d,U+537f,U+5384,U+5393,U+5398}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-92-wght-normal-CfCk7nA7.woff2) format("woff2-variations");unicode-range:U+4f43,U+4f46-4f48,U+4f4d-4f51,U+4f55,U+4f59-4f5a,U+4f69,U+4f6f-4f70,U+4f73,U+4f76,U+4f7a,U+4f7e-4f7f,U+4f81,U+4f83-4f84,U+4f86,U+4f88,U+4f8a-4f8b,U+4f8d,U+4f8f,U+4f91,U+4f96,U+4f98,U+4f9b,U+4f9d,U+4fae-4faf,U+4fb5-4fb6,U+4fbf,U+4fc2-4fc4,U+4fc9-4fca,U+4fce,U+4fd1,U+4fd3-4fd4,U+4fd7,U+4fda,U+4fdf-4fe0,U+4fee-4fef,U+4ff1,U+4ff3,U+4ff5,U+4ff8,U+4ffa,U+5002,U+5006,U+5009,U+500b,U+500d,U+5011-5012,U+5016,U+5019-501a,U+501c,U+501e-501f,U+5021,U+5023-5024,U+5026-5028,U+502a-502d,U+503b,U+5043,U+5047-5049,U+504f,U+5055,U+505a,U+505c,U+5065,U+5074-5076,U+5078,U+5080,U+5085,U+508d,U+5091,U+5098-5099,U+50ac-50ad,U+50b2-50b3,U+50b5,U+50b7,U+50be,U+50c5,U+50c9-50ca,U+50d1,U+50d5-50d6,U+50da,U+50de,U+50e5,U+50e7,U+50ed,U+50f9,U+50fb,U+50ff-5101,U+5104,U+5106,U+5109,U+5112,U+511f,U+5121,U+512a,U+5132,U+5137,U+513a,U+513c,U+5140-5141,U+5143-5148,U+514b-514e,U+5152,U+515c,U+5162,U+5169-516b,U+516d}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-93-wght-normal-LhQTABfI.woff2) format("woff2-variations");unicode-range:U+338c-339c,U+339f-33a0,U+33a2-33cb,U+33cf-33d0,U+33d3,U+33d6,U+33d8,U+33db-33dd,U+4e01,U+4e03,U+4e07-4e08,U+4e11,U+4e14-4e15,U+4e18-4e19,U+4e1e,U+4e32,U+4e38-4e39,U+4e42-4e43,U+4e45,U+4e4d-4e4f,U+4e56,U+4e58-4e59,U+4e5d-4e5e,U+4e6b,U+4e6d,U+4e73,U+4e76-4e77,U+4e7e,U+4e82,U+4e86,U+4e88,U+4e8e,U+4e90-4e92,U+4e94-4e95,U+4e98,U+4e9b,U+4e9e,U+4ea1-4ea2,U+4ea4-4ea6,U+4ea8,U+4eab,U+4ead-4eae,U+4eb6,U+4ec0-4ec1,U+4ec4,U+4ec7,U+4ecb,U+4ecd,U+4ed4-4ed5,U+4ed7-4ed9,U+4edd,U+4edf,U+4ee4,U+4ef0,U+4ef2,U+4ef6-4ef7,U+4efb,U+4f01,U+4f09,U+4f0b,U+4f0d-4f11,U+4f2f,U+4f34,U+4f36,U+4f38,U+4f3a,U+4f3c-4f3d}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-94-wght-normal-ihdiE-sw.woff2) format("woff2-variations");unicode-range:U+3136,U+3138,U+313a-3140,U+3143-3144,U+3150,U+3152,U+3154-3156,U+3158-315b,U+315d-315f,U+3162,U+3164-318c,U+318e,U+3200-321b,U+3231,U+3239,U+3251-325a,U+3260-327b,U+327e-327f,U+328a-3290,U+3294,U+329e,U+32a5,U+3380-3384,U+3388-338b}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-95-wght-normal-aqERMEsW.woff2) format("woff2-variations");unicode-range:U+2f7d,U+2f7f-2f8b,U+2f8e-2f90,U+2f92-2f97,U+2f99-2fa0,U+2fa2-2fa3,U+2fa5-2fa9,U+2fac-2fb1,U+2fb3-2fbc,U+2fc1-2fca,U+2fcd-2fd4,U+3003,U+3012-3019,U+301c,U+301e-3020,U+3036,U+3041,U+3043,U+3045,U+3047,U+3049,U+304e,U+3050,U+3052,U+3056,U+305a,U+305c,U+305e,U+3062,U+3065,U+306c,U+3070-307d,U+3080,U+3085,U+3087,U+308e,U+3090-3091,U+30a1,U+30a5,U+30a9,U+30ae,U+30b1-30b2,U+30b4,U+30b6,U+30bc-30be,U+30c2,U+30c5,U+30cc,U+30d2,U+30d4,U+30d8-30dd,U+30e4,U+30e6,U+30e8,U+30ee,U+30f0-30f2,U+30f4-30f6,U+3133,U+3135}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-96-wght-normal-BsiGrPsV.woff2) format("woff2-variations");unicode-range:U+2541-254b,U+25a4-25a9,U+25b1,U+25b5,U+25b9,U+25bf,U+25c1,U+25c3,U+25c9-25ca,U+25cc,U+25ce,U+25d0-25d1,U+25e6,U+25ef,U+260f,U+261d,U+261f,U+262f,U+2660,U+2664,U+2667-2669,U+266d,U+266f,U+2716,U+271a,U+273d,U+2756,U+2776-277f,U+278a-2793,U+2963,U+2965,U+2ac5-2ac6,U+2acb-2acc,U+2f00,U+2f04,U+2f06,U+2f08,U+2f0a-2f0b,U+2f11-2f12,U+2f14,U+2f17-2f18,U+2f1c-2f1d,U+2f1f-2f20,U+2f23-2f26,U+2f28-2f29,U+2f2b,U+2f2d,U+2f2f-2f32,U+2f38,U+2f3c-2f40,U+2f42-2f4c,U+2f4f-2f52,U+2f54-2f58,U+2f5a-2f66,U+2f69-2f70,U+2f72-2f76,U+2f78,U+2f7a-2f7c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-97-wght-normal-Dr2ufsTl.woff2) format("woff2-variations");unicode-range:U+2479-2487,U+249c-24d1,U+24d3-24d7,U+24d9-24e9,U+24eb-24f4,U+2500-2501,U+2503,U+250c-2513,U+2515-2516,U+2518-2540}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-98-wght-normal-DO7crlgc.woff2) format("woff2-variations");unicode-range:U+215b-215e,U+2162-2169,U+2170-2179,U+2195-2199,U+21b0-21b4,U+21bc,U+21c0,U+21c4-21c5,U+21cd,U+21cf-21d4,U+21e0-21e3,U+21e6-21e9,U+2200,U+2202-2203,U+2206-2209,U+220b-220c,U+220f,U+2211,U+2213,U+221a,U+221d-2220,U+2222,U+2225-2227,U+2229-222c,U+222e,U+2234-2237,U+223d,U+2243,U+2245,U+2248,U+2250-2253,U+225a,U+2260-2262,U+2264-2267,U+226a-226b,U+226e-2273,U+2276-2277,U+2279-227b,U+2280-2287,U+228a-228b,U+2295-2297,U+22a3-22a5,U+22bb-22bc,U+22ce-22cf,U+22da-22db,U+22ee-22ef,U+2306,U+2312,U+2314,U+2467-2478}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-99-wght-normal-DzzxDKB5.woff2) format("woff2-variations");unicode-range:U+81-82,U+84,U+a2-a5,U+a7-a8,U+aa,U+ac-ad,U+b1-b3,U+b6,U+b8-ba,U+bc-be,U+c0,U+c2,U+c6-cb,U+ce-d0,U+d4,U+d8-d9,U+db-dc,U+de-df,U+e6,U+eb,U+ee-f0,U+f4,U+f7-f9,U+fb,U+fe-ff,U+111,U+126-127,U+132-133,U+138,U+13f-142,U+149-14b,U+152-153,U+166-167,U+2bc,U+2c7,U+2d0,U+2d8-2d9,U+2db-2dd,U+391-394,U+396-3a1,U+3a3-3a9,U+3b2-3b6,U+3b8,U+3bc,U+3be-3c1,U+3c3-3c9,U+2010,U+2015-2016,U+2018-2019,U+201b,U+201f-2021,U+2025,U+2030,U+2033-2036,U+203c,U+203e,U+2042,U+2074,U+207a-207f,U+2081-2084,U+2109,U+2113,U+2116,U+2121,U+2126,U+212b,U+2153-2154}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-100-wght-normal-BUnzX67h.woff2) format("woff2-variations");unicode-range:U+e8,U+2da,U+2160,U+2194,U+3054,U+3058,U+306d,U+3086,U+308d,U+30ac,U+30bb,U+30c4,U+30cd-30ce,U+30e2,U+3132,U+3146,U+3149,U+339d,U+4e3b,U+4f0a,U+4fdd,U+4fe1,U+5409,U+540c,U+5834,U+592a-592b,U+5b9a,U+5dde,U+5e0c,U+5e73,U+5f0f,U+60f3,U+653f,U+661f,U+662f,U+667a,U+683c,U+6b4c,U+6c11,U+767c,U+76ee,U+76f4,U+77f3,U+79d1,U+7a7a,U+7b2c,U+7d22,U+8207,U+8a00,U+8a71,U+9280,U+9580,U+958b,U+96c6,U+9762,U+98df,U+9ed1,U+ac2d,U+adc8,U+add3,U+af48,U+b014,U+b134-b135,U+b158,U+b2aa,U+b35f,U+b6a4,U+b9cf,U+bb63,U+bd23,U+be91,U+c29b,U+c3f4,U+c42c,U+c55c,U+c573,U+c58f,U+c78c,U+c7dd,U+c8f5,U+cad1,U+cc48,U+cf10,U+cf20,U+d03c,U+d07d,U+d2a0,U+d30e,U+d38d,U+d3a8,U+d3c8,U+d5e5,U+d5f9,U+d6e4,U+f90a,U+ff02,U+ff1c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-101-wght-normal-yIk-xkbt.woff2) format("woff2-variations");unicode-range:U+3b1,U+2466,U+25a1,U+25a3,U+261c,U+3008-3009,U+305b,U+305d,U+3069,U+30a7,U+30ba,U+30cf,U+30ef,U+3151,U+3157,U+4e4b,U+4e5f,U+4e8c,U+4eca,U+4ed6,U+4f5b,U+50cf,U+5149,U+5165,U+5171,U+5229,U+529b,U+5316,U+539f,U+53f2,U+571f,U+5728,U+58eb,U+591c,U+5b78,U+5c11,U+5c55,U+5ddd,U+5e02,U+5fb7,U+60c5,U+610f,U+611f,U+6625,U+66f8,U+6797,U+679c,U+682a,U+6d2a,U+706b,U+7406,U+767b,U+76f8,U+77e5,U+7acb,U+898b,U+8a69,U+8def,U+8fd1,U+901a,U+90e8,U+91cd,U+975e,U+ae14,U+ae6c,U+aec0,U+afc7,U+afc9,U+b01c,U+b028,U+b308,U+b311,U+b314,U+b31c,U+b524,U+b560,U+b764,U+b920,U+b9e3,U+bd48,U+be7d,U+c0db,U+c231,U+c270,U+c2e3,U+c37d,U+c3ed,U+c530,U+c6a5,U+c6dc,U+c7a4,U+c954,U+c974,U+d000,U+d565,U+d667,U+d6c5,U+d79d,U+ff1e}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-102-wght-normal-DPlG-Gq_.woff2) format("woff2-variations");unicode-range:U+131,U+2032,U+2465,U+2642,U+3048,U+3051,U+3083-3084,U+308f,U+30c0,U+30d1,U+30d3,U+30d6,U+30df,U+30e7,U+3153,U+4e16,U+4e8b,U+4ee5,U+5206,U+52a0,U+52d5,U+53e4,U+53ef,U+54c1,U+57ce,U+597d,U+5b8c,U+5ea6,U+5f8c,U+5f97,U+6210,U+6240,U+624b,U+6728,U+6bd4,U+7236,U+7269,U+7279,U+738b,U+7528,U+7530,U+767e,U+798f,U+8005,U+8a18,U+90fd,U+91cc,U+9577,U+9593,U+98a8,U+ac20,U+acf6,U+ad90,U+af5d,U+af80,U+afcd,U+aff0,U+b0a1,U+b0b5,U+b1fd,U+b2fc,U+b380,U+b51b,U+b584,U+b5b3,U+b8fd,U+b93c,U+b9f4,U+bb44,U+bc08,U+bc27,U+bc49,U+be55,U+be64,U+bfb0,U+bfc5,U+c178,U+c21f,U+c314,U+c4f1,U+c58d,U+c664,U+c698,U+c6a7,U+c6c1,U+c9ed,U+cac0,U+cacc,U+cad9,U+ccb5,U+cdcc,U+d0e4,U+d143,U+d320,U+d330,U+d54d,U+ff06,U+ff1f,U+ff5e}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-103-wght-normal-C9B_csKo.woff2) format("woff2-variations");unicode-range:U+b4,U+20a9,U+20ac,U+2190,U+24d8,U+2502,U+2514,U+2592,U+25c7-25c8,U+2663,U+3060,U+3064,U+3081,U+3088,U+30a3,U+30a6,U+30aa,U+30b5,U+30c7,U+30ca-30cb,U+30d0,U+30e3,U+30e5,U+339e,U+4e09,U+4eac,U+4f5c,U+5167-5168,U+516c,U+51fa,U+5408,U+540d,U+591a,U+5b57,U+6211,U+65b9,U+660e,U+6642,U+6700,U+6b63,U+6e2f,U+7063,U+7532,U+793e,U+81ea,U+8272,U+82b1,U+897f,U+8eca,U+91ce,U+ac38,U+ad76,U+ae84,U+aecc,U+b07d,U+b0b1,U+b215,U+b2a0,U+b310,U+b3d7,U+b52a,U+b618,U+b775,U+b797,U+bcd5,U+bd59,U+be80,U+bea8,U+bed1,U+bee4-bee5,U+c060,U+c2ef,U+c329,U+c3dc,U+c597,U+c5bd,U+c5e5,U+c69c,U+c9d6,U+ca29,U+ca5c,U+ca84,U+cc39,U+cc3b,U+ce89,U+cee5,U+cf65,U+cf85,U+d058,U+d145,U+d22d,U+d325,U+d37d,U+d3ad,U+d769,U+ff0c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-104-wght-normal-BV6o_vl3.woff2) format("woff2-variations");unicode-range:U+2161,U+2228,U+2299,U+2464,U+2517,U+2640,U+3042,U+304a,U+3053,U+3061,U+307f,U+3082,U+308c,U+3092,U+30a8,U+30ab,U+30ad,U+30b0,U+30b3,U+30b7,U+30c1,U+30c6,U+30c9,U+30d5,U+30d7,U+30de,U+30e0-30e1,U+30ec-30ed,U+4e0b,U+4e0d,U+4ee3,U+53f0,U+548c,U+5b89,U+5bb6,U+5c0f,U+611b,U+6771,U+6aa2,U+6bcd,U+6c34,U+6cd5,U+6d77,U+767d,U+795e,U+8ecd,U+9999,U+9ad8,U+ac07,U+ac1a,U+ac40,U+ad0c,U+ad88,U+ada4,U+ae01,U+ae65,U+aebd,U+aec4,U+afe8,U+b139,U+b205,U+b383,U+b38c,U+b42c,U+b461,U+b55c,U+b78f,U+b8fb,U+b9f7,U+bafc,U+bc99,U+bed8,U+bfcd,U+c0bf,U+c0f9,U+c167,U+c204,U+c20f,U+c22f,U+c258,U+c298,U+c2bc,U+c388,U+c501,U+c50c,U+c5b9,U+c5ce,U+c641,U+c648,U+c73d,U+ca50,U+ca61,U+cc4c,U+ceac,U+d0d4,U+d5f7,U+d6d7,U+ff1a}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-105-wght-normal-Bwk-4itQ.woff2) format("woff2-variations");unicode-range:U+2103,U+2463,U+25c6,U+25cb,U+266c,U+3001,U+300a,U+3046,U+304c-304d,U+304f,U+3055,U+3059,U+3063,U+3066-3068,U+306f,U+3089,U+30b8,U+30bf,U+314f,U+4e0a,U+570b,U+5730,U+5916,U+5929,U+5c71,U+5e74,U+5fc3,U+601d,U+6027,U+63d0,U+6709,U+6734,U+751f,U+7684,U+82f1,U+9053,U+91d1,U+97f3,U+ac2f,U+ac4d,U+adc4,U+ade4,U+ae41,U+ae4d-ae4e,U+aed1,U+afb9,U+b0e0,U+b299,U+b365,U+b46c,U+b480,U+b4c8,U+b7b4,U+b819,U+b918,U+baab,U+bab9,U+be8f,U+bed7,U+c0ec,U+c19f,U+c1a5,U+c3d9,U+c464,U+c53d,U+c553,U+c570,U+c5cc,U+c633,U+c6a4,U+c7a3,U+c7a6,U+c886,U+c9d9-c9da,U+c9ec,U+ca0c,U+cc21,U+cd1b,U+cd78,U+cdc4,U+cef8,U+cfe4,U+d0a5,U+d0b5,U+d0ec,U+d15d,U+d188,U+d23c,U+d2ac,U+d729,U+d79b,U+ff01,U+ff08-ff09,U+ff5c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-106-wght-normal-DCG_yG2L.woff2) format("woff2-variations");unicode-range:U+2039-203a,U+223c,U+25b3,U+25b7,U+25bd,U+25cf,U+266a,U+3002,U+300b,U+304b,U+3057,U+305f,U+306a-306b,U+307e,U+308a-308b,U+3093,U+30a2,U+30af,U+30b9,U+30c3,U+30c8,U+30e9-30eb,U+33a1,U+4e00,U+524d,U+5357,U+5b50,U+7121,U+884c,U+9751,U+ac94,U+aebe,U+aecd,U+af08,U+af41,U+af49,U+b010,U+b053,U+b109,U+b11b,U+b128,U+b154,U+b291,U+b2e6,U+b301,U+b385,U+b525,U+b5b4,U+b729,U+b72f,U+b738,U+b7ff,U+b837,U+b975,U+ba67,U+bb47,U+bc1f,U+bd90,U+bfd4,U+c27c,U+c324,U+c379,U+c3e0,U+c465,U+c53b,U+c58c,U+c610,U+c653,U+c6cd,U+c813,U+c82f,U+c999,U+c9e0,U+cac4,U+cad3,U+cbd4,U+cc10,U+cc22,U+ccb8,U+ccbc,U+cda5,U+ce84,U+cea3,U+cf67,U+cfe1,U+d241,U+d30d,U+d31c,U+d391,U+d401,U+d479,U+d5c9,U+d5db,U+d649,U+d6d4}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-107-wght-normal-CWnd6wcQ.woff2) format("woff2-variations");unicode-range:U+b0,U+e9,U+2193,U+2462,U+260e,U+261e,U+300e-300f,U+3044,U+30a4,U+30fb-30fc,U+314d,U+5973,U+6545,U+6708,U+7537,U+ac89,U+ac9c,U+acc1,U+ad04,U+ad75,U+ad7d,U+ae45,U+ae61,U+af42,U+b0ab,U+b0af,U+b0b3,U+b12c,U+b194,U+b1a8,U+b220,U+b258,U+b284,U+b2ff,U+b315,U+b371,U+b3d4-b3d5,U+b460,U+b527,U+b534,U+b810,U+b818,U+b98e,U+ba55,U+bbac,U+bc0b,U+bc40,U+bca1,U+bccd,U+bd93,U+be54,U+be5a,U+bf08,U+bf50,U+bf55,U+bfdc,U+c0c0,U+c0d0,U+c0f4,U+c100,U+c11e,U+c170,U+c20d,U+c274,U+c290,U+c308,U+c369,U+c539,U+c587,U+c5ff,U+c6ec,U+c70c,U+c7ad,U+c7c8,U+c83c,U+c881,U+cb48,U+cc60,U+ce69,U+ce6b,U+ce75,U+cf04,U+cf08,U+cf55,U+cf70,U+cffc,U+d0b7,U+d1a8,U+d2c8,U+d384,U+d47c,U+d48b,U+d5dd,U+d5e8,U+d720,U+d759,U+f981}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-108-wght-normal-CVosuT20.woff2) format("woff2-variations");unicode-range:U+e0,U+e2,U+395,U+3b7,U+3ba,U+2460-2461,U+25a0,U+3010-3011,U+306e,U+30f3,U+314a,U+314c,U+5927,U+65b0,U+7e41,U+97d3,U+9ad4,U+ad49,U+ae0b,U+ae0d,U+ae43,U+ae5d,U+aecf,U+af3c,U+af64,U+afd4,U+b080,U+b084,U+b0c5,U+b10c,U+b1e8,U+b2ac,U+b36e,U+b451,U+b515,U+b540,U+b561,U+b6ab,U+b6b1,U+b72c,U+b730,U+b744,U+b800,U+b8ec,U+b8f0,U+b904,U+b968,U+b96d,U+b987,U+b9d9,U+bb36,U+bb49,U+bc2d,U+bc43,U+bcf6,U+bd89,U+be57,U+be61,U+bed4,U+c090,U+c130,U+c148,U+c19c,U+c2f9,U+c36c,U+c37c,U+c384,U+c3df,U+c575,U+c584,U+c660,U+c719,U+c816,U+ca4d,U+ca54,U+cabc,U+cb49,U+cc14,U+cff5,U+d004,U+d038,U+d0b4,U+d0d3,U+d0e0,U+d0ed,U+d131,U+d1b0,U+d31f,U+d33d,U+d3a0,U+d3ab,U+d514,U+d584,U+d6a1,U+d6cc,U+d749,U+d760,U+d799}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-109-wght-normal-B6hzfDSQ.woff2) format("woff2-variations");unicode-range:U+24,U+60,U+3b9,U+3bb,U+3bd,U+2191,U+2606,U+300c-300d,U+3131,U+3134,U+3139,U+3141-3142,U+3148,U+3161,U+3163,U+321c,U+4eba,U+5317,U+ac31,U+ac77,U+ac9f,U+acb9,U+acf0-acf1,U+acfd,U+ad73,U+af3d,U+b00c,U+b04a,U+b057,U+b0c4,U+b188,U+b1cc,U+b214,U+b2db,U+b2ee,U+b304,U+b4ed,U+b518,U+b5bc,U+b625,U+b69c-b69d,U+b7ac,U+b801,U+b86c,U+b959,U+b95c,U+b985,U+ba48,U+bb58,U+bc0c,U+bc38,U+bc85,U+bc9a,U+bf40,U+c068,U+c0bd,U+c0cc,U+c12f,U+c149,U+c1e0,U+c22b,U+c22d,U+c250,U+c2fc,U+c300,U+c313,U+c370,U+c3d8,U+c557,U+c580,U+c5e3,U+c62e,U+c634,U+c6f0,U+c74d,U+c783,U+c78e,U+c796,U+c7bc,U+c92c,U+ca4c,U+cc1c,U+cc54,U+cc59,U+ce04,U+cf30,U+cfc4,U+d140,U+d321,U+d38c,U+d399,U+d54f,U+d587,U+d5d0,U+d6e8,U+d770}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-110-wght-normal-Bz2J7MHi.woff2) format("woff2-variations");unicode-range:U+d7,U+ea,U+fc,U+2192,U+25bc,U+3000,U+3137,U+3145,U+315c,U+7f8e,U+ac13,U+ac71,U+ac90,U+acb8,U+ace7,U+ad7f,U+ae50,U+aef4,U+af34,U+afbc,U+b048,U+b09a,U+b0ad,U+b0bc,U+b113,U+b125,U+b141,U+b20c,U+b2d9,U+b2ed,U+b367,U+b369,U+b374,U+b3cb,U+b4ec,U+b611,U+b760,U+b81b,U+b834,U+b8b0,U+b8e1,U+b989,U+b9d1,U+b9e1,U+b9fa,U+ba4d,U+ba78,U+bb35,U+bb54,U+bbf9,U+bc11,U+bcb3,U+bd05,U+bd95,U+bdd4,U+be10,U+bed0,U+bf51,U+c0d8,U+c232,U+c2b7,U+c2eb,U+c378,U+c500,U+c52c,U+c549,U+c568,U+c598,U+c5c9,U+c61b,U+c639,U+c67c,U+c717,U+c78a,U+c80a,U+c90c-c90d,U+c950,U+c9e7,U+cbe4,U+cca9,U+cce4,U+cdb0,U+ce78,U+ce94,U+ce98,U+cf8c,U+d018,U+d034,U+d0f1,U+d1b1,U+d280,U+d2f8,U+d338,U+d380,U+d3b4,U+d610,U+d69f,U+d6fc,U+d758}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-111-wght-normal-DeeXajyY.woff2) format("woff2-variations");unicode-range:U+e7,U+2022,U+203b,U+25c0,U+2605,U+2661,U+3147,U+318d,U+672c,U+8a9e,U+acaa,U+acbc,U+ad1c,U+ae4a,U+ae5c,U+b044,U+b054,U+b0c8-b0c9,U+b2a6,U+b2d0,U+b35c,U+b364,U+b428,U+b454,U+b465,U+b4b7,U+b4e3,U+b51c,U+b5a1,U+b784,U+b790,U+b7ab,U+b7f4,U+b82c,U+b835,U+b8e9,U+b8f8,U+b9d8,U+b9f9,U+ba5c,U+ba64,U+babd,U+bb18,U+bb3b,U+bbff,U+bc0d,U+bc45,U+bc97,U+bcbc,U+be45,U+be75,U+be7c,U+bfcc,U+c0b6,U+c0f7,U+c14b,U+c2b4,U+c30d,U+c4f8,U+c5bb,U+c5d1,U+c5e0,U+c5ee,U+c5fd,U+c606,U+c6c5,U+c6e0,U+c708,U+c81d,U+c820,U+c824,U+c878,U+c918,U+c96c,U+c9e4,U+c9f1,U+cc2e,U+cd09,U+cea1,U+cef5,U+cef7,U+cf64,U+cf69,U+cfe8,U+d035,U+d0ac,U+d230,U+d234,U+d2f4,U+d31d,U+d575,U+d578,U+d608,U+d614,U+d718,U+d751,U+d761,U+d78c,U+d790}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-112-wght-normal-DApkhTZy.woff2) format("woff2-variations");unicode-range:U+2665,U+3160,U+4e2d,U+6587,U+65e5,U+ac12,U+ac14,U+ac16,U+ac81,U+ad34,U+ade0,U+ae54,U+aebc,U+af2c,U+afc0,U+afc8,U+b04c,U+b08c,U+b099,U+b0a9,U+b0ac,U+b0ae,U+b0b8,U+b123,U+b179,U+b2e5,U+b2f7,U+b4c0,U+b531,U+b538,U+b545,U+b550,U+b5a8,U+b6f0,U+b728,U+b73b,U+b7ad,U+b7ed,U+b809,U+b864,U+b86d,U+b871,U+b9bf,U+b9f5,U+ba40,U+ba4b,U+ba58,U+ba87,U+baac,U+bbc0,U+bc16,U+bc34,U+bd07,U+bd99,U+be59,U+bfd0,U+c058,U+c0e4,U+c0f5,U+c12d,U+c139,U+c228,U+c529,U+c5c7,U+c635,U+c637,U+c735,U+c77d,U+c787,U+c789,U+c8c4,U+c989,U+c98c,U+c9d0,U+c9d3,U+cc0c,U+cc99,U+cd0c,U+cd2c,U+cd98,U+cda4,U+ce59,U+ce60,U+ce6d,U+cea0,U+d0d0-d0d1,U+d0d5,U+d14d,U+d1a4,U+d29c,U+d2f1,U+d301,U+d39c,U+d3bc,U+d4e8,U+d540,U+d5ec,U+d640,U+d750}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-113-wght-normal-DnhzVD4m.woff2) format("woff2-variations");unicode-range:U+5e,U+25b2,U+25b6,U+314e,U+ac24,U+ace1,U+ace4,U+ae68,U+af2d,U+b0d0,U+b0e5,U+b150,U+b155,U+b193,U+b2c9,U+b2dd,U+b3c8,U+b3fc,U+b410,U+b458,U+b4dd,U+b5a0,U+b5a4,U+b5bb,U+b7b5,U+b838,U+b840,U+b86f,U+b8f9,U+b960,U+b9e5,U+bab8,U+bb50,U+bc1d,U+bc24-bc25,U+bca8,U+bcbd,U+bd04,U+bd10,U+bd24,U+be48,U+be5b,U+be68,U+c05c,U+c12c,U+c140,U+c15c,U+c168,U+c194,U+c219,U+c27d,U+c2a8,U+c2f1,U+c2f8,U+c368,U+c554-c555,U+c559,U+c564,U+c5d8,U+c5fc,U+c625,U+c65c,U+c6b1,U+c728,U+c794,U+c84c,U+c88c,U+c8e0,U+c8fd,U+c998,U+c9dd,U+cc0d,U+cc30,U+ceec,U+cf13,U+cf1c,U+cf5c,U+d050,U+d07c,U+d0a8,U+d134,U+d138,U+d154,U+d1f4,U+d2bc,U+d329,U+d32c,U+d3d0,U+d3f4,U+d3fc,U+d56b,U+d5cc,U+d600-d601,U+d639,U+d6c8,U+d754,U+d765}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-114-wght-normal-BcwVxkxL.woff2) format("woff2-variations");unicode-range:U+3c-3d,U+2026,U+24d2,U+314b,U+ac11,U+acf3,U+ad74,U+ad81,U+adf9,U+ae34,U+af43,U+afb8,U+b05d,U+b07c,U+b110,U+b118,U+b17c,U+b180,U+b18d,U+b192,U+b2cc,U+b355,U+b378,U+b4a4,U+b4ef,U+b78d,U+b799,U+b7a9,U+b7fd,U+b807,U+b80c,U+b839,U+b9b4,U+b9db,U+ba3c,U+bab0,U+bba4,U+bc94,U+be4c,U+c154,U+c1c4,U+c26c,U+c2ac,U+c2ed,U+c4f4,U+c55e,U+c561,U+c571,U+c5b5,U+c5c4,U+c654-c655,U+c695,U+c6e8,U+c6f9,U+c724,U+c751,U+c775,U+c7a0,U+c7c1,U+c874,U+c880,U+c9d5,U+c9f8,U+cabd,U+cc29,U+cc2c,U+cca8,U+ccab,U+ccd0,U+ce21,U+ce35,U+ce7c,U+ce90,U+cee8,U+cef4,U+cfe0,U+d070,U+d0b9,U+d0c1,U+d0c4,U+d0c8,U+d15c,U+d1a1,U+d2c0,U+d300,U+d314,U+d3ed,U+d478,U+d480,U+d48d,U+d508,U+d53d,U+d5e4,U+d611,U+d61c,U+d68d,U+d6a8,U+d798}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-115-wght-normal-Czx6kN3B.woff2) format("woff2-variations");unicode-range:U+23,U+25,U+5f,U+a9,U+ac08,U+ac78,U+aca8,U+acac,U+ace8,U+ad70,U+adc0,U+addc,U+b137,U+b140,U+b208,U+b290,U+b2f5,U+b3c5,U+b3cc,U+b420,U+b429,U+b529,U+b530,U+b77d,U+b79c,U+b7a8,U+b7c9,U+b7f0,U+b7fc,U+b828,U+b860,U+b9ad,U+b9c1,U+b9c9,U+b9dd-b9de,U+b9e8,U+ba38-ba39,U+babb,U+bc00,U+bc8c,U+bca0,U+bca4,U+bcd1,U+bcfc,U+bd09,U+bdf0,U+be60,U+c0ad,U+c0b4,U+c0bc,U+c190,U+c1fc,U+c220,U+c288,U+c2b9,U+c2f6,U+c528,U+c545,U+c558,U+c5bc,U+c5d4,U+c600,U+c644,U+c6c0,U+c6c3,U+c721,U+c798,U+c7a1,U+c811,U+c838,U+c871,U+c904,U+c990,U+c9dc,U+cc38,U+cc44,U+cca0,U+cd1d,U+cd95,U+cda9,U+ce5c,U+cf00,U+cf58,U+d150,U+d22c,U+d305,U+d328,U+d37c,U+d3f0,U+d551,U+d5a5,U+d5c8,U+d5d8,U+d63c,U+d64d,U+d669,U+d734,U+d76c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-116-wght-normal-DvHAaAUg.woff2) format("woff2-variations");unicode-range:U+26,U+2b,U+3e,U+40,U+7e,U+ac01,U+ac19,U+ac1d,U+aca0,U+aca9,U+acb0,U+ad8c,U+ae09,U+ae38,U+ae40,U+aed8,U+b09c,U+b0a0,U+b108,U+b204,U+b298,U+b2d8,U+b2eb-b2ec,U+b2f4,U+b313,U+b358,U+b450,U+b4e0,U+b54c,U+b610,U+b780,U+b78c,U+b791,U+b8e8,U+b958,U+b974,U+b984,U+b9b0,U+b9bc-b9bd,U+b9ce,U+ba70,U+bbfc,U+bc0f,U+bc15,U+bc1b,U+bc31,U+bc95,U+bcc0,U+bcc4,U+bd81,U+bd88,U+c0c8,U+c11d,U+c13c,U+c158,U+c18d,U+c1a1,U+c21c,U+c4f0,U+c54a,U+c560,U+c5b8,U+c5c8,U+c5f4,U+c628,U+c62c,U+c678,U+c6cc,U+c808,U+c810,U+c885,U+c88b,U+c900,U+c988,U+c99d,U+c9c8,U+cc3d-cc3e,U+cc45,U+cd08,U+ce20,U+cee4,U+d074,U+d0a4,U+d0dd,U+d2b9,U+d3b8,U+d3c9,U+d488,U+d544,U+d559,U+d56d,U+d588,U+d615,U+d648,U+d655,U+d658,U+d65c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-117-wght-normal-DNkILo1k.woff2) format("woff2-variations");unicode-range:U+d,U+48,U+7c,U+ac10,U+ac15,U+ac74,U+ac80,U+ac83,U+acc4,U+ad11,U+ad50,U+ad6d,U+adfc,U+ae00,U+ae08,U+ae4c,U+b0a8,U+b124,U+b144,U+b178,U+b274,U+b2a5,U+b2e8,U+b2f9,U+b354,U+b370,U+b418,U+b41c,U+b4f1,U+b514,U+b798,U+b808,U+b824-b825,U+b8cc,U+b978,U+b9d0,U+b9e4,U+baa9,U+bb3c,U+bc18,U+bc1c,U+bc30,U+bc84,U+bcf5,U+bcf8,U+bd84,U+be0c,U+be14,U+c0b0,U+c0c9,U+c0dd,U+c124,U+c2dd,U+c2e4,U+c2ec,U+c54c,U+c57c-c57d,U+c591,U+c5c5-c5c6,U+c5ed,U+c608,U+c640,U+c6b8,U+c6d4,U+c784,U+c7ac,U+c800-c801,U+c9c1,U+c9d1,U+cc28,U+cc98,U+cc9c,U+ccad,U+cd5c,U+cd94,U+cd9c,U+cde8,U+ce68,U+cf54,U+d0dc,U+d14c,U+d1a0,U+d1b5,U+d2f0,U+d30c,U+d310,U+d398,U+d45c,U+d50c,U+d53c,U+d560,U+d568,U+d589,U+d604,U+d6c4,U+d788}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-118-wght-normal-Be8jlQ51.woff2) format("woff2-variations");unicode-range:U+39,U+49,U+4d-4e,U+a0,U+ac04,U+ac1c,U+ac70,U+ac8c,U+acbd,U+acf5,U+acfc,U+ad00,U+ad6c,U+adf8,U+b098,U+b0b4,U+b294,U+b2c8,U+b300,U+b3c4,U+b3d9,U+b4dc,U+b4e4,U+b77c,U+b7ec,U+b85d,U+b97c,U+b9c8,U+b9cc,U+ba54,U+ba74,U+ba85,U+baa8,U+bb34,U+bb38,U+bbf8,U+bc14,U+bc29,U+bc88,U+bcf4,U+bd80,U+be44,U+c0c1,U+c11c,U+c120,U+c131,U+c138,U+c18c,U+c218,U+c2b5,U+c2e0,U+c544,U+c548,U+c5b4,U+c5d0,U+c5ec,U+c5f0,U+c601,U+c624,U+c694,U+c6a9,U+c6b0,U+c6b4,U+c6d0,U+c704,U+c720,U+c73c,U+c740,U+c744,U+c74c,U+c758,U+c77c,U+c785,U+c788,U+c790-c791,U+c7a5,U+c804,U+c815,U+c81c,U+c870,U+c8fc,U+c911,U+c9c4,U+ccb4,U+ce58,U+ce74,U+d06c,U+d0c0,U+d130,U+d2b8,U+d3ec,U+d504,U+d55c,U+d569,U+d574,U+d638,U+d654,U+d68c}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-119-wght-normal-C_6m2-od.woff2) format("woff2-variations");unicode-range:U+20-22,U+27-2a,U+2c-38,U+3a-3b,U+3f,U+41-47,U+4a-4c,U+4f-5d,U+61-7b,U+7d,U+a1,U+ab,U+ae,U+b7,U+bb,U+bf,U+2013-2014,U+201c-201d,U+2122,U+ac00,U+ace0,U+ae30,U+b2e4,U+b85c,U+b9ac,U+c0ac,U+c2a4,U+c2dc,U+c774,U+c778,U+c9c0,U+d558}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-cyrillic-wght-normal-Bd4ZsfxM.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-vietnamese-wght-normal-BHUVOYrQ.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-latin-ext-wght-normal-B5bX9d3o.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Noto Sans KR Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-kr-latin-wght-normal-CZ1P3i-_.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(data:font/woff2;base64,d09GMgABAAAAAA7UABYAAAAAGdwAAA5mAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGYIKG4EYHHI/SFZBUl0GYD9TVEFUgR4nKgCBJC9sEQgKkhiODgscADCMOAE2AiQDNAQgBYYwByAMBxckGBwbOxajoqRTLkL0j8PYGb2zl5FsCJ1Ws2pqQfJWZy61ukFwJBnjziIwQpJZn3+as79vZjKEmThpVqCvwUJSQaxigZCUiocGsSDipydQ6uYBVpXd7+w6PxNuVpA4y4VARGyd5MSs+um//qK+e6r2S9PsnnpMiYgShedp5/uxFllQdw1sKjObyHi29ffLnP1vLwmlLrV/SheyK8FgzLu37M2+/NmU0je9q3QH3cUFB1EMaveO0ruKw5XmERYhMdph25CmEgLEduHAF9dLZbKaIdVTqlQsWJhlc2Kve/uLBAFBCRmAXjwDBz7BNsWOEb25pgyGUZNfCsN0VhRjxFLhvOvDWVcBAx4AwIKDUYA29Agw6TqqjBcjaMKyZxVhEaNi9HD2PSMZBKzU01IFA4hnEZYdDX57vMskz3WAwxXnFuRY37p/tBCiprK8AgSAbqzLwCwnwLe+fl1gZtYAAsaYBLljg88QbtC4wHvnOqX5NRWQKrKwOQaWSqpRQtRHCd8/C2dQgbFZq8gCWJtgzZ4idXdGdAVIauJsPQHOBCU9vKwyt+wmnDQk4OENwkoGgsO1lQAL+UdD4EsiGoAACO1PW17n6AFvtIS01pfr5ytz7KfySABmSUkGMNmfl2QiMlaAERm4vuz220Nci58OM/2mmVWeRcAtij6bJ14AwAxiPgXo8SDdoerB++n8MI2FRXWEANCgBotlM0umEg3Q5Wp5YJcSEY90GRkKrMOAIat69LVz2QrSZ+YqmeS+KspcNaufo2E7CTDmlgG4JRVhrJb2fNe7rx6B9y4iHpkYanLbbdscpIqMZ7IQdBlAFrCcB6C3A3jsXYuVBOS/ylSAc7WvUwEJsZv4WAQe7sMDRwAHIwPfloBBgF0eT24kxEZ52omAtK7CkNSRUplJSFoYzZaBeBNhn2RlqAMiAzoayGEVKKBPKEnEOKISmaSLBbQCRAPclBGPB0B4QR4HtNMxE5gbwJ4CAu7hAAkABgwUUMILCkjhBRl4MByLjXgZz4tcnlQqSD3LILjpooazBPLPWJHJxWj4lTxvTsoPMZphbSGu9hkwQCLKpGqLbEmf18rxfJKXmi8pVOTnezUpCwr4QkcqEZFsX3KEtB8Vlx6G61DWHCLCLq6qlQa73VM2oIPuZY+fEgr7YnmhyAip5CHtbNni9q73grZ0O0KO+9TDt2+3u7lzJyf4mHuE4WpPpppXtfJqr1Zt2b+xpWzYoNPUnrDsGG68kPN4V5dp3Trtke7u0Oz1l2ENYOsKPHS5jMAmQUbmeFzGsVAatghLcm3SrrsntIufX/rOxo2EiLlQkELISLW5Og+/fm0yHnnzZnChnDmZ1kqVMwIrs1vqSMk+3oW1Rq5bp73SPS80KtjN9kf0BCrlsiNOsgUOEcJRSSLDKZZyQRmaETJDDneZjEe67SGX/bMkb+3pGWQ65Q7PFSGkiiAQCLGLECFLPSIdMpLFGOcovtHccfe7OpPGisJ1LOvswwqhIDUB2G4o2XC5HyPErZFckXNtCtrnFjZs0Z3vuihu3EhaCSnCkm5MJ+0908WlXfNQsMQ9Ha4uzBTH7f89hOQBjMA6jrkTt8uOvn07JOlRMlJ/kyXl8Ov3jFu6Bztd67pPVYqkWJJryx1yIiO03UMl41OYoNZEZAQ237UpqAfCt5xEIjqgIM9H19zGH/Q/rPQbu6kt4/ZbEmm6m9am+GtF8lZouc5+agu23bjiiXKBVrdAqVqg0y5Aji+/1TLUItla7eUxwyz0EjHi54f6+Ow2X83ChRGmjLq3Vppq37WVbh2052v6tXwjnUdXdNBFNHDhpW140aMn+nUKdvGeXHBsN5wP9E8qe1Sun7N28Jain4oPHDuQ8nPvoIOm0SnDtvmOTjp3uBPzyN6SGcVgA8ftvOi+Pba46RPjg2KuWQISx46fbI0XQkbPirf+EvPMwsaZR04zdJCAERPMY15brlnd5o+HmRw13W/9kn+VLIjZlP6i9ULTzml02t00mk33pN2foX5Ib9qMq5oNGyN6HYkXH8xTrXJ/vSucL7fdGrVql83rHp0gocfp+HZqpelq+od287muvhztTK72uy4EfLqarvZJv0FvKLQfh1PNTg2Vfa0F/WsPzH47a3JmQtbI3ZaX1rVZYzIT7VO/KbhqNNc1Lcy1+ke/nJ0waGFmbV33Lj5nVT/tV+XeoDdKf6Hf0dffvv/g2hxqVbncb1eFSSoMVaNcQpL0lvUNPTeLHto1/fu4MTqLwTzeujvrfavVNNtkTVQd/3+QPTijt2rK8KWdv/5NN9PaItqAz+hnaE6jzV9RlPxYNyfR1bRD8p49aX/DysnR2pPRiRE1S2bu1M0Yu81nd9//LGQEX2lTWbFrV4Owh2qo6xx9s2Ph1vH9cnqc5ho7zvTT9PTe8/S8dP8NeoPdQ//GxUr/anPJVJ+ixoghY/NoqVAcfuYvWqn7Vhs4gyTosmOz4/DK+9VmOcaQtizbgblzD9iysgwd44BZ+25PT6dui29sjN+WmmooKAOm2v8VvJq+bi9da/9Pf1461e4K+uq/jULEiiUJ9kmTx/oUtwQkllYPqZu+KfOB60G0ebPYoVp5966/SVIRGx7peiV7lzbOoq/olSJ6jE5N9p3oS30n+I4Y2Ovore6WoyZzlOIRqI+Zmj9eqD3H/c9KYvgccS9z6lSh+B5NltJWipxVrzXBm17BKbKgsR4O+Uwg8nV5IRgWbCE6MpUcJz8ywcwO5luWNcNFIIUEgAve7fP2INKd0fw9MaNTObdoLP0b8+jY9Lm3ko6WdmHGvYED783w0I6aHo/O4YnYdIvJQ4id7oc/H7SdtGZasQ+LMY94ExY/uMyEtJtpSJezBxLJQZybY2E2Dfz0BZ7L7O5ubVmODOq1AsbnC5YCwZJis6ne3l5vfPbsOKvXZ7+p1d+quPvo0VK5mnQ5LKYvvthnk16lUBxef8n7kD1x7o59PigTTIVgMCDOcbuDOc0rNvftIo0mFLLbSdLtrtdpGoZpGkUXbw+E2f1GtkwteWCvns6P5hjCBVaFUps3wYB5t87lIQTzvwLBABY6ccS5EmOVzZeZLBr6f9188KsQU5tMqvWgW0nHBUcgLnuWCARjqbRcJuSCdDicKrfbMtmbN/N5v6/Vfv26rzPaXUZ+p5TxfdzaMkv5a6C/U4sEA74AHmFrtZrNJpPFgsXqdIxqDIb+O3zrCxPEOYxPVmlOAUaxd8qjZ1PtHkUDDjuOG/jrGUu5uWNhjse9ehlk8EVKdblaLhVKFARR8nBY7qvvp8hcoQFUty4CJ1uy5bjTaCysHo8bx/f2aA/y8SNCvIosGpVNllwErZXJkK9t+L4aIs5mG3ILJh/KZN7Lt24NCU1PPJDTLIOYrHHgw9tPITKb2N7a9+BO3nRYIwkEzV698ngajcWCx//5Jx5QC08xnEEKm1Pdz+XS0XBsmYomsmRXbjeJGGzR/4p8A+JWSxzb24slHI5E0GgMvhHiwfnrcbPVLJDf3r19/eYNRZIXL1JJPk+AZrOJqdNoMJRP1ysWC3lpwWx2uSIMRiS0taVSVSohCMfbbUjIjtvb3a7VmskwjSuGmdHZsF1vUGo7wIaTh/X5ms0ghCi1hWz0sP/HBhYPvsRQiC3lpDOtxgrVaM+3bxKJxazXJ5hMfO0HDX/QUml3F993Hzvq4kwH5XgQw6D1sD3slzLvD7z//4fa2LMbDx9Op7QS2sNiEXuE9uDOWs05HdYLhb7KalBi0E1cBIGrFXL+/v0H9+/dvaNHTCyWT19vyudNVr/fynsBY7FoNJfLZgdJOpr3+CJ3rp09tiuetruddrPp3feQcqbNTiv65cX/SPR6rSuK/ntBLn/50uHw+WIKExgv32BvJtk9tmMQ8zkoen0YRA87HeaZe6i4e/fOndsWam5iBIF5TGBFjfq42IhaAawURpDHHA9A07bOjxwCgOSDtLs9OF6vm3V6k07AoXulvEqtUSsVQjYwycY0clSYSBVrRqMa4zO57NmwEA76Edz4WI1hLJZUev/2y/t6dBIJCBKPZOWMGogluoNXO+eOoBT1pt3IZ5pivfZ+0I1Y1P/lS4RS29TgEOSKZb12Pn3MDDEWFMXfPYOnOH3qVKMhjcelmmIR1mi1nQ6GlUrwZAI3LL4rczkBJnONbSrIiGMx3LagxgjlRHjAqE8BMtBGA2+fID8jo1pSKbzu5lLxd8/++PdfrxSYPnIQ8SAbBMDJn67v/Y8BYHFB4HQwYB9bNXHCBJu1/47u/VcbOK+DtGV5HcASdBKR8PjxAm4thwPtOGA7toQZSeBDAwzh9X+/isxSjvmFx7I/APDJKfNBAD5f81/P0vBXRazx0gDgwQAACMAt+nOAeKkc3z87BgjcxeXsD/J8AhAfONOA9DyUyIVmJIqRZaWcSYR9PwSupdavWBDOO87eRnZIgoC0SQYKUiFZmBPal7NSghL3JA/qgFQgWs0qNSlKGhACGTL1tt59BS1FaE2SMggw23Ic0lIBGaKlEipBUgUp/KQaGgJtPR8Qr4xTrlJWTerUcIpXqUyebzpbvnLF+zAV8rh+ylN4RKEidfHdj2U75G/rdkW+ClSnyihho2atXDWKM9eJHqqWy5wrp1xYbz2dzRTTVPrNmc2pYgU922JYxrI58tVEcmWqqRcpVPjg6BVO5PTRiuJV7nluUF8Ehzoqj5C65ZxK5ZO4QLjJ9uXhGNJjxRwZLirz7zBanATxphsNZxJ5ura1miVfoXrJo2viovVjpR+P05cZ5TKBpIeLaIe2OFIdvTh5rHJABzKKqhpn2aGcFBXaPJdXqSZDD/RGxelF9EiqVkDV8LhiVzaZoK5sGqdyhtQQs6dcvwS5dUKEYuH25iFEutQl4pl/ccsRFUjfGn45z9/2r2kgjJnQqcFWYQXqRc4ijZ8QAQ==) format("woff2-variations");unicode-range:U+1f1e9-1f1f5,U+1f1f7-1f1ff,U+1f21a,U+1f232,U+1f234-1f237,U+1f250-1f251,U+1f300,U+1f302-1f308,U+1f30a-1f311,U+1f315,U+1f319-1f320,U+1f324,U+1f327,U+1f32a,U+1f32c-1f32d,U+1f330-1f357,U+1f359-1f37e}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-5-wght-normal-DI846rD9.woff2) format("woff2-variations");unicode-range:U+fee3,U+fef3,U+ff03-ff04,U+ff07,U+ff0a,U+ff17-ff19,U+ff1c-ff1d,U+ff20-ff3a,U+ff3c,U+ff3e-ff5b,U+ff5d,U+ff61-ff65,U+ff67-ff6a,U+ff6c,U+ff6f-ff78,U+ff7a-ff7d,U+ff80-ff84,U+ff86,U+ff89-ff8e,U+ff92,U+ff97-ff9b,U+ff9d-ff9f,U+ffe0-ffe4,U+ffe6,U+ffe9,U+ffeb,U+ffed,U+fffc,U+1f004,U+1f170-1f171,U+1f192-1f195,U+1f198-1f19a,U+1f1e6-1f1e8}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-6-wght-normal-ozUCEY9O.woff2) format("woff2-variations");unicode-range:U+f0a7,U+f0b2,U+f0b7,U+f0c9,U+f0d8,U+f0da,U+f0dc-f0dd,U+f0e0,U+f0e6,U+f0eb,U+f0fc,U+f101,U+f104-f105,U+f107,U+f10b,U+f11b,U+f14b,U+f18a,U+f193,U+f1d6-f1d7,U+f244,U+f27a,U+f296,U+f2ae,U+f471,U+f4b3,U+f610-f611,U+f880-f881,U+f8ec,U+f8f5,U+f8ff,U+f901,U+f90a,U+f92c-f92d,U+f934,U+f937,U+f941,U+f965,U+f967,U+f969,U+f96b,U+f96f,U+f974,U+f978-f979,U+f97e,U+f981,U+f98a,U+f98e,U+f997,U+f99c,U+f9b2,U+f9b5,U+f9ba,U+f9be,U+f9ca,U+f9d0-f9d1,U+f9dd,U+f9e0-f9e1,U+f9e4,U+f9f7,U+fa00-fa01,U+fa08,U+fa0a,U+fa11,U+fb01-fb02,U+fdfc,U+fe0e,U+fe30-fe31,U+fe33-fe44,U+fe49-fe52,U+fe54-fe57,U+fe59-fe66,U+fe68-fe6b,U+fe8e,U+fe92-fe93,U+feae,U+feb8,U+fecb-fecc,U+fee0}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-21-wght-normal-DIu_1ZBI.woff2) format("woff2-variations");unicode-range:U+9f83,U+9f85-9f8d,U+9f90-9f91,U+9f94-9f96,U+9f98,U+9f9b-9f9c,U+9f9e,U+9fa0,U+9fa2,U+9ff0-9fff,U+a001,U+a007,U+a025,U+a046-a047,U+a057,U+a072,U+a078-a079,U+a083,U+a085,U+a100,U+a118,U+a132,U+a134,U+a1f4,U+a242,U+a4a6,U+a4aa,U+a4b0-a4b1,U+a4b3,U+a9c1-a9c2,U+ac00-ac01,U+ac04,U+ac08,U+ac10-ac11,U+ac13-ac16,U+ac19,U+ac1c-ac1d,U+ac24,U+ac70-ac71,U+ac74,U+ac77-ac78,U+ac80-ac81,U+ac83,U+ac8c,U+ac90,U+ac9f-aca0,U+aca8-aca9,U+acac,U+acb0,U+acbd,U+acc1,U+acc4,U+ace0-ace1,U+ace4,U+ace8,U+acf3,U+acf5,U+acfc-acfd,U+ad00,U+ad0c,U+ad11,U+ad1c,U+ad34,U+ad50,U+ad64,U+ad6c,U+ad70,U+ad74,U+ad7f,U+ad81,U+ad8c,U+adc0,U+adc8,U+addc,U+ade0,U+adf8-adf9,U+adfc,U+ae00,U+ae08-ae09,U+ae0b,U+ae30,U+ae34,U+ae38,U+ae40,U+ae4a,U+ae4c,U+ae54,U+ae68,U+aebc,U+aed8,U+af2c-af2d}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-22-wght-normal-VXjdYcT-.woff2) format("woff2-variations");unicode-range:U+9e30-9e33,U+9e35-9e3b,U+9e3e,U+9e40-9e44,U+9e46-9e4e,U+9e51,U+9e53,U+9e55-9e58,U+9e5a-9e5c,U+9e5e-9e63,U+9e66-9e6e,U+9e71,U+9e73,U+9e75,U+9e78-9e79,U+9e7c-9e7e,U+9e82,U+9e86-9e88,U+9e8b-9e8c,U+9e90-9e91,U+9e93,U+9e95,U+9e97,U+9e9d,U+9ea4-9ea5,U+9ea9-9eaa,U+9eb4-9eb5,U+9eb8-9eba,U+9ebc-9ebf,U+9ec3,U+9ec9,U+9ecd,U+9ed0,U+9ed2-9ed3,U+9ed5-9ed6,U+9ed9,U+9edc-9edd,U+9edf-9ee0,U+9ee2,U+9ee5,U+9ee7-9eea,U+9eef,U+9ef1,U+9ef3-9ef4,U+9ef6,U+9ef9,U+9efb-9efc,U+9efe,U+9f0b,U+9f0d,U+9f10,U+9f14,U+9f17,U+9f19,U+9f22,U+9f29,U+9f2c,U+9f2f,U+9f31,U+9f37,U+9f39,U+9f3d-9f3e,U+9f41,U+9f4a-9f4b,U+9f51-9f52,U+9f61-9f63,U+9f66-9f67,U+9f80-9f81}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-23-wght-normal-4HrHKhpL.woff2) format("woff2-variations");unicode-range:U+9c82-9c83,U+9c85-9c8c,U+9c8e-9c92,U+9c94-9c9b,U+9c9e-9ca3,U+9ca5-9ca7,U+9ca9,U+9cab,U+9cad-9cae,U+9cb1-9cb7,U+9cb9-9cbd,U+9cbf-9cc0,U+9cc3,U+9cc5-9cc7,U+9cc9-9cd1,U+9cd3-9cda,U+9cdc-9cdd,U+9cdf,U+9ce1-9ce3,U+9ce5,U+9ce9,U+9cee-9cef,U+9cf3-9cf4,U+9cf6,U+9cfc-9cfd,U+9d02,U+9d08-9d09,U+9d12,U+9d1b,U+9d1e,U+9d26,U+9d28,U+9d37,U+9d3b,U+9d3f,U+9d51,U+9d59,U+9d5c-9d5d,U+9d5f-9d61,U+9d6c,U+9d70,U+9d72,U+9d7a,U+9d7e,U+9d84,U+9d89,U+9d8f,U+9d92,U+9daf,U+9db4,U+9db8,U+9dbc,U+9dc4,U+9dc7,U+9dc9,U+9dd7,U+9ddf,U+9df2,U+9df9-9dfa,U+9e0a,U+9e11,U+9e1a,U+9e1e,U+9e20,U+9e22,U+9e28-9e2c,U+9e2e-9e2f}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-24-wght-normal-B58DWgHS.woff2) format("woff2-variations");unicode-range:U+9a80,U+9a83,U+9a85,U+9a88-9a8a,U+9a8d-9a8e,U+9a90,U+9a92-9a93,U+9a95-9a96,U+9a98-9a99,U+9a9b-9aa2,U+9aa5,U+9aa7,U+9aaf-9ab1,U+9ab5-9ab6,U+9ab9-9aba,U+9ac0-9ac4,U+9ac8,U+9acb-9acc,U+9ace-9acf,U+9ad1-9ad2,U+9ad9,U+9adf,U+9ae1,U+9ae3,U+9aea-9aeb,U+9aed-9aef,U+9af4,U+9af9,U+9afb,U+9b03-9b04,U+9b06,U+9b08,U+9b0d,U+9b0f-9b10,U+9b13,U+9b18,U+9b1a,U+9b1f,U+9b22-9b23,U+9b25,U+9b27-9b28,U+9b2a,U+9b2f,U+9b31-9b32,U+9b3b,U+9b43,U+9b46-9b49,U+9b4d-9b4e,U+9b51,U+9b56,U+9b58,U+9b5a,U+9b5c,U+9b5f,U+9b61-9b62,U+9b6f,U+9b77,U+9b80,U+9b88,U+9b8b,U+9b8e,U+9b91,U+9b9f-9ba0,U+9ba8,U+9baa-9bab,U+9bad-9bae,U+9bb0-9bb1,U+9bb8,U+9bc9-9bca,U+9bd3,U+9bd6,U+9bdb,U+9be8,U+9bf0-9bf1,U+9c02,U+9c10,U+9c15,U+9c24,U+9c2d,U+9c32,U+9c39,U+9c3b,U+9c40,U+9c47-9c49,U+9c53,U+9c57,U+9c64,U+9c72,U+9c77-9c78,U+9c7b,U+9c7f-9c80}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-25-wght-normal-C3Jm6l7O.woff2) format("woff2-variations");unicode-range:U+98dd,U+98e1-98e2,U+98e7-98ea,U+98ec,U+98ee-98ef,U+98f2,U+98f4,U+98fc-98fe,U+9903,U+9905,U+9908,U+990a,U+990c-990d,U+9913-9914,U+9918,U+991a-991b,U+991e,U+9921,U+9928,U+992c,U+992e,U+9935,U+9938-9939,U+993d-993e,U+9945,U+994b-994c,U+9951-9952,U+9954-9955,U+9957,U+995e,U+9963,U+9966-9969,U+996b-996c,U+996f,U+9974-9975,U+9977-9979,U+997d-997e,U+9980-9981,U+9983-9984,U+9987,U+998a-998b,U+998d-9991,U+9993-9995,U+9997-9998,U+99a5,U+99ab,U+99ad-99ae,U+99b1,U+99b3-99b4,U+99bc,U+99bf,U+99c1,U+99c3-99c6,U+99cc,U+99d0,U+99d2,U+99d5,U+99db,U+99dd,U+99e1,U+99ed,U+99f1,U+99ff,U+9a01,U+9a03-9a04,U+9a0e-9a0f,U+9a11-9a13,U+9a19,U+9a1b,U+9a28,U+9a2b,U+9a30,U+9a32,U+9a37,U+9a40,U+9a45,U+9a4a,U+9a4d-9a4e,U+9a52,U+9a55,U+9a57,U+9a5a-9a5b,U+9a5f,U+9a62,U+9a65,U+9a69,U+9a6b,U+9a6e,U+9a75,U+9a77-9a7a,U+9a7d}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-26-wght-normal-YNOygvr_.woff2) format("woff2-variations");unicode-range:U+975b-975c,U+9763,U+9765-9766,U+976c-976d,U+9773,U+9776,U+977a,U+977c,U+9784-9785,U+978e-978f,U+9791-9792,U+9794-9795,U+9798,U+979a,U+979e,U+97a3,U+97a5-97a6,U+97a8,U+97ab-97ac,U+97ae-97af,U+97b2,U+97b4,U+97c6,U+97cb-97cc,U+97d3,U+97d8,U+97dc,U+97e1,U+97ea-97eb,U+97ee,U+97fb,U+97fe-97ff,U+9801-9803,U+9805-9806,U+9808,U+980c,U+9810-9814,U+9817-9818,U+981e,U+9820-9821,U+9824,U+9828,U+982b-982d,U+9830,U+9834,U+9838-9839,U+983c,U+9846,U+984d-984f,U+9851-9852,U+9854-9855,U+9857-9858,U+985a-985b,U+9862-9863,U+9865,U+9867,U+986b,U+986f-9871,U+9877-9878,U+987c,U+9880,U+9883,U+9885,U+9889,U+988b-988f,U+9893-9895,U+9899-989b,U+989e-989f,U+98a1-98a2,U+98a5-98a7,U+98a9,U+98af,U+98b1,U+98b6,U+98ba,U+98be,U+98c3-98c4,U+98c6-98c8,U+98cf-98d6,U+98da-98db}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-27-wght-normal-BP2pEGQH.woff2) format("woff2-variations");unicode-range:U+95c4-95ca,U+95cc-95cd,U+95d4-95d6,U+95d8,U+95e1-95e2,U+95e9,U+95f0-95f1,U+95f3,U+95f6,U+95fc,U+95fe-95ff,U+9602-9604,U+9606-960d,U+960f,U+9611-9613,U+9615-9617,U+9619-961b,U+961d,U+9621,U+9628,U+962f,U+963c-963e,U+9641-9642,U+9649,U+9654,U+965b-965f,U+9661,U+9663,U+9665,U+9667-9668,U+966c,U+9670,U+9672-9674,U+9678,U+967a,U+967d,U+9682,U+9685,U+9688,U+968a,U+968d-968e,U+9695,U+9697-9698,U+969e,U+96a0,U+96a3-96a4,U+96a8,U+96aa,U+96b0-96b1,U+96b3-96b4,U+96b7-96b9,U+96bb-96bd,U+96c9,U+96cb,U+96ce,U+96d1-96d2,U+96d6,U+96d9,U+96db-96dc,U+96de,U+96e0,U+96e3,U+96e9,U+96eb,U+96f0-96f2,U+96f9,U+96ff,U+9701-9702,U+9705,U+9708,U+970a,U+970e-970f,U+9711,U+9719,U+9727,U+972a,U+972d,U+9730,U+973d,U+9742,U+9744,U+9748-9749,U+9750-9751,U+975a}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-28-wght-normal-BWPKDbtH.woff2) format("woff2-variations");unicode-range:U+94f5,U+94f7,U+94f9,U+94fb-94fd,U+94ff,U+9503-9504,U+9506-9507,U+9509-950a,U+950d-950f,U+9511-9518,U+951a-9520,U+9522,U+9528-952d,U+9530-953a,U+953c-953f,U+9543-9546,U+9548-9550,U+9552-9555,U+9557-955b,U+955d-9568,U+956a-956d,U+9570-9574,U+9583,U+9586,U+9589,U+958e-958f,U+9591-9592,U+9594,U+9598-9599,U+959e-95a0,U+95a2-95a6,U+95a8-95b2,U+95b4,U+95b8-95c3}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-29-wght-normal-45aVmHn_.woff2) format("woff2-variations");unicode-range:U+941c-942b,U+942d-942e,U+9432-9433,U+9435,U+9438,U+943a,U+943e,U+9444,U+944a,U+9451-9452,U+945a,U+9462-9463,U+9465,U+9470-9487,U+948a-9492,U+9494-9498,U+949a,U+949c-949d,U+94a1,U+94a3-94a4,U+94a8,U+94aa-94ad,U+94af,U+94b2,U+94b4-94ba,U+94bc-94c0,U+94c4,U+94c6-94db,U+94de-94ec,U+94ee-94f1,U+94f3}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-30-wght-normal-B8_s30jZ.woff2) format("woff2-variations");unicode-range:U+92ec-92ed,U+92f0,U+92f3,U+92f8,U+92fc,U+9304,U+9306,U+9310,U+9312,U+9315,U+9318,U+931a,U+931e,U+9320-9322,U+9324,U+9326-9329,U+932b-932c,U+932f,U+9331-9332,U+9335-9336,U+933e,U+9340-9341,U+934a-9360,U+9362-9363,U+9365-936b,U+936e,U+9375,U+937e,U+9382,U+938a,U+938c,U+938f,U+9393-9394,U+9396-9397,U+939a,U+93a2,U+93a7,U+93ac-93cd,U+93d0-93d1,U+93d6-93d8,U+93de-93df,U+93e1-93e2,U+93e4,U+93f8,U+93fb,U+93fd,U+940e-941a}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-31-wght-normal-DW0t445S.woff2) format("woff2-variations");unicode-range:U+9163-9164,U+9169,U+9170,U+9172,U+9174,U+9179-917a,U+917d-917e,U+9182-9183,U+9185,U+918c-918d,U+9190-9191,U+919a,U+919c,U+91a1-91a4,U+91a8,U+91aa-91af,U+91b4-91b5,U+91b8,U+91ba,U+91be,U+91c0-91c1,U+91c6,U+91c8,U+91cb,U+91d0,U+91d2,U+91d7-91d8,U+91dd,U+91e3,U+91e6-91e7,U+91ed,U+91f0,U+91f5,U+91f9,U+9200,U+9205,U+9207-920a,U+920d-920e,U+9210,U+9214-9215,U+921c,U+921e,U+9221,U+9223-9227,U+9229-922a,U+922d,U+9234-9235,U+9237,U+9239-923a,U+923c-9240,U+9244-9246,U+9249,U+924e-924f,U+9251,U+9253,U+9257,U+925b,U+925e,U+9262,U+9264-9266,U+9268,U+926c,U+926f,U+9271,U+927b,U+927e,U+9280,U+9283,U+9285-928a,U+928e,U+9291,U+9293,U+9296,U+9298,U+929c-929d,U+92a8,U+92ab-92ae,U+92b3,U+92b6-92b7,U+92b9,U+92c1,U+92c5-92c6,U+92c8,U+92cc,U+92d0,U+92d2,U+92e4,U+92ea}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-32-wght-normal-ShbWPcei.woff2) format("woff2-variations");unicode-range:U+9004,U+900b,U+9011,U+9015-9016,U+901e,U+9021,U+9026,U+902d,U+902f,U+9031,U+9035-9036,U+9039-903a,U+9041,U+9044-9046,U+904a,U+904f-9052,U+9054-9055,U+9058-9059,U+905b-905e,U+9060-9062,U+9068-9069,U+906f,U+9072,U+9074,U+9076-907a,U+907c-907d,U+9081,U+9083,U+9085,U+9087-908b,U+908f,U+9095,U+9097,U+9099-909b,U+909d,U+90a0-90a1,U+90a8-90a9,U+90ac,U+90b0,U+90b2-90b4,U+90b6,U+90b8,U+90ba,U+90bd-90be,U+90c3-90c5,U+90c7-90c8,U+90cf-90d0,U+90d3,U+90d5,U+90d7,U+90da-90dc,U+90de,U+90e2,U+90e4,U+90e6-90e7,U+90ea-90eb,U+90ef,U+90f4-90f5,U+90f7,U+90fe-9100,U+9104,U+9109,U+910c,U+9112,U+9114-9115,U+9118,U+911c,U+911e,U+9120,U+9122-9123,U+9127,U+912d,U+912f-9132,U+9139-913a,U+9143,U+9146,U+9149-914a,U+914c,U+914e-9150,U+9154,U+9157,U+915a,U+915d-915e,U+9161-9162}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-33-wght-normal-BOTZYTjM.woff2) format("woff2-variations");unicode-range:U+8e41-8e42,U+8e47,U+8e49-8e4b,U+8e50-8e53,U+8e59-8e5a,U+8e5f-8e60,U+8e64,U+8e69,U+8e6c,U+8e70,U+8e74,U+8e76,U+8e7a-8e7c,U+8e7f,U+8e84-8e85,U+8e87,U+8e89,U+8e8b,U+8e8d,U+8e8f-8e90,U+8e94,U+8e99,U+8e9c,U+8e9e,U+8eaa,U+8eac,U+8eb0,U+8eb6,U+8ec0,U+8ec6,U+8eca-8ece,U+8ed2,U+8eda,U+8edf,U+8ee2,U+8eeb,U+8ef8,U+8efb-8efe,U+8f03,U+8f09,U+8f0b,U+8f12-8f15,U+8f1b,U+8f1d,U+8f1f,U+8f29-8f2a,U+8f2f,U+8f36,U+8f38,U+8f3b,U+8f3e-8f3f,U+8f44-8f45,U+8f49,U+8f4d-8f4e,U+8f5f,U+8f6b,U+8f6d,U+8f71-8f73,U+8f75-8f76,U+8f78-8f7a,U+8f7c,U+8f7e,U+8f81-8f82,U+8f84,U+8f87,U+8f8a-8f8b,U+8f8d-8f8f,U+8f94-8f95,U+8f97-8f9a,U+8fa6,U+8fad-8faf,U+8fb2,U+8fb5-8fb7,U+8fba-8fbc,U+8fbf,U+8fc2,U+8fcb,U+8fcd,U+8fd3,U+8fd5,U+8fd7,U+8fda,U+8fe2-8fe5,U+8fe8-8fe9,U+8fee,U+8ff3-8ff4,U+8ff8,U+8ffa}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-34-wght-normal-BF1rqDSt.woff2) format("woff2-variations");unicode-range:U+8cbd,U+8cbf-8cc4,U+8cc7-8cc8,U+8cca,U+8ccd,U+8cd1,U+8cd3,U+8cdb-8cdc,U+8cde,U+8ce0,U+8ce2-8ce4,U+8ce6-8ce8,U+8cea,U+8ced,U+8cf4,U+8cf8,U+8cfa,U+8cfc-8cfd,U+8d04-8d05,U+8d07-8d08,U+8d0a,U+8d0d,U+8d0f,U+8d13-8d14,U+8d16,U+8d1b,U+8d20,U+8d30,U+8d32-8d33,U+8d36,U+8d3b,U+8d3d,U+8d40,U+8d42-8d43,U+8d45-8d46,U+8d48-8d4a,U+8d4d,U+8d51,U+8d53,U+8d55,U+8d59,U+8d5c-8d5d,U+8d5f,U+8d61,U+8d66-8d67,U+8d6a,U+8d6d,U+8d71,U+8d73,U+8d84,U+8d90-8d91,U+8d94-8d95,U+8d99,U+8da8,U+8daf,U+8db1,U+8db5,U+8db8,U+8dba,U+8dbc,U+8dbf,U+8dc2,U+8dc4,U+8dc6,U+8dcb,U+8dce-8dcf,U+8dd6-8dd7,U+8dda-8ddb,U+8dde,U+8de1,U+8de3-8de4,U+8de9,U+8deb-8dec,U+8df0-8df1,U+8df6-8dfd,U+8e05,U+8e07,U+8e09-8e0a,U+8e0c,U+8e0e,U+8e10,U+8e14,U+8e1d-8e1f,U+8e23,U+8e26,U+8e2b-8e31,U+8e34-8e35,U+8e39-8e3a,U+8e3d,U+8e40}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-35-wght-normal-Bosspiyr.woff2) format("woff2-variations");unicode-range:U+8b80,U+8b83,U+8b8a,U+8b8c,U+8b90,U+8b93,U+8b99-8b9a,U+8ba0,U+8ba3,U+8ba5-8ba7,U+8baa-8bac,U+8bb4-8bb5,U+8bb7,U+8bb9,U+8bc2-8bc3,U+8bc5,U+8bcb-8bcc,U+8bce-8bd0,U+8bd2-8bd4,U+8bd6,U+8bd8-8bd9,U+8bdc,U+8bdf,U+8be3-8be4,U+8be7-8be9,U+8beb-8bec,U+8bee,U+8bf0,U+8bf2-8bf3,U+8bf6,U+8bf9,U+8bfc-8bfd,U+8bff-8c00,U+8c02,U+8c04,U+8c06-8c07,U+8c0c,U+8c0f,U+8c11-8c12,U+8c14-8c1b,U+8c1d-8c21,U+8c24-8c25,U+8c27,U+8c2a-8c2c,U+8c2e-8c30,U+8c32-8c36,U+8c3f,U+8c47-8c4c,U+8c4e-8c50,U+8c54-8c56,U+8c62,U+8c68,U+8c6c,U+8c73,U+8c78,U+8c7a,U+8c82,U+8c85,U+8c89-8c8a,U+8c8d-8c8e,U+8c90,U+8c93-8c94,U+8c98,U+8c9d-8c9e,U+8ca0-8ca2,U+8ca7-8cac,U+8caf-8cb0,U+8cb3-8cb4,U+8cb6-8cb9,U+8cbb-8cbc}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-36-wght-normal-CtU9CyKw.woff2) format("woff2-variations");unicode-range:U+8a15-8a18,U+8a1a-8a1b,U+8a1d,U+8a1f,U+8a22-8a23,U+8a25,U+8a2b,U+8a2d,U+8a31,U+8a33-8a34,U+8a36-8a38,U+8a3a,U+8a3c,U+8a3e,U+8a40-8a41,U+8a46,U+8a48,U+8a50,U+8a52,U+8a54-8a55,U+8a58,U+8a5b,U+8a5d-8a63,U+8a66,U+8a69-8a6b,U+8a6d-8a6e,U+8a70,U+8a72-8a73,U+8a7a,U+8a85,U+8a87,U+8a8a,U+8a8c-8a8d,U+8a90-8a92,U+8a95,U+8a98,U+8aa0-8aa1,U+8aa3-8aa6,U+8aa8-8aa9,U+8aac-8aae,U+8ab0,U+8ab2,U+8ab8-8ab9,U+8abc,U+8abe-8abf,U+8ac7,U+8acf,U+8ad2,U+8ad6-8ad7,U+8adb-8adc,U+8adf,U+8ae1,U+8ae6-8ae8,U+8aeb,U+8aed-8aee,U+8af1,U+8af3-8af4,U+8af7-8af8,U+8afa,U+8afe,U+8b00-8b02,U+8b07,U+8b0a,U+8b0c,U+8b0e,U+8b10,U+8b17,U+8b19,U+8b1b,U+8b1d,U+8b20-8b21,U+8b26,U+8b28,U+8b2c,U+8b33,U+8b39,U+8b3e-8b3f,U+8b41,U+8b45,U+8b49,U+8b4c,U+8b4f,U+8b57-8b58,U+8b5a,U+8b5c,U+8b5e,U+8b60,U+8b6c,U+8b6f-8b70,U+8b72,U+8b74,U+8b77,U+8b7d}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-37-wght-normal-ghDiyiuv.woff2) format("woff2-variations");unicode-range:U+8882,U+8884-8886,U+8888,U+888f,U+8892-8893,U+889b,U+88a2,U+88a4,U+88a6,U+88a8,U+88aa,U+88ae,U+88b1,U+88b4,U+88b7,U+88bc,U+88c0,U+88c6-88c9,U+88ce-88cf,U+88d1-88d3,U+88d8,U+88db-88dd,U+88df,U+88e1-88e3,U+88e5,U+88e8,U+88ec,U+88f0-88f1,U+88f3-88f4,U+88fc-88fe,U+8900,U+8902,U+8906-8907,U+8909-890c,U+8912-8915,U+8918-891b,U+8921,U+8925,U+892b,U+8930,U+8932,U+8934,U+8936,U+893b,U+893d,U+8941,U+894c,U+8955-8956,U+8959,U+895c,U+895e-8960,U+8966,U+896a,U+896c,U+896f-8970,U+8972,U+897b,U+897e,U+8980,U+8983,U+8985,U+8987-8988,U+898c,U+898f,U+8993,U+8997,U+899a,U+89a1,U+89a7,U+89a9-89aa,U+89b2-89b3,U+89b7,U+89c0,U+89c7,U+89ca-89cc,U+89ce-89d1,U+89d6,U+89da,U+89dc,U+89de,U+89e5,U+89e7,U+89eb,U+89ef,U+89f1,U+89f3-89f4,U+89f8,U+89ff,U+8a01-8a03,U+8a07-8a0a,U+8a0e-8a0f,U+8a13}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-38-wght-normal-4Nz8k_dt.woff2) format("woff2-variations");unicode-range:U+86f4,U+86f8-86f9,U+86fb,U+86fe,U+8703,U+8706-870a,U+870d,U+8711-8713,U+871a,U+871e,U+8722-8723,U+8725,U+8729,U+872e,U+8731,U+8734,U+8737,U+873a-873b,U+873e-8740,U+8742,U+8747-8748,U+8753,U+8755,U+8757-8758,U+875d,U+875f,U+8762-8766,U+8768,U+876e,U+8770,U+8772,U+8775,U+8778,U+877b-877e,U+8782,U+8785,U+8788,U+878b,U+8793,U+8797,U+879a,U+879e-87a0,U+87a2-87a3,U+87a8,U+87ab-87ad,U+87af,U+87b3,U+87b5,U+87bd,U+87c0,U+87c4,U+87c6,U+87ca-87cb,U+87d1-87d2,U+87db-87dc,U+87de,U+87e0,U+87e5,U+87ea,U+87ec,U+87ee,U+87f2-87f3,U+87fb,U+87fd-87fe,U+8802-8803,U+8805,U+880a-880b,U+880d,U+8813-8816,U+8819,U+881b,U+881f,U+8821,U+8823,U+8831-8832,U+8835-8836,U+8839,U+883b-883c,U+8844,U+8846,U+884a,U+884e,U+8852-8853,U+8855,U+8859,U+885b,U+885d-885e,U+8862,U+8864,U+8869-886a,U+886e-886f,U+8872,U+8879,U+887d-887f}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-39-wght-normal-Ddtm1XVC.woff2) format("woff2-variations");unicode-range:U+8548,U+854e,U+8553,U+8556-8557,U+8559,U+855e,U+8561,U+8564-8565,U+8568-856a,U+856d,U+856f-8570,U+8572,U+8576,U+8579-857b,U+8580,U+8585-8586,U+8588,U+858a,U+858f,U+8591,U+8594,U+8599,U+859c,U+85a2,U+85a4,U+85a6,U+85a8-85a9,U+85ab-85ac,U+85ae,U+85b7-85b9,U+85be,U+85c1,U+85c7,U+85cd,U+85d0,U+85d3,U+85d5,U+85dc-85dd,U+85df-85e0,U+85e5-85e6,U+85e8-85ea,U+85f4,U+85f9,U+85fe-85ff,U+8602,U+8605-8607,U+860a-860b,U+8616,U+8618,U+861a,U+8627,U+8629,U+862d,U+8638,U+863c,U+863f,U+864d,U+864f,U+8652-8655,U+865b-865c,U+865f,U+8662,U+8667,U+866c,U+866e,U+8671,U+8675,U+867a-867c,U+867f,U+868b,U+868d,U+8693,U+869c-869d,U+86a1,U+86a3-86a4,U+86a7-86a9,U+86ac,U+86af-86b1,U+86b4-86b6,U+86ba,U+86c0,U+86c4,U+86c6,U+86c9-86ca,U+86cd-86d1,U+86d4,U+86d8,U+86de-86df,U+86e4,U+86e6,U+86e9,U+86ed,U+86ef-86f3}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-40-wght-normal-BVn4-kgX.woff2) format("woff2-variations");unicode-range:U+83c5,U+83c8-83c9,U+83cb,U+83d1,U+83d3-83d6,U+83d8,U+83db,U+83dd,U+83df,U+83e1,U+83e5,U+83ea-83eb,U+83f0,U+83f4,U+83f8-83f9,U+83fb,U+83fd,U+83ff,U+8401,U+8406,U+840a-840b,U+840f,U+8411,U+8418,U+841c,U+8420,U+8422-8424,U+8426,U+8429,U+842c,U+8438-8439,U+843b-843c,U+843f,U+8446-8447,U+8449,U+844e,U+8451-8452,U+8456,U+8459-845a,U+845c,U+8462,U+8466,U+846d,U+846f-8470,U+8473,U+8476-8478,U+847a,U+847d,U+8484-8485,U+8487,U+8489,U+848c,U+848e,U+8490,U+8493-8494,U+8497,U+849b,U+849e-849f,U+84a1,U+84a5,U+84a8,U+84af,U+84b4,U+84b9-84bf,U+84c1-84c2,U+84c5-84c7,U+84ca-84cb,U+84cd,U+84d0-84d1,U+84d3,U+84d6,U+84df-84e0,U+84e2-84e3,U+84e5-84e7,U+84ee,U+84f3,U+84f6,U+84fa,U+84fc,U+84ff-8500,U+850c,U+8511,U+8514-8515,U+8517-8518,U+851f,U+8523,U+8525-8526,U+8529,U+852b,U+852d,U+8532,U+8534-8535,U+8538-853a,U+853c,U+8543,U+8545}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-41-wght-normal-CZqajZnl.woff2) format("woff2-variations");unicode-range:U+82bc,U+82be,U+82c0-82c2,U+82c4-82c8,U+82ca-82cc,U+82ce,U+82d0,U+82d2-82d3,U+82d5-82d6,U+82d8-82d9,U+82dc-82de,U+82e0-82e4,U+82e7,U+82e9-82eb,U+82ed-82ee,U+82f3-82f4,U+82f7-82f8,U+82fa-8301,U+8306-8308,U+830c-830d,U+830f,U+8311,U+8313-8315,U+8318,U+831a-831b,U+831d,U+8324,U+8327,U+832a,U+832c-832d,U+832f,U+8331-8334,U+833a-833c,U+8340,U+8343-8345,U+8347-8348,U+834a,U+834c,U+834f,U+8351,U+8356,U+8358-835c,U+835e,U+8360,U+8364-8366,U+8368-836a,U+836c-836e,U+8373,U+8378,U+837b-837d,U+837f-8380,U+8382,U+8388,U+838a-838b,U+8392,U+8394,U+8396,U+8398-8399,U+839b-839c,U+83a0,U+83a2-83a3,U+83a8-83aa,U+83ae-83b0,U+83b3-83b4,U+83b6,U+83b8,U+83ba,U+83bc-83bd,U+83bf-83c0,U+83c2}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-42-wght-normal-CQ4lY28u.woff2) format("woff2-variations");unicode-range:U+8166-8169,U+816b,U+816d,U+8171,U+8173-8174,U+8178,U+817c-817d,U+8182,U+8188,U+8191,U+8198-819b,U+81a0,U+81a3,U+81a5-81a6,U+81a9,U+81b6,U+81ba-81bb,U+81bd,U+81bf,U+81c1,U+81c3,U+81c6,U+81c9-81ca,U+81cc-81cd,U+81d1,U+81d3-81d4,U+81d8,U+81db-81dc,U+81de-81df,U+81e5,U+81e7-81e9,U+81eb-81ec,U+81ee-81ef,U+81f5,U+81f8,U+81fa,U+81fc,U+81fe,U+8200-8202,U+8204,U+8208-820a,U+820e-8210,U+8216-8218,U+821b-821c,U+8221-8224,U+8226-8228,U+822b,U+822d,U+822f,U+8232-8234,U+8237-8238,U+823a-823b,U+823e,U+8244,U+8249,U+824b,U+824f,U+8259-825a,U+825f,U+8266,U+8268,U+826e,U+8271,U+8276-8279,U+827d,U+827f,U+8283-8284,U+8288-828a,U+828d-8291,U+8293-8294,U+8296-8298,U+829f-82a1,U+82a3-82a4,U+82a7-82ab,U+82ae,U+82b0,U+82b2,U+82b4-82b6}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-43-wght-normal-psppu0d8.woff2) format("woff2-variations");unicode-range:U+8016,U+8018-8019,U+801c,U+801e,U+8026-802a,U+8031,U+8034-8035,U+8037,U+8043,U+804b,U+804d,U+8052,U+8056,U+8059,U+805e,U+8061,U+8068-8069,U+806e-8074,U+8076-8078,U+807c-8080,U+8082,U+8084-8085,U+8088,U+808f,U+8093,U+809c,U+809f,U+80ab,U+80ad-80ae,U+80b1,U+80b6-80b8,U+80bc-80bd,U+80c2,U+80c4,U+80ca,U+80cd,U+80d1,U+80d4,U+80d7,U+80d9-80db,U+80dd,U+80e0,U+80e4-80e5,U+80e7-80ed,U+80ef-80f1,U+80f3-80f4,U+80fc,U+8101,U+8104-8105,U+8107-8108,U+810c-810e,U+8112-8115,U+8117-8119,U+811b-811f,U+8121-8130,U+8132-8134,U+8137,U+8139,U+813f-8140,U+8142,U+8146,U+8148,U+814d-814e,U+8151,U+8153,U+8158-815a,U+815e,U+8160}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-44-wght-normal-cbKJlTUe.woff2) format("woff2-variations");unicode-range:U+7ef0-7ef2,U+7ef6,U+7efa-7efb,U+7efe,U+7f01-7f04,U+7f08,U+7f0a-7f12,U+7f17,U+7f19,U+7f1b-7f1c,U+7f1f,U+7f21-7f23,U+7f25-7f28,U+7f2a-7f33,U+7f35-7f37,U+7f3d,U+7f42,U+7f44-7f45,U+7f4c-7f4d,U+7f52,U+7f54,U+7f58-7f59,U+7f5d,U+7f5f-7f61,U+7f63,U+7f65,U+7f68,U+7f70-7f71,U+7f73-7f75,U+7f77,U+7f79,U+7f7d-7f7e,U+7f85-7f86,U+7f88-7f89,U+7f8b-7f8c,U+7f90-7f91,U+7f94-7f96,U+7f98-7f9b,U+7f9d,U+7f9f,U+7fa3,U+7fa7-7fa9,U+7fac-7fb2,U+7fb4,U+7fb6,U+7fb8,U+7fbc,U+7fbf-7fc0,U+7fc3,U+7fca,U+7fcc,U+7fce,U+7fd2,U+7fd5,U+7fd9-7fdb,U+7fdf,U+7fe3,U+7fe5-7fe7,U+7fe9,U+7feb-7fec,U+7fee-7fef,U+7ff1,U+7ff3-7ff4,U+7ff9-7ffa,U+7ffe,U+8004,U+8006,U+800b,U+800e,U+8011-8012,U+8014}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-45-wght-normal-MKIEVRIC.woff2) format("woff2-variations");unicode-range:U+7dd2,U+7dd4,U+7dd6-7dd8,U+7dda-7de0,U+7de2-7de6,U+7de8-7ded,U+7def,U+7df1-7df5,U+7df7,U+7df9,U+7dfb-7dfc,U+7dfe-7e02,U+7e04,U+7e08-7e0b,U+7e12,U+7e1b,U+7e1e,U+7e20,U+7e22-7e23,U+7e26,U+7e29,U+7e2b,U+7e2e-7e2f,U+7e31,U+7e37,U+7e39-7e3e,U+7e40,U+7e43-7e44,U+7e46-7e47,U+7e4a-7e4b,U+7e4d-7e4e,U+7e51,U+7e54-7e56,U+7e58-7e5b,U+7e5d-7e5e,U+7e61,U+7e66-7e67,U+7e69-7e6b,U+7e6d,U+7e70,U+7e73,U+7e77,U+7e79,U+7e7b-7e7d,U+7e81-7e82,U+7e8c-7e8d,U+7e8f,U+7e92-7e94,U+7e96,U+7e98,U+7e9a-7e9c,U+7e9e-7e9f,U+7ea1,U+7ea3,U+7ea5,U+7ea8-7ea9,U+7eab,U+7ead-7eae,U+7eb0,U+7ebb,U+7ebe,U+7ec0-7ec2,U+7ec9,U+7ecb-7ecc,U+7ed0,U+7ed4,U+7ed7,U+7edb,U+7ee0-7ee2,U+7ee5-7ee6,U+7ee8,U+7eeb}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-46-wght-normal-CErGc6Mt.woff2) format("woff2-variations");unicode-range:U+7ce8,U+7cec,U+7cf0,U+7cf5-7cf9,U+7cfc,U+7cfe,U+7d00,U+7d04-7d0b,U+7d0d,U+7d10-7d14,U+7d17-7d19,U+7d1b-7d1f,U+7d21,U+7d24-7d26,U+7d28-7d2a,U+7d2c-7d2e,U+7d30-7d31,U+7d33,U+7d35-7d36,U+7d38-7d3a,U+7d40,U+7d42-7d44,U+7d46,U+7d4b-7d4c,U+7d4f,U+7d51,U+7d54-7d56,U+7d58,U+7d5b-7d5c,U+7d5e,U+7d61-7d63,U+7d66,U+7d68,U+7d6a-7d6c,U+7d6f,U+7d71-7d73,U+7d75-7d77,U+7d79-7d7a,U+7d7e,U+7d81,U+7d84-7d8b,U+7d8d,U+7d8f,U+7d91,U+7d94,U+7d96,U+7d98-7d9a,U+7d9c-7da0,U+7da2,U+7da6,U+7daa-7db1,U+7db4-7db8,U+7dba-7dbf,U+7dc1,U+7dc4,U+7dc7-7dc8,U+7dca-7dcd,U+7dcf,U+7dd1}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-47-wght-normal-C5Kgg1_m.woff2) format("woff2-variations");unicode-range:U+7bd3-7bd4,U+7bd9-7bda,U+7bdd,U+7be0-7be1,U+7be4-7be6,U+7be9-7bea,U+7bef,U+7bf4,U+7bf6,U+7bfc,U+7bfe,U+7c01,U+7c03,U+7c07-7c08,U+7c0a-7c0d,U+7c0f,U+7c11,U+7c15-7c16,U+7c19,U+7c1e-7c21,U+7c23-7c24,U+7c26,U+7c28-7c33,U+7c35,U+7c37-7c3b,U+7c3d-7c3e,U+7c40-7c41,U+7c43,U+7c47-7c48,U+7c4c,U+7c50,U+7c53-7c54,U+7c59,U+7c5f-7c60,U+7c63-7c65,U+7c6c,U+7c6e,U+7c72,U+7c74,U+7c79-7c7a,U+7c7c,U+7c81-7c82,U+7c84-7c85,U+7c88,U+7c8a-7c91,U+7c93-7c96,U+7c99,U+7c9b-7c9e,U+7ca0-7ca2,U+7ca6-7ca9,U+7cac,U+7caf-7cb3,U+7cb5-7cb7,U+7cba-7cbd,U+7cbf-7cc2,U+7cc5,U+7cc7-7cc9,U+7ccc-7ccd,U+7cd7,U+7cdc,U+7cde,U+7ce0,U+7ce4-7ce5,U+7ce7}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-48-wght-normal-DFMjDDY6.woff2) format("woff2-variations");unicode-range:U+7ae6,U+7af4-7af7,U+7afa-7afb,U+7afd-7b0a,U+7b0c,U+7b0e-7b0f,U+7b13,U+7b15-7b16,U+7b18-7b19,U+7b1e-7b20,U+7b22-7b25,U+7b29-7b2b,U+7b2d-7b2e,U+7b30-7b3b,U+7b3e-7b3f,U+7b41-7b42,U+7b44-7b47,U+7b4a,U+7b4c-7b50,U+7b58,U+7b5a,U+7b5c,U+7b60,U+7b66-7b67,U+7b69,U+7b6c-7b6f,U+7b72-7b76,U+7b7b-7b7d,U+7b7f,U+7b82,U+7b85,U+7b87,U+7b8b-7b96,U+7b98-7b99,U+7b9b-7b9f,U+7ba2-7ba4,U+7ba6-7bac,U+7bae-7bb0,U+7bb4,U+7bb7-7bb9,U+7bbb,U+7bc0-7bc1,U+7bc3-7bc4,U+7bc6,U+7bc8-7bcc,U+7bd1}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-49-wght-normal-B7l_3BZr.woff2) format("woff2-variations");unicode-range:U+798b-798e,U+7992,U+7994-7995,U+7997-7998,U+799a-799c,U+799f,U+79a3-79a6,U+79a8-79ac,U+79ae-79b1,U+79b3-79b5,U+79b8,U+79ba,U+79bf,U+79c2,U+79c6,U+79c8,U+79cf,U+79d5-79d6,U+79dd-79de,U+79e3,U+79e7-79e8,U+79eb,U+79ed,U+79f4,U+79f7-79f8,U+79fa,U+79fe,U+7a02-7a03,U+7a05,U+7a0a,U+7a14,U+7a17,U+7a19,U+7a1c,U+7a1e-7a1f,U+7a23,U+7a25-7a26,U+7a2c,U+7a2e,U+7a30-7a32,U+7a36-7a37,U+7a39,U+7a3c,U+7a40,U+7a42,U+7a47,U+7a49,U+7a4c-7a4f,U+7a51,U+7a55,U+7a5b,U+7a5d-7a5e,U+7a62-7a63,U+7a66,U+7a68-7a69,U+7a6b,U+7a70,U+7a78,U+7a80,U+7a85-7a88,U+7a8a,U+7a90,U+7a93-7a96,U+7a98,U+7a9b-7a9c,U+7a9e,U+7aa0-7aa1,U+7aa3,U+7aa8-7aaa,U+7aac-7ab0,U+7ab3,U+7ab8,U+7aba,U+7abd-7abf,U+7ac4-7ac5,U+7ac7-7ac8,U+7aca,U+7ad1-7ad2,U+7ada-7add,U+7ae1,U+7ae4}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-50-wght-normal-C5KfAmFp.woff2) format("woff2-variations");unicode-range:U+784c,U+784e-7854,U+7856-7857,U+7859-785a,U+7865,U+7869-786a,U+786d,U+786f,U+7876-7877,U+787c,U+787e-787f,U+7881,U+7887-7889,U+7893-7894,U+7898-789e,U+78a1,U+78a3,U+78a5,U+78a9,U+78ad,U+78b2,U+78b4,U+78b6,U+78b9-78ba,U+78bc,U+78bf,U+78c3,U+78c9,U+78cb,U+78d0-78d2,U+78d4,U+78d9-78da,U+78dc,U+78de,U+78e1,U+78e5-78e6,U+78ea,U+78ec,U+78ef,U+78f1-78f2,U+78f4,U+78fa-78fb,U+78fe,U+7901-7902,U+7905,U+7907,U+7909,U+790b-790c,U+790e,U+7910,U+7913,U+7919-791b,U+791e-791f,U+7921,U+7924,U+7926,U+792a-792b,U+7934,U+7936,U+7939,U+793b,U+793d,U+7940,U+7942-7943,U+7945-7947,U+7949-794a,U+794c,U+794e-7951,U+7953-7955,U+7957-795a,U+795c,U+795f-7960,U+7962,U+7964,U+7966-7967,U+7969,U+796b,U+796f,U+7972,U+7974,U+7979,U+797b-797c,U+797e-7980,U+7982,U+7986-7987,U+7989-798a}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-51-wght-normal-C2bq6hC8.woff2) format("woff2-variations");unicode-range:U+7722,U+7726,U+7728,U+772b-7730,U+7732-7736,U+7739-773a,U+773d-773f,U+7743,U+7746-7747,U+774c-774f,U+7751-7752,U+7758-775a,U+775c-775e,U+7762,U+7765-7766,U+7768-776a,U+776c-776d,U+7771-7772,U+777a,U+777c-777e,U+7780,U+7785,U+7787,U+778b-778d,U+778f-7791,U+7793,U+779e-77a0,U+77a2,U+77a5,U+77ad,U+77af,U+77b4-77b7,U+77bd-77c0,U+77c2,U+77c5,U+77c7,U+77cd,U+77d6-77d7,U+77d9-77da,U+77dd-77de,U+77e7,U+77ea,U+77ec,U+77ef,U+77f8,U+77fb,U+77fd-77fe,U+7800,U+7803,U+7806,U+7809,U+780f-7812,U+7815,U+7817-7818,U+781a-781f,U+7821-7823,U+7825-7827,U+7829,U+782b-7830,U+7832-7833,U+7835,U+7837,U+7839-783c,U+783e,U+7841-7844,U+7847-7849,U+784b}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-52-wght-normal-P18e_Y0j.woff2) format("woff2-variations");unicode-range:U+7613-7619,U+761b-761d,U+761f-7622,U+7625,U+7627-762a,U+762e-7630,U+7632-7635,U+7638-763a,U+763c-763d,U+763f-7640,U+7642-7643,U+7647-7648,U+764d-764e,U+7652,U+7654,U+7658,U+765a,U+765c,U+765e-765f,U+7661-7663,U+7665,U+7669,U+766c,U+766e-766f,U+7671-7673,U+7675-7676,U+7678-767a,U+767f,U+7681,U+7683,U+7688,U+768a-768c,U+768e,U+7690-7692,U+7695,U+7698,U+769a-769b,U+769d-76a0,U+76a2,U+76a4-76a7,U+76ab-76ac,U+76af-76b0,U+76b2,U+76b4-76b5,U+76ba-76bb,U+76bf,U+76c2-76c3,U+76c5,U+76c9,U+76cc-76ce,U+76dc-76de,U+76e1-76ea,U+76f1,U+76f9-76fb,U+76fd,U+76ff-7700,U+7703-7704,U+7707-7708,U+770c-770f,U+7712,U+7714,U+7716,U+7719-771b,U+771e,U+7721}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-53-wght-normal-Bgkuo2tF.woff2) format("woff2-variations");unicode-range:U+750d,U+750f,U+7511,U+7513,U+7515,U+7517,U+7519,U+7521-7527,U+752a,U+752c-752d,U+752f,U+7534,U+7536,U+753a,U+753e,U+7540,U+7544,U+7547-754b,U+754d-754e,U+7550-7553,U+7556-7557,U+755a-755b,U+755d-755e,U+7560,U+7562,U+7564,U+7566-7568,U+756b-756c,U+756f-7573,U+7575,U+7579-757c,U+757e-757f,U+7581-7584,U+7587,U+7589-758e,U+7590,U+7592,U+7594,U+7596,U+7599-759a,U+759d,U+759f-75a0,U+75a3,U+75a5,U+75a8,U+75ac-75ad,U+75b0-75b1,U+75b3-75b5,U+75b8,U+75bd,U+75c1-75c4,U+75c8-75ca,U+75cc-75cd,U+75d4,U+75d6,U+75d9,U+75de,U+75e0,U+75e2-75e4,U+75e6-75ea,U+75f1-75f3,U+75f7,U+75f9-75fa,U+75fc,U+75fe-7601,U+7603,U+7605-7606,U+7608-760e,U+7610-7612}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-54-wght-normal-DL5lmlUd.woff2) format("woff2-variations");unicode-range:U+73f0,U+73f2,U+73f4-73f5,U+73f7,U+73f9-73fa,U+73fc-73fd,U+73ff-7402,U+7404,U+7407-7408,U+740a-740f,U+7418,U+741a-741c,U+741e,U+7424-7425,U+7428-7429,U+742c-7430,U+7432,U+7435-7436,U+7438-743b,U+743e-7441,U+7443-7446,U+7448,U+744a-744b,U+7452,U+7457,U+745b,U+745d,U+7460,U+7462-7465,U+7467-746a,U+746d,U+746f,U+7471,U+7473-7474,U+7477,U+747a,U+747e,U+7481-7482,U+7484,U+7486,U+7488-748b,U+748e-748f,U+7493,U+7498,U+749a,U+749c-74a0,U+74a3,U+74a6,U+74a9-74aa,U+74ae,U+74b0-74b2,U+74b6,U+74b8-74ba,U+74bd,U+74bf,U+74c1,U+74c3,U+74c5,U+74c8,U+74ca,U+74cc,U+74cf,U+74d1-74d2,U+74d4-74d5,U+74d8-74db,U+74de-74e0,U+74e2,U+74e4-74e5,U+74e7-74e9,U+74ee-74ef,U+74f4,U+74ff,U+7501,U+7503,U+7505,U+7508}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-55-wght-normal-BV_Oy6IF.woff2) format("woff2-variations");unicode-range:U+72e6,U+72e8,U+72ef-72f0,U+72f2-72f4,U+72f6-72f7,U+72f9-72fb,U+72fd,U+7300-7304,U+7307,U+730a-730c,U+7313-7317,U+731d-7322,U+7327,U+7329,U+732c-732d,U+7330-7331,U+7333,U+7335-7337,U+7339,U+733d-733e,U+7340,U+7342,U+7344-7345,U+734a,U+734d-7350,U+7352,U+7355,U+7357,U+7359,U+735f-7360,U+7362-7363,U+7365,U+7368,U+736c-736d,U+736f-7370,U+7372,U+7374-7376,U+7378,U+737a-737b,U+737d-737e,U+7382-7383,U+7386,U+7388,U+738a,U+738c-7393,U+7395,U+7397-739a,U+739c,U+739e,U+73a0-73a3,U+73a5-73a8,U+73aa,U+73ad,U+73b1,U+73b3,U+73b6-73b7,U+73b9,U+73c2,U+73c5-73c9,U+73cc,U+73ce-73d0,U+73d2,U+73d6,U+73d9,U+73db-73de,U+73e3,U+73e5-73ea,U+73ee-73ef}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-56-wght-normal-B4L7Hj8f.woff2) format("woff2-variations");unicode-range:U+71a8,U+71af,U+71b1-71bc,U+71be,U+71c1-71c2,U+71c4,U+71c8-71cb,U+71ce-71d0,U+71d2,U+71d4,U+71d9-71da,U+71dc,U+71df-71e0,U+71e6-71e8,U+71ea,U+71ed-71ee,U+71f4,U+71f6,U+71f9,U+71fb-71fc,U+71ff-7200,U+7207,U+720c-720d,U+7210,U+7216,U+721a-721e,U+7223,U+7228,U+722b,U+722d-722e,U+7230,U+7232,U+723a-723c,U+723e-7242,U+7246,U+724b,U+724d-724e,U+7252,U+7256,U+7258,U+725a,U+725c-725d,U+7260,U+7264-7266,U+726a,U+726c,U+726e-726f,U+7271,U+7273-7274,U+7278,U+727b,U+727d-727e,U+7281-7282,U+7284,U+7287,U+728a,U+728d,U+728f,U+7292,U+729b,U+729f-72a0,U+72a7,U+72ad-72ae,U+72b0-72b5,U+72b7-72b8,U+72ba-72be,U+72c0-72c1,U+72c3,U+72c5-72c6,U+72c8,U+72cc-72ce,U+72d2,U+72d6,U+72db,U+72dd-72df,U+72e1,U+72e5}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-57-wght-normal-DU8YBsDj.woff2) format("woff2-variations");unicode-range:U+700b,U+700d,U+7015,U+7018,U+701b,U+701d-701f,U+7023,U+7026-7028,U+702c,U+702e-7030,U+7035,U+7037,U+7039-703a,U+703c-703e,U+7044,U+7049-704b,U+704f,U+7051,U+7058,U+705a,U+705c-705e,U+7061,U+7064,U+7066,U+706c,U+707d,U+7080-7081,U+7085-7086,U+708a,U+708f,U+7091,U+7094-7095,U+7098-7099,U+709c-709d,U+709f,U+70a4,U+70a9-70aa,U+70af-70b2,U+70b4-70b7,U+70bb,U+70c0,U+70c3,U+70c7,U+70cb,U+70ce-70cf,U+70d4,U+70d9-70da,U+70dc-70dd,U+70e0,U+70e9,U+70ec,U+70f7,U+70fa,U+70fd,U+70ff,U+7104,U+7108-7109,U+710c,U+7110,U+7113-7114,U+7116-7118,U+711c,U+711e,U+7120,U+712e-712f,U+7131,U+713c,U+7142,U+7144-7147,U+7149-714b,U+7150,U+7152,U+7155-7156,U+7159-715a,U+715c,U+7161,U+7165-7166,U+7168-7169,U+716d,U+7173-7174,U+7176,U+7178,U+717a,U+717d,U+717f-7180,U+7184,U+7186-7188,U+7192,U+7198,U+719c,U+71a0,U+71a4-71a5}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-58-wght-normal-CE0BKS9u.woff2) format("woff2-variations");unicode-range:U+6ed9,U+6edb,U+6edd,U+6edf-6ee0,U+6ee2,U+6ee6,U+6eea,U+6eec,U+6eee-6eef,U+6ef2-6ef3,U+6ef7-6efa,U+6efe,U+6f01,U+6f03,U+6f08-6f09,U+6f15-6f16,U+6f19,U+6f22-6f25,U+6f28-6f2a,U+6f2c-6f2d,U+6f2f,U+6f32,U+6f36-6f38,U+6f3f,U+6f43-6f46,U+6f48,U+6f4b,U+6f4e-6f4f,U+6f51,U+6f54-6f57,U+6f59-6f5b,U+6f5e-6f5f,U+6f61,U+6f64-6f67,U+6f69-6f6c,U+6f6f-6f72,U+6f74-6f76,U+6f78-6f7e,U+6f80-6f83,U+6f86,U+6f89,U+6f8b-6f8d,U+6f90,U+6f92,U+6f94,U+6f97-6f98,U+6f9b,U+6fa3-6fa5,U+6fa7,U+6faa,U+6faf,U+6fb1,U+6fb4,U+6fb6,U+6fb9,U+6fc1-6fcb,U+6fd1-6fd3,U+6fd5,U+6fdb,U+6fde-6fe1,U+6fe4,U+6fe9,U+6feb-6fec,U+6fee-6ff1,U+6ffa,U+6ffe,U+7005-7006,U+7009}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-59-wght-normal-Azv2Ku9_.woff2) format("woff2-variations");unicode-range:U+6dc3,U+6dc5-6dc6,U+6dc9,U+6dcc,U+6dcf,U+6dd2-6dd3,U+6dd6,U+6dd9-6dde,U+6de0,U+6de4,U+6de6,U+6de8-6dea,U+6dec,U+6def-6df0,U+6df5-6df6,U+6df8,U+6dfa,U+6dfc,U+6e03-6e04,U+6e07-6e09,U+6e0b-6e0c,U+6e0e,U+6e11,U+6e13,U+6e15-6e16,U+6e19-6e1b,U+6e1e-6e1f,U+6e22,U+6e25-6e27,U+6e2b-6e2c,U+6e36-6e37,U+6e39-6e3a,U+6e3c-6e41,U+6e44-6e45,U+6e47,U+6e49-6e4b,U+6e4d-6e4e,U+6e51,U+6e53-6e55,U+6e5c-6e5f,U+6e61-6e63,U+6e65-6e67,U+6e6a-6e6b,U+6e6d-6e70,U+6e72-6e74,U+6e76-6e78,U+6e7c,U+6e80-6e82,U+6e86-6e87,U+6e89,U+6e8d,U+6e8f,U+6e96,U+6e98,U+6e9d-6e9f,U+6ea1,U+6ea5-6ea7,U+6eab,U+6eb1-6eb2,U+6eb4,U+6eb7,U+6ebb-6ebd,U+6ebf-6ec6,U+6ec8-6ec9,U+6ecc,U+6ecf-6ed0,U+6ed3-6ed4,U+6ed7-6ed8}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-60-wght-normal-C1lngC61.woff2) format("woff2-variations");unicode-range:U+6cb1-6cb2,U+6cb4-6cb5,U+6cb7,U+6cba,U+6cbc-6cbd,U+6cc1-6cc3,U+6cc5-6cc7,U+6cd0-6cd4,U+6cd6-6cd7,U+6cd9-6cda,U+6cde-6ce0,U+6ce4,U+6ce6,U+6ce9,U+6ceb-6cef,U+6cf1-6cf2,U+6cf6-6cf7,U+6cfa,U+6cfe,U+6d03-6d05,U+6d07-6d08,U+6d0a,U+6d0c,U+6d0e-6d11,U+6d13-6d14,U+6d16,U+6d18-6d1a,U+6d1c,U+6d1f,U+6d22-6d23,U+6d26-6d29,U+6d2b,U+6d2e-6d30,U+6d33,U+6d35-6d36,U+6d38-6d3a,U+6d3c,U+6d3f,U+6d42-6d44,U+6d48-6d49,U+6d4d,U+6d50,U+6d52,U+6d54,U+6d56-6d58,U+6d5a-6d5c,U+6d5e,U+6d60-6d61,U+6d63-6d65,U+6d67,U+6d6c-6d6d,U+6d6f,U+6d75,U+6d7b-6d7d,U+6d87,U+6d8a,U+6d8e,U+6d90-6d9a,U+6d9c-6da0,U+6da2-6da3,U+6da7,U+6daa-6dac,U+6dae,U+6db3-6db4,U+6db6,U+6db8,U+6dbc,U+6dbf,U+6dc2}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-61-wght-normal-BxWkGF5M.woff2) format("woff2-variations");unicode-range:U+6b83-6b86,U+6b89,U+6b8d,U+6b91-6b93,U+6b95,U+6b97-6b98,U+6b9a-6b9b,U+6b9e,U+6ba1-6ba4,U+6ba9-6baa,U+6bad,U+6baf-6bb0,U+6bb2-6bb3,U+6bba-6bbd,U+6bc0,U+6bc2,U+6bc6,U+6bca-6bcc,U+6bce,U+6bd0-6bd1,U+6bd3,U+6bd6-6bd8,U+6bda,U+6be1,U+6be6,U+6bec,U+6bf1,U+6bf3-6bf5,U+6bf9,U+6bfd,U+6c05-6c08,U+6c0d,U+6c10,U+6c15-6c1a,U+6c21,U+6c23-6c26,U+6c29-6c2d,U+6c30-6c33,U+6c35-6c37,U+6c39-6c3a,U+6c3c-6c3f,U+6c46,U+6c4a-6c4c,U+6c4e-6c50,U+6c54,U+6c56,U+6c59-6c5c,U+6c5e,U+6c63,U+6c67-6c69,U+6c6b,U+6c6d,U+6c6f,U+6c72-6c74,U+6c78-6c7a,U+6c7c,U+6c84-6c87,U+6c8b-6c8c,U+6c8f,U+6c91,U+6c93-6c96,U+6c98,U+6c9a,U+6c9d,U+6ca2-6ca4,U+6ca8-6ca9,U+6cac-6cae}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-62-wght-normal-CXXMAq-5.woff2) format("woff2-variations");unicode-range:U+69fe-6a01,U+6a06,U+6a09,U+6a0b,U+6a11,U+6a13,U+6a17-6a19,U+6a1b,U+6a1e,U+6a23,U+6a28-6a29,U+6a2b,U+6a2f-6a30,U+6a35,U+6a38-6a40,U+6a46-6a48,U+6a4a-6a4b,U+6a4e,U+6a50,U+6a52,U+6a5b,U+6a5e,U+6a62,U+6a65-6a67,U+6a6b,U+6a79,U+6a7c,U+6a7e-6a7f,U+6a84,U+6a86,U+6a8e,U+6a90-6a91,U+6a94,U+6a97,U+6a9c,U+6a9e,U+6aa0,U+6aa2,U+6aa4,U+6aa9,U+6aab,U+6aae-6ab0,U+6ab2-6ab3,U+6ab5,U+6ab7-6ab8,U+6aba-6abb,U+6abd,U+6abf,U+6ac2-6ac4,U+6ac6,U+6ac8,U+6acc,U+6ace,U+6ad2-6ad3,U+6ad8-6adc,U+6adf-6ae0,U+6ae4-6ae5,U+6ae7-6ae8,U+6afb,U+6b04-6b05,U+6b0d-6b13,U+6b16-6b17,U+6b19,U+6b24-6b25,U+6b2c,U+6b37-6b39,U+6b3b,U+6b3d,U+6b43,U+6b46,U+6b4e,U+6b50,U+6b53-6b54,U+6b58-6b59,U+6b5b,U+6b60,U+6b69,U+6b6d,U+6b6f-6b70,U+6b73-6b74,U+6b77-6b7a,U+6b80-6b82}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-63-wght-normal-4La5uKvS.woff2) format("woff2-variations");unicode-range:U+68d3,U+68d7,U+68dd,U+68df,U+68e1,U+68e3-68e4,U+68e6-68ed,U+68ef-68f0,U+68f2,U+68f4,U+68f6-68f7,U+68f9,U+68fb-68fd,U+68ff-6902,U+6906-6908,U+690b,U+6910,U+691a-691c,U+691f-6920,U+6924-6925,U+692a,U+692d,U+6934,U+6939,U+693c-6945,U+694a-694b,U+6952-6954,U+6957,U+6959,U+695b,U+695d,U+695f,U+6962-6964,U+6966,U+6968-696c,U+696e-696f,U+6971,U+6973-6974,U+6978-6979,U+697d,U+697f-6980,U+6985,U+6987-698a,U+698d-698e,U+6994-6999,U+699b,U+69a3-69a4,U+69a6-69a7,U+69ab,U+69ad-69ae,U+69b1,U+69b7,U+69bb-69bc,U+69c1,U+69c3-69c5,U+69c7,U+69ca-69ce,U+69d0-69d1,U+69d3-69d4,U+69d7-69da,U+69e0,U+69e4,U+69e6,U+69ec-69ed,U+69f1-69f3,U+69f8,U+69fa-69fc}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-64-wght-normal-CbIuD2Eg.woff2) format("woff2-variations");unicode-range:U+678b-678d,U+678f,U+6792-6793,U+6796,U+6798,U+679e-67a1,U+67a5,U+67a7-67a9,U+67ac-67ad,U+67b0-67b1,U+67b3,U+67b5,U+67b7,U+67b9,U+67bb-67bc,U+67c0-67c1,U+67c3,U+67c5-67ca,U+67d1-67d2,U+67d7-67d9,U+67dd-67df,U+67e2-67e4,U+67e6-67e9,U+67f0,U+67f5,U+67f7-67f8,U+67fa-67fb,U+67fd-67fe,U+6800-6801,U+6803-6804,U+6806,U+6809-680a,U+680c,U+680e,U+6812,U+681d-681f,U+6822,U+6824-6829,U+682b-682d,U+6831-6835,U+683b,U+683e,U+6840-6841,U+6844-6845,U+6849,U+684e,U+6853,U+6855-6856,U+685c-685d,U+685f-6862,U+6864,U+6866-6868,U+686b,U+686f,U+6872,U+6874,U+6877,U+687f,U+6883,U+6886,U+688f,U+689b,U+689f-68a0,U+68a2-68a3,U+68b1,U+68b6,U+68b9-68ba,U+68bc-68bf,U+68c1-68c4,U+68c6,U+68c8,U+68ca,U+68cc,U+68d0-68d1}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-65-wght-normal-BGqvKda2.woff2) format("woff2-variations");unicode-range:U+6631,U+6633-6634,U+6636,U+663a-663b,U+663d,U+6641,U+6644-6645,U+6649,U+664c,U+664f,U+6654,U+6659,U+665b,U+665d-665e,U+6660-6667,U+6669,U+666b-666c,U+6671,U+6673,U+6677-6679,U+667c,U+6680-6681,U+6684-6685,U+6688-6689,U+668b-668e,U+6690,U+6692,U+6695,U+6698,U+669a,U+669d,U+669f-66a0,U+66a2-66a3,U+66a6,U+66aa-66ab,U+66b1-66b2,U+66b5,U+66b8-66b9,U+66bb,U+66be,U+66c1,U+66c6-66c9,U+66cc,U+66d5-66d8,U+66da-66dc,U+66de-66e2,U+66e8-66ea,U+66ec,U+66f1,U+66f3,U+66f7,U+66fa,U+66fd,U+6702,U+6705,U+670a,U+670f-6710,U+6713,U+6715,U+6719,U+6722-6723,U+6725-6727,U+6729,U+672d-672e,U+6732-6733,U+6736,U+6739,U+673b,U+673f,U+6744,U+6748,U+674c-674d,U+6753,U+6755,U+6762,U+6767,U+6769-676c,U+676e,U+6772-6773,U+6775,U+6777,U+677a-677d,U+6782-6783,U+6787,U+678a}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-66-wght-normal-BvNozWOY.woff2) format("woff2-variations");unicode-range:U+64f1-64f2,U+64f4,U+64f7-64f8,U+64fa,U+64fc,U+64fe-64ff,U+6503,U+6509,U+650f,U+6514,U+6518,U+651c-651e,U+6522-6525,U+652a-652c,U+652e,U+6530-6532,U+6534-6535,U+6537-6538,U+653a,U+653c-653d,U+6542,U+6549-654b,U+654d-654e,U+6553-6555,U+6557-6558,U+655d,U+6564,U+6569,U+656b,U+656d-656f,U+6571,U+6573,U+6575-6576,U+6578-657e,U+6581-6583,U+6585-6586,U+6589,U+658e-658f,U+6592-6593,U+6595-6596,U+659b,U+659d,U+659f-65a1,U+65a3,U+65ab-65ac,U+65b2,U+65b6-65b7,U+65ba-65bb,U+65be-65c0,U+65c2-65c4,U+65c6-65c8,U+65cc,U+65ce,U+65d0,U+65d2-65d3,U+65d6,U+65db,U+65dd,U+65e1,U+65e3,U+65ee-65f0,U+65f3-65f5,U+65f8,U+65fb-65fc,U+65fe-6600,U+6603,U+6607,U+6609,U+660b,U+6610-6611,U+6619-661a,U+661c-661e,U+6621,U+6624,U+6626,U+662a-662c,U+662e,U+6630}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-67-wght-normal-CC-WRBV-.woff2) format("woff2-variations");unicode-range:U+63b8-63bc,U+63be,U+63c0,U+63c3-63c4,U+63c6,U+63c8,U+63cd-63ce,U+63d1,U+63d6,U+63da-63db,U+63de,U+63e0,U+63e3,U+63e9-63ea,U+63ee,U+63f2,U+63f5-63fa,U+63fc,U+63fe-6400,U+6406,U+640b-640d,U+6410,U+6414,U+6416-6417,U+641b,U+6420-6423,U+6425-6428,U+642a,U+6431-6432,U+6434-6437,U+643d-6442,U+6445,U+6448,U+6450-6452,U+645b-645f,U+6462,U+6465,U+6468,U+646d,U+646f-6471,U+6473,U+6477,U+6479-647d,U+6482-6485,U+6487-6488,U+648c,U+6490,U+6493,U+6496-649a,U+649d,U+64a0,U+64a5,U+64ab-64ac,U+64b1-64b7,U+64b9-64bb,U+64be-64c1,U+64c4,U+64c7,U+64c9-64cb,U+64d0,U+64d4,U+64d7-64d8,U+64da,U+64de,U+64e0-64e2,U+64e4,U+64e9,U+64ec,U+64f0}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-68-wght-normal-c0FjfUaj.woff2) format("woff2-variations");unicode-range:U+622c,U+622e-6230,U+6232,U+6238,U+623b,U+623d-623e,U+6243,U+6246,U+6248-6249,U+624c,U+6255,U+6259,U+625e,U+6260-6261,U+6265-6266,U+626a,U+6271,U+627a,U+627c-627d,U+6283,U+6286,U+6289,U+628e,U+6294,U+629c,U+629e-629f,U+62a1,U+62a8,U+62ba-62bb,U+62bf,U+62c2,U+62c4,U+62c8,U+62ca-62cb,U+62cf,U+62d1,U+62d7,U+62d9-62da,U+62dd,U+62e0-62e1,U+62e3-62e4,U+62e7,U+62eb,U+62ee,U+62f0,U+62f4-62f6,U+6308,U+630a-630e,U+6310,U+6312-6313,U+6317,U+6319,U+631b,U+631d-631f,U+6322,U+6326,U+6329,U+6331-6332,U+6334-6337,U+6339,U+633b-633c,U+633e-6340,U+6343,U+6347,U+634b-634e,U+6354,U+635c-635d,U+6368-6369,U+636d,U+636f-6372,U+6376,U+637a-637b,U+637d,U+6382-6383,U+6387,U+638a-638b,U+638d-638e,U+6391,U+6393-6397,U+6399,U+639b,U+639e-639f,U+63a1,U+63a3-63a4,U+63ac-63ae,U+63b1-63b5}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-69-wght-normal-D596Jjl2.woff2) format("woff2-variations");unicode-range:U+60ed-60ee,U+60f0-60f1,U+60f4,U+60f6,U+60fa,U+6100,U+6106,U+610d-610e,U+6112,U+6114-6115,U+6119,U+611c,U+6120,U+6122-6123,U+6126,U+6128-6130,U+6136-6137,U+613a,U+613d-613e,U+6144,U+6146-6147,U+614a-614b,U+6151,U+6153,U+6158,U+615a,U+615c-615d,U+615f,U+6161,U+6163-6165,U+616b-616c,U+616e,U+6171,U+6173-6177,U+617e,U+6182,U+6187,U+618a,U+618d-618e,U+6190-6191,U+6194,U+6199-619a,U+619c,U+619f,U+61a1,U+61a3-61a4,U+61a7-61a9,U+61ab-61ad,U+61b2-61b3,U+61b5-61b7,U+61ba-61bb,U+61bf,U+61c3-61c4,U+61c6-61c7,U+61c9-61cb,U+61d0-61d1,U+61d3-61d4,U+61d7,U+61da,U+61df-61e1,U+61e6,U+61ee,U+61f0,U+61f2,U+61f6-61f8,U+61fa,U+61fc-61fe,U+6200,U+6206-6207,U+6209,U+620b,U+620d-620e,U+6213-6215,U+6217,U+6219,U+621b-6223,U+6225-6226}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-70-wght-normal-ColEcmtJ.woff2) format("woff2-variations");unicode-range:U+5fc4,U+5fc9,U+5fcb,U+5fce-5fd6,U+5fda-5fde,U+5fe1-5fe2,U+5fe4-5fe5,U+5fea,U+5fed-5fee,U+5ff1-5ff3,U+5ff6,U+5ff8,U+5ffb,U+5ffe-5fff,U+6002-6006,U+600a,U+600d,U+600f,U+6014,U+6019,U+601b,U+6020,U+6023,U+6026,U+6029,U+602b,U+602e-602f,U+6031,U+6033,U+6035,U+6039,U+603f,U+6041-6043,U+6046,U+604f,U+6053-6054,U+6058-605b,U+605d-605e,U+6060,U+6063,U+6065,U+6067,U+606a-606c,U+6075,U+6078-6079,U+607b,U+607d,U+607f,U+6083,U+6085-6087,U+608a,U+608c,U+608e-608f,U+6092-6093,U+6095-6097,U+609b-609d,U+60a2,U+60a7,U+60a9-60ab,U+60ad,U+60af-60b1,U+60b3-60b6,U+60b8,U+60bb,U+60bd-60be,U+60c0-60c3,U+60c6-60c9,U+60cb,U+60ce,U+60d3-60d4,U+60d7-60db,U+60dd,U+60e1-60e4,U+60e6,U+60ea,U+60ec}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-71-wght-normal-ChZfXpdg.woff2) format("woff2-variations");unicode-range:U+5e98,U+5e9b,U+5e9d,U+5ea0-5ea5,U+5ea8,U+5eab,U+5eaf,U+5eb3,U+5eb5-5eb6,U+5eb9,U+5ebe,U+5ec1-5ec3,U+5ec6,U+5ec8,U+5ecb-5ecc,U+5ed1-5ed2,U+5ed4,U+5ed9-5edb,U+5edd,U+5edf-5ee0,U+5ee2-5ee3,U+5ee8,U+5eea,U+5eec,U+5eef-5ef0,U+5ef3-5ef4,U+5ef8,U+5efb-5efc,U+5efe-5eff,U+5f01,U+5f07,U+5f0b-5f0e,U+5f10-5f12,U+5f14,U+5f1a,U+5f22,U+5f28-5f29,U+5f2c-5f2d,U+5f35-5f36,U+5f38,U+5f3b-5f43,U+5f45-5f4a,U+5f4c-5f4e,U+5f50,U+5f54,U+5f56-5f59,U+5f5b-5f5f,U+5f61,U+5f63,U+5f65,U+5f67-5f68,U+5f6b,U+5f6e-5f6f,U+5f72-5f78,U+5f7a,U+5f7e-5f7f,U+5f82-5f83,U+5f87,U+5f89-5f8a,U+5f8d,U+5f91,U+5f93,U+5f95,U+5f98-5f99,U+5f9c,U+5f9e,U+5fa0,U+5fa6-5fa9,U+5fac-5fad,U+5faf,U+5fb3-5fb5,U+5fb9,U+5fbc}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-72-wght-normal-D1VyfEG3.woff2) format("woff2-variations");unicode-range:U+5d26-5d27,U+5d2e-5d34,U+5d3c-5d3e,U+5d41-5d44,U+5d46-5d48,U+5d4a-5d4b,U+5d4e,U+5d50,U+5d52,U+5d55-5d58,U+5d5a-5d5d,U+5d68-5d69,U+5d6b-5d6c,U+5d6f,U+5d74,U+5d7f,U+5d82-5d89,U+5d8b-5d8c,U+5d8f,U+5d92-5d93,U+5d99,U+5d9d,U+5db2,U+5db6-5db7,U+5dba,U+5dbc-5dbd,U+5dc2-5dc3,U+5dc6-5dc7,U+5dc9,U+5dcc,U+5dd2,U+5dd4,U+5dd6-5dd8,U+5ddb-5ddc,U+5de3,U+5ded,U+5def,U+5df3,U+5df6,U+5dfa-5dfd,U+5dff-5e00,U+5e07,U+5e0f,U+5e11,U+5e13-5e14,U+5e19-5e1b,U+5e22,U+5e25,U+5e28,U+5e2a,U+5e2f-5e31,U+5e33-5e34,U+5e36,U+5e39-5e3c,U+5e3e,U+5e40,U+5e44,U+5e46-5e48,U+5e4c,U+5e4f,U+5e53-5e54,U+5e57,U+5e59,U+5e5b,U+5e5e-5e5f,U+5e61,U+5e63,U+5e6a-5e6b,U+5e75,U+5e77,U+5e79-5e7a,U+5e7e,U+5e80-5e81,U+5e83,U+5e85,U+5e87,U+5e8b,U+5e91-5e92,U+5e96}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-73-wght-normal-DwSJRYPJ.woff2) format("woff2-variations");unicode-range:U+5bec,U+5bee-5bf0,U+5bf2-5bf3,U+5bf5-5bf6,U+5bfe,U+5c02-5c03,U+5c05,U+5c07-5c09,U+5c0b-5c0c,U+5c0e,U+5c10,U+5c12-5c13,U+5c15,U+5c17,U+5c19,U+5c1b-5c1c,U+5c1e-5c1f,U+5c22,U+5c25,U+5c28,U+5c2a-5c2b,U+5c2f-5c30,U+5c37,U+5c3b,U+5c43-5c44,U+5c46-5c47,U+5c4d,U+5c50,U+5c59,U+5c5b-5c5c,U+5c62-5c64,U+5c66,U+5c6c,U+5c6e,U+5c74,U+5c78-5c7e,U+5c80,U+5c83-5c84,U+5c88,U+5c8b-5c8d,U+5c91,U+5c94-5c96,U+5c98-5c99,U+5c9c,U+5c9e,U+5ca1-5ca3,U+5cab-5cac,U+5cb1,U+5cb5,U+5cb7,U+5cba,U+5cbd-5cbf,U+5cc1,U+5cc3-5cc4,U+5cc7,U+5ccb,U+5cd2,U+5cd8-5cd9,U+5cdf-5ce0,U+5ce3-5ce6,U+5ce8-5cea,U+5ced,U+5cef,U+5cf3-5cf4,U+5cf6,U+5cf8,U+5cfd,U+5d00-5d04,U+5d06,U+5d08,U+5d0b-5d0d,U+5d0f-5d13,U+5d15,U+5d17-5d1a,U+5d1d-5d22,U+5d24-5d25}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-74-wght-normal-Cte7o1QG.woff2) format("woff2-variations");unicode-range:U+5aa0,U+5aa3-5aa4,U+5aaa,U+5aae-5aaf,U+5ab1-5ab2,U+5ab4-5ab5,U+5ab7-5aba,U+5abd-5abf,U+5ac3-5ac4,U+5ac6-5ac8,U+5aca-5acb,U+5acd,U+5acf-5ad2,U+5ad4,U+5ad8-5ada,U+5adc,U+5adf-5ae2,U+5ae4,U+5ae6,U+5ae8,U+5aea-5aed,U+5af0-5af3,U+5af5,U+5af9-5afb,U+5afd,U+5b01,U+5b05,U+5b08,U+5b0b-5b0c,U+5b11,U+5b16-5b17,U+5b1b,U+5b21-5b22,U+5b24,U+5b27-5b2e,U+5b30,U+5b32,U+5b34,U+5b36-5b38,U+5b3e-5b40,U+5b43,U+5b45,U+5b4a-5b4b,U+5b51-5b53,U+5b56,U+5b5a-5b5b,U+5b62,U+5b65,U+5b67,U+5b6a-5b6e,U+5b70-5b71,U+5b73,U+5b7a-5b7b,U+5b7f-5b80,U+5b84,U+5b8d,U+5b91,U+5b93-5b95,U+5b9f,U+5ba5-5ba6,U+5bac,U+5bae,U+5bb8,U+5bc0,U+5bc3,U+5bcb,U+5bd0-5bd1,U+5bd4-5bd8,U+5bda-5bdc,U+5be2,U+5be4-5be5,U+5be7,U+5be9,U+5beb}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-75-wght-normal-B0qL41rF.woff2) format("woff2-variations");unicode-range:U+596a,U+596c-596e,U+5977,U+597b-597c,U+5981,U+598f,U+5997-5998,U+599a,U+599c-599d,U+59a0-59a1,U+59a3-59a4,U+59a7,U+59aa-59ad,U+59af,U+59b2-59b3,U+59b5-59b6,U+59b8,U+59ba,U+59bd-59be,U+59c0-59c1,U+59c3-59c4,U+59c7-59ca,U+59cc-59cd,U+59cf,U+59d2,U+59d5-59d6,U+59d8-59d9,U+59db,U+59dd-59e0,U+59e2-59e7,U+59e9-59eb,U+59ee,U+59f1,U+59f3,U+59f5,U+59f7-59f9,U+59fd,U+5a06,U+5a08-5a0a,U+5a0c-5a0d,U+5a11-5a13,U+5a15-5a16,U+5a1a-5a1b,U+5a21-5a23,U+5a2d-5a2f,U+5a32,U+5a38,U+5a3c,U+5a3e-5a45,U+5a47,U+5a4a,U+5a4c-5a4d,U+5a4f-5a51,U+5a53,U+5a55-5a57,U+5a5e,U+5a60,U+5a62,U+5a65-5a67,U+5a6a,U+5a6c-5a6d,U+5a72-5a73,U+5a75-5a76,U+5a79-5a7c,U+5a81-5a84,U+5a8c,U+5a8e,U+5a93,U+5a96-5a97,U+5a9c,U+5a9e}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-76-wght-normal-BPLMO_2x.woff2) format("woff2-variations");unicode-range:U+5820,U+5822-5823,U+5825-5826,U+582c,U+582f,U+5831,U+583a,U+583d,U+583f-5842,U+5844-5846,U+5848,U+584a,U+584d,U+5852,U+5857,U+5859-585a,U+585c-585d,U+5862,U+5868-5869,U+586c-586d,U+586f-5873,U+5875,U+5879,U+587d-587e,U+5880-5881,U+5888-588a,U+588d,U+5892,U+5896-5898,U+589a,U+589c-589d,U+58a0-58a1,U+58a3,U+58a6,U+58a9,U+58ab-58ae,U+58b0,U+58b3,U+58bb-58bf,U+58c2-58c3,U+58c5-58c8,U+58ca,U+58cc,U+58ce,U+58d1-58d3,U+58d5,U+58d8-58d9,U+58de-58df,U+58e2,U+58e9,U+58ec,U+58ef,U+58f1-58f2,U+58f5,U+58f7-58f8,U+58fa,U+58fd,U+5900,U+5902,U+5906,U+5908-590c,U+590e,U+5910,U+5914,U+5919,U+591b,U+591d-591e,U+5920,U+5922-5925,U+5928,U+592c-592d,U+592f,U+5932,U+5936,U+593c,U+593e,U+5940-5942,U+5944,U+594c-594d,U+5950,U+5953,U+5958,U+595a,U+5961,U+5966-5968}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-77-wght-normal-Dkbi3pye.woff2) format("woff2-variations");unicode-range:U+56f9,U+56fc,U+56ff-5700,U+5703-5704,U+5709-570a,U+570c-570d,U+570f,U+5712-5713,U+5718-5719,U+571c,U+571e,U+5725,U+5727,U+5729-572a,U+572c,U+572e-572f,U+5734-5735,U+5739,U+573b,U+5741,U+5743,U+5745,U+5749,U+574c-574d,U+575c,U+5763,U+5768-5769,U+576b,U+576d-576e,U+5770,U+5773,U+5775,U+5777,U+577b-577c,U+5785-5786,U+5788,U+578c,U+578e-578f,U+5793-5795,U+5799-57a1,U+57a3-57a4,U+57a6-57aa,U+57ac-57ad,U+57af-57b2,U+57b4-57b6,U+57b8-57b9,U+57bd-57bf,U+57c2,U+57c4-57c8,U+57cc-57cd,U+57cf,U+57d2,U+57d5-57de,U+57e1-57e2,U+57e4-57e5,U+57e7,U+57eb,U+57ed,U+57ef,U+57f4-57f8,U+57fc-57fd,U+5800-5801,U+5803,U+5805,U+5807,U+5809,U+580b-580e,U+5811,U+5814,U+5819,U+581b-581f}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-78-wght-normal-BFUXeSw6.woff2) format("woff2-variations");unicode-range:U+55f5-55f7,U+55fb,U+55fe,U+5600-5601,U+5605-5606,U+5608,U+560c-560d,U+560f,U+5614,U+5616-5617,U+561a,U+561c,U+561e,U+5621-5625,U+5627,U+5629,U+562b-5630,U+5636,U+5638-563a,U+563c,U+5640-5642,U+5649,U+564c-5650,U+5653-5655,U+5657-565b,U+5660,U+5663-5664,U+5666,U+566b,U+566f-5671,U+5673-567c,U+567e,U+5684-5687,U+568c,U+568e-5693,U+5695,U+5697,U+569b-569c,U+569e-569f,U+56a1-56a2,U+56a4-56a9,U+56ac-56af,U+56b1,U+56b4,U+56b6-56b8,U+56bf,U+56c1-56c3,U+56c9,U+56cd,U+56d1,U+56d4,U+56d6-56d9,U+56dd,U+56df,U+56e1,U+56e3-56e6,U+56e8-56ec,U+56ee-56ef,U+56f1-56f3,U+56f5,U+56f7-56f8}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-79-wght-normal-DoJG4UTB.woff2) format("woff2-variations");unicode-range:U+550f,U+5511-5514,U+5516-5517,U+5519,U+551b,U+551d-551e,U+5520,U+5522-5523,U+5526-5527,U+552a-552c,U+5530,U+5532-5535,U+5537-5538,U+553b-5541,U+5543-5544,U+5547-5549,U+554b,U+554d,U+5550,U+5553,U+5555-5558,U+555b-555f,U+5567-5569,U+556b-5572,U+5574-5577,U+557b-557c,U+557e-557f,U+5581,U+5583,U+5585-5586,U+5588,U+558b-558c,U+558e-5591,U+5593,U+5599-559a,U+559f,U+55a5-55a6,U+55a8-55ac,U+55ae,U+55b0-55b3,U+55b6,U+55b9-55ba,U+55bc-55be,U+55c4,U+55c6-55c7,U+55c9,U+55cc-55d2,U+55d4-55db,U+55dd-55df,U+55e1,U+55e3-55e6,U+55ea-55ee,U+55f0-55f3}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-80-wght-normal-BEFypWOO.woff2) format("woff2-variations");unicode-range:U+53e7-53e9,U+53f1,U+53f4-53f5,U+53fa-5400,U+5402,U+5405-5407,U+540b,U+540f,U+5412,U+5414,U+5416,U+5418-541a,U+541d,U+5420-5423,U+5425,U+5429-542a,U+542d-542e,U+5431-5433,U+5436,U+543d,U+543f,U+5442-5443,U+5449,U+544b-544c,U+544e,U+5451-5454,U+5456,U+5459,U+545b-545c,U+5461,U+5463-5464,U+546a-5472,U+5474,U+5476-5478,U+547a,U+547e-5484,U+5486,U+548a,U+548d-548e,U+5490-5491,U+5494,U+5497-5499,U+549b,U+549d,U+54a1-54a7,U+54a9,U+54ab,U+54ad,U+54b4-54b5,U+54b9,U+54bb,U+54be-54bf,U+54c2-54c3,U+54c9-54cc,U+54cf-54d0,U+54d3,U+54d5-54d6,U+54d9-54da,U+54dc-54de,U+54e2,U+54e7,U+54f3-54f4,U+54f8-54f9,U+54fd-54ff,U+5501,U+5504-5506,U+550c-550e}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-81-wght-normal-ed_TZlfo.woff2) format("woff2-variations");unicode-range:U+5289,U+528b,U+528d,U+528f,U+5291-5293,U+529a,U+52a2,U+52a6-52a7,U+52ac-52ad,U+52af,U+52b4-52b5,U+52b9,U+52bb-52bc,U+52be,U+52c1,U+52c5,U+52ca,U+52cd,U+52d0,U+52d6-52d7,U+52d9,U+52db,U+52dd-52de,U+52e0,U+52e2-52e3,U+52e5,U+52e7-52f0,U+52f2-52f3,U+52f5-52f9,U+52fb-52fc,U+5302,U+5304,U+530b,U+530d,U+530f-5310,U+5315,U+531a,U+531c-531d,U+5321,U+5323,U+5326,U+532e-5331,U+5338,U+533c-533e,U+5344-5345,U+534b-534d,U+5350,U+5354,U+5358,U+535d-535f,U+5363,U+5368-5369,U+536c,U+536e-536f,U+5372,U+5379-537b,U+537d,U+538d-538e,U+5390,U+5393-5394,U+5396,U+539b-539d,U+53a0-53a1,U+53a3-53a5,U+53a9,U+53ad-53ae,U+53b0,U+53b2-53b3,U+53b5-53b8,U+53bc,U+53be,U+53c1,U+53c3-53c7,U+53ce-53cf,U+53d2-53d3,U+53d5,U+53da,U+53de-53df,U+53e1-53e2}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-82-wght-normal-DcxfR5OJ.woff2) format("woff2-variations");unicode-range:U+5104,U+5106-5107,U+5109-510b,U+510d,U+510f-5110,U+5113,U+5115,U+5117-5118,U+511a-511c,U+511e-511f,U+5121,U+5128,U+512b-512d,U+5131-5135,U+5137-5139,U+513c,U+5140,U+5142,U+5147,U+514c,U+514e-5150,U+5155-5158,U+5162,U+5169,U+5172,U+517f,U+5181-5184,U+5186-5187,U+518b,U+518f,U+5191,U+5195-5197,U+519a,U+51a2-51a3,U+51a6-51ab,U+51ad-51ae,U+51b1,U+51b4,U+51bc-51bd,U+51bf,U+51c3,U+51c7-51c8,U+51ca-51cb,U+51cd-51ce,U+51d4,U+51d6,U+51db-51dc,U+51e6,U+51e8-51eb,U+51f1,U+51f5,U+51fc,U+51ff,U+5202,U+5205,U+5208,U+520b,U+520d-520e,U+5215-5216,U+5228,U+522a,U+522c-522d,U+5233,U+523c-523d,U+523f-5240,U+5245,U+5247,U+5249,U+524b-524c,U+524e,U+5250,U+525b-525f,U+5261,U+5263-5264,U+5270,U+5273,U+5275,U+5277,U+527d,U+527f,U+5281-5285,U+5287}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-83-wght-normal-C9UjAcMM.woff2) format("woff2-variations");unicode-range:U+4fd1,U+4fd3,U+4fda-4fdc,U+4fdf-4fe0,U+4fe2-4fe4,U+4fe6,U+4fe8,U+4feb-4fed,U+4ff3,U+4ff5-4ff6,U+4ff8,U+4ffe,U+5001,U+5005-5006,U+5009,U+500c,U+500f,U+5013-5018,U+501b-501e,U+5022-5025,U+5027-5028,U+502b-502e,U+5030,U+5033-5034,U+5036-5039,U+503b,U+5041-5043,U+5045-5046,U+5048-504a,U+504c-504e,U+5051,U+5053,U+5055-5057,U+505b,U+505e,U+5060,U+5062-5063,U+5067,U+506a,U+506c,U+5070-5072,U+5074-5075,U+5078,U+507b,U+507d-507e,U+5080,U+5088-5089,U+5091-5092,U+5095,U+5097-509e,U+50a2-50a3,U+50a5-50a7,U+50a9,U+50ad,U+50b3,U+50b5,U+50b7,U+50ba,U+50be,U+50c4-50c5,U+50c7,U+50ca,U+50cd,U+50d1,U+50d5-50d6,U+50da,U+50de,U+50e5-50e6,U+50ec-50ee,U+50f0-50f1,U+50f3,U+50f9-50fb,U+50fe-5102}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-84-wght-normal-C7NxT478.woff2) format("woff2-variations");unicode-range:U+4ea3,U+4ea5,U+4eb0-4eb1,U+4eb3-4eb6,U+4eb8-4eb9,U+4ebb-4ebe,U+4ec2-4ec4,U+4ec8-4ec9,U+4ecc,U+4ecf-4ed0,U+4ed2,U+4eda-4edb,U+4edd-4ee1,U+4ee6-4ee9,U+4eeb,U+4eee-4eef,U+4ef3-4ef5,U+4ef8-4efa,U+4efc,U+4f00,U+4f03-4f05,U+4f08-4f09,U+4f0b,U+4f0e,U+4f12-4f13,U+4f15,U+4f1b,U+4f1d,U+4f21-4f22,U+4f25,U+4f27-4f29,U+4f2b-4f2e,U+4f31-4f33,U+4f36-4f37,U+4f39,U+4f3e,U+4f40-4f41,U+4f43,U+4f47-4f49,U+4f54,U+4f57-4f58,U+4f5d-4f5e,U+4f61-4f62,U+4f64-4f65,U+4f67,U+4f6a,U+4f6e-4f6f,U+4f72,U+4f74-4f7e,U+4f80-4f82,U+4f84,U+4f89-4f8a,U+4f8e-4f98,U+4f9e,U+4fa1,U+4fa5,U+4fa9-4faa,U+4fac,U+4fb3,U+4fb6-4fb8,U+4fbd,U+4fc2,U+4fc5-4fc6,U+4fcd-4fce,U+4fd0}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-85-wght-normal-DBcDBu1n.woff2) format("woff2-variations");unicode-range:U+3129,U+3131,U+3134,U+3137,U+3139,U+3141-3142,U+3145,U+3147-3148,U+314b,U+314d-314e,U+315c,U+3160-3161,U+3163-3164,U+3186,U+318d,U+3192,U+3196-3198,U+319e-319f,U+3220-3229,U+3231,U+3268,U+3297,U+3299,U+32a3,U+338e-338f,U+3395,U+339c-339e,U+33c4,U+33d1-33d2,U+33d5,U+3434,U+34dc,U+34ee,U+353e,U+355d,U+3566,U+3575,U+3592,U+35a0-35a1,U+35ad,U+35ce,U+36a2,U+36ab,U+38a8,U+3dab,U+3de7,U+3deb,U+3e1a,U+3f1b,U+3f6d,U+4495,U+4723,U+48fa,U+4ca3,U+4db6-4dbf,U+4e02,U+4e04-4e06,U+4e0c,U+4e0f,U+4e15,U+4e17,U+4e1f-4e21,U+4e26,U+4e29,U+4e2c,U+4e2f,U+4e31,U+4e35,U+4e37,U+4e3c,U+4e3f-4e42,U+4e44,U+4e46-4e47,U+4e57,U+4e5a-4e5c,U+4e64-4e65,U+4e67,U+4e69,U+4e6d,U+4e78,U+4e7f-4e82,U+4e85,U+4e87,U+4e8a,U+4e8d,U+4e93,U+4e96,U+4e98-4e99,U+4e9c,U+4e9e-4ea0,U+4ea2}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-86-wght-normal-CLJIoPpl.woff2) format("woff2-variations");unicode-range:U+279f-27a2,U+27a4-27a5,U+27a8,U+27b0,U+27b2-27b3,U+27b9,U+27e8-27e9,U+27f6,U+2800,U+28ec,U+2913,U+2921-2922,U+2934-2935,U+2a2f,U+2b05-2b07,U+2b50,U+2b55,U+2bc5-2bc6,U+2e1c-2e1d,U+2ebb,U+2f00,U+2f08,U+2f24,U+2f2d,U+2f2f-2f30,U+2f3c,U+2f45,U+2f63-2f64,U+2f74,U+2f83,U+2f8f,U+2fbc,U+3003,U+3005-3007,U+3012-3013,U+301c-301e,U+3021,U+3023-3024,U+3030,U+3034-3035,U+3041,U+3043,U+3045,U+3047,U+3049,U+3056,U+3058,U+305c,U+305e,U+3062,U+306c,U+3074,U+3077,U+307a,U+307c-307d,U+3080,U+308e,U+3090-3091,U+3099-309b,U+309d-309e,U+30a5,U+30bc,U+30be,U+30c2,U+30c5,U+30cc,U+30d8,U+30e2,U+30e8,U+30ee,U+30f0-30f2,U+30f4-30f6,U+30fd-30fe,U+3105-3126,U+3128}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-87-wght-normal-DYfJ-vGE.woff2) format("woff2-variations");unicode-range:U+2651-2655,U+2658,U+265a-265b,U+265d-265e,U+2660-266d,U+266f,U+267b,U+2688,U+2693-2696,U+2698-2699,U+269c,U+26a0-26a1,U+26a4,U+26aa-26ab,U+26bd-26be,U+26c4-26c5,U+26d4,U+26e9,U+26f0-26f1,U+26f3,U+26f5,U+26fd,U+2702,U+2704-2706,U+2708-270f,U+2712-2718,U+271a-271b,U+271d,U+271f,U+2721,U+2724-2730,U+2732-2734,U+273a,U+273d-2744,U+2747-2749,U+274c,U+274e-274f,U+2753-2757,U+275b,U+275d-275e,U+2763,U+2765-2767,U+276e-276f,U+2776-277e,U+2780-2782,U+278a-278c,U+278e,U+2794-2796,U+279c}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-88-wght-normal-ClNDOCGW.woff2) format("woff2-variations");unicode-range:U+2550-2551,U+2554,U+2557,U+255a-255b,U+255d,U+255f-2560,U+2562-2563,U+2565-2567,U+2569-256a,U+256c-2572,U+2579,U+2580-2595,U+25a1,U+25a3,U+25a9-25ad,U+25b0,U+25b3-25bb,U+25bd-25c2,U+25c4,U+25c8-25cb,U+25cd,U+25d0-25d1,U+25d4-25d5,U+25d8,U+25dc-25e6,U+25ea-25eb,U+25ef,U+25fe,U+2600-2604,U+2609,U+260e-260f,U+2611,U+2614-2615,U+2618,U+261a-2620,U+2622-2623,U+262a,U+262d-2630,U+2639-2640,U+2642,U+2648-2650}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-89-wght-normal-IQU_KQA8.woff2) format("woff2-variations");unicode-range:U+23f0,U+23f3,U+2445,U+2449,U+2465-2471,U+2474-249b,U+24b8,U+24c2,U+24c7,U+24c9,U+24d0,U+24d2,U+24d4,U+24d8,U+24dd-24de,U+24e3,U+24e6,U+24e8,U+2500-2509,U+250b-2526,U+2528-2534,U+2536-2537,U+253b-2548,U+254a-254b}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-90-wght-normal-BWcrRNoG.woff2) format("woff2-variations");unicode-range:U+207c-2083,U+208c-208e,U+2092,U+20a6,U+20a8-20ad,U+20af,U+20b1,U+20b4-20b5,U+20b8-20ba,U+20bd,U+20db,U+20dd,U+20e0,U+20e3,U+2105,U+2109,U+2113,U+2116-2117,U+2120-2121,U+2126,U+212b,U+2133,U+2139,U+2194,U+2196-2199,U+21a0,U+21a9-21aa,U+21af,U+21b3,U+21b5,U+21ba-21bb,U+21c4,U+21ca,U+21cc,U+21d0-21d4,U+21e1,U+21e6-21e9,U+2200,U+2202,U+2205-2208,U+220f,U+2211-2212,U+2215,U+2217-2219,U+221d-2220,U+2223,U+2225,U+2227-222b,U+222e,U+2234-2237,U+223c-223d,U+2248,U+224c,U+2252,U+2256,U+2260-2261,U+2266-2267,U+226a-226b,U+226e-226f,U+2282-2283,U+2295,U+2297,U+2299,U+22a5,U+22b0-22b1,U+22b9,U+22bf,U+22c5-22c6,U+22ef,U+2304,U+2307,U+230b,U+2312-2314,U+2318,U+231a-231b,U+2323,U+239b,U+239d-239e,U+23a0,U+23e9}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-91-wght-normal-CGekvDdH.woff2) format("woff2-variations");unicode-range:U+1d34-1d35,U+1d38-1d3a,U+1d3c,U+1d3f-1d40,U+1d49,U+1d4e-1d4f,U+1d52,U+1d55,U+1d5b,U+1d5e,U+1d9c,U+1da0,U+1dc4-1dc5,U+1e69,U+1e73,U+1ea0-1ea9,U+1eab-1ead,U+1eaf,U+1eb1,U+1eb3,U+1eb5,U+1eb7,U+1eb9,U+1ebb,U+1ebd-1ebe,U+1ec0-1ec3,U+1ec5-1ec6,U+1ec9-1ecd,U+1ecf-1ed3,U+1ed5,U+1ed7-1edf,U+1ee1,U+1ee3,U+1ee5-1eeb,U+1eed,U+1eef-1ef1,U+1ef3,U+1ef7,U+1ef9,U+1f62,U+1f7b,U+2001-2002,U+2004-2006,U+2009-200a,U+200c-2012,U+2015-2016,U+201a,U+201e-2021,U+2023,U+2025,U+2028,U+202a-202d,U+202f-2030,U+2032-2033,U+2035,U+2038,U+203c,U+203e-203f,U+2043-2044,U+2049,U+204d-204e,U+2060-2061,U+2070,U+2074-2078,U+207a-207b}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(data:font/woff2;base64,d09GMgABAAAAAAggABcAAAAAEXAAAAeuAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGYIKGhwbgUYcgTo/SFZBUm8GYD9TVEFUgR4nKgB8L2wRCAqGTIQZCygAMIU4ATYCJANMBCAFhjAHIAwHFyQYTBuKDiiOhNxE6yWubH7Ewz/8nN73/ydAEvBSp5laTTP3us+ETjhMVIzFx7ep7wcIL2lr81GI8MBA/wwBAO3tWB7myltBe7XjBDvwX/u1uu/E0uGyiIcomgkJSjv+6c7intwS/odMIiTiVZqJNtFQxJJFMiXyLF2hA920CeKJDfWGYz/+xn/VQlgoCd94Tia30SaDk6iddUDQC928PW0e6ObPoC7ULppBJdQunrFGoRMDUplVldtTIgYkMm3SuCUJ+4tMbzVfpCEoeoqwA+mU25VkSVsaUTlKmo4SgziUtHK/AgqyBbPsMrLX/mvhDgU1HwVBG4KiBMHnfRFBWSsEioCQVyWVIpUK5I3WX4bvOq6Or4OoKB/Xv9NFc4IUcQiETIJQI1HWCabrFynDBSGVIG0gSBhdJ5XwGyCl0UUmpRjsZC0gjU0LkImbTTASCuKkyZICaaLVThfvpnhR8COrKcjad1hTlAWiYJC5phiEmnEbRatXkNcsXqhcZ3Kq1aisNG/PTEeKXG2ANUArADIt3yzV1+vXaGzKAMFIBEUtiAC1DozA2vePzIFwR0yfpe+bLZrkmGQ82FKMGVOJsTEkhQQGT9389TdqH0ErJi2mu1eOIjsqStNzUQ3JgOR9lMQIoUagVTz6idhvnnONBJqVMKnWbdwytw0ENFGBgqPgKauLYqwJUiSSOInkPobs+vgNjBqS8exGo1FTWjJsTg+780LNQx4CjRLGtCKro5e8P0ruvLku4buyViBBilaRAq2izAdt0kTKWd7D5N7kyeTZ5O3k2zRLq9NipYJS0MfTP0Xl48qM7p26x3SP7l6nu727pjvXnQg8WaBRhNAqXs1FbAIVzIZSikRt5FXmohFUIIqstoSoI04i6onfiAaS8RCNLuGI0QRpCaIZLstFRKWiAbQAVgZ9wG3oBmSgColE9EqlGcVmKUtzxRzKJMUsp5jrkaMjLO5c3ZRbOC9lzpzY/Rvmzo2Zt+s8KRi/08010Xlt4dirHXrVtF1IwU6F+UY7EsZPTJiwKFmxo8/s1RbNNcyYdPto+4WPDD3mod5nPzwtaLNLIcnPI4tMoadGnUV0P4+PmHZzQ3S+OWq1Fw9Zb+z9M6dq/bBmbv3O2u9r6asT+415sGzKy2H+wNVeT1pGsh2agejFgfen72+y0ibzr3+m4YjWtouGxiPaWi/M7Js7d8M1N6w6d49qEbPWhnCeSnutWwoPeWhI+/uFqu7uaO9QnJYfGtnPiE/F8bW1Eyr+XmOVtzy++6pPNtTf4pnF+fZ84x8D/hpwGPeqdC++O6qPs/OWyy/HfH6XnHt2ii24l28JlIazIx1ZazVwNTsHPMvX797a0k4+KTKUUwqZHR3xSQNGsMPLovqPYmuuj7ksX9fZ3NLh24gJbhwIhMBomYCxgGor6TBqloI6dryzXOo6D3rOd5GP1WNM2VGoUYVD1XZ2aTCw/6T5vz/KzhoOnt/U/p+N28csHryYRex05rd7rH//N9tVKqttOLkdZ622dPKGxkoXB2k/f9d7HB1Tu/DU0bqiNlJfHVqO6CxXlqT39OgRXl8oCZWVCI0zVe14i61vSbqqsuzgqqp7wlAdc2R6TMLnL9J8XRHpwB9eGNiV3l31+yldQsYrb/P52xaVDb6+GfrtpJDU9WjLToy/vv3m63+7Cl9+9Xul0LMtJ6ny21fWnyBPlkaSJGn/Xh3PpKMez3U7tzWJx5UjiUji7VVil1wCT+6jj3/4K2tsaKj66/uPi4ehOW0blf7n/lfYbvZ4e7tQ0jV2Tt7m8gvY6ly/smM7TmPX9U/9nj7z4uMPn3rnXQ9DzKUn7EX7NLslnP7GJ7Fs2kDPHeOwKETO1xVkTnb1vNMVkbtKVFYCe1gCorkT5cXldE2dU3aYeRRSN6hs1Y/T0XDFQz/999jTD95z3M0334Nx5x95dbu1VdcFqPfqax9/+2eaJDtjPnoNkPMmidyx2546clrD6N9r0vQreO+mFa+ED0+5883/lvv3i8Ke1c0gJwFBdtT/H1G4yyLq/rsHBC+8Jf3KbO+IFlLsazEZbyj9KoYKcrUt2IzfXA6LD2M/cBSVDvAmtvZFeSQD4fANLhRoSTYzCQg8U6ufUpHV4ry4QMFh+ViGE/WxFKfKsTY7M+IqC73BOe2e43qDBe2bxFlYI0LRVPBey84DLmjVj4vyyrhOfSzF9YoG4waN7uJGcfrhJhkSGLk3NuAlUXh02bImSNJO46V2dSfY+LhUGAK1YJ3PIPRycFpzYQlkz7ApOpOcXPow1vjV43BCFEEufmtCWCEuXixNkANnRLdBwzRrNBMkVMiEDlbfomk2wfFL11AMEYvHq2TVS9TA6UIVE9kgrkBYMbSgVgMfiYfNSuyQucXmRqpwjGpVqvEq+D8JDdp0ajeiIUWlnYxQ0y7jbBzWL3x0cHQ0Q5QhIVNkoDCmk84TimIkEamA0UZFKqfbleHS0s0+myUZKXsJluLDMbJgbHJZ48QkRkOXkW7c3HRG98WCtaJhEt9pUvUmQmTdCsqH6bEigUqXgXiyu6Jy+E3Z8aIR+e3/4tNuUtmpe/+QITS2onR3sRNgHyjDHTAATRDFOWKrw/3QBbfAqnAZzENkTV785jgAAA==) format("woff2-variations");unicode-range:U+2ae-2b3,U+2b5-2bf,U+2c2-2c3,U+2c6-2d1,U+2d8-2da,U+2dc,U+2e1-2e3,U+2e5,U+2eb,U+2ee-2f0,U+2f2-2f7,U+2f9-2ff,U+302-30d,U+311,U+31b,U+321-325,U+327-329,U+32b-32c,U+32e-32f,U+331-339,U+33c-33d,U+33f,U+348,U+352,U+35c,U+35e-35f,U+361,U+363,U+368,U+36c,U+36f,U+530-540,U+55d-55e,U+561,U+563,U+565,U+56b,U+56e-579}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(data:font/woff2;base64,d09GMgABAAAAAA1YABcAAAAAG/QAAAzlAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGYIKGjMbg34ccj9IVkFScgZgP1NUQVSBHicqAIEcL2wRCAqQeI0+CyoAMI16ATYCJANQBCAFhjAHIAwHFyQYKht9GFGUk1HBZD8WqttewHiUqS9JxzGEKd4xQpJZgq/9yn4zfxECSApZA3ogR2rPXUWhjI4wxDIVoUmxPr8/0Db/HXcy4VDawMJIogxMaKsobVRSOdFew9b+iHb7FWluv9plyvHP9xc79+14qAuRBTVTYFETSISZJRKH/f/b71udu+vtzTrtcZY5Z+I/hCRa/yGahvq+6Hx5uD9BZk2tEdmGijW6hUalVCKtUyoQbm0nxj49JgtclkjJ3vduKzYj+kTkQoaR//75/KtaCJcx8B++Akz5gLnBAurTxvERyDmPu4Yh5+IkfKC+OgknqG/OSQJyUEFWWCnDFqmoIClMx+LHEG5D8zNeqG0IBPOMm+XIiF+Ih5WVGO+D5u2GpDECefz2HKjFpUH3gJef/JuF44yPBghAML3ATUkMfiWZC3EPLWiQdVgf552BDsodO4NMSEndDnUnNeqcwJzgnADM/qylr7jGCYjGou8tPPqFVqXYCEYQoxxAU9X5V8eLtUE0r8aXawBibWYoG4krk9y/Xkraki4OBowAqYC43ZD0UFWQhKwQiq5ISdgweIOqL38dt5aIrURvXPjoEzrHRp0XxNmadiHQL7/9VhgcxNXRwZE8OE4cyroQIQu9CDC0RWH4ubZ/uO2/8GvB4R0Qd9Noo91Ozd0Qp9VQadFIpbG7Z6MmJTRhN/eFi/zdkCjSvXEAOD4+bVwEZSaA1Eg6E2Yvbe9R3wxawnGiQXIfKCYT9lORCqQFlJ+BhahCnlkM0D7HXJRbHu8kgqAvVYFiZm16+U1DQM8QEBANX+a4GWsh501S3Afp/fa17ZiKYzvpdPmuObaHCmP66C5OqH7WAK6ri76TB7x7AiT8hJD5kYPiq9FqktvVQ6iU542ZBOZjQbUt9mA391DP9UOLLbfa4X7qEqWV4iRJAAtNxg/2bNDF3wX5+3JGxiOuiCNSEimOFEUKI6qIMhK//t768xAdc6x3UYS+7qq2G2AI9C0CdVGL+rJZS7diQzRpJIoWcV+7BRQbo8Old3U7vEe98LwQ+la10saYBCa3J6xUt4L0dAuPvW55TImlLmRIJEuuBAuhCBiKHonKoFLTomJZLCZblyWw+CpH88tKBsZIFkYzxu+Dh/ExITM9lkq1bmBT/Z5Yl2vDLNPtpnrsnQgODsvcE0j4SfyaxyF0sM+G4GDBU84690pc0mNf/MJKZtfKykIc8WV+wu2v0OfeW0x2LNqV9yF2HGbKPl1AwnfHld91H4S+655bXkbCOammW1qC0OKi7ZpHRsKrTJ9DhhBeDzJA1P69zxxggVE1aTMFr775LASVg5daRlCcEnLhOcvMuUh7T9kBjPDca92W3Jz9RO0ojtFt9LcWnY72t88msuL2fIuVWP3eHfnVkyqKyb9csr3nyF5gz7d6N9kuwFp7uAMjm8iaGY/CfVb84WVkz0x+G/2hJaBsrslRuLvfLSENKHQ0XDILWiiV/GXHl+KZOCV0163cEZ94661seAahv6XkWg36TpbINbdcJnrdFxlBfrz0A+0wEAstdmIL3HJHHJz5T/jfDcmVd27pef9SlPkfdm1RaTiVxQA2vY3+bM42X3nsF8w9vLg9TNaeON4eGEii3mMQG6LuGdvQZYmBLxAah7n5//54rzA/XdCmF91BNWQM/CNLqTj/1keChNy/4y3NojuphmynTgXRSdXYP0JgzeftbcuLIbZk3LSLq1o/9J5td0/94+MT9fO7u2y2XV3IE+Pz29rVY81oHLNo7vJ6NXeMtTU2TLRp7/B6tXdNWGB+LffgY3IGsfXUzbdwRGbiPlLj12o22Ts0m7kTmSVLa87y6O3aTT7tb2pHhWqkplYVcFSq1c4pA7U1ypE1B9S9fcG04kj24Q/dXETE+EFsSTRo8gjLJ9nvDKqDXZLC4m5JaXDwnaxPLHmESWNNhNUL1KW7R4SMbVuRm2/hiM//dBxvbXR62rOa7WUWg6KlmDaXxUxDOyhbrWrIYgR0pBxn+AHdpuuiNl+ni+5BhHFkJXdH6AFFokXYpmqi6YdjjbGsnpMVmYofSMPTsh5gLi5gMqulc9ghUe7X9hLzMQtwRMpEvG+I7bJjQ/b0qD86wVLrz9pWBvxD3nltULw5OzuxnKthtV0flUUZUi1kLedVvf5vGAfpKzzEzIyZ23Ttjl3gY6ZGtVP2WUtKWhsH3O1ZTfYyq1HRouLe8uX0HY+9cuNB4DH0zqqiTR1W7Ra/QSuvSW+kZAgPs56jY8Eg0f8BPfF9BQXsCrnUInvCON8gzC9x6FSEsaZgpLUCkqCkI7UzeUurQGSxOq3bEYeqRO+sLJq1a7KGdGZLllxeLaygaIWG7uGgK40eVHqcKtWw0d+7QxgGXo8SotrG+T6WLBp4F14ke95PxTIGow74FeEgemQCubPvh54OU0JzYD7fKHk32qOFUFBVwght4rkEm4+c+lfPa2HXYZu3MvWqxaVWdm+7lm7Y9KC3fJSS8lELSeYbuvWwC3a3dRvyyZ1owly4fKfhNvea4FH77YwW2d+QFkEmdjKAtv8Gn/+GrtsKpLUl0PTGssvFiUlZGckxl8+cO3EayzVV2h0Gc7PNNT4zOzUZdJAko7kZHOHMCBlZd/m9vhZdC8YXcE3kcZ984sBJv7jCFiTFRN5KTkl5ixM8Sp6nND0WkY6PjG4WZ4Xs9TPUOlsoMzRSBpkQW3030yomLPfqYQfcGeoth5qw5BSHh1EYPF5xUTIDuUCSERTnxHE5A5+DoxFyerpLhB954z5J9sYRXNQ1rR24FUVHPjPC0CtXegcCokvAvnqMvsoWpMsrzZQ6U4AuvUwtoQJF39Y761OAKizDJeLsLLFM0m6tlIlTmSQZxYpPzhbJmfIykuNZUSRB2OXx64tvSYrF9Xi5nZAG3Ry9LzeBn0zSBMGmrQaYg3R7BJM5G478+Q9ogrIpchLPrqC+JzHYa4SWcO4aN5ZyFY3h80uKU2Kizh8lSVa+sYnLVbUEpmVZoEU1tjQZ81kXFWwc3RcXE8O15Ez2xIwBdoASP3vuvz9AwRu2FqZf+e03grh65tT5i9AYTqUXZCckZEvECJLUWF6QUlAga5hG7tTEjjB69uxFbnDUrKCMfrrvVqIEAln3IKjCedrkSONqvV4tN60O2qpTw/zWv/7Ny8uvCkxCYzi8ALwwFvCOXrmMfvEvi7tIF8gMBBjW2lqrzoxT13YSVXYyB6Rx587RBAVV7KVAQDsn7usTL5ees6lrTuRYJyWrnWqG4OiL93L6XFJefklPv9MSOQzI3IupZnjTpuEak6OykTmVGeu6sok1T9WCKX3if//NnPznnz8WzaCz86v2nu7+0bPi72F1YAyHEC7XBO/C44f6LPwKJ+YEYRNpI/2cqI+Ukqkh9Ep0r+7Rh/IjCX79ta2j02LvdI8Y+uXKLiVJrYEAfJJhgKZwiFZQUFKiEAnNiQnTrv720gm++R8ScrSwGzrp4FPyyctnTmJ49sLZ40f/WzvnvKcht3vQOeppqspcP7p24oIo/sjCwhotqcyrhzCcCQ1UQ0lYSpLR3Pi0XBHDibOzCwq2jRMCnUoeEbtw4QoZDFpMv3/9pqT9mZ4oag/uvNScnMY5v8YhJe3UdwsrPx137T4P+N+10xsLRfFr9paVurcbZQVNGEtOnL7RACHYB1x8j/zMVQ7SuiIpJcO5IMnN5WpEyToItZV0t93lYIejU0xanCD0uYB5IuxoS9/R5s3ZFR5l/wQwyg7zD5j32qdol0DwpklRPnlUrexjVpyLRvNfwLfnsg4Aft786srV9Cv/4OMbOADKEgiKyf9vAI3Xm7D1SwMBofN8htt/hvwEEANwNg3dQ1NLX+mnDsrnfSOjg/65eVxoP+NriDGCb7p3znbMVAt7/HBqwNJE6Fxs6DxUFDU86f45CYvbQpJ2XCfZnqTlCzMpuewjUjbfPGnbanxYT7TLKSI0XYxHrJWvx6RhqI401e0hLe24TtqatpKOrizShWhzSQ846ObG47HPCKdBw0xmTRrnpDdqxNA4bTuXAN8yNMKQOiWggV08vCap+dfX2rnm2MIbSHwdk4LKyMhMGDTOJ2jSBKkJPiOkRo3zkGlm1qDJqEmj2jkRJrQzkLDpNi7jpOsfRRBSkpKTKyRRQ6mcl8oGTa5pDVBkIKWgoCZpgNMwFyKlm8ssF4eriOXFiry9nIr1ZyinY6TXrDwwG8rVrFlN2rh4TOntH6f4hQUTFqFCPc+g/CBWyimkmKcupapCOkMFD3BVlqcom+mulXKamVR4xgCZfGLCM6nPJC9hOGxCPTZ9SVcKmTWCSb2JU4A9Ya52o6YSMJgklxSqM6vxTkrneh25+41dB+kCMhVh3OdDlmV91hgERAbIN+F6U7IZPFtHHFTTIpPWCfFLFVkWAAAAAAA=) format("woff2-variations");unicode-range:U+176-17f,U+192,U+194,U+19a-19b,U+19d,U+1a0-1a1,U+1a3-1a4,U+1aa,U+1ac-1ad,U+1af-1bf,U+1d2,U+1d4,U+1d6,U+1d8,U+1da,U+1dc,U+1e3,U+1e7,U+1e9,U+1ee,U+1f0-1f1,U+1f3,U+1f5-1ff,U+219-21b,U+221,U+223-226,U+228,U+22b,U+22f,U+231,U+234-237,U+23a-23b,U+23d,U+250-252,U+254-255,U+259-25e,U+261-263,U+265,U+268,U+26a-26b,U+26f-277,U+279,U+27b-280,U+282-283,U+285,U+28a,U+28c,U+28f,U+292,U+294-296,U+298-29a,U+29c,U+29f,U+2a1-2a4,U+2a6-2a7,U+2a9,U+2ab}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-99-wght-normal-Q_IptJM5.woff2) format("woff2-variations");unicode-range:U+a1-a4,U+a6-a8,U+aa,U+ac,U+af,U+b1,U+b3-b6,U+b8-ba,U+bc-d6,U+d8-de,U+e6,U+eb,U+ee-f0,U+f5,U+f7-f8,U+fb,U+fd-100,U+102,U+104-107,U+10d,U+10f-112,U+115,U+117,U+119,U+11b,U+11e-11f,U+121,U+123,U+125-127,U+129-12a,U+12d,U+12f-13f,U+141-142,U+144,U+146,U+14b-14c,U+14f-153,U+158-15b,U+15e-160,U+163-165,U+168-16a,U+16d-175}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-100-wght-normal-DrqXJETY.woff2) format("woff2-variations");unicode-range:U+221a,U+2264,U+2464,U+25a0,U+3008,U+4e10,U+512a,U+5152,U+5201,U+5241,U+5340,U+5352,U+549a,U+54b2,U+54c6,U+54d7,U+54e1,U+5509,U+55c5,U+5618,U+5716,U+576f,U+5784,U+57a2,U+589f,U+5a20,U+5a25,U+5a29,U+5a34,U+5a7f,U+5ad6,U+5b09,U+5b5c,U+5bc7,U+5be6,U+5c27,U+5d2d,U+5dcd,U+5f1b,U+5f37,U+604d,U+6055,U+6073,U+60eb,U+61ff,U+62ce,U+62ed,U+6345,U+6390,U+63b0,U+63b7,U+64ae,U+64c2,U+64d2,U+6556,U+663c,U+667e,U+66d9,U+66f8,U+6756,U+6789,U+689d,U+68f1,U+695e,U+6975,U+6a1f,U+6b0a,U+6b61,U+6b87,U+6c5d,U+6c7e,U+6c92,U+6d31,U+6df9,U+6e0d,U+6e2d,U+6f31,U+6f3e,U+70b3,U+70bd,U+70ca,U+70e8,U+725f,U+733f,U+7396,U+739f,U+7459,U+74a7,U+75a1,U+75f0,U+76cf,U+76d4,U+7729,U+77aa,U+77b0,U+77e3,U+780c,U+78d5,U+7941,U+7977,U+797a,U+79c3,U+7a20,U+7a92,U+7b71,U+7bf1,U+7c9f,U+7eb6,U+7eca,U+7ef7,U+7f07,U+7f09,U+7f15,U+7f81,U+7fb9,U+8038,U+8098,U+80b4,U+8110,U+814b-814c,U+816e,U+818a,U+8205,U+8235,U+828b,U+82a5,U+82b7,U+82d4,U+82db,U+82df,U+8317,U+8338,U+8385-8386,U+83c1,U+83cf,U+8537,U+853b,U+854a,U+8715,U+8783,U+892a,U+8a71,U+8bb3,U+8d2e,U+8d58,U+8dbe,U+8f67,U+8fab,U+8fc4,U+8fe6,U+9023,U+9084,U+9091,U+916a,U+91c9,U+91dc,U+94b3,U+9502,U+9523,U+9551,U+956f,U+960e,U+962a,U+962e,U+9647,U+96f3,U+9739,U+97a0,U+97ed,U+983b,U+985e,U+988a,U+99ac,U+9a6f,U+9a87,U+9a8b,U+9ab7,U+9abc,U+9ac5,U+9e25,U+e608,U+e621,U+ff06,U+ff14-ff16}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-101-wght-normal-c94LAl5p.woff2) format("woff2-variations");unicode-range:U+161,U+926,U+928,U+939,U+93f-940,U+94d,U+e17,U+e22,U+e44,U+25c7,U+25ce,U+2764,U+3009,U+3016-3017,U+4e4d,U+4e53,U+4f5a,U+4f70,U+4fae,U+4fd8,U+4ffa,U+5011,U+501a,U+51c4,U+5225,U+547b,U+5495,U+54e8,U+54ee,U+5594,U+55d3,U+55dc,U+55fd,U+560e,U+565c,U+5662,U+5669,U+566c,U+56bc,U+5742,U+5824,U+5834,U+598a,U+5992,U+59a9,U+5a04,U+5ac9,U+5b75,U+5b7d,U+5bc5,U+5c49,U+5c90,U+5e1c,U+5e27,U+5e2b,U+5e37,U+5e90,U+618b,U+61f5,U+620a,U+620c,U+6273,U+62c7,U+62f7,U+6320,U+6342,U+6401-6402,U+6413,U+6512,U+655b,U+65a7,U+65f1,U+65f7,U+665f,U+6687,U+66a7,U+673d,U+67b8,U+6854,U+68d8,U+68fa,U+696d,U+6a02,U+6a0a,U+6a80,U+6b7c,U+6bd9,U+6c2e,U+6c76,U+6cf8,U+6d4a,U+6d85,U+6e24,U+6e32,U+6ec7,U+6f88,U+700f,U+701a,U+7078,U+707c,U+70ac,U+70c1,U+72e9,U+7409,U+7422,U+745a,U+7480,U+74a8,U+752b,U+7574,U+7656,U+7699,U+7737,U+785d,U+78be,U+79b9,U+7a3d,U+7a91,U+7a9f,U+7ae3,U+7b77,U+7c3f,U+7d1a,U+7d50,U+7d93,U+8042,U+808b,U+8236,U+82b8-82b9,U+82ef,U+8309,U+836b,U+83ef,U+8431,U+85c9,U+865e,U+868c,U+8759,U+8760,U+8845,U+89ba,U+8a2a,U+8aaa,U+8c41,U+8d2c,U+8d4e,U+8e66,U+8e6d,U+8eaf,U+902e,U+914b,U+916e,U+919b,U+949b,U+94a0,U+94b0,U+9541-9542,U+9556,U+95eb,U+95f5,U+964b,U+968b,U+96cc-96cd,U+96cf,U+9713,U+9890,U+98a8,U+9985,U+9992,U+9a6d,U+9a81,U+9a86,U+9ab8,U+9ca4,U+e606-e607,U+e60a,U+e60c,U+e60e,U+fe0f,U+ff02,U+ff1e}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-102-wght-normal-C1RtbCZr.woff2) format("woff2-variations");unicode-range:U+10c,U+627-629,U+639,U+644,U+64a,U+203b,U+2265,U+2463,U+2573,U+25b2,U+3448-3449,U+4e1e,U+4e5e,U+4f3a,U+4f5f,U+4fea,U+5026,U+508d,U+516e,U+5189,U+5254,U+5288,U+52d8,U+52fa,U+5306,U+5308,U+5364,U+5384,U+53ed,U+543c,U+5450,U+5455,U+5466,U+54c4,U+5578,U+55a7,U+561f,U+5631,U+572d,U+575f,U+57ae,U+57e0,U+5830,U+594e,U+5984,U+5993,U+5bdd,U+5c0d,U+5c7f,U+5c82,U+5e62,U+5ed3,U+5f08,U+607a,U+60bc,U+625b,U+6292,U+62e2,U+6363,U+6467,U+6714,U+675e,U+6771,U+67a2,U+67ff,U+6805,U+68a7,U+68e0,U+6930,U+6986,U+69a8,U+69df,U+6a44,U+6a5f,U+6c13,U+6c1f,U+6c22,U+6c2f,U+6c40,U+6c81,U+6c9b,U+6ca5,U+6da4,U+6df3,U+6e85,U+6eba,U+6ed5,U+6f13,U+6f33,U+6f62,U+715e,U+72c4,U+73d1,U+7405,U+7487,U+7578,U+75a4,U+75eb,U+7693,U+7738,U+7741,U+776b,U+7792,U+77a7,U+77a9,U+77b3,U+788c,U+7984,U+79a7,U+79e4,U+7a1a,U+7a57,U+7aa6,U+7b0b,U+7b5d,U+7c27,U+7c7d,U+7caa,U+7cd9,U+7cef,U+7eda,U+7ede,U+7f24,U+803f,U+8046,U+80fa,U+81fb,U+8207,U+8258,U+8335,U+8339,U+8354,U+840e,U+85b0,U+85fb,U+8695,U+86aa,U+8717,U+8749,U+874c,U+8996,U+89bd,U+89c5,U+8bdb,U+8bf5,U+8c5a,U+8cec,U+8d3f,U+8d9f,U+8e44,U+8fed,U+9005,U+9019,U+9082,U+90af,U+90dd,U+90e1,U+90f8,U+916f,U+9176,U+949e,U+94a7,U+94c2,U+9525,U+9580,U+95dc,U+96e2,U+96fb,U+9704,U+9a7c,U+9a7f,U+9b41,U+9ca8,U+9cc4,U+9cde,U+9e92,U+9ede,U+9f9a,U+e60b,U+e610,U+ff10,U+ff13,U+ff3b,U+ff3d,U+f012b}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-103-wght-normal-DGHo20nu.woff2) format("woff2-variations");unicode-range:U+60,U+631,U+2606,U+3014-3015,U+309c,U+33a1,U+4e52,U+4ec6,U+4f86,U+4f8d,U+4fde,U+4fef,U+500b,U+502a,U+515c,U+518a,U+51a5,U+51f3,U+5243,U+52c9,U+52d5,U+53a2,U+53ee,U+54ce,U+54fa,U+54fc,U+5580,U+5587,U+563f,U+56da,U+5792,U+5815,U+5960,U+59d7,U+5b78,U+5b9b,U+5be1,U+5c4e,U+5c51,U+5c6f,U+5c9a,U+5cfb,U+5d16,U+5ed6,U+5f27,U+5f6a,U+609a,U+60df,U+6168,U+61c8,U+6236,U+62f1,U+62fd,U+631a,U+6328,U+632b,U+6346,U+638f,U+63a0,U+63c9,U+655e,U+6590,U+6615,U+6627,U+66ae,U+66e6,U+66f0,U+67da,U+67ec,U+6813,U+6816,U+6869,U+6893,U+68ad,U+68f5,U+6977,U+6984,U+69db,U+6b72,U+6bb7,U+6ce3,U+6cfb,U+6d47,U+6da1,U+6dc4,U+6e43,U+6eaf,U+6eff,U+6f8e,U+7011,U+7063,U+7076,U+7096,U+70ba,U+70db,U+70ef,U+7119-711a,U+7172,U+718f,U+7194,U+727a,U+72d9,U+72ed,U+7325,U+73ae,U+73ba,U+73c0,U+73fe,U+7410,U+7426,U+7455,U+7554,U+7576,U+75ae,U+75b9,U+762b,U+766b,U+7682,U+7750,U+7779,U+7784,U+77eb,U+77ee,U+78f7,U+79e9,U+7a79,U+7b1b,U+7b28,U+7bf7,U+7db2,U+7ec5,U+7eee,U+7f14,U+7f1a,U+7fe1,U+8087,U+809b,U+81b3,U+8231,U+830e,U+835f,U+83e9,U+849c,U+851a,U+868a,U+8718,U+874e,U+8822,U+8910,U+8944,U+8a3b,U+8bb6,U+8bbc,U+8e72,U+8f9c,U+900d,U+904b,U+904e,U+9063,U+90a2,U+90b9,U+9119,U+94f2,U+952f,U+9576-9577,U+9593,U+95f8,U+961c,U+969b,U+96a7,U+96c1,U+9716,U+9761,U+97ad,U+97e7,U+98a4,U+997a,U+9a73,U+9b44,U+9e3d,U+9ecf,U+9ed4,U+ff11-ff12,U+fffd}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-104-wght-normal-CJT2ioDJ.woff2) format("woff2-variations");unicode-range:U+2003,U+2193,U+2462,U+4e19,U+4e2b,U+4e36,U+4ea8,U+4ed1,U+4ed7,U+4f51,U+4f63,U+4f83,U+50e7,U+5112,U+5167,U+51a4,U+51b6,U+5239,U+5265,U+532a,U+5351,U+537f,U+5401,U+548f,U+5492,U+54af,U+54b3,U+54bd,U+54d1,U+54df,U+554f,U+5564,U+5598,U+5632,U+56a3,U+56e7,U+574e,U+575d-575e,U+57d4,U+584c,U+58e4,U+5937,U+5955,U+5a05,U+5a1f,U+5a49,U+5ac2,U+5c39,U+5c61,U+5d0e,U+5de9,U+5e9a,U+5eb8,U+5f0a,U+5f13,U+5f6c,U+5f8c,U+603c,U+608d,U+611b,U+6127,U+62a0,U+62d0,U+634f,U+635e,U+63fd,U+6577,U+658b,U+65bc,U+660a,U+6643,U+6656,U+6703,U+6760,U+67af,U+67c4,U+67e0,U+6817,U+68cd,U+690e,U+6960,U+69b4,U+6a71,U+6aac,U+6b67,U+6bb4,U+6c55,U+6c70,U+6c82,U+6ca6,U+6cb8,U+6cbe,U+6ede,U+6ee5,U+6f4d,U+6f84,U+6f9c,U+7115,U+7121,U+722a,U+7261,U+7272,U+7280,U+72f8,U+7504,U+754f,U+75d8,U+767c,U+76ef,U+778e,U+77bb,U+77f6,U+786b,U+78b1,U+7948,U+7985,U+79be,U+7a83,U+7a8d,U+7eac,U+7eef,U+7ef8,U+7efd,U+7f00,U+803d,U+8086,U+810a,U+8165,U+819d,U+81a8,U+8214,U+829c,U+831c,U+832b,U+8367,U+83e0,U+83f1,U+8403,U+846b,U+8475,U+84b2,U+8513,U+8574,U+85af,U+86d9,U+86db,U+8acb,U+8bbd,U+8be0-8be1,U+8c0e,U+8d29,U+8d50,U+8d63,U+8f7f,U+9032,U+9042,U+90b1,U+90b5,U+9165,U+9175,U+94a6,U+94c5,U+950c,U+9610,U+9631,U+9699,U+973e,U+978d,U+97ec,U+97f6,U+984c,U+987d,U+9882,U+9965,U+996a,U+9972,U+9a8f,U+9ad3,U+9ae6,U+9cb8,U+9edb,U+e600,U+e60f,U+e611,U+ff05,U+ff0b}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-105-wght-normal-BFoiJwz2.woff2) format("woff2-variations");unicode-range:U+5e,U+2190,U+250a,U+25bc,U+25cf,U+4e56,U+4ea9,U+4f3d,U+4f6c,U+4f88,U+4fa8,U+4fcf,U+5029,U+5188,U+51f9,U+5203,U+524a,U+5256,U+529d,U+5375,U+53db,U+541f,U+5435,U+5457,U+548b,U+54c7,U+54d4,U+54e9,U+556a,U+5589,U+55bb,U+55e8,U+55ef,U+563b,U+566a,U+576a,U+58f9,U+598d,U+599e,U+59a8,U+5a9b,U+5ae3,U+5bb0,U+5bde,U+5c4c,U+5c60,U+5d1b,U+5deb,U+5df7,U+5e18,U+5f26,U+5f64,U+601c,U+6084,U+60e9,U+614c,U+6208,U+621a,U+6233,U+6254,U+62d8,U+62e6,U+62ef,U+6323,U+632a,U+633d,U+6361,U+6405,U+640f,U+6614,U+6642,U+6657,U+67a3,U+6808,U+683d,U+6850,U+6897,U+68b3,U+68b5,U+68d5,U+6a58,U+6b47,U+6b6a,U+6c28,U+6c90,U+6ca7,U+6cf5,U+6d51,U+6da9,U+6dc7,U+6dd1,U+6e0a,U+6e5b,U+6e9c,U+6f47,U+6f6d,U+70ad,U+70f9,U+710a,U+7130,U+71ac,U+745f,U+7476,U+7490,U+7529,U+7538,U+75d2,U+7696,U+76b1,U+76fc,U+777f,U+77dc,U+789f,U+795b,U+79bd,U+79c9,U+7a3b,U+7a46,U+7aa5,U+7ad6,U+7ca5,U+7cb9,U+7cdf,U+7d6e,U+7f06,U+7f38,U+7fa1,U+7fc1,U+8015,U+803b,U+80a2,U+80aa,U+8116,U+813e,U+82bd,U+8305,U+8328,U+8346,U+846c,U+8549,U+859b,U+8611,U+8680,U+87f9,U+884d,U+8877,U+888d,U+88d4,U+898b,U+8a79,U+8a93,U+8c05,U+8c0d,U+8c26,U+8d1e,U+8d31,U+8d81,U+8e22,U+8e81,U+8f90,U+8f96,U+90ca,U+916c,U+917f,U+9187,U+918b,U+9499,U+94a9,U+9524,U+9540,U+958b,U+9600,U+9640,U+96b6,U+96c7,U+96ef,U+98d9,U+9976,U+997f,U+9a74,U+9a84,U+9c8d,U+9e26,U+9e9f,U+ad6d,U+c5b4,U+d55c,U+ff0f}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-106-wght-normal-D6uUHw3w.woff2) format("woff2-variations");unicode-range:U+b0,U+2191,U+2460-2461,U+25c6,U+300e-300f,U+4e1b,U+4e7e,U+4ed5,U+4ef2,U+4f10,U+4f1e,U+4f50,U+4fa6,U+4faf,U+5021,U+50f5,U+5179,U+5180,U+51d1,U+522e,U+52a3,U+52c3,U+52cb,U+5300,U+5319,U+5320,U+5349,U+5395,U+53d9,U+541e,U+5428,U+543e,U+54b1,U+54c0,U+54d2,U+570b,U+5858,U+58f6,U+5974,U+59a5,U+59e8,U+59ec,U+5a36,U+5a9a,U+5ab3,U+5b99,U+5baa,U+5ce1,U+5d14,U+5d4c,U+5dc5,U+5de2,U+5e99,U+5e9e,U+5f18,U+5f66,U+5f70,U+6070,U+60d5,U+60e7,U+6101,U+611a,U+61be,U+6241,U+6252,U+626f,U+6296,U+62bc,U+62cc,U+6380,U+63a9,U+644a,U+6454,U+64a9,U+64b8,U+6500,U+6572,U+65a5,U+65a9,U+65ec,U+660f,U+6749,U+6795,U+67ab,U+68da,U+6912,U+6bbf,U+6bef,U+6cab,U+6cca,U+6ccc,U+6cfc,U+6d3d,U+6d78,U+6dee,U+6e17,U+6e34,U+6e83,U+6ea2,U+6eb6,U+6f20,U+6fa1,U+707f,U+70d8,U+70eb,U+714c,U+714e,U+7235,U+7239,U+73ca,U+743c,U+745c,U+7624,U+763e,U+76f2,U+77db,U+77e9,U+780d,U+7838,U+7845,U+78ca,U+796d,U+7a84,U+7aed,U+7b3c,U+7eb2,U+7f05,U+7f20,U+7f34,U+7f62,U+7fc5,U+7fd8,U+7ff0,U+800d,U+8036,U+80ba,U+80be,U+80c0-80c1,U+8155,U+817a,U+8180,U+81e3,U+8206,U+8247,U+8270,U+8299,U+82ad,U+8304,U+8393,U+83b9,U+840d,U+8427,U+8469,U+8471,U+84c4,U+84ec,U+853d,U+8681-8682,U+8721,U+8854,U+88d5,U+88f9,U+8bc0,U+8c0a,U+8c29,U+8c2d,U+8d41,U+8dea,U+8eb2,U+8f9f,U+903b,U+903e,U+9102,U+9493,U+94a5,U+94f8,U+95f7,U+9706,U+9709,U+9774,U+98a0,U+9e64,U+9f9f,U+e603}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-107-wght-normal-kFQzJDLH.woff2) format("woff2-variations");unicode-range:U+200b,U+2103,U+4e18,U+4e27-4e28,U+4e38,U+4e59,U+4e8f,U+4ead,U+4ec7,U+4fe9,U+503a,U+5085,U+5146,U+51af,U+51f8,U+52ab,U+5339,U+535c,U+5378,U+538c,U+5398,U+53f9,U+5415,U+5475,U+54aa,U+54ac,U+54b8,U+5582,U+5760,U+5764,U+57cb,U+5835,U+5885,U+5951,U+5983,U+59da,U+5a77,U+5b5d,U+5b5f,U+5bb5,U+5bc2,U+5be8,U+5bfa,U+5c2c,U+5c34,U+5c41,U+5c48,U+5c65,U+5cad,U+5e06,U+5e42,U+5ef7,U+5f17,U+5f25,U+5f6d,U+5f79,U+6028,U+6064,U+6068,U+606d,U+607c,U+6094,U+6109,U+6124,U+6247,U+626d,U+6291,U+629a,U+62ac,U+62b9,U+62fe,U+6324,U+6349,U+6367,U+6398,U+6495,U+64a4,U+64b0,U+64bc,U+64ce,U+658c,U+65ed,U+6602,U+6674,U+6691,U+66a8,U+674f,U+679a,U+67ef,U+67f4,U+680b,U+6876,U+68a8,U+6a59,U+6a61,U+6b20,U+6bc5,U+6d12,U+6d46,U+6d8c,U+6dc0,U+6e14,U+6e23,U+6f06,U+7164,U+716e,U+7199,U+71e5,U+72ac,U+742a,U+755c,U+75ab,U+75b2,U+75f4,U+7897,U+78b3,U+78c5,U+7978,U+79fd,U+7a74,U+7b4b,U+7b5b,U+7ece,U+7ed2,U+7ee3,U+7ef3,U+7f50,U+7f55,U+7f9e,U+7fe0,U+809d,U+8106,U+814a,U+8154,U+817b,U+818f,U+81c2,U+81ed,U+821f,U+82a6,U+82d1,U+8302,U+83c7,U+83ca,U+845b,U+848b,U+84c9,U+85e4,U+86ee,U+8700,U+8774,U+8881,U+8c1c,U+8c79,U+8d2a,U+8d3c,U+8eba,U+8f70,U+8fa9,U+8fb1,U+900a,U+9017,U+901d,U+9022,U+906e,U+946b,U+94dd,U+94ed,U+953b,U+95ef,U+95fa,U+95fd,U+96c0,U+971e,U+9753,U+9756,U+97e6,U+9881,U+9887,U+9b4f,U+9e2d,U+9f0e,U+e601-e602,U+e604-e605,U+ff5c}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-108-wght-normal-7aXvqIa2.woff2) format("woff2-variations");unicode-range:U+24,U+4e08,U+4e43,U+4e4f,U+4ef0,U+4f2a,U+507f,U+50ac,U+50bb,U+5151,U+51bb,U+51f6,U+51fd,U+5272,U+52fe,U+5362,U+53c9,U+53d4,U+53e0,U+543b,U+54f2,U+5507,U+5524,U+558a,U+55b5,U+561b,U+56ca,U+5782,U+57c3,U+5893,U+5915,U+5949,U+5962,U+59ae,U+59dc,U+59fb,U+5bd3,U+5c38,U+5cb3,U+5d07,U+5d29,U+5de1,U+5dfe,U+5e15,U+5eca,U+5f2f,U+5f7c,U+5fcc,U+6021,U+609f,U+60f9,U+6108,U+6148,U+6155,U+6170,U+61d2,U+6251,U+629b,U+62ab,U+62e8,U+62f3,U+6321,U+6350,U+6566,U+659c,U+65e8,U+6635,U+6655,U+6670,U+66f9,U+6734,U+679d,U+6851,U+6905,U+6b49,U+6b96,U+6c1b,U+6c41,U+6c6a,U+6c83,U+6cf3,U+6d9b,U+6dcb,U+6e1d,U+6e20-6e21,U+6eaa,U+6ee4,U+6ee9,U+6f58,U+70e4,U+722c,U+7262,U+7267,U+72b9,U+72e0,U+72ee,U+72f1,U+7334,U+73ab,U+7433,U+7470,U+758f,U+75d5,U+764c,U+7686,U+76c6,U+76fe,U+7720,U+77e2,U+7802,U+7816,U+788d,U+7891,U+7a00,U+7a9d,U+7b52,U+7bad,U+7c98,U+7cca,U+7eba,U+7eea,U+7ef5,U+7f1d,U+7f69,U+806a,U+809a,U+80bf,U+80c3,U+81c0,U+820c,U+82ac,U+82af,U+82cd,U+82d7,U+838e,U+839e,U+8404,U+84b8,U+852c,U+8587,U+8650,U+8679,U+86c7,U+8702,U+87ba,U+886b-886c,U+8870,U+8c10,U+8c23,U+8c6b,U+8d3e,U+8d4b-8d4c,U+8d64,U+8d6b,U+8d74,U+8e29,U+8f69,U+8f74,U+8fb0,U+8fdf,U+901b,U+9038,U+9093,U+9171,U+9489,U+94ae,U+94c3,U+9508,U+9510,U+9601,U+9614,U+964c,U+9675,U+971c,U+97f5,U+9888,U+98d8,U+9971,U+9aa4,U+9e3f,U+9e45,U+9e4f,U+9e70,U+9f7f,U+e715}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-109-wght-normal-CnjNbNmw.woff2) format("woff2-variations");unicode-range:U+a5,U+2192,U+2605,U+4e11,U+4e22,U+4e32,U+4f0d,U+4f0f,U+4f69,U+4ff1,U+50b2,U+5154,U+51dd,U+51f0,U+5211,U+5269,U+533f,U+5366-5367,U+5389,U+5413,U+5440,U+5446,U+5561,U+574a,U+5751,U+57ab,U+5806,U+5821,U+582a,U+58f3,U+5938,U+5948,U+5978,U+59d1,U+5a03,U+5a07,U+5ac1,U+5acc,U+5ae9,U+5bb4,U+5bc4,U+5c3f,U+5e3d,U+5e7d,U+5f92,U+5faa,U+5fe0,U+5ffd,U+6016,U+60a0,U+60dc,U+60e8,U+614e,U+6212,U+6284,U+62c6,U+62d3-62d4,U+63f4,U+642c,U+6478,U+6491-6492,U+64e6,U+6591,U+65a4,U+664b,U+6735,U+6746,U+67f1,U+67f3,U+6842,U+68af,U+68c9,U+68cb,U+6a31,U+6b3a,U+6bc1,U+6c0f,U+6c27,U+6c57,U+6cc4,U+6ce5,U+6d2a,U+6d66,U+6d69,U+6daf,U+6e58,U+6ecb,U+6ef4,U+707e,U+7092,U+70ab,U+71d5,U+7275,U+7384,U+73b2,U+7434,U+74e6,U+74f7,U+75bc,U+76c8,U+76d0,U+7709,U+77ac,U+7855,U+78a7,U+78c1,U+7a77,U+7b79,U+7c92,U+7cae,U+7cd5,U+7ea4,U+7eb5,U+7ebd,U+7f5a,U+7fd4,U+7ffc,U+8083,U+8096,U+80a0,U+80d6,U+80de,U+8102,U+8109,U+810f,U+8179,U+8292,U+82b3,U+8352,U+8361,U+83cc,U+841d,U+8461,U+8482,U+8521,U+857e,U+85aa,U+866b,U+8776,U+8896,U+889c,U+88f8,U+8a9e,U+8bc8,U+8bf8,U+8c0b,U+8c28,U+8d2b,U+8d2f,U+8d37,U+8d3a,U+8d54,U+8dc3,U+8dcc,U+8df5,U+8e0f,U+8e48,U+8f86,U+8f88,U+8f9e,U+8fc1,U+8fc8,U+8feb,U+9065,U+90a6,U+90aa,U+90bb,U+90c1,U+94dc,U+9521,U+9676,U+96d5,U+970d,U+9897,U+997c,U+9a70,U+9a76,U+9a9a,U+9ad4,U+9e23,U+9e7f,U+9f3b,U+e675,U+e6b9,U+ffe5}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-110-wght-normal-D2JBr045.woff2) format("woff2-variations");unicode-range:U+300c-300d,U+4e54,U+4e58,U+4e95,U+4ec1,U+4f2f,U+4f38,U+4fa3,U+4fca,U+503e,U+5141,U+5144,U+517c,U+51cc,U+51ed,U+5242,U+52b2,U+52d2,U+52e4,U+540a,U+5439,U+5448,U+5496,U+54ed,U+5565,U+5761,U+5766,U+58ee,U+593a,U+594b,U+594f,U+5954,U+5996,U+59c6,U+59ff,U+5b64,U+5bff,U+5c18,U+5c1d,U+5c97,U+5ca9,U+5cb8,U+5e9f,U+5ec9,U+5f04,U+5f7b,U+5fa1,U+5fcd,U+6012,U+60a6,U+60ac,U+60b2,U+60ef,U+626e,U+6270,U+6276,U+62d6,U+62dc,U+6316,U+632f,U+633a,U+6355,U+63aa,U+6447,U+649e,U+64c5,U+654c,U+65c1,U+65cb,U+65e6,U+6606,U+6731,U+675c,U+67cf,U+67dc,U+6846,U+6b8b,U+6beb,U+6c61,U+6c88,U+6cbf,U+6cdb,U+6cea,U+6d45,U+6d53,U+6d74,U+6d82,U+6da8,U+6db5,U+6deb,U+6eda,U+6ee8,U+6f0f,U+706d,U+708e,U+70ae,U+70bc,U+70c2,U+70e6,U+7237-7238,U+72fc,U+730e,U+731b,U+739b,U+73bb,U+7483,U+74dc,U+74f6,U+7586,U+7626,U+775b,U+77ff,U+788e,U+78b0,U+7956,U+7965,U+79e6,U+7af9,U+7bee,U+7c97,U+7eb1,U+7eb7,U+7ed1,U+7ed5,U+7f6a,U+7f72,U+7fbd,U+8017,U+808c,U+80a9,U+80c6,U+80ce,U+8150,U+8170,U+819c,U+820d,U+8230,U+8239,U+827e,U+8377,U+8389,U+83b2,U+8428,U+8463,U+867e,U+88c2,U+88d9,U+8986,U+8bca,U+8bde,U+8c13,U+8c8c,U+8d21,U+8d24,U+8d56,U+8d60,U+8d8b,U+8db4,U+8e2a,U+8f68,U+8f89,U+8f9b,U+8fa8,U+8fbd,U+9003,U+90ce,U+90ed,U+9189,U+94bb,U+9505,U+95f9,U+963b,U+9655,U+966a,U+9677,U+96fe,U+9896,U+99a8,U+9a71,U+9a82,U+9a91,U+9b45,U+9ece,U+9f20,U+feff,U+ff0d}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-111-wght-normal-ClFr5QXM.woff2) format("woff2-variations");unicode-range:U+4e4c,U+4e88,U+4ea1,U+4ea6,U+4ed3-4ed4,U+4eff,U+4f30,U+4fa7,U+4fc4,U+4fd7,U+500d,U+504f,U+5076-5077,U+517d,U+5192,U+51c9,U+51ef,U+5238,U+5251,U+526a,U+52c7,U+52df,U+52ff,U+53a6,U+53a8,U+53ec,U+5410,U+559d,U+55b7,U+5634,U+573e,U+5783,U+585e,U+586b,U+58a8,U+5999,U+59d3,U+5a1c,U+5a46,U+5b54-5b55,U+5b85,U+5b8b,U+5b8f,U+5bbf,U+5bd2,U+5c16,U+5c24,U+5e05,U+5e45,U+5e7c,U+5e84,U+5f03,U+5f1f,U+5f31,U+5f84,U+5f90,U+5fbd,U+5fc6,U+5fd9,U+5fe7,U+6052,U+6062,U+6089,U+60a3,U+60d1,U+6167,U+622a,U+6234,U+624e,U+6269,U+626c,U+62b5,U+62d2,U+6325,U+63e1,U+643a,U+6446,U+6562,U+656c,U+65e2,U+65fa,U+660c,U+6628,U+6652,U+6668,U+6676,U+66fc,U+66ff,U+6717,U+676d,U+67aa,U+67d4,U+6843,U+6881,U+68d2,U+695a,U+69fd,U+6a2a,U+6b8a,U+6c60,U+6c64,U+6c9f,U+6caa,U+6cc9,U+6ce1,U+6cfd,U+6d1b,U+6d1e,U+6d6e,U+6de1,U+6e10,U+6e7f,U+6f5c,U+704c,U+7070,U+7089,U+70b8,U+718a,U+71c3,U+723d,U+732a,U+73cd,U+7518,U+756a,U+75af,U+75be,U+75c7,U+76d2,U+76d7,U+7763,U+78e8,U+795d,U+79df,U+7c4d,U+7d2f,U+7ee9,U+7f13,U+7f8a,U+8000,U+8010,U+80af,U+80f6,U+80f8,U+8212,U+8273,U+82f9,U+83ab,U+83b1,U+83f2,U+8584,U+871c,U+8861,U+888b,U+88c1,U+88e4,U+8bd1,U+8bf1,U+8c31,U+8d5a,U+8d75-8d76,U+8de8,U+8f85,U+8fa3,U+8fc5,U+9006,U+903c,U+904d,U+9075,U+9178,U+9274,U+950b,U+9526,U+95ea,U+9636,U+9686,U+978b,U+987f,U+9a7e,U+9b42,U+9e1f,U+9ea6,U+9f13,U+9f84,U+ff5e}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-112-wght-normal-CiZxJMyY.woff2) format("woff2-variations");unicode-range:U+23,U+3d,U+4e01,U+4e39,U+4e73,U+4ecd,U+4ed9,U+4eea,U+4f0a,U+4f1f,U+4f5b,U+4fa0,U+4fc3,U+501f,U+50a8,U+515a,U+5175,U+51a0,U+51c0,U+51e1,U+51e4,U+5200,U+520a,U+5224,U+523a,U+52aa,U+52b1,U+52b3,U+5348,U+5353,U+5360,U+5371,U+5377,U+539a,U+541b,U+5434,U+547c,U+54e6,U+5510,U+5531,U+5609,U+56f0,U+56fa,U+5733,U+574f,U+5851,U+5854,U+5899,U+58c1,U+592e,U+5939,U+5976,U+5986,U+59bb,U+5a18,U+5a74,U+5b59,U+5b87,U+5b97,U+5ba0,U+5bab,U+5bbd-5bbe,U+5bf8,U+5c0a,U+5c3a,U+5c4a,U+5e16,U+5e1d,U+5e2d,U+5e8a,U+6015,U+602a,U+6050,U+6069,U+6162,U+61c2,U+6293,U+6297,U+62b1,U+62bd,U+62df,U+62fc,U+6302,U+635f,U+638c,U+63ed,U+6458,U+6469,U+6563,U+6620,U+6653,U+6696-6697,U+66dd,U+675f,U+676f-6770,U+67d0,U+67d3,U+684c,U+6865,U+6885,U+68b0,U+68ee,U+690d,U+6b23,U+6b32,U+6bd5,U+6c89,U+6d01,U+6d25,U+6d89,U+6da6,U+6db2,U+6df7,U+6ed1,U+6f02,U+70c8,U+70df,U+70e7,U+7126,U+7236,U+7259,U+731c,U+745e,U+74e3,U+751a,U+751c,U+7532,U+7545,U+75db,U+7761,U+7a0d,U+7b51,U+7ca4,U+7cd6,U+7d2b,U+7ea0,U+7eb9,U+7ed8,U+7f18,U+7f29,U+8033,U+804a,U+80a4-80a5,U+80e1,U+817f,U+829d,U+82e6,U+8336,U+840c,U+8499,U+864e,U+8651,U+865a,U+88ad,U+89e6,U+8bd7,U+8bfa,U+8c37,U+8d25,U+8d38,U+8ddd,U+8fea,U+9010,U+9012,U+906d,U+907f-9080,U+90d1,U+9177,U+91ca,U+94fa,U+9501,U+9634-9635,U+9694,U+9707,U+9738,U+9769,U+9a7b,U+9a97,U+9aa8,U+9b3c,U+9c81,U+9ed8}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-113-wght-normal-OgQXOX6x.woff2) format("woff2-variations");unicode-range:U+26,U+3c,U+d7,U+4e4e,U+4e61,U+4e71,U+4ebf,U+4f26,U+5012,U+51ac,U+51b0,U+51b2,U+51b7,U+5218,U+521a,U+5220,U+5237,U+523b,U+526f,U+5385,U+53bf,U+53e5,U+53eb,U+53f3,U+53f6,U+5409,U+5438,U+54c8,U+54e5,U+552f,U+5584,U+5706,U+5723,U+5750,U+575a,U+5987-5988,U+59b9,U+59d0,U+59d4,U+5b88,U+5b9c,U+5bdf,U+5bfb,U+5c01,U+5c04,U+5c3e,U+5c4b,U+5c4f,U+5c9b,U+5cf0,U+5ddd,U+5de6,U+5de8,U+5e01,U+5e78,U+5e7b,U+5e9c,U+5ead,U+5ef6,U+5f39,U+5fd8,U+6000,U+6025,U+604b,U+6076,U+613f,U+6258,U+6263,U+6267,U+6298,U+62a2,U+62e5,U+62ec,U+6311,U+6377,U+6388-6389,U+63a2,U+63d2,U+641e,U+642d,U+654f,U+6551,U+6597,U+65cf,U+65d7,U+65e7,U+6682,U+66f2,U+671d,U+672b,U+6740,U+6751,U+6768,U+6811,U+6863,U+6982,U+6bd2,U+6cf0,U+6d0b,U+6d17,U+6d59,U+6dd8,U+6dfb,U+6e7e,U+6f6e,U+6fb3,U+706f,U+719f,U+72af,U+72d0,U+72d7,U+732b,U+732e,U+7389,U+73e0,U+7530,U+7687,U+76d6,U+76db,U+7840,U+786c,U+79cb,U+79d2,U+7a0e,U+7a33,U+7a3f,U+7a97,U+7ade-7adf,U+7b26,U+7e41,U+7ec3,U+7f3a,U+8089,U+80dc,U+811a,U+8131,U+8138,U+821e,U+8349,U+83dc,U+8457,U+867d,U+86cb,U+8a89,U+8ba8,U+8bad,U+8bef,U+8bfe,U+8c6a,U+8d1d,U+8d4f,U+8d62,U+8dd1,U+8df3,U+8f6e,U+8ff9,U+900f,U+9014,U+9057,U+9192,U+91ce,U+9488,U+94a2,U+9547,U+955c,U+95f2,U+9644,U+964d,U+96c4-96c5,U+96e8,U+96f6-96f7,U+9732,U+9759,U+9760,U+987a,U+989c,U+9910,U+996d-996e,U+9b54,U+9e21,U+9ebb,U+9f50}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-114-wght-normal-CRH9SDZu.woff2) format("woff2-variations");unicode-range:U+7e,U+2026,U+4e03,U+4e25,U+4e30,U+4e34,U+4e45,U+4e5d,U+4e89,U+4eae,U+4ed8,U+4f11,U+4f19,U+4f24,U+4f34,U+4f59,U+4f73,U+4f9d,U+4fb5,U+5047,U+505c,U+5170,U+519c,U+51cf,U+5267,U+5356,U+5374,U+5382,U+538b,U+53e6,U+5426,U+542b,U+542f,U+5462,U+5473,U+554a,U+5566,U+5708,U+571f,U+5757,U+57df,U+57f9,U+5802,U+590f,U+591c,U+591f,U+592b,U+5965,U+5979,U+5a01,U+5a5a,U+5b63,U+5b69,U+5b81,U+5ba1,U+5ba3,U+5c3c,U+5c42,U+5c81,U+5de7,U+5dee,U+5e0c,U+5e10,U+5e55,U+5e86,U+5e8f,U+5ea7,U+5f02,U+5f52,U+5f81,U+5ff5,U+60ca,U+60e0,U+6279,U+62c5,U+62ff,U+63cf,U+6444,U+64cd,U+653b,U+65bd,U+65e9,U+665a,U+66b4,U+66fe,U+6728,U+6742,U+677e,U+67b6,U+680f,U+68a6,U+68c0,U+699c,U+6b4c,U+6b66,U+6b7b,U+6bcd,U+6bdb,U+6c38,U+6c47,U+6c49,U+6cb3,U+6cb9,U+6ce2,U+6d32,U+6d3e,U+6d4f,U+6e56,U+6fc0,U+7075,U+7206,U+725b,U+72c2,U+73ed,U+7565,U+7591,U+7597,U+75c5,U+76ae,U+76d1,U+76df,U+7834,U+7968,U+7981,U+79c0,U+7a7f,U+7a81,U+7ae5,U+7b14,U+7c89,U+7d27,U+7eaf,U+7eb3,U+7eb8,U+7ec7,U+7ee7,U+7eff,U+7f57,U+7ffb,U+805a,U+80a1,U+822c,U+82cf,U+82e5,U+8363,U+836f,U+84dd,U+878d,U+8840,U+8857,U+8863,U+8865,U+8b66,U+8bb2,U+8bda,U+8c01,U+8c08,U+8c46,U+8d1f,U+8d35,U+8d5b,U+8d5e,U+8da3,U+8ddf,U+8f93,U+8fdd,U+8ff0,U+8ff7,U+8ffd,U+9000,U+9047,U+9152,U+949f,U+94c1,U+94f6,U+9646,U+9648,U+9669,U+969c,U+96ea,U+97e9,U+987b,U+987e,U+989d,U+9970,U+9986,U+9c7c,U+9c9c}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-115-wght-normal-BN__2iBG.woff2) format("woff2-variations");unicode-range:U+25,U+4e14,U+4e1d,U+4e3d,U+4e49,U+4e60,U+4e9a,U+4eb2,U+4ec5,U+4efd,U+4f3c,U+4f4f,U+4f8b,U+4fbf,U+5019,U+5145,U+514b,U+516b,U+516d,U+5174,U+5178,U+517b,U+5199,U+519b,U+51b3,U+51b5,U+5207,U+5212,U+5219,U+521d,U+52bf,U+533b,U+5343,U+5347,U+534a,U+536b,U+5370,U+53e4,U+53f2,U+5403,U+542c,U+547d,U+54a8,U+54cd,U+54ea,U+552e,U+56f4,U+5747,U+575b,U+5883,U+589e,U+5931,U+5947,U+5956-5957,U+5a92,U+5b83,U+5ba4,U+5bb3,U+5bcc,U+5c14,U+5c1a,U+5c3d,U+5c40,U+5c45,U+5c5e,U+5df4,U+5e72,U+5e95,U+5f80,U+5f85,U+5fb7,U+5fd7,U+601d,U+626b,U+627f,U+62c9,U+62cd,U+6309,U+63a7,U+6545,U+65ad,U+65af,U+65c5,U+666e,U+667a,U+670b,U+671b,U+674e,U+677f,U+6781,U+6790,U+6797,U+6821,U+6838-6839,U+697c,U+6b27,U+6b62,U+6bb5,U+6c7d,U+6c99,U+6d4b,U+6d4e,U+6d6a,U+6e29,U+6e2f,U+6ee1,U+6f14,U+6f2b,U+72b6,U+72ec,U+7387,U+7533,U+753b,U+76ca,U+76d8,U+7701,U+773c,U+77ed,U+77f3,U+7814,U+793c,U+79bb,U+79c1,U+79d8,U+79ef,U+79fb,U+7a76,U+7b11,U+7b54,U+7b56,U+7b97,U+7bc7,U+7c73,U+7d20,U+7eaa,U+7ec8,U+7edd,U+7eed,U+7efc,U+7fa4,U+804c,U+8058,U+80cc,U+8111,U+817e,U+826f,U+8303,U+843d,U+89c9,U+89d2,U+8ba2,U+8bbf,U+8bc9,U+8bcd,U+8be6,U+8c22,U+8c61,U+8d22,U+8d26-8d27,U+8d8a,U+8f6f,U+8f7b,U+8f83,U+8f91,U+8fb9,U+8fd4,U+8fdc,U+9002,U+94b1,U+9519,U+95ed,U+961f,U+9632-9633,U+963f,U+968f-9690,U+96be,U+9876,U+9884,U+98de,U+9988,U+9999,U+9ec4,U+ff1b}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-116-wght-normal-vdFVzbO2.woff2) format("woff2-variations");unicode-range:U+2b,U+40,U+3000,U+300a-300b,U+4e16,U+4e66,U+4e70,U+4e91-4e92,U+4e94,U+4e9b,U+4ec0,U+4eca,U+4f01,U+4f17-4f18,U+4f46,U+4f4e,U+4f9b,U+4fee,U+503c,U+5065,U+50cf,U+513f,U+5148,U+518d,U+51c6,U+51e0,U+5217,U+529e-529f,U+5341,U+534f,U+5361,U+5386,U+53c2,U+53c8,U+53cc,U+53d7-53d8,U+53ea,U+5404,U+5411,U+5417,U+5427,U+5468,U+559c,U+5668,U+56e0,U+56e2,U+56ed,U+5740,U+57fa,U+58eb,U+5904,U+592a,U+59cb,U+5a31,U+5b58,U+5b9d,U+5bc6,U+5c71,U+5dde,U+5df1,U+5e08,U+5e26,U+5e2e,U+5e93,U+5e97,U+5eb7,U+5f15,U+5f20,U+5f3a,U+5f62,U+5f69,U+5f88,U+5f8b,U+5fc5,U+600e,U+620f,U+6218,U+623f,U+627e,U+628a,U+62a4,U+62db,U+62e9,U+6307,U+6362,U+636e,U+64ad,U+6539,U+653f,U+6548,U+6574,U+6613,U+6625,U+663e,U+666f,U+672a,U+6750,U+6784,U+6a21,U+6b3e,U+6b65,U+6bcf,U+6c11,U+6c5f,U+6df1,U+706b,U+7167,U+724c,U+738b,U+73a9,U+73af,U+7403,U+7537,U+754c,U+7559,U+767d,U+7740,U+786e,U+795e,U+798f,U+79f0,U+7aef,U+7b7e,U+7bb1,U+7ea2,U+7ea6,U+7ec4,U+7ec6,U+7ecd,U+7edc,U+7ef4,U+8003,U+80b2,U+81f3-81f4,U+822a,U+827a,U+82f1,U+83b7,U+8425,U+89c2,U+89c8,U+8ba9,U+8bb8,U+8bc6,U+8bd5,U+8be2,U+8be5,U+8bed,U+8c03,U+8d23,U+8d2d,U+8d34,U+8d70,U+8db3,U+8fbe,U+8fce,U+8fd1,U+8fde,U+9001,U+901f-9020,U+90a3,U+914d,U+91c7,U+94fe,U+9500,U+952e,U+9605,U+9645,U+9662,U+9664,U+9700,U+9752,U+975e,U+97f3,U+9879,U+9886,U+98df,U+9a6c,U+9a8c,U+9ed1,U+9f99}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-117-wght-normal-Dsz3vkzU.woff2) format("woff2-variations");unicode-range:U+4e,U+201c-201d,U+3010-3011,U+4e07,U+4e1c,U+4e24,U+4e3e,U+4e48,U+4e50,U+4e5f,U+4e8b-4e8c,U+4ea4,U+4eab-4eac,U+4ecb,U+4ece,U+4ed6,U+4ee3,U+4ef6-4ef7,U+4efb,U+4f20,U+4f55,U+4f7f,U+4fdd,U+505a,U+5143,U+5149,U+514d,U+5171,U+5177,U+518c,U+51fb,U+521b,U+5229,U+522b,U+52a9,U+5305,U+5317,U+534e,U+5355,U+5357,U+535a,U+5373,U+539f,U+53bb,U+53ca,U+53cd,U+53d6,U+53e3,U+53f0,U+5458,U+5546,U+56db,U+573a,U+578b,U+57ce,U+58f0,U+590d,U+5934,U+5973,U+5b57,U+5b8c,U+5b98,U+5bb9,U+5bfc,U+5c06,U+5c11,U+5c31,U+5c55,U+5df2,U+5e03,U+5e38,U+5e76,U+5e94,U+5efa,U+5f71,U+5f97,U+5feb,U+6001,U+603b,U+60f3,U+611f,U+6216,U+624d,U+6253,U+6295,U+6301,U+6392,U+641c,U+652f,U+653e,U+6559,U+6599,U+661f,U+671f,U+672f,U+6761,U+67e5,U+6807,U+6837,U+683c,U+6848,U+6b22,U+6b64,U+6bd4,U+6c14,U+6c34,U+6c42,U+6ca1,U+6d41,U+6d77,U+6d88,U+6e05,U+6e38,U+6e90,U+7136,U+7231,U+7531,U+767e,U+76ee,U+76f4,U+771f,U+7801,U+793a,U+79cd,U+7a0b,U+7a7a,U+7acb,U+7ae0,U+7b2c,U+7b80,U+7ba1,U+7cbe,U+7d22,U+7ea7,U+7ed3,U+7ed9,U+7edf,U+7f16,U+7f6e,U+8001,U+800c,U+8272,U+8282,U+82b1,U+8350,U+88ab,U+88c5,U+897f,U+89c1,U+89c4,U+89e3,U+8a00,U+8ba1,U+8ba4,U+8bae-8bb0,U+8bbe,U+8bc1,U+8bc4,U+8bfb,U+8d28,U+8d39,U+8d77,U+8d85,U+8def,U+8eab,U+8f66,U+8f6c,U+8f7d,U+8fd0,U+9009,U+90ae,U+90fd,U+91cc-91cd,U+91cf,U+95fb,U+9650,U+96c6,U+9891,U+98ce,U+ff1f}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-118-wght-normal-BPEb0gM9.woff2) format("woff2-variations");unicode-range:U+d,U+3e,U+5f,U+7c,U+a0,U+a9,U+4e09-4e0b,U+4e0d-4e0e,U+4e13,U+4e1a,U+4e2a,U+4e3a-4e3b,U+4e4b,U+4e86,U+4e8e,U+4ea7,U+4eba,U+4ee4-4ee5,U+4eec,U+4f1a,U+4f4d,U+4f53,U+4f5c,U+4f60,U+4fe1,U+5165,U+5168,U+516c,U+5173,U+5176,U+5185,U+51fa,U+5206,U+5230,U+5236,U+524d,U+529b,U+52a0-52a1,U+52a8,U+5316,U+533a,U+53cb,U+53d1,U+53ef,U+53f7-53f8,U+5408,U+540c-540e,U+544a,U+548c,U+54c1,U+56de,U+56fd-56fe,U+5728,U+5730,U+5907,U+5916,U+591a,U+5927,U+5929,U+597d,U+5982,U+5b50,U+5b66,U+5b89,U+5b9a,U+5b9e,U+5ba2,U+5bb6,U+5bf9,U+5c0f,U+5de5,U+5e02,U+5e73-5e74,U+5e7f,U+5ea6,U+5f00,U+5f0f,U+5f53,U+5f55,U+5fae,U+5fc3,U+6027,U+606f,U+60a8,U+60c5,U+610f,U+6210-6211,U+6237,U+6240,U+624b,U+6280,U+62a5,U+63a5,U+63a8,U+63d0,U+6536,U+6570,U+6587,U+65b9,U+65e0,U+65f6,U+660e,U+662d,U+662f,U+66f4,U+6700,U+670d,U+672c,U+673a,U+6743,U+6765,U+679c,U+682a,U+6b21,U+6b63,U+6cbb,U+6cd5,U+6ce8,U+6d3b,U+70ed,U+7247-7248,U+7269,U+7279,U+73b0,U+7406,U+751f,U+7528,U+7535,U+767b,U+76f8,U+770b,U+77e5,U+793e,U+79d1,U+7ad9,U+7b49,U+7c7b,U+7cfb,U+7ebf,U+7ecf,U+7f8e,U+8005,U+8054,U+80fd,U+81ea,U+85cf,U+884c,U+8868,U+8981,U+89c6,U+8bba,U+8bdd,U+8bf4,U+8bf7,U+8d44,U+8fc7,U+8fd8-8fd9,U+8fdb,U+901a,U+9053,U+90e8,U+91d1,U+957f,U+95e8,U+95ee,U+95f4,U+9762,U+9875,U+9898,U+9996,U+9ad8,U+ff01,U+ff08-ff09}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-119-wght-normal-BfzSEbFz.woff2) format("woff2-variations");unicode-range:U+20-22,U+27-2a,U+2c-3b,U+3f,U+41-4d,U+4f-5d,U+61-7b,U+7d,U+ab,U+ae,U+b2,U+b7,U+bb,U+df-e5,U+e7-ea,U+ec-ed,U+f1-f4,U+f6,U+f9-fa,U+fc,U+101,U+103,U+113,U+12b,U+148,U+14d,U+16b,U+1ce,U+1d0,U+300-301,U+1ebf,U+1ec7,U+2013-2014,U+2022,U+2027,U+2039-203a,U+2122,U+3001-3002,U+3042,U+3044,U+3046,U+3048,U+304a-3055,U+3057,U+3059-305b,U+305d,U+305f-3061,U+3063-306b,U+306d-3073,U+3075-3076,U+3078-3079,U+307b,U+307e-307f,U+3081-308d,U+308f,U+3092-3093,U+30a1-30a4,U+30a6-30bb,U+30bd,U+30bf-30c1,U+30c3-30c4,U+30c6-30cb,U+30cd-30d7,U+30d9-30e1,U+30e3-30e7,U+30e9-30ed,U+30ef,U+30f3,U+30fb-30fc,U+3127,U+4e00,U+4e2d,U+65b0,U+65e5,U+6708-6709,U+70b9,U+7684,U+7f51,U+ff0c,U+ff0e,U+ff1a}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-cyrillic-wght-normal-CRA5_Pf1.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-vietnamese-wght-normal-y5SU35Rl.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-latin-ext-wght-normal-CqPqLCfe.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-sc-latin-wght-normal-DYAKOyvl.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-0-wght-normal-AlCjBspo.woff2) format("woff2-variations");unicode-range:U+1f921-1f930,U+1f932-1f935,U+1f937-1f939,U+1f940-1f944,U+1f947-1f94a,U+1f950-1f95f,U+1f962-1f967,U+1f969-1f96a,U+1f980-1f981,U+1f984-1f98d,U+1f990-1f992,U+1f994-1f996,U+1f9c0,U+1f9d0,U+1f9d2,U+1f9d4,U+1f9d6,U+1f9d8,U+1f9da,U+1f9dc-1f9dd,U+1f9df-1f9e2,U+1f9e5-1f9e6,U+20024,U+20487,U+20779,U+20c41,U+20c78,U+20d71,U+20e98,U+20ef9,U+2107b,U+210c1,U+22c51,U+233b4,U+24a12,U+2512b,U+2546e,U+25683,U+267cc,U+269f2,U+27657,U+282e2,U+2898d,U+29d5a,U+f0001-f0005,U+f0019,U+f009b,U+f0101-f0104,U+f012b,U+f01ba,U+f01d6,U+f0209,U+f0217,U+f0223-f0224,U+fc355,U+fe327,U+fe517,U+feb97,U+fffb4}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-6-wght-normal-WPkr41zz.woff2) format("woff2-variations");unicode-range:U+ff78-ff7e,U+ff80-ff86,U+ff89-ff94,U+ff97-ff9e,U+ffb9,U+ffe0-ffe3,U+ffe9,U+ffeb,U+ffed,U+fffc,U+1d7c7,U+1f004,U+1f0cf,U+1f141-1f142,U+1f150,U+1f154,U+1f158,U+1f15b,U+1f15d-1f15e,U+1f162-1f163,U+1f170-1f171,U+1f174,U+1f177-1f178,U+1f17d-1f17f,U+1f192-1f195,U+1f197-1f19a,U+1f1e6-1f1f5,U+1f1f7-1f1ff,U+1f21a,U+1f22f,U+1f232-1f237,U+1f239-1f23a,U+1f250-1f251,U+1f300,U+1f302-1f319}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-7-wght-normal-foGylaCC.woff2) format("woff2-variations");unicode-range:U+fa0a,U+fa0c,U+fa11,U+fa17,U+fa19,U+fa1b,U+fa1d,U+fa26,U+fa2c,U+fb01,U+fdfc,U+fe0e,U+fe33-fe36,U+fe38-fe44,U+fe49-fe51,U+fe54,U+fe56-fe57,U+fe59-fe5c,U+fe5f-fe6a,U+fe8e,U+fe92-fe93,U+feae,U+fecb-fecc,U+fee0,U+feec,U+fef3,U+ff04,U+ff07,U+ff26-ff2c,U+ff31-ff32,U+ff35-ff37,U+ff39-ff3a,U+ff3c,U+ff3e-ff5b,U+ff5d,U+ff61-ff65,U+ff67-ff68,U+ff6a,U+ff6c-ff77}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-8-wght-normal-BHOicRI8.woff2) format("woff2-variations");unicode-range:U+f78a-f78c,U+f78e,U+f792-f796,U+f798,U+f79c,U+f7f5,U+f812,U+f815,U+f876,U+f8f5,U+f8f8,U+f8ff,U+f901-f902,U+f904,U+f906,U+f909-f90a,U+f90f,U+f914,U+f918-f919,U+f91b,U+f91d,U+f91f,U+f923,U+f925,U+f92d-f92f,U+f934,U+f937-f938,U+f93d,U+f93f,U+f941,U+f949,U+f94c,U+f94e-f94f,U+f95a,U+f95d-f95e,U+f961-f963,U+f965-f970,U+f974,U+f976-f97a,U+f97c,U+f97e-f97f,U+f981,U+f983,U+f988,U+f98a,U+f98c,U+f98e,U+f996-f997,U+f999-f99a,U+f99c,U+f99f-f9a0,U+f9a3,U+f9a8,U+f9ad,U+f9b2-f9b6,U+f9b9-f9ba,U+f9bd-f9be,U+f9c1,U+f9c4,U+f9c7,U+f9ca,U+f9cd,U+f9d0-f9d1,U+f9d3-f9d4,U+f9d7-f9d8,U+f9dc-f9dd,U+f9df-f9e1,U+f9e4,U+f9e8-f9ea,U+f9f4,U+f9f6-f9f7,U+f9f9-f9fa,U+f9fc-fa01,U+fa03-fa04,U+fa06,U+fa08-fa09}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-19-wght-normal-C8pGE9DU.woff2) format("woff2-variations");unicode-range:U+9ee5,U+9ee7,U+9eee,U+9ef3-9ef4,U+9ef6-9ef7,U+9ef9,U+9efb-9efd,U+9eff,U+9f07-9f09,U+9f10,U+9f14-9f15,U+9f19,U+9f22,U+9f29,U+9f2c,U+9f2f,U+9f31,U+9f34,U+9f37,U+9f39,U+9f3d-9f3e,U+9f41,U+9f4c-9f50,U+9f54,U+9f57,U+9f59,U+9f5c,U+9f5f-9f60,U+9f62-9f63,U+9f66-9f67,U+9f6a,U+9f6c,U+9f72,U+9f76-9f77,U+9f7f,U+9f84-9f85,U+9f88,U+9f8e,U+9f91,U+9f94-9f96,U+9f98,U+9f9a-9f9b,U+9f9f-9fa0,U+9fa2,U+9fa4,U+9ff0-9fff,U+a1f4,U+a4b0-a4b1,U+a4b3,U+a9c1-a9c2,U+aa31,U+ab34,U+ac00-ac01,U+ac04,U+ac08,U+ac10-ac11,U+ac13-ac16,U+ac19,U+ac1c-ac1d,U+ac24,U+ac70-ac71,U+ac74,U+ac77-ac78,U+ac80-ac81,U+ac83,U+ac8c,U+ac90,U+aca0,U+aca8-aca9,U+acac,U+acb0,U+acb8-acb9,U+acbc-acbd,U+acc1,U+acc4,U+ace0-ace1,U+ace4,U+ace8,U+acf0-acf1,U+acf3,U+acf5,U+acfc}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-20-wght-normal-C3zSSq0m.woff2) format("woff2-variations");unicode-range:U+9d77,U+9d7a,U+9d7e,U+9d87,U+9d89,U+9d8f,U+9d91-9d93,U+9d96,U+9d98,U+9d9a,U+9da1-9da2,U+9da5,U+9da9,U+9dab-9dac,U+9db1-9db2,U+9db5,U+9db9-9dbc,U+9dbf-9dc2,U+9dc4,U+9dc7-9dc9,U+9dd3,U+9dd6,U+9dd9-9dda,U+9dde-9ddf,U+9de2,U+9de5-9de6,U+9de8,U+9def-9df0,U+9df2-9df4,U+9df8,U+9dfa,U+9dfd,U+9dff,U+9e02,U+9e07,U+9e0a,U+9e11,U+9e15,U+9e18,U+9e1a-9e1b,U+9e1d-9e1e,U+9e20-9e23,U+9e25-9e26,U+9e2d,U+9e2f,U+9e33,U+9e35,U+9e3d-9e3f,U+9e42-9e43,U+9e45,U+9e48-9e4a,U+9e4c,U+9e4f,U+9e51,U+9e55,U+9e64,U+9e66,U+9e6b,U+9e6d-9e6e,U+9e70,U+9e73,U+9e75,U+9e78,U+9e80-9e83,U+9e87-9e88,U+9e8b-9e8c,U+9e90-9e91,U+9e93,U+9e96,U+9e9d,U+9ea1,U+9ea4,U+9ea6,U+9ea9-9eab,U+9ead,U+9eaf,U+9eb4,U+9eb7-9eba,U+9ebe-9ebf,U+9ecc-9ecd,U+9ed0,U+9ed2,U+9ed4,U+9ed9-9eda,U+9edc-9edd,U+9edf-9ee0,U+9ee2}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-21-wght-normal-J1OUZdIj.woff2) format("woff2-variations");unicode-range:U+9bf0-9bf1,U+9bf5,U+9bf7,U+9bf9,U+9bfd,U+9bff,U+9c02,U+9c06,U+9c08-9c0a,U+9c0d,U+9c10,U+9c12-9c13,U+9c15,U+9c1c,U+9c1f,U+9c21,U+9c23-9c25,U+9c28-9c29,U+9c2d-9c2e,U+9c31-9c33,U+9c35-9c37,U+9c39-9c3b,U+9c3d-9c3e,U+9c40,U+9c42,U+9c45-9c49,U+9c52,U+9c54,U+9c56,U+9c58-9c5a,U+9c5d,U+9c5f-9c60,U+9c63,U+9c67-9c68,U+9c72,U+9c75,U+9c78,U+9c7a-9c7c,U+9c7f-9c81,U+9c87-9c88,U+9c8d,U+9c91,U+9c94,U+9c97,U+9c9b,U+9ca4,U+9ca8,U+9cab,U+9cad,U+9cb1-9cb3,U+9cb6-9cb8,U+9cc4-9cc5,U+9ccc-9ccd,U+9cd5-9cd7,U+9cdd-9cdf,U+9ce7,U+9ce9,U+9cee-9cf0,U+9cf2,U+9cfc-9cfe,U+9d03,U+9d06-9d08,U+9d0e,U+9d10,U+9d12,U+9d15,U+9d17,U+9d1d-9d1f,U+9d23,U+9d2b,U+9d2f-9d30,U+9d34,U+9d37,U+9d3d,U+9d42,U+9d50,U+9d52-9d53,U+9d59,U+9d5c,U+9d5e-9d61,U+9d6a,U+9d6f-9d70}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-22-wght-normal-BxkVDKYB.woff2) format("woff2-variations");unicode-range:U+9a87,U+9a8a-9a8b,U+9a8f-9a91,U+9a97,U+9a9a,U+9a9e,U+9aa0-9aa1,U+9aa4-9aa5,U+9aaf-9ab1,U+9ab6-9ab7,U+9ab9-9aba,U+9abe,U+9ac0-9ac5,U+9ac8,U+9acb-9acc,U+9ace-9acf,U+9ad1,U+9ad5-9ad7,U+9ad9,U+9adf,U+9ae1,U+9ae3,U+9aea-9aeb,U+9aed,U+9aef,U+9af2,U+9af4,U+9af9,U+9afb,U+9afd,U+9b03-9b04,U+9b08,U+9b13,U+9b18,U+9b1f,U+9b22-9b23,U+9b28-9b2a,U+9b2c-9b30,U+9b32,U+9b3b,U+9b43,U+9b46-9b49,U+9b4b-9b4e,U+9b51,U+9b55,U+9b58,U+9b5b,U+9b5e-9b60,U+9b63,U+9b68-9b69,U+9b74,U+9b7d,U+9b80-9b81,U+9b83-9b84,U+9b87-9b88,U+9b8a-9b8b,U+9b8d-9b8e,U+9b90,U+9b92-9b95,U+9b97,U+9b9f-9ba0,U+9ba2-9ba3,U+9ba8,U+9bab,U+9bb0,U+9bb8,U+9bc0-9bc1,U+9bc3,U+9bc6-9bc8,U+9bd3-9bd7,U+9bd9,U+9bdb,U+9bdd,U+9be1-9be2,U+9be4-9be5,U+9be7,U+9bea,U+9bed-9bee}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-23-wght-normal-CpwJlAzD.woff2) format("woff2-variations");unicode-range:U+993c-9940,U+9943-9944,U+9948-994a,U+994c-994e,U+9951,U+9954,U+995c,U+995e-995f,U+9961-9962,U+9965,U+9968,U+996a,U+996d-9972,U+9975-9976,U+997a,U+997c,U+997f-9980,U+9984-9985,U+9988,U+998b,U+998d,U+998f,U+9992,U+9994-9995,U+9997-9998,U+999c,U+999e,U+99a0-99a1,U+99ab,U+99af,U+99b1,U+99b4,U+99b9,U+99c4-99c6,U+99cf,U+99d1-99d2,U+99d4,U+99d6,U+99d8-99d9,U+99df,U+99e1-99e2,U+99e9,U+99ee,U+99f0,U+99f8,U+99fb,U+9a01-9a05,U+9a0c,U+9a0f-9a13,U+9a16,U+9a1b-9a1c,U+9a20,U+9a24,U+9a28,U+9a2b,U+9a2d-9a2e,U+9a34-9a36,U+9a38,U+9a3e,U+9a40-9a44,U+9a4a,U+9a4c-9a4e,U+9a52,U+9a56,U+9a62-9a65,U+9a69-9a6b,U+9a6d,U+9a6f-9a71,U+9a73-9a74,U+9a76,U+9a78-9a79,U+9a7b-9a7c,U+9a7e-9a7f,U+9a81-9a82,U+9a84-9a86}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-24-wght-normal-q2nxC991.woff2) format("woff2-variations");unicode-range:U+97f5,U+97f9-97fa,U+97fe,U+9804,U+9807,U+980a,U+980e-980f,U+9814,U+9816,U+981a,U+981c,U+981e,U+9820-9821,U+9823,U+9826,U+9828,U+982a-982c,U+9832,U+9834-9835,U+9837,U+9839,U+983c-983d,U+9845,U+9848-9849,U+984e,U+9852-9857,U+9859-985a,U+9862-9863,U+9865,U+9870-9871,U+9873-9874,U+9877,U+987a-987f,U+9881-9882,U+9885,U+9887-988a,U+988c-988d,U+9890,U+9893,U+9896-9897,U+989a,U+989c-989e,U+98a0,U+98a4,U+98a6-98a7,U+98a9,U+98ae-98af,U+98b2-98b3,U+98b6-98b8,U+98ba-98bd,U+98bf,U+98c7-98c8,U+98ca,U+98d2-98d3,U+98d8-98da,U+98dc,U+98de,U+98e0-98e1,U+98e3,U+98e5,U+98e7-98e9,U+98eb-98ee,U+98f1,U+98f4,U+9901,U+9908-9909,U+990c,U+9911-9912,U+9914,U+9916-9917,U+991b-991c,U+991e,U+9920,U+9927,U+992b-992c,U+992e,U+9931-9933,U+9938,U+993a}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-25-wght-normal-t7uRby9D.woff2) format("woff2-variations");unicode-range:U+9672,U+9674,U+967a,U+9682-9685,U+9688-9689,U+968b,U+968d,U+9695,U+9697-9698,U+969e,U+96a0-96a4,U+96a9,U+96ac,U+96ae,U+96b0,U+96b2-96b4,U+96b6-96b7,U+96b9,U+96bc-96be,U+96c3,U+96c9-96cb,U+96ce-96cf,U+96d1-96d2,U+96d8,U+96dd,U+96e9,U+96eb,U+96f0-96f1,U+96f3-96f4,U+96f9,U+96fe-96ff,U+9701-9702,U+9705,U+9708,U+970a,U+970e-9711,U+9719,U+971d,U+971f-9720,U+9728,U+972a,U+972d,U+9730,U+9733,U+973a,U+973d,U+9744,U+9746-9747,U+9749,U+9750-9751,U+9753,U+9758-9759,U+975b,U+975d,U+9763,U+9765-9766,U+9768,U+976c-976d,U+9771,U+9773,U+9776,U+977a,U+977c,U+9780,U+9784-9786,U+9788,U+978e-978f,U+9798,U+979d-979e,U+97a3,U+97a5-97a6,U+97a8,U+97ab-97ac,U+97ae,U+97b6-97b7,U+97b9,U+97bf,U+97c1,U+97c3,U+97c6,U+97c9,U+97cd,U+97d6,U+97d8-97d9,U+97dc-97de,U+97e1,U+97e6-97e7,U+97ec-97ee,U+97f0-97f1}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-26-wght-normal-CLhaJ79b.woff2) format("woff2-variations");unicode-range:U+9530,U+9535,U+953a-953b,U+9540-9542,U+9547,U+9549-954a,U+954d,U+9550-9551,U+9554-9556,U+955c,U+956c-956d,U+956f-9570,U+9573,U+9576,U+9578,U+9582,U+9586,U+9588,U+958e-958f,U+9599,U+959c,U+959e-959f,U+95a1-95a2,U+95a4,U+95a6-95a7,U+95aa-95ae,U+95b0,U+95b2,U+95b6,U+95b9-95bf,U+95c2-95c4,U+95c7-95c9,U+95cb-95cd,U+95d0,U+95d3-95d5,U+95d7-95d8,U+95da,U+95de,U+95e0-95e1,U+95e4-95e5,U+95ea-95eb,U+95ef-95f0,U+95f2-95f3,U+95f5,U+95f7-95fa,U+95fd,U+9600-9602,U+9607-9609,U+960e,U+9610-9611,U+9614,U+9616,U+9619-961a,U+961c-961d,U+961f,U+9621,U+9624,U+9628,U+962f,U+9633-9636,U+963c,U+9641-9643,U+9645,U+9647-9648,U+964e-964f,U+9651,U+9653-9655,U+9658,U+965b-965f,U+9661,U+9665,U+9668-9669,U+966c}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-27-wght-normal-Bsb6CrxP.woff2) format("woff2-variations");unicode-range:U+941a,U+941c,U+941e,U+9420-9425,U+9427-942b,U+942e,U+9432-9433,U+9436,U+9438,U+943a,U+943d,U+943f-9440,U+9445,U+944a,U+944c,U+9454-9455,U+945a-945b,U+945e,U+9460,U+9462-9463,U+9468,U+946a,U+946d,U+946f,U+9471,U+9474-9477,U+9479,U+947e-9481,U+9488-948a,U+948e,U+9492-9493,U+9497,U+9499,U+949b-94a3,U+94a5-94a9,U+94ac,U+94ae-94b1,U+94b3-94b5,U+94bb-94bc,U+94be-94c3,U+94c5-94c6,U+94c9,U+94ce-94d0,U+94db-94dd,U+94e0,U+94e2-94e3,U+94e8,U+94ec-94ee,U+94f0,U+94f2,U+94f5-94f6,U+94f8,U+94fa,U+94ff-9502,U+9504-9506,U+9508,U+950b-950c,U+950f-9510,U+9519-951b,U+951d,U+951f,U+9521-9526,U+952d-952f}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-28-wght-normal-DzIWEAg_.woff2) format("woff2-variations");unicode-range:U+930b,U+930f,U+9312,U+9315,U+9319-931b,U+931d-931f,U+9321,U+9323-9325,U+9327-932a,U+932c-932e,U+9331-9333,U+9335,U+9338,U+933c,U+9340-9341,U+9345-9349,U+934f-9352,U+9354,U+9356-935a,U+935c-9360,U+9363-9367,U+9369-936a,U+936c,U+936e,U+9370-9371,U+9373,U+9376,U+9379-937a,U+937c,U+9385,U+9387,U+938c,U+938f,U+9394,U+9397-9398,U+939a-939b,U+939d-939e,U+93a1-93a3,U+93a6-93a7,U+93a9-93aa,U+93ac-93ad,U+93af-93b0,U+93b3-93bb,U+93bd-93be,U+93c0-93c4,U+93c7,U+93ca-93cd,U+93d0-93d1,U+93d6-93d8,U+93dc-93de,U+93e0,U+93e4,U+93e8,U+93ee,U+93f0,U+93f5,U+93f7-93f9,U+93fb,U+9403,U+9407,U+940f-9410,U+9413-9414,U+9417,U+9419}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-29-wght-normal-CVD47Xgy.woff2) format("woff2-variations");unicode-range:U+9208-920a,U+920d-920e,U+9210-9211,U+9217,U+9219,U+921c,U+9221,U+9224-9225,U+9227,U+922a,U+922d-922e,U+9230-9231,U+9233,U+9235-9239,U+923b,U+923d-9241,U+9244,U+9246,U+9248-9249,U+924b-9251,U+9253,U+925a,U+925d-925e,U+9262,U+9265-9267,U+926b-926d,U+926f,U+9271-9272,U+9274,U+9276,U+9278,U+927a-927c,U+927e-927f,U+9282-9283,U+9286,U+9288,U+928a,U+928d-928e,U+9291,U+9295-9296,U+9299-929b,U+929d,U+92a0-92ae,U+92b2,U+92b5-92b6,U+92bb-92bc,U+92c2-92c3,U+92c6-92cd,U+92cf-92d1,U+92d5,U+92d7,U+92d9,U+92dd,U+92df,U+92e4-92e6,U+92e8-92e9,U+92ed-92ef,U+92f1-92f3,U+92f6,U+92f9,U+92fb,U+9300-9302,U+9306}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-30-wght-normal-qEGnB_nK.woff2) format("woff2-variations");unicode-range:U+90e2-90e4,U+90ea-90eb,U+90ef,U+90f4,U+90f7-90f8,U+90fc,U+90fe-9100,U+9102,U+9104,U+9106,U+9112,U+9114-911a,U+911c,U+911e,U+9120,U+9122-9123,U+9129,U+912b,U+912f,U+9131-9132,U+9134,U+9136,U+9139-913a,U+9143,U+9146,U+9148-914a,U+914e-9150,U+9154,U+9156-9157,U+9159-915a,U+915d-915e,U+9161-9164,U+916b,U+916e,U+9170-9172,U+9174,U+9176,U+9179-917a,U+917f,U+9181-9182,U+9184-9186,U+918c-918e,U+9190-9191,U+9196,U+919a-919b,U+919e,U+91a1-91a4,U+91a7,U+91aa,U+91ae-91b2,U+91b4-91b5,U+91b8,U+91bd-91be,U+91c1,U+91c3,U+91c5-91c6,U+91c8-91ca,U+91d2-91d5,U+91d7,U+91d9,U+91e1,U+91e4,U+91e6-91e9,U+91ec-91ed,U+91f0-91f1,U+91f5-91fa,U+91fd,U+91ff-9201,U+9203-9207}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-31-wght-normal-CUZYeSc0.woff2) format("woff2-variations");unicode-range:U+8f85-8f86,U+8f88-8f8a,U+8f8d,U+8f90,U+8f93,U+8f95-8f97,U+8f99,U+8f9e-8f9f,U+8fa2,U+8fa7,U+8fa9,U+8fab,U+8fae,U+8fb3,U+8fb5-8fb6,U+8fba-8fbd,U+8fbf,U+8fc1-8fc2,U+8fc6,U+8fc8,U+8fcc-8fcd,U+8fd2-8fd3,U+8fd5,U+8fdc-8fdd,U+8fdf,U+8fe2-8fe5,U+8fe8-8fe9,U+8fed-8fee,U+8ff3,U+8ff5,U+8ff8,U+8ffa-8ffc,U+8ffe,U+9002,U+9004,U+9008,U+900a-900b,U+9011-9013,U+9016,U+901e,U+9021,U+9024,U+902d,U+902f-9030,U+9034-9036,U+9039-903b,U+9041,U+9044-9045,U+904f-9052,U+9057-9058,U+905b,U+905d,U+9061-9062,U+9065,U+9068,U+906f,U+9074,U+9079,U+907d,U+9083,U+9085,U+9087-9089,U+908b,U+9090,U+9093,U+9095,U+9097,U+9099,U+909b,U+909d-909e,U+90a0-90a2,U+90ac,U+90af-90b0,U+90b2-90b4,U+90b6,U+90b9,U+90bb,U+90bd-90be,U+90c3-90c5,U+90c7,U+90d1,U+90d4-90d5,U+90d7,U+90db-90df}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-32-wght-normal-B4A85CGO.woff2) format("woff2-variations");unicode-range:U+8e30-8e31,U+8e35,U+8e39,U+8e3c-8e3d,U+8e40-8e42,U+8e47,U+8e49-8e4e,U+8e50,U+8e53-8e55,U+8e59-8e5b,U+8e60,U+8e62-8e63,U+8e67,U+8e69,U+8e6c-8e6d,U+8e6f,U+8e74,U+8e76,U+8e7a-8e7c,U+8e82,U+8e84-8e85,U+8e87,U+8e89-8e8b,U+8e8f-8e95,U+8e99-8e9a,U+8e9d-8e9e,U+8ea1,U+8ea3,U+8ea5-8ea6,U+8eaa,U+8eac-8ead,U+8eaf-8eb1,U+8eb9,U+8ebc,U+8ebe,U+8ec6,U+8ecb,U+8ecf,U+8ed1,U+8ed4,U+8ed7,U+8eda-8edb,U+8ee2,U+8ee8,U+8eeb,U+8ef2,U+8ef9-8efe,U+8f05,U+8f07-8f08,U+8f0a-8f0c,U+8f12-8f13,U+8f17,U+8f19-8f1a,U+8f1c,U+8f1e-8f1f,U+8f25-8f26,U+8f2d,U+8f30,U+8f33,U+8f36,U+8f3e,U+8f40-8f42,U+8f45-8f47,U+8f4d,U+8f54-8f55,U+8f5d,U+8f61-8f62,U+8f64,U+8f67-8f69,U+8f6d-8f72,U+8f74,U+8f76,U+8f7b-8f7c,U+8f7f,U+8f83-8f84}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-33-wght-normal-BuZ7TSCr.woff2) format("woff2-variations");unicode-range:U+8ce1,U+8ce8,U+8ceb,U+8cf0,U+8cf8,U+8cfb,U+8cfe,U+8d04,U+8d07,U+8d0b,U+8d0d,U+8d10,U+8d12-8d14,U+8d17,U+8d1b-8d1f,U+8d21-8d26,U+8d29-8d2c,U+8d2e-8d32,U+8d34-8d35,U+8d37-8d38,U+8d3a-8d3c,U+8d3e-8d3f,U+8d41-8d43,U+8d48,U+8d4b-8d4c,U+8d4e-8d50,U+8d54,U+8d56,U+8d58,U+8d5a-8d5b,U+8d5f-8d60,U+8d62-8d63,U+8d66-8d69,U+8d6c-8d6e,U+8d73,U+8d75-8d76,U+8d7b,U+8d7d,U+8d84,U+8d8b,U+8d90-8d91,U+8d94,U+8d96,U+8d9c,U+8dab,U+8daf,U+8db2,U+8db5,U+8db7,U+8dba,U+8dbc,U+8dbf,U+8dc2-8dc3,U+8dc6,U+8dcb,U+8dce-8dd0,U+8dd6-8dd7,U+8dda-8ddb,U+8de3-8de4,U+8de9,U+8deb-8dec,U+8df1,U+8df5-8df7,U+8dfa-8dfd,U+8e05,U+8e08-8e0a,U+8e0e,U+8e14,U+8e16,U+8e18,U+8e1d-8e21,U+8e23,U+8e26-8e28,U+8e2a-8e2b,U+8e2d-8e2e}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-34-wght-normal-C1wbJ2k5.woff2) format("woff2-variations");unicode-range:U+8b9c,U+8b9e-8b9f,U+8ba3,U+8ba5,U+8ba7,U+8baa,U+8bad,U+8bb2-8bb4,U+8bb6-8bb9,U+8bbc-8bbd,U+8bbf-8bc0,U+8bc3,U+8bc5,U+8bc8-8bcb,U+8bcf,U+8bd1,U+8bd7-8bdc,U+8bde-8be1,U+8be3,U+8be5,U+8be7,U+8be9,U+8beb-8bec,U+8bef,U+8bf1-8bf2,U+8bf5-8bf6,U+8bf8,U+8bfa,U+8bfd-8bfe,U+8c01-8c02,U+8c05,U+8c08,U+8c0a-8c11,U+8c13-8c15,U+8c18-8c1c,U+8c1f,U+8c23-8c29,U+8c2c-8c2d,U+8c31,U+8c34,U+8c36,U+8c39,U+8c3f,U+8c47,U+8c49-8c4c,U+8c4f,U+8c51,U+8c55,U+8c62,U+8c68,U+8c73,U+8c78,U+8c7a-8c7c,U+8c82,U+8c85,U+8c89-8c8a,U+8c8d-8c8e,U+8c90,U+8c94,U+8c98-8c99,U+8ca3-8ca4,U+8cad-8cb0,U+8cb2,U+8cb9-8cba,U+8cbd,U+8cc1-8cc2,U+8cc4-8cc5,U+8ccf-8cd2,U+8cd4-8cd5,U+8cd9-8cdb}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-35-wght-normal-DJnPxO40.woff2) format("woff2-variations");unicode-range:U+8a1b,U+8a22,U+8a25,U+8a27,U+8a2b,U+8a33,U+8a36,U+8a38,U+8a3d-8a3e,U+8a41,U+8a45-8a46,U+8a48,U+8a4e,U+8a51-8a52,U+8a54,U+8a56-8a58,U+8a5b,U+8a5d,U+8a61,U+8a63,U+8a67,U+8a6a-8a6c,U+8a70,U+8a74-8a76,U+8a7a-8a7c,U+8a82,U+8a84-8a86,U+8a89,U+8a8f-8a92,U+8a94,U+8a9a,U+8aa1,U+8aa3,U+8aa5,U+8aa7-8aa8,U+8aad,U+8ab1,U+8ab6,U+8abe,U+8ac2,U+8ac4,U+8ac6,U+8ac9,U+8acc-8acf,U+8ad1,U+8adb,U+8add-8ae2,U+8ae4,U+8ae6,U+8aea-8aeb,U+8aed,U+8af1-8af6,U+8afa,U+8afc,U+8b01,U+8b04-8b05,U+8b07,U+8b0b-8b0d,U+8b0f-8b10,U+8b13-8b14,U+8b16,U+8b1a,U+8b1c,U+8b21-8b22,U+8b26,U+8b28,U+8b2b,U+8b2e,U+8b33,U+8b41,U+8b46,U+8b4c-8b4f,U+8b53-8b54,U+8b56,U+8b59,U+8b5e-8b60,U+8b64,U+8b6a-8b6d,U+8b72,U+8b7e,U+8b83,U+8b89,U+8b8c,U+8b8e,U+8b90,U+8b92,U+8b95-8b96,U+8b99}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-36-wght-normal-D8HTrsxI.woff2) format("woff2-variations");unicode-range:U+88b7-88b8,U+88bc-88be,U+88c0,U+88c4,U+88c6-88c7,U+88c9-88cc,U+88ce,U+88d2,U+88d6,U+88d8,U+88db,U+88df,U+88e4,U+88e8-88e9,U+88ec,U+88ef-88f1,U+88f3-88f5,U+88fc,U+88fe,U+8900,U+8902,U+8906,U+890a-890c,U+8912-8915,U+8918-891a,U+891f,U+8921,U+8923,U+8925,U+892a-892b,U+892d,U+8930,U+8933,U+8935-8936,U+8938,U+893d,U+8941-8943,U+8946-8947,U+8949,U+894c-894d,U+8956-8957,U+8959,U+895c,U+895e-8960,U+8964,U+8966,U+896c,U+8971,U+8974,U+897b,U+897e,U+8980,U+8982-8983,U+8987-8988,U+898a,U+898c,U+8991,U+8994-8995,U+8997-8998,U+899a,U+899c,U+89a1,U+89a4-89a7,U+89a9,U+89ac,U+89af,U+89b2-89b3,U+89b7,U+89bb,U+89bf,U+89c5,U+89c9-89ca,U+89d1,U+89d4-89d5,U+89da,U+89dc-89de,U+89e5-89e7,U+89ed,U+89f1,U+89f3-89f4,U+89f6,U+89ff,U+8a01,U+8a03,U+8a07,U+8a09,U+8a0c,U+8a0f-8a12,U+8a16}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-37-wght-normal-Ci96APBt.woff2) format("woff2-variations");unicode-range:U+8763-8765,U+8768,U+876a,U+876c-8770,U+8772,U+8777,U+877a-877b,U+877d,U+8781,U+8784-8785,U+8788,U+878b,U+8793,U+8797-8798,U+879f,U+87a3,U+87a8,U+87ab-87ad,U+87af,U+87b3,U+87b5,U+87b9,U+87bb,U+87bd-87c0,U+87c4-87c8,U+87ca-87cc,U+87ce,U+87d2,U+87db-87dc,U+87e0-87e1,U+87e3,U+87e5,U+87e7,U+87ea-87eb,U+87ee-87ef,U+87f3-87f4,U+87f6-87f7,U+87fe,U+8802-8806,U+880a-880b,U+880e,U+8810-8811,U+8813,U+8815-8816,U+881b,U+8821,U+8823,U+8827,U+8831-8832,U+8835,U+8839-883a,U+883c,U+8844-8846,U+884a,U+884e,U+8852,U+8854-8856,U+8859-885a,U+885e,U+8862,U+8864-8865,U+8869-886a,U+886c-886e,U+8871-8872,U+8875,U+8879,U+887d-887f,U+8882,U+8884-8885,U+8888,U+8890,U+8892-8893,U+8897-8898,U+889a-889c,U+889e,U+88a2,U+88a4,U+88a8,U+88aa,U+88ad-88ae,U+88b1,U+88b4}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-38-wght-normal-CaasFSCy.woff2) format("woff2-variations");unicode-range:U+8621-8622,U+8627,U+8629-862a,U+8634-8636,U+8638,U+863a,U+863c,U+8640,U+8642,U+8646,U+864c-864d,U+864f,U+8651-8654,U+8657,U+8659-865a,U+865c,U+8662,U+866b-866c,U+866f-8671,U+8673,U+8677,U+867a-867b,U+867d-867e,U+8680-8682,U+868b-868d,U+8693-8696,U+869a,U+869c-869d,U+86a1,U+86a3-86a4,U+86a7-86aa,U+86af-86b1,U+86b3-86b4,U+86b6,U+86b9-86ba,U+86c0-86c2,U+86c4,U+86c6,U+86c9-86ca,U+86cc-86ce,U+86d0,U+86d3-86d4,U+86de-86df,U+86e9,U+86ed-86f0,U+86f3,U+86f8-86fc,U+86fe,U+8703,U+8706-870a,U+870d-870e,U+8711-8712,U+8715,U+8717,U+8719-871a,U+871e,U+8721-8723,U+8725,U+8728-8729,U+872e,U+8731,U+8734,U+8737,U+873a,U+873e-8740,U+8742,U+8747,U+8749,U+874b-874c,U+874e-874f,U+8753,U+8757-8758,U+875d,U+875f,U+8761-8762}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-39-wght-normal-DNt0rKy4.woff2) format("woff2-variations");unicode-range:U+84c0,U+84c2,U+84c6-84c7,U+84ca,U+84cd-84d2,U+84d6,U+84dd,U+84df,U+84e2,U+84e6-84e8,U+84ea,U+84ef-84f0,U+84f3-84f4,U+84f7,U+84fa,U+84fc-84fd,U+84ff-8500,U+8506,U+850c,U+8511,U+8515,U+8517,U+851d-851f,U+8524,U+852b,U+852f,U+8532,U+8534-8535,U+8537-8538,U+853a,U+853c,U+853e,U+8541-8542,U+8545,U+8548,U+854b,U+854d-854e,U+8552-8553,U+8555-8558,U+855a,U+855e,U+8561-8565,U+8568,U+856a-856c,U+856f,U+8574,U+8577-857b,U+8580-8581,U+8585-8586,U+858a,U+858c,U+858f-8590,U+8594,U+8597-8599,U+859c,U+859f,U+85a1-85a2,U+85a4,U+85a8,U+85ab-85ac,U+85ae,U+85b3-85b4,U+85b7,U+85b9-85ba,U+85bd-85be,U+85c1-85c2,U+85cb,U+85ce,U+85d0,U+85d3,U+85d5,U+85dc,U+85e0,U+85e6,U+85e8,U+85ea,U+85ed,U+85f4,U+85f6-85f7,U+85f9-85fa,U+85ff,U+8602,U+8604-8605,U+8610,U+8616-8618,U+861a,U+861e}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-40-wght-normal-Byd_iF60.woff2) format("woff2-variations");unicode-range:U+8380,U+8383,U+8385-8386,U+8392,U+8394-8395,U+8398-8399,U+839b-839c,U+83a0,U+83a2,U+83a4,U+83a7-83aa,U+83af-83b5,U+83b7,U+83b9-83ba,U+83bc-83c0,U+83c2,U+83c4-83c5,U+83c8-83c9,U+83cb,U+83ce-83cf,U+83d1,U+83d4-83d6,U+83d8,U+83dd,U+83df,U+83e1-83e2,U+83e5,U+83ea-83eb,U+83f0,U+83f3-83f4,U+83f9,U+83fb-83fe,U+8406-8407,U+840b,U+840f,U+8411,U+8413,U+8418,U+841b-841d,U+8420-8421,U+8423-8424,U+8426-8429,U+842b,U+842d-842e,U+8432-8433,U+8435,U+8437-8439,U+843b-843c,U+843e,U+8445-8447,U+844e,U+8451-8452,U+8456,U+8459-845a,U+845c,U+845f,U+8462,U+8466-8467,U+846d,U+846f-8471,U+8473-8474,U+8476-8478,U+847a,U+8484,U+848b,U+848d-848e,U+8493-8494,U+8497,U+849d,U+849f,U+84a1,U+84a8,U+84af,U+84b1,U+84b4,U+84b9-84bb,U+84bd-84bf}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-41-wght-normal-CimuZG9f.woff2) format("woff2-variations");unicode-range:U+827d,U+827f,U+8283-8284,U+8288-828a,U+828d-8291,U+8293-8294,U+8298,U+829a-829c,U+829e-82a4,U+82a6-82ab,U+82ae,U+82b0,U+82b4,U+82b6,U+82ba-82bc,U+82be,U+82c1,U+82c4-82c5,U+82c7,U+82cb,U+82cd,U+82cf-82d0,U+82d2,U+82d5-82d6,U+82d9,U+82db-82dc,U+82de-82e1,U+82e3-82e4,U+82e7,U+82ea-82eb,U+82ef-82f0,U+82f3-82f4,U+82f6-82f7,U+82f9-82fc,U+82fe-8301,U+8306-8308,U+830b-830e,U+8316,U+8318,U+831a-831b,U+831d-831e,U+8327,U+832a,U+832c-832d,U+832f,U+8331,U+8333-8334,U+8337,U+833a-833c,U+833f-8340,U+8342,U+8344-8347,U+834b-834c,U+834f,U+8351,U+8356-8358,U+835a,U+835e-8361,U+8363-8364,U+8367-8368,U+836b,U+836f,U+8373,U+8375,U+8378,U+837a-837f}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-42-wght-normal-DT8sgwsv.woff2) format("woff2-variations");unicode-range:U+811b,U+811e,U+8121-8127,U+8129,U+812c,U+812f-8134,U+8137-8138,U+813a,U+813d,U+8144,U+8146,U+8148,U+814a,U+814c-814d,U+8151,U+8153,U+8156,U+8158,U+815a,U+8160,U+8167,U+8169,U+816d,U+816f,U+8171,U+8174,U+817b-817c,U+817e,U+8182,U+8188,U+818a,U+8194-8195,U+8198,U+819b,U+819e,U+81a3,U+81a6-81a7,U+81ab,U+81af-81b0,U+81b5-81b6,U+81b8,U+81ba-81bb,U+81be-81bf,U+81c3,U+81c6,U+81ca,U+81cc,U+81cf,U+81d1-81d3,U+81d6-81d7,U+81d9-81da,U+81dd-81de,U+81e0-81e2,U+81e7,U+81ec,U+81ef,U+81fc,U+81fe,U+8200-8202,U+8204-8206,U+820b,U+820e,U+8210,U+8215,U+8217-8218,U+821b,U+821d,U+8221-8222,U+8224,U+8228-8229,U+822b,U+822f-8234,U+8236-8238,U+823a,U+823e,U+8240,U+8244-8245,U+8249,U+824b,U+824e-824f,U+8257,U+825a,U+825f,U+8264,U+8268,U+826b,U+826e,U+8270,U+8273,U+8276,U+8278-8279}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-43-wght-normal-xnDjStnc.woff2) format("woff2-variations");unicode-range:U+7fb8,U+7fbc,U+7fbf-7fc0,U+7fc3,U+7fcb-7fcc,U+7fce-7fcf,U+7fd1,U+7fd5,U+7fd8,U+7fdb,U+7fde-7fdf,U+7fe5-7fe6,U+7fe9,U+7feb-7fec,U+7fee,U+7ff2-7ff3,U+7ffa,U+7ffd-7ffe,U+8002,U+8004,U+8006,U+800b,U+800e,U+8011-8012,U+8014,U+8016,U+8018-8019,U+801c,U+8024,U+8026,U+8028,U+802c,U+8030,U+8035,U+8037-8039,U+803b,U+8042-8043,U+804b-804c,U+8052,U+8061,U+8068,U+806a,U+806e,U+8071,U+8073-8076,U+8079,U+807c,U+807e-807f,U+8083-8084,U+808f,U+8093,U+8095,U+8098,U+809c,U+809f-80a0,U+80a4,U+80a7,U+80ab,U+80ad-80ae,U+80b0-80b1,U+80b4-80b6,U+80b8,U+80bc-80c2,U+80c4,U+80c6-80c7,U+80cb,U+80cd,U+80cf,U+80d4,U+80d7,U+80d9,U+80db-80dd,U+80e0,U+80e3-80e5,U+80e7,U+80eb-80ed,U+80ef-80f1,U+80f3-80f4,U+80f6-80f7,U+80fc,U+80fe-80ff,U+8101,U+8107,U+8109,U+810f-8113,U+8115,U+8117-8118,U+811a}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-44-wght-normal-Dv8Wk8tG.woff2) format("woff2-variations");unicode-range:U+7eb3,U+7eb5-7eba,U+7ebd-7ebe,U+7ec0-7ec1,U+7ec3,U+7ec5,U+7ec7-7eca,U+7ecd-7ece,U+7ed1-7ed2,U+7ed4-7ed5,U+7ed7-7ed8,U+7eda-7edb,U+7edd-7ede,U+7ee2-7ee3,U+7ee5,U+7ee7,U+7ee9-7eeb,U+7eee-7ef0,U+7ef3,U+7ef5,U+7ef7-7ef8,U+7efd-7f01,U+7f03,U+7f05-7f09,U+7f0e,U+7f10,U+7f13-7f15,U+7f18-7f1a,U+7f1c-7f1d,U+7f20,U+7f24-7f25,U+7f28-7f2a,U+7f2d-7f2e,U+7f30,U+7f34,U+7f36-7f37,U+7f3d,U+7f42-7f45,U+7f47-7f4e,U+7f52,U+7f54,U+7f58,U+7f5a,U+7f5d,U+7f5f-7f63,U+7f65,U+7f68,U+7f6b,U+7f78,U+7f7d-7f7e,U+7f81-7f83,U+7f86-7f87,U+7f8b-7f8d,U+7f91,U+7f93-7f95,U+7f97,U+7f99-7f9a,U+7f9d,U+7f9f,U+7fa1-7fa3,U+7fa5,U+7fa7,U+7fad-7fb2,U+7fb4,U+7fb6}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-45-wght-normal-DdGhaj3f.woff2) format("woff2-variations");unicode-range:U+7d8c-7d8f,U+7d91,U+7d95-7d96,U+7d98-7d9a,U+7d9d-7d9e,U+7da2-7da3,U+7da6,U+7daa,U+7dac,U+7dae-7db0,U+7db3,U+7db5,U+7db7,U+7db9,U+7dbd,U+7dc1,U+7dc3-7dc7,U+7dcc-7dcf,U+7dd1,U+7dd6-7dd9,U+7ddb-7ddc,U+7de1-7de2,U+7de6,U+7df0-7df3,U+7df6,U+7dfe,U+7e01-7e02,U+7e04,U+7e08-7e0b,U+7e10-7e11,U+7e13,U+7e15,U+7e1d-7e20,U+7e22,U+7e25-7e27,U+7e29,U+7e2d,U+7e2f-7e30,U+7e32-7e37,U+7e39,U+7e3b,U+7e44-7e45,U+7e47-7e48,U+7e4a-7e4b,U+7e4d,U+7e50-7e52,U+7e56,U+7e58-7e5b,U+7e62,U+7e68,U+7e6d-7e70,U+7e76,U+7e78,U+7e7b,U+7e7e,U+7e81-7e82,U+7e86-7e88,U+7e8a,U+7e8d-7e8e,U+7e92-7e94,U+7e98-7e9b,U+7e9e,U+7ea0,U+7ea3-7ea4,U+7ea8,U+7eaa-7eaf,U+7eb1-7eb2}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-46-wght-normal-C7pDsoZP.woff2) format("woff2-variations");unicode-range:U+7c23,U+7c25-7c26,U+7c2a-7c2b,U+7c37-7c39,U+7c40-7c41,U+7c48-7c49,U+7c50,U+7c53-7c54,U+7c56-7c57,U+7c59-7c5c,U+7c5f,U+7c63,U+7c65,U+7c69,U+7c6c-7c6e,U+7c74-7c75,U+7c79,U+7c7c,U+7c7e,U+7c84,U+7c8b,U+7c8d,U+7c91,U+7c94-7c95,U+7c9b,U+7c9f,U+7ca2,U+7ca4,U+7ca6,U+7ca8-7caa,U+7cae,U+7cb1-7cb3,U+7cba,U+7cbc,U+7cbf-7cc0,U+7cc5,U+7cc8-7cc9,U+7ccc-7cce,U+7cd7,U+7cdc-7cdd,U+7ce0,U+7ce2,U+7ce8,U+7cea,U+7ced,U+7cf2,U+7cf4,U+7cf6,U+7cf8-7cfa,U+7cfc,U+7d02,U+7d06-7d0a,U+7d0f,U+7d11-7d12,U+7d15,U+7d18,U+7d1c-7d1e,U+7d25,U+7d27,U+7d29,U+7d2c,U+7d31-7d32,U+7d35,U+7d38,U+7d3a,U+7d3c,U+7d3e-7d41,U+7d43,U+7d45,U+7d4c,U+7d4e-7d4f,U+7d53-7d54,U+7d56,U+7d5b-7d5d,U+7d5f,U+7d63,U+7d67,U+7d6a,U+7d6d,U+7d70,U+7d73,U+7d75,U+7d79-7d7b,U+7d7d,U+7d80,U+7d83-7d84,U+7d86-7d89,U+7d8b}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-47-wght-normal-BeEDFoeW.woff2) format("woff2-variations");unicode-range:U+7afd-7afe,U+7b01-7b06,U+7b09-7b0b,U+7b0e-7b10,U+7b14,U+7b18,U+7b1a,U+7b1e-7b1f,U+7b22-7b25,U+7b29-7b2b,U+7b2d-7b2e,U+7b31-7b35,U+7b38-7b3c,U+7b45,U+7b47-7b48,U+7b4a,U+7b4c,U+7b4e-7b50,U+7b58,U+7b5b,U+7b5d,U+7b60,U+7b62,U+7b65-7b67,U+7b69,U+7b6d-7b6f,U+7b72-7b76,U+7b79,U+7b7e,U+7b82,U+7b84-7b85,U+7b87,U+7b8b,U+7b8d-7b93,U+7b95-7b96,U+7b98,U+7b9c-7b9d,U+7ba0,U+7ba7,U+7ba9-7bac,U+7bb0,U+7bb4,U+7bb6,U+7bb8-7bb9,U+7bc1,U+7bc3,U+7bc6,U+7bcb-7bcc,U+7bcf,U+7bd4,U+7bd9-7bdb,U+7bdd,U+7be0-7be1,U+7be5-7be6,U+7bea,U+7bed-7bee,U+7bf1-7bf3,U+7bf8-7bf9,U+7bfc-7c01,U+7c03,U+7c07,U+7c0a-7c0d,U+7c0f,U+7c11-7c12,U+7c15,U+7c1e-7c20}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-48-wght-normal-CKLCikII.woff2) format("woff2-variations");unicode-range:U+798a-798b,U+7991,U+7993-7996,U+7998,U+799a-799b,U+799f-79a2,U+79a4,U+79a8-79a9,U+79af-79b0,U+79b3,U+79b5,U+79b8,U+79ba,U+79c3,U+79c6,U+79c8,U+79cf,U+79d5-79d6,U+79dc-79de,U+79e3,U+79e7,U+79ea-79ed,U+79ef-79f0,U+79f4,U+79f6-79f8,U+79fd,U+7a02-7a03,U+7a08-7a0a,U+7a0c,U+7a0e,U+7a10-7a11,U+7a14,U+7a17-7a19,U+7a1c,U+7a1e-7a1f,U+7a23,U+7a26,U+7a2d,U+7a32-7a33,U+7a37,U+7a39,U+7a3c,U+7a42,U+7a45,U+7a49,U+7a4f,U+7a56,U+7a5a,U+7a5c,U+7a60-7a61,U+7a63,U+7a68,U+7a6d-7a6e,U+7a70-7a71,U+7a77-7a79,U+7a80,U+7a83,U+7a85-7a86,U+7a88,U+7a8d,U+7a90-7a91,U+7a93-7a96,U+7a98,U+7a9c-7a9d,U+7aa0,U+7aa3,U+7aa5-7aa6,U+7aa8,U+7aaa,U+7aac,U+7ab0,U+7ab3,U+7ab6,U+7ab8,U+7abb,U+7abe-7abf,U+7ac2,U+7ac8-7ac9,U+7ad1-7ad2,U+7ad6,U+7ada,U+7adc-7ade,U+7ae4,U+7ae6,U+7ae9-7aeb,U+7af4,U+7af8,U+7afa-7afb}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-49-wght-normal-CCLgFFzC.woff2) format("woff2-variations");unicode-range:U+7842-7843,U+7845,U+7847,U+784a,U+784c-7850,U+7852-7853,U+7855,U+7858,U+785a,U+785c-785d,U+7864,U+7866,U+7868,U+786a,U+786f,U+7874,U+7876,U+787c,U+787f,U+7886-7887,U+7889,U+788d,U+788f,U+7893,U+7895-7896,U+7898,U+789a,U+789e,U+78a1,U+78a3,U+78a5,U+78aa,U+78ad,U+78b1-78b2,U+78b4,U+78b6,U+78b8,U+78be,U+78c8-78c9,U+78cb,U+78ce,U+78d0-78d1,U+78d4-78d5,U+78d7-78d8,U+78de,U+78e3,U+78e6-78e7,U+78ea,U+78ec,U+78f2-78f4,U+78fa-78fb,U+78fd-7900,U+7904-7906,U+790a,U+790c,U+7910-7912,U+791c,U+791e,U+7920-7921,U+792a-792c,U+792e,U+7931,U+7934,U+7938,U+793b,U+793d,U+793f,U+7941-7942,U+7945-7947,U+7949,U+794c,U+794e,U+7953-7954,U+7957-795c,U+795f,U+7961-7962,U+7964,U+7967,U+7969,U+796b-796c,U+796f,U+7972-7973,U+7977-7979,U+797b-797c,U+797e,U+7980,U+7982,U+7984-7988}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-50-wght-normal-C42Zjgp-.woff2) format("woff2-variations");unicode-range:U+7707-7708,U+770a,U+770c,U+770f,U+7715,U+7719-771b,U+771d-771e,U+7722,U+7725-7726,U+7728,U+772d,U+772f,U+7733-7736,U+7738,U+773b,U+773d,U+7741,U+7744,U+7746,U+774c,U+774e-7752,U+7755,U+7759-775a,U+775f-7760,U+7762,U+7765-7766,U+7768-776a,U+776c-776e,U+7771,U+7778,U+777a,U+777d-777e,U+7780,U+7785,U+7787,U+7789,U+778b-778d,U+7791-7793,U+779c,U+779f-77a0,U+77a2,U+77a5,U+77a9,U+77b0-77b1,U+77b4,U+77b6-77b7,U+77b9,U+77bc-77bf,U+77c5,U+77c7,U+77cc-77cd,U+77d3,U+77d6-77d7,U+77dc,U+77de,U+77e3,U+77e7,U+77eb-77ec,U+77f0,U+77f2,U+77f6,U+77f8,U+77fa-77fc,U+77fe-7800,U+7803,U+7805-7806,U+7809,U+7810-7812,U+7815-7816,U+781a,U+781c-781d,U+781f-7823,U+7825-7827,U+7829,U+782c-7830,U+7833,U+7835,U+7837,U+7839-783a,U+783c,U+783e,U+7840}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-51-wght-normal-AEQJR1Ln.woff2) format("woff2-variations");unicode-range:U+75cd,U+75d2,U+75d4,U+75d9,U+75df,U+75e2-75e4,U+75e6-75e7,U+75e9-75ec,U+75f0-75f3,U+75f7,U+75f9-75fa,U+75fc,U+75fe-7602,U+7608-760a,U+760c-760d,U+7610,U+7615-7616,U+7618-7620,U+7622-7623,U+7625,U+7627,U+7629,U+762b,U+762e,U+7630,U+7632-7635,U+7638,U+763a-763c,U+763e,U+7640,U+7643,U+7646,U+7648-7649,U+764d-764e,U+7654,U+7658,U+765c,U+765f,U+7663-7667,U+7669,U+766b-766d,U+766f-7670,U+7676,U+7678-767a,U+767f-7681,U+7683,U+7688,U+768a-768b,U+768e,U+7690,U+7695-7696,U+769a-769e,U+76a3-76a4,U+76aa,U+76b0-76b1,U+76b4,U+76b7-76b8,U+76c2,U+76c5,U+76c9,U+76cc-76cd,U+76cf-76d1,U+76d6-76d8,U+76e5-76e6,U+76e9,U+76ec,U+76f1,U+76f7,U+76f9-76fb,U+76ff-7700,U+7704-7705}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-52-wght-normal-BdHOWR67.woff2) format("woff2-variations");unicode-range:U+749c-74a1,U+74a3,U+74a5-74a7,U+74a9-74ab,U+74ae,U+74b1-74b2,U+74b5,U+74b8,U+74ba,U+74bf,U+74c5,U+74c8,U+74cc-74cd,U+74d2,U+74d4,U+74d6,U+74d8,U+74da,U+74de-74e0,U+74e2,U+74e4,U+74e8-74e9,U+74ee-74ef,U+74f4,U+74f9,U+74fb,U+74ff-7501,U+7503,U+7507,U+750c-750d,U+7511,U+7513,U+7515-7517,U+7519,U+751e,U+7521,U+7525,U+752a,U+752c-752f,U+7534,U+753e,U+7542,U+7545,U+7547-7548,U+754a-754b,U+754e,U+7551,U+755a-755b,U+755d,U+7560,U+7563-7564,U+7566-7568,U+756c-756f,U+7572-7575,U+7577-757a,U+757c,U+757e-757f,U+7583-7584,U+7587,U+7589,U+758b-758e,U+7590,U+7592,U+7594-7595,U+7597,U+7599-759a,U+759d,U+759f,U+75a1-75a3,U+75a5,U+75a7,U+75aa,U+75ac,U+75ae-75b1,U+75b3-75b4,U+75b8,U+75bd,U+75c0,U+75c2-75c4,U+75c9-75ca,U+75cc}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-53-wght-normal-DRtz34YW.woff2) format("woff2-variations");unicode-range:U+73b4-73ba,U+73bc,U+73bf,U+73c2,U+73c4-73c6,U+73c9,U+73cb-73cc,U+73ce-73d2,U+73d6-73d7,U+73d9,U+73db-73de,U+73e3,U+73e5-73eb,U+73ef,U+73f5-73f7,U+73f9-73fa,U+73fc-73fd,U+7400-7401,U+7404-7405,U+7407-7408,U+740a-740d,U+740f-7410,U+7416,U+741a-741b,U+741d-741e,U+7420-7425,U+7428-7429,U+742c-7432,U+7435-7436,U+7438-743a,U+743c-7442,U+7445-7446,U+7448-744a,U+7451-7452,U+7454,U+7457,U+7459,U+745d,U+7460-7462,U+7465,U+7467-7468,U+746c-746e,U+7471-7477,U+7479-747a,U+747c-747f,U+7481-7482,U+7484-7486,U+7488-748a,U+748e-7490,U+7492,U+7498,U+749a}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-54-wght-normal-Bctil8qQ.woff2) format("woff2-variations");unicode-range:U+7281-7282,U+7284,U+7287,U+728a,U+728d,U+7292,U+7296,U+7298,U+729b,U+729f-72a2,U+72ad-72ae,U+72b0-72b5,U+72b8-72b9,U+72bc-72bd,U+72c1,U+72c3,U+72c5-72c6,U+72c8,U+72cc-72ce,U+72d2,U+72d4,U+72db,U+72dd,U+72df,U+72e1,U+72e8,U+72ec-72ee,U+72f1,U+72f3-72f4,U+72f7,U+72fa-72fb,U+72fd,U+7300-7301,U+7304,U+7307,U+730a-730b,U+730e,U+7313,U+7315-7317,U+7319,U+731e-731f,U+7322,U+7328-732e,U+7330-7331,U+7337,U+733a-733c,U+733e,U+7340-7341,U+7343,U+734c-734d,U+734f-7350,U+7352,U+7355,U+7357,U+7359-735a,U+7360-7363,U+7365,U+7369-7370,U+7373-7374,U+7377,U+737a,U+737c,U+737e,U+7380,U+7385-7386,U+738a,U+738e-738f,U+7391-7395,U+7397-7398,U+739b,U+73a0-73a2,U+73a5-73a8,U+73ad-73ae,U+73b3}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-55-wght-normal-ChI6Gtzx.woff2) format("woff2-variations");unicode-range:U+7115-7116,U+7118,U+711c,U+711e,U+7120,U+7122,U+712e-712f,U+7131,U+7134,U+713c,U+713f,U+7143,U+7145-7147,U+714a-714b,U+7150-7153,U+7155-7156,U+715a,U+7160,U+7162,U+7166,U+7168,U+716c,U+7171,U+7173,U+7178,U+717a-717b,U+717d,U+7180-7181,U+7185,U+7187-7188,U+718b,U+718f-7190,U+7192,U+7196-7198,U+719a-719c,U+71a0,U+71a4,U+71a8,U+71af,U+71b2-71b3,U+71b5,U+71b7-71ba,U+71be,U+71c1,U+71c4,U+71ca-71cb,U+71ce-71d0,U+71d4,U+71d7-71d8,U+71da,U+71dc,U+71e0-71e1,U+71e7,U+71ec,U+71ee,U+71f4-71f6,U+71f9,U+71fc,U+71fe-7201,U+7203,U+7207,U+7209,U+720c,U+7213-7215,U+7217,U+721a,U+721d,U+7222-7223,U+7228,U+722b,U+7230,U+7237,U+723b,U+723f-7242,U+724b,U+724d,U+7252-7253,U+7256,U+7258,U+725d,U+7263-7266,U+726a-726b,U+726e-7270,U+7273-7275,U+7277,U+727a-727b,U+727e-727f}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-56-wght-normal-B7o92O3n.woff2) format("woff2-variations");unicode-range:U+6fec,U+6fee,U+6ff0,U+6ff3,U+6ff5-6ff6,U+6ffa,U+6ffc,U+6fff-7001,U+7003,U+7005-7007,U+700b,U+700d,U+7015,U+7018,U+701b,U+701e,U+7020-7021,U+7023,U+7026-7027,U+702c,U+702f-7032,U+7034-7035,U+7037-703c,U+7040,U+7042-7044,U+7046,U+7049,U+704b,U+704f,U+7052,U+7054-7055,U+705c-7061,U+7064-7069,U+706c-706d,U+706f,U+7073-7075,U+7078,U+707a,U+707e-7081,U+7085-7086,U+7089,U+7090-7091,U+7094-7096,U+7098,U+709c,U+709f,U+70a1,U+70a4,U+70a9,U+70ac,U+70af-70b2,U+70b4-70b5,U+70b7,U+70bb-70be,U+70c0-70c3,U+70ca-70cb,U+70d2,U+70d4-70d5,U+70d9-70dd,U+70df,U+70e6-70e9,U+70eb-70ec,U+70ef,U+70f1,U+70f4,U+70f7,U+70fa,U+70fd,U+70ff,U+7104,U+7106,U+7109,U+710c,U+7110,U+7113-7114}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-57-wght-normal-tuc02TtS.woff2) format("woff2-variations");unicode-range:U+6eda-6edb,U+6edd-6ede,U+6ee2,U+6ee4-6ee5,U+6ee8-6ee9,U+6eeb,U+6eee,U+6ef3,U+6ef8-6efb,U+6f00,U+6f08-6f0a,U+6f0d-6f0e,U+6f11-6f13,U+6f15,U+6f19-6f1a,U+6f23,U+6f25-6f2a,U+6f2d-6f31,U+6f33-6f36,U+6f3a-6f3c,U+6f40-6f41,U+6f43-6f44,U+6f47,U+6f4d-6f4f,U+6f53,U+6f57,U+6f59-6f5a,U+6f5c,U+6f5e-6f61,U+6f63,U+6f66-6f67,U+6f69-6f6c,U+6f6f,U+6f72-6f78,U+6f7a-6f7f,U+6f81-6f82,U+6f87,U+6f89,U+6f8b-6f8d,U+6f90,U+6f92,U+6f94-6f97,U+6f9c,U+6f9f-6fa0,U+6fa2-6fa3,U+6fa5-6fa8,U+6faa-6fab,U+6fae-6faf,U+6fb4,U+6fb6,U+6fb9-6fba,U+6fbc,U+6fc2,U+6fc6-6fcb,U+6fce,U+6fd1-6fd2,U+6fd4,U+6fd8,U+6fda,U+6fde,U+6fe0-6fe2,U+6fe8-6fe9}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-58-wght-normal-DzvAN8Jo.woff2) format("woff2-variations");unicode-range:U+6dd6,U+6dd9,U+6ddb-6de0,U+6de2-6de6,U+6de9,U+6dec,U+6def-6df0,U+6df2,U+6df4,U+6df6,U+6df8,U+6dfc-6dfd,U+6e00,U+6e02-6e03,U+6e07-6e0b,U+6e0d-6e0e,U+6e10,U+6e13-6e15,U+6e17,U+6e19-6e1a,U+6e1d,U+6e1f,U+6e22,U+6e24-6e25,U+6e27,U+6e2b,U+6e2d-6e2e,U+6e30-6e31,U+6e36,U+6e39-6e3a,U+6e3c-6e3d,U+6e40-6e41,U+6e44-6e45,U+6e47,U+6e49,U+6e4b,U+6e4d-6e4f,U+6e51,U+6e53-6e54,U+6e59,U+6e5c,U+6e5e-6e61,U+6e63-6e66,U+6e69-6e6b,U+6e6e,U+6e70-6e76,U+6e78,U+6e7c,U+6e7f-6e80,U+6e83,U+6e85-6e86,U+6e88-6e89,U+6e8b,U+6e8d-6e8f,U+6e93,U+6e98-6e9a,U+6e9f,U+6ea1,U+6ea4-6ea7,U+6eae,U+6eb1-6eb2,U+6eb4-6eb5,U+6eb7,U+6ebd,U+6ec1-6ec3,U+6ec7-6ec9,U+6ecd-6ed0,U+6ed3-6ed6,U+6ed8}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-59-wght-normal-02_K4Ups.woff2) format("woff2-variations");unicode-range:U+6cdd-6cde,U+6ce0,U+6ce7,U+6ce9-6cec,U+6cee-6cef,U+6cf1,U+6cf7-6cf8,U+6cfb-6cfe,U+6d00-6d02,U+6d04,U+6d06-6d07,U+6d09-6d0a,U+6d0c,U+6d0e-6d12,U+6d18-6d1a,U+6d1f,U+6d22-6d24,U+6d27-6d28,U+6d2b,U+6d2d-6d31,U+6d33-6d3a,U+6d3c,U+6d3f,U+6d43-6d47,U+6d4a-6d4b,U+6d4e-6d4f,U+6d51-6d53,U+6d57-6d58,U+6d5a,U+6d5c,U+6d5e-6d65,U+6d67,U+6d6c-6d6d,U+6d6f-6d70,U+6d72,U+6d75,U+6d79,U+6d7c,U+6d7f,U+6d82,U+6d85,U+6d87,U+6d8e-6d8f,U+6d91-6d95,U+6d97-6d99,U+6d9b,U+6d9d,U+6d9f,U+6da1,U+6da4,U+6da6-6dac,U+6db3-6db4,U+6db7-6db8,U+6dbe-6dc0,U+6dc2,U+6dc4-6dc5,U+6dc8-6dca,U+6dcc-6dcd,U+6dcf-6dd0,U+6dd2-6dd3,U+6dd5}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-60-wght-normal-CUXov-_V.woff2) format("woff2-variations");unicode-range:U+6bc1-6bc2,U+6bcc,U+6bce,U+6bd0-6bd1,U+6bd5-6bd9,U+6bde,U+6be1,U+6bec,U+6bf3,U+6bf9,U+6bfd,U+6bff-6c00,U+6c02,U+6c05-6c06,U+6c0a,U+6c0c-6c0d,U+6c10,U+6c13,U+6c16,U+6c18-6c1a,U+6c1f,U+6c21-6c22,U+6c24,U+6c26,U+6c28-6c2a,U+6c2c,U+6c2e-6c33,U+6c35-6c37,U+6c39-6c3a,U+6c3d-6c3f,U+6c43,U+6c46,U+6c49-6c4f,U+6c54-6c55,U+6c58,U+6c5a-6c5c,U+6c5e,U+6c64-6c69,U+6c6b-6c6f,U+6c71-6c75,U+6c78-6c79,U+6c7c,U+6c7e,U+6c82,U+6c84-6c87,U+6c8c-6c8d,U+6c8f,U+6c93-6c94,U+6c98,U+6c9a,U+6c9d,U+6c9f,U+6ca2,U+6ca5-6ca8,U+6caa,U+6cac-6cb2,U+6cb4-6cb5,U+6cba,U+6cbc,U+6cc2-6cc3,U+6cc5-6cc7,U+6cd0-6cd2,U+6cd4,U+6cd6-6cd7,U+6cd9-6cda,U+6cdc}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-61-wght-normal-CWCy7dBQ.woff2) format("woff2-variations");unicode-range:U+6a35,U+6a3b,U+6a3e-6a40,U+6a47-6a48,U+6a50,U+6a52,U+6a55-6a57,U+6a5a-6a5b,U+6a5e,U+6a62,U+6a66,U+6a6a,U+6a71,U+6a79,U+6a7c,U+6a7e-6a81,U+6a84,U+6a87,U+6a89,U+6a8d-6a8e,U+6a90-6a92,U+6a97,U+6a9c,U+6a9e-6aa1,U+6aa3-6aa5,U+6aa8,U+6aab,U+6aae,U+6ab5,U+6aba,U+6abe,U+6ac2,U+6ac5-6ac6,U+6ac8-6ac9,U+6acc,U+6ad3,U+6ada-6adb,U+6add-6adf,U+6ae3,U+6ae7-6ae8,U+6aea-6aec,U+6af1,U+6af3,U+6af8,U+6afa,U+6afc,U+6b05,U+6b09,U+6b0e-6b13,U+6b17,U+6b1d-6b1e,U+6b25,U+6b2c,U+6b31,U+6b35-6b37,U+6b39,U+6b3b,U+6b40,U+6b43,U+6b46,U+6b48,U+6b53-6b55,U+6b59,U+6b5b,U+6b5f-6b60,U+6b68-6b69,U+6b6f,U+6b74,U+6b7a,U+6b7c,U+6b7f-6b84,U+6b86-6b87,U+6b89,U+6b8b,U+6b8d,U+6b91-6b93,U+6b9b,U+6b9e,U+6ba1-6ba2,U+6ba4,U+6baa-6bab,U+6bad-6bae,U+6bb2-6bb4,U+6bbb,U+6bbd}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-62-wght-normal-DPjuIv4Z.woff2) format("woff2-variations");unicode-range:U+6904,U+6906-6907,U+6909,U+690b,U+690f-6910,U+6917,U+691a-691c,U+6925,U+692a,U+692c-692d,U+6932,U+6934,U+6939,U+693c-6940,U+6942,U+6949,U+6952,U+6954-6957,U+6959,U+695b-695f,U+6961-696c,U+696e-6970,U+6973-6974,U+6976,U+6978-697a,U+697c,U+6980,U+6984-6986,U+6988-698a,U+698d-698e,U+6990-6991,U+6994,U+6996-699b,U+699e,U+69a3-69a7,U+69ab,U+69ad,U+69af,U+69b1,U+69b3,U+69b6-69b7,U+69bb-69bc,U+69bf,U+69c1,U+69c3-69c5,U+69c7,U+69ca,U+69cc,U+69ce,U+69d0-69d1,U+69d4,U+69d8-69d9,U+69db,U+69df,U+69e4,U+69e8-69ea,U+69ed-69ee,U+69f1-69f4,U+69f6,U+69f8,U+69fa-69fb,U+69ff-6a00,U+6a05,U+6a0a-6a0b,U+6a17-6a18,U+6a1b,U+6a28-6a2b,U+6a31-6a32}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-63-wght-normal-D8azYq-W.woff2) format("woff2-variations");unicode-range:U+67dc-67e0,U+67e2,U+67e4,U+67e9-67ea,U+67f0,U+67f2,U+67f6-67f8,U+67fa-67fb,U+67fe,U+6800-6805,U+6808-6809,U+680b,U+680e-680f,U+6811-6812,U+6814,U+6816,U+6818,U+681c-681e,U+6820,U+6822,U+6825,U+6827-6829,U+682b,U+682e-682f,U+6831-6834,U+683a-683b,U+683e,U+6840-6841,U+6844-6845,U+6849,U+684e,U+6853,U+6855-6856,U+685c-685d,U+685f,U+6861-6863,U+6865-6869,U+686b,U+686d,U+686f,U+6871-6872,U+6874-6875,U+6877,U+6879,U+687b-687c,U+687e,U+6880,U+6882-6883,U+6886,U+688f,U+6891-6892,U+6894,U+6896,U+6898,U+689b-689c,U+689f-68a0,U+68a2-68a3,U+68a6,U+68a9,U+68b1-68b2,U+68b4,U+68b6,U+68c0,U+68c3,U+68c6,U+68c8,U+68ca,U+68d0-68d1,U+68d3,U+68d6,U+68e1,U+68e3,U+68e6,U+68e8-68ec,U+68ef-68f1,U+68f3,U+68f6-68f7,U+68f9,U+68fb-68fd,U+6900,U+6902}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-64-wght-normal-CFXGj_qd.woff2) format("woff2-variations");unicode-range:U+66b3,U+66b5,U+66b8-66bc,U+66be,U+66c1,U+66c4,U+66c7-66c8,U+66cc,U+66cf,U+66d5,U+66d8-66db,U+66df,U+66e1-66e2,U+66e8-66e9,U+66ef,U+66f1,U+66f5,U+66f7,U+66fa,U+66fd,U+6705,U+670a,U+670f-6710,U+6713-6715,U+6718-6719,U+6720,U+6722-6727,U+6729,U+672e,U+6733,U+6736,U+6738-6739,U+673f-6740,U+6742,U+6745,U+6747-6748,U+674b-674d,U+6753,U+6755,U+6759,U+675d-675e,U+6760,U+6762-6763,U+6767-676a,U+676c,U+676e,U+6772-6777,U+677a-677c,U+6782,U+6786-6787,U+678a-678c,U+678e-678f,U+6791-6793,U+6796,U+6798-6799,U+679f-67a3,U+67a5,U+67aa-67ae,U+67b0-67b5,U+67b7-67bc,U+67c0-67c3,U+67c5-67c6,U+67c8-67ca,U+67ce,U+67d2,U+67d8-67d9,U+67db}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-65-wght-normal-C6nqnFQi.woff2) format("woff2-variations");unicode-range:U+6565,U+6567,U+656b,U+656d-656e,U+6573,U+6576,U+6579-657b,U+6581,U+6586,U+6588-6589,U+658b,U+658e,U+6593,U+6595,U+659b,U+659d,U+659f-65a1,U+65a9,U+65ab,U+65ad,U+65b2-65b3,U+65b5,U+65bb,U+65be-65bf,U+65c2-65c4,U+65c6,U+65cc,U+65ce,U+65d2,U+65d6,U+65db,U+65e1,U+65e3,U+65e7,U+65ee-65f0,U+65f2-65f4,U+65f7-65f8,U+65fc-65fd,U+6600,U+6603-6605,U+6609,U+660d,U+6610-6611,U+6619,U+661c-661e,U+6621-6622,U+6624,U+6626,U+6629,U+662b,U+6630,U+6633-6636,U+6639-663d,U+6640-6641,U+6644-6645,U+664a-664c,U+6653-6657,U+6659,U+665b,U+665d-665e,U+6661-6667,U+6669,U+666c,U+6672-6673,U+6677-6679,U+667b-667e,U+6681-6684,U+668b-6690,U+6692,U+6698,U+669d,U+669f-66a0,U+66a6-66a7,U+66aa,U+66b2}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-66-wght-normal-CABLcObE.woff2) format("woff2-variations");unicode-range:U+642b,U+642f-6430,U+6432,U+6434,U+6437,U+643a,U+643d-6444,U+6446-6447,U+644a-644b,U+644e,U+6450-6453,U+6456,U+6459,U+645b-645c,U+645e,U+6460-6461,U+6463-6465,U+6468,U+646c-646e,U+6470,U+6472-6477,U+6479,U+647b,U+647d,U+6480,U+6482,U+6485,U+648b-648c,U+6491,U+6493,U+6496-649a,U+649d,U+649f-64a0,U+64a2-64a3,U+64ac,U+64b1,U+64b3-64b4,U+64b7-64b9,U+64bb,U+64be,U+64c0,U+64c3-64c4,U+64d0,U+64d2,U+64d5,U+64d7-64d8,U+64e1-64e4,U+64e7,U+64e9,U+64ed,U+64ef-64f0,U+64f3,U+64f8,U+64fb-64fc,U+64ff,U+6504-6506,U+6509,U+6511-6512,U+6516,U+6518-6519,U+651b,U+6520-6523,U+6525-6526,U+6529,U+652b,U+652e,U+6530,U+6532,U+6534-6535,U+6537-6538,U+653a,U+653d,U+6542-6543,U+6549,U+654c-654e,U+6554-6555,U+655b,U+655d,U+6561,U+6564}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-67-wght-normal-C7UtET7V.woff2) format("woff2-variations");unicode-range:U+6312-6313,U+6319-631b,U+631d-6321,U+6323-6325,U+632d-632e,U+6332,U+6334-6339,U+633b-633c,U+633e-6340,U+6342-6346,U+634b-634c,U+634e,U+6352,U+6357,U+635a,U+635c,U+635e-635f,U+6361,U+6363,U+6365,U+6369,U+636b-636d,U+636f-6370,U+6373,U+6375-6376,U+637a-637b,U+637d,U+6381,U+6384,U+6387,U+638a,U+638d-638e,U+6390,U+6394-6397,U+639e-639f,U+63a3-63a4,U+63a6,U+63ac-63af,U+63b1-63b4,U+63b7,U+63b9-63bb,U+63bd-63be,U+63c3-63c4,U+63c8,U+63cd-63ce,U+63d1,U+63d6,U+63dc,U+63de,U+63e0,U+63e3-63e4,U+63e6,U+63e9,U+63f0,U+63f2-63f3,U+63f5-63f8,U+63fa,U+63fc-63fe,U+6400-6402,U+6405-6406,U+6409-640c,U+6410,U+6414-6415,U+6418,U+641b,U+641f-6423,U+6425-6428,U+642a}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-68-wght-normal-DU7AqVdX.woff2) format("woff2-variations");unicode-range:U+61cc-61cd,U+61d0,U+61d2,U+61de-61e0,U+61e3,U+61e6,U+61e8,U+61ed-61ee,U+61f5,U+61f9-61fa,U+61fd-61fe,U+6207,U+6209,U+620d-620e,U+6213-6215,U+6219,U+621b,U+621d-6223,U+6225-6227,U+6229,U+622b-622c,U+622e-622f,U+6231,U+6238,U+623b,U+623d-623e,U+6242-6243,U+6246,U+6248-6249,U+624c,U+6251,U+6255,U+6259-625a,U+625e,U+6260-6262,U+6265-6267,U+6269,U+626b-626c,U+6270-6273,U+6275,U+627a-627d,U+6283,U+6285-6286,U+6289,U+628c,U+628e,U+6294,U+629a-629e,U+62a0,U+62a2,U+62a6,U+62a8,U+62af,U+62b3,U+62b6,U+62ba-62bb,U+62be-62bf,U+62c2,U+62c4-62c5,U+62c8,U+62ca,U+62cf,U+62d1,U+62d5,U+62d7,U+62d9,U+62dd,U+62df-62e3,U+62e5-62e8,U+62ee,U+62f4-62fb,U+62fd,U+6300,U+6302,U+6308,U+630c-630e,U+6310}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-69-wght-normal-ChhTaUGt.woff2) format("woff2-variations");unicode-range:U+60b0-60b1,U+60b3-60b5,U+60b8,U+60bb,U+60bd-60be,U+60c0,U+60c6-60c7,U+60ca-60cb,U+60d3-60d5,U+60d7-60db,U+60dd,U+60e2-60e3,U+60e6-60f0,U+60f2,U+60f4,U+60f6,U+60fa-60fb,U+60ff-6100,U+6103,U+6106,U+610a-610b,U+610d-610e,U+6110,U+6112-6116,U+6120,U+6123-6124,U+6128-6130,U+6134,U+6136,U+613c-613f,U+6144,U+6146-6147,U+6149-614a,U+614d,U+6151-6153,U+6159-615a,U+615c-615f,U+6164-6165,U+6169-616d,U+616f,U+6171-6175,U+6177,U+617a,U+617c,U+617f-6180,U+6187,U+618a-618e,U+6192-6194,U+6199-619b,U+619f,U+61a1,U+61a7-61a8,U+61aa-61af,U+61b8,U+61ba,U+61bf,U+61c3,U+61c6,U+61ca-61cb}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-70-wght-normal-BJCVnFr4.woff2) format("woff2-variations");unicode-range:U+5f82-5f84,U+5f87,U+5f89-5f8a,U+5f8d,U+5f93,U+5f95,U+5f98-5f99,U+5f9b-5f9c,U+5fa0,U+5fa4,U+5fa6-5fa8,U+5fab-5fad,U+5fb3-5fb4,U+5fbc,U+5fc4,U+5fc6,U+5fc9,U+5fcb,U+5fce-5fd6,U+5fdc-5fdf,U+5fe1,U+5fe4,U+5fe7,U+5fea,U+5fec-5fee,U+5ff1,U+5ff3,U+5ff8,U+5ffa-5ffc,U+5fff-6000,U+6002,U+6005,U+600a,U+600d,U+600f-6010,U+6014,U+6017,U+6019-601c,U+601e,U+6020,U+6022,U+6026,U+6029,U+602b-602c,U+602e-602f,U+6031,U+6033-6035,U+6039,U+603c,U+6040-6043,U+6045,U+6047,U+604a-604c,U+604f,U+6053,U+6059-605b,U+605d,U+6060,U+6063,U+6067,U+606a-606b,U+606e,U+6072-6076,U+6078,U+607a,U+607c,U+607f-6081,U+6083,U+6086,U+608a,U+608c,U+608e,U+6092-6093,U+6095-6097,U+609b,U+609d,U+60a2,U+60a6-60a7,U+60a9-60aa,U+60ac-60ad,U+60af}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-71-wght-normal-C68sB2pX.woff2) format("woff2-variations");unicode-range:U+5e3c,U+5e40,U+5e42-5e44,U+5e47,U+5e54,U+5e57-5e5b,U+5e5e-5e5f,U+5e61-5e62,U+5e64,U+5e6a,U+5e6c,U+5e6e,U+5e75,U+5e77,U+5e7a,U+5e80-5e81,U+5e83,U+5e86,U+5e88,U+5e8b,U+5e90,U+5e92,U+5e96,U+5e99,U+5e9b,U+5e9d-5ea2,U+5ea4-5ea5,U+5eb3-5eb6,U+5eb9,U+5ebe,U+5ec3-5ec4,U+5ec6,U+5ecb-5ecd,U+5ed0-5ed2,U+5ed4-5ed5,U+5ed8-5ed9,U+5edb,U+5edd,U+5ee1,U+5ee8-5ee9,U+5eec,U+5eef-5ef0,U+5ef4-5ef5,U+5ef8,U+5efb-5efc,U+5efe,U+5f01-5f03,U+5f05,U+5f07-5f09,U+5f0b-5f0e,U+5f10-5f12,U+5f14,U+5f16,U+5f1b,U+5f1d,U+5f22,U+5f25,U+5f28-5f29,U+5f2d,U+5f2f-5f30,U+5f36,U+5f38-5f39,U+5f3c,U+5f3e,U+5f40-5f42,U+5f45-5f46,U+5f4a,U+5f50-5f52,U+5f54,U+5f56-5f58,U+5f5a-5f5e,U+5f61,U+5f63,U+5f66-5f67,U+5f6b,U+5f72-5f74,U+5f76,U+5f78,U+5f7b,U+5f7d}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-72-wght-normal-zLtu43lR.woff2) format("woff2-variations");unicode-range:U+5ce6,U+5ce8-5cea,U+5ced-5cee,U+5cf1,U+5cf4-5cf5,U+5cf8,U+5cfe-5d00,U+5d06,U+5d08,U+5d0a-5d0d,U+5d15,U+5d18,U+5d1a,U+5d1d,U+5d1f-5d22,U+5d24,U+5d26-5d28,U+5d2c-5d2e,U+5d33-5d35,U+5d3d,U+5d3f,U+5d42-5d43,U+5d46-5d47,U+5d49-5d4b,U+5d4e,U+5d52-5d53,U+5d57-5d59,U+5d5b-5d5c,U+5d65,U+5d68-5d69,U+5d6b-5d6c,U+5d6f,U+5d74-5d75,U+5d7e-5d7f,U+5d81-5d82,U+5d85-5d88,U+5d8b-5d8c,U+5d92,U+5d94,U+5d97,U+5d99,U+5d9d,U+5da0-5da2,U+5da7,U+5da9-5daa,U+5dae,U+5db2,U+5db4,U+5db7-5db8,U+5dbd,U+5dc2-5dc5,U+5dc9,U+5dcb-5dcd,U+5dd2,U+5dd6,U+5dd8,U+5ddb-5ddc,U+5de0,U+5de3,U+5de9,U+5df0,U+5df3,U+5df5,U+5df9,U+5dfb-5dfd,U+5e00-5e01,U+5e04-5e05,U+5e0a,U+5e11,U+5e14,U+5e18-5e1c,U+5e1f-5e22,U+5e27-5e28,U+5e2f-5e30,U+5e34,U+5e37,U+5e3a}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-73-wght-normal-Dx6FRt8Y.woff2) format("woff2-variations");unicode-range:U+5b84,U+5b8d,U+5b92-5b93,U+5b95-5b96,U+5b9f-5ba1,U+5ba6-5ba8,U+5baa-5bad,U+5bbd-5bbe,U+5bc0-5bc1,U+5bc3,U+5bd0-5bd1,U+5bd4-5bd8,U+5bdb-5bdd,U+5be4-5be5,U+5bef,U+5bf3,U+5bfb,U+5bfe-5bff,U+5c02-5c03,U+5c05,U+5c09,U+5c0c,U+5c10,U+5c12-5c13,U+5c15,U+5c18-5c19,U+5c1b,U+5c1d-5c1f,U+5c22,U+5c25,U+5c27-5c28,U+5c2a-5c2b,U+5c34,U+5c38,U+5c3d,U+5c42,U+5c44,U+5c47,U+5c49-5c4a,U+5c50,U+5c53,U+5c58-5c59,U+5c5b,U+5c5d,U+5c61,U+5c63,U+5c68,U+5c6d-5c6e,U+5c74,U+5c79-5c84,U+5c86,U+5c88,U+5c8a-5c8d,U+5c92-5c9c,U+5ca0,U+5ca2-5ca3,U+5ca5-5ca7,U+5cab-5cad,U+5cb5,U+5cb7,U+5cba-5cbb,U+5cc1,U+5cc8,U+5cca-5ccb,U+5cce,U+5cd2,U+5cd6,U+5cd8-5cda,U+5cdf-5ce1,U+5ce5}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-74-wght-normal-Bv7R4L9_.woff2) format("woff2-variations");unicode-range:U+5a57,U+5a5d-5a5e,U+5a60-5a62,U+5a65,U+5a67,U+5a6a,U+5a6c-5a6d,U+5a73-5a76,U+5a7a-5a7c,U+5a81-5a84,U+5a8c,U+5a90,U+5a93,U+5a96-5a97,U+5a9c,U+5a9e-5aa0,U+5aa4,U+5aa7,U+5aab-5aac,U+5aae-5aaf,U+5ab1,U+5ab4-5ab5,U+5ab8,U+5aba-5abc,U+5abe-5abf,U+5ac3-5ac4,U+5ac6-5acb,U+5acf-5ad2,U+5ad4-5adc,U+5ae0-5ae1,U+5ae3,U+5ae5-5ae6,U+5ae8,U+5aea-5aeb,U+5aee,U+5af0,U+5af2,U+5af5,U+5afa,U+5aff,U+5b01,U+5b05,U+5b08,U+5b0b,U+5b11,U+5b16-5b17,U+5b19,U+5b1b,U+5b1d,U+5b21-5b23,U+5b28,U+5b2a-5b2d,U+5b32,U+5b34,U+5b36-5b38,U+5b3e-5b40,U+5b43-5b46,U+5b4b-5b4c,U+5b51,U+5b53,U+5b59,U+5b5b-5b5c,U+5b62,U+5b65,U+5b6c-5b6e,U+5b70-5b73,U+5b75,U+5b7a-5b7b,U+5b7d,U+5b7f-5b82}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-75-wght-normal-CY_syJjm.woff2) format("woff2-variations");unicode-range:U+5910-5911,U+5914,U+5919,U+591b,U+591f,U+5923-5924,U+592c,U+5932,U+5938-593a,U+5940,U+5942,U+5944,U+594b-594c,U+594e,U+5950,U+5953,U+5956,U+5958,U+595a,U+5961,U+5966,U+5968-5969,U+596c-596d,U+5975,U+5977,U+597b-597c,U+597e,U+5980-5981,U+5986-5988,U+598a,U+598f,U+5997-5998,U+599f-59a3,U+59a6-59a7,U+59a9,U+59ab-59ac,U+59af,U+59b1-59b2,U+59b6,U+59b8,U+59ba,U+59be,U+59c1,U+59c3,U+59c7-59c9,U+59cd-59ce,U+59d2,U+59d6-59d9,U+59dd-59de,U+59e0,U+59e3-59e5,U+59e9-59eb,U+59ee,U+59f1-59f3,U+59f5-59f9,U+59fc-59fd,U+5a00,U+5a04-5a07,U+5a09,U+5a0c,U+5a11,U+5a13,U+5a16-5a17,U+5a1a,U+5a1e,U+5a20,U+5a23-5a24,U+5a29-5a2b,U+5a2d-5a2f,U+5a32-5a34,U+5a38,U+5a3c,U+5a3f-5a44,U+5a47-5a48,U+5a4a,U+5a4c-5a4d,U+5a50-5a51,U+5a53,U+5a56}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-76-wght-normal-De8sopUP.woff2) format("woff2-variations");unicode-range:U+57a9,U+57ab,U+57b5,U+57b8-57bb,U+57c2,U+57c5-57c8,U+57cc,U+57cf,U+57d2,U+57dc-57de,U+57e1-57e2,U+57e5,U+57e7,U+57ed-57ee,U+57f0,U+57f3-57f6,U+57f8,U+57fb-57fd,U+5800-5801,U+5803-5804,U+5807,U+5809-580b,U+580d-580e,U+5810-5811,U+5814-5815,U+5819,U+581d-581e,U+5820,U+5823,U+5826,U+582c-582d,U+5830,U+583a,U+583f-5841,U+5848,U+584b,U+584d,U+584f,U+5852,U+5859-585a,U+585c,U+5861,U+5864,U+5868-5869,U+586c-586d,U+5871-5872,U+5879,U+587c-5881,U+5887-5889,U+588e,U+5890-5892,U+5896-5899,U+589d,U+58a1,U+58a3,U+58a6,U+58a9,U+58ac,U+58b0-58b1,U+58bb-58bc,U+58c2,U+58c5-58c6,U+58ca,U+58cc,U+58ce,U+58d0-58d1,U+58d5,U+58d9-58da,U+58df-58e0,U+58e9,U+58ec,U+58ee,U+58f1-58f3,U+58f6-58f7,U+58fb-58fc,U+5900,U+5902,U+5906,U+5909-590c,U+590e}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-77-wght-normal-DtQ0zzNs.woff2) format("woff2-variations");unicode-range:U+567b-567c,U+5680,U+5684-5686,U+568c,U+568e-568f,U+5692-5693,U+5697-5699,U+569c,U+569e,U+56a1-56a7,U+56a9,U+56ab-56ad,U+56af,U+56b3,U+56b5-56b6,U+56b8,U+56bf-56c1,U+56c3,U+56c5,U+56c7-56c8,U+56cb-56cc,U+56d1-56d4,U+56d6-56d9,U+56dd,U+56df,U+56e1-56e5,U+56ea-56ec,U+56ee-56ef,U+56f1-56f4,U+56f7,U+56f9,U+56ff-5700,U+5703-5704,U+5706-5707,U+5709-570a,U+570c,U+570f,U+5711,U+5717,U+571c,U+5723-5724,U+5727,U+5729-572a,U+572c,U+572e-572f,U+5734-5735,U+573b,U+5741,U+574b-574d,U+574f,U+5752,U+5754,U+575a-5760,U+5763,U+5768-5769,U+576b,U+576d,U+576f-5770,U+5772-5775,U+5777,U+577b-577d,U+5780,U+5784,U+5788,U+578c,U+578e,U+5792-5793,U+5795,U+579a-579b,U+579f-57a1,U+57a4,U+57a6}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-78-wght-normal-BM2ohN5p.woff2) format("woff2-variations");unicode-range:U+555c,U+5562-5563,U+5567,U+5569,U+556b-556c,U+5570,U+5575-5579,U+557b-557c,U+557f,U+5581,U+5583,U+5586,U+5588,U+558b,U+558f,U+5591,U+5599,U+559f,U+55a1,U+55a3,U+55a5-55a6,U+55a8-55a9,U+55ab,U+55ad,U+55b0-55b1,U+55b3,U+55b6-55b7,U+55b9,U+55bc-55bd,U+55c4-55c5,U+55c7,U+55c9,U+55cc-55cd,U+55d0,U+55d2,U+55d4-55d9,U+55db,U+55dd-55df,U+55e1-55e6,U+55e9-55ea,U+55ec,U+55ee,U+55f1-55f3,U+55f5-55f7,U+55f9-55fa,U+55fe,U+5600-5602,U+5608,U+560c,U+560f,U+5612-5613,U+5615-5616,U+5618,U+561a,U+561c,U+561e,U+5620,U+5623-5625,U+5627,U+562a,U+562c-562e,U+5630-5631,U+5635-5636,U+5638-563a,U+5640,U+5642-5643,U+5649,U+564c-5650,U+5654,U+5658-565d,U+5664-5666,U+5669,U+566b,U+566d,U+566f,U+5671-5672,U+5676,U+567a}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-79-wght-normal-BTshvStA.woff2) format("woff2-variations");unicode-range:U+5447,U+5449,U+544b-544d,U+5450-5455,U+5457,U+545b-545c,U+545f-5460,U+5463-5464,U+546a-5472,U+5474,U+5476,U+5478,U+547b,U+547e-547f,U+5482-5488,U+548a,U+548d-5491,U+5494,U+5498-549d,U+54a1-54a5,U+54ab,U+54ad-54af,U+54b5,U+54b7,U+54bb-54bc,U+54be-54bf,U+54ca,U+54cc,U+54cf-54d2,U+54d4,U+54d6-54d7,U+54da,U+54de-54df,U+54e2,U+54e4,U+54e7,U+54eb,U+54f3,U+54fd,U+54ff,U+5501-5502,U+5504-5506,U+550a,U+550c,U+550e-550f,U+5511-5513,U+5516-5517,U+551a-551b,U+551e,U+5520,U+5524,U+5526-5527,U+552a,U+552c-552d,U+5530,U+5532-5533,U+5535-5536,U+553b-553c,U+553e-553f,U+5541-5542,U+5544-5545,U+5547,U+5549,U+554b,U+554d-554e,U+5550-5551,U+5553,U+5555-5557}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-80-wght-normal-B3lzDGAN.woff2) format("woff2-variations");unicode-range:U+52eb,U+52ed-52ee,U+52f0-52f2,U+52f7,U+52f9-52fa,U+5300-5302,U+530a-530b,U+530d,U+530f-5310,U+5315,U+531a,U+531c-531d,U+532d-532e,U+5331,U+5338,U+533b-533e,U+5344-5345,U+534b-534d,U+534f-5350,U+5358,U+535e-535f,U+5362-5364,U+5367,U+5369,U+536b-536c,U+536e-536f,U+5372,U+5374,U+5379-537a,U+537c-537d,U+5382,U+5385,U+5389,U+538b-538c,U+538e,U+5392-5396,U+5399,U+53a0-53a2,U+53a4-53a6,U+53a8-53a9,U+53ae,U+53b0,U+53b3-53b4,U+53b6-53b7,U+53b9,U+53bf,U+53c1,U+53c4,U+53ce-53cf,U+53d2,U+53d5,U+53d9-53da,U+53df-53e1,U+53e7-53e9,U+53f1,U+53f5-53f6,U+53f9,U+53fb-53fd,U+5400-5402,U+5405-5407,U+540f,U+5412,U+5414-5417,U+541a,U+5420-5421,U+5424-5425,U+5428-5429,U+542c-542f,U+5431-5432,U+5434,U+5437,U+543d,U+543f,U+5441,U+5444-5445}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-81-wght-normal-CdB6HoDd.woff2) format("woff2-variations");unicode-range:U+5197,U+519a-519c,U+519e,U+51a2,U+51a6-51a9,U+51ab,U+51ad-51af,U+51b1-51b6,U+51ba-51c0,U+51c3-51c5,U+51c7,U+51c9-51cb,U+51ce-51d1,U+51d4,U+51d6,U+51d9,U+51db-51dc,U+51df,U+51e4,U+51e6,U+51e9-51ea,U+51ed,U+51ef,U+51f4-51f5,U+51fc,U+51ff,U+5201-5202,U+5204-5205,U+5208,U+520b,U+520d-520e,U+5213,U+5215-5216,U+5218,U+521a,U+5220,U+5223,U+5226-5228,U+5232-5234,U+5239,U+523c,U+5241-5242,U+5244,U+5249,U+524c,U+5251-5252,U+5255,U+5257,U+525c,U+525e,U+5261,U+5263-5265,U+526e,U+5270,U+5273-5274,U+5277,U+527d,U+527f,U+5281-5282,U+5284,U+528a,U+528c,U+528f,U+5292-5294,U+529d,U+52a6,U+52ac-52ad,U+52b1-52b5,U+52b9,U+52bb-52bc,U+52be-52c0,U+52c5,U+52cb,U+52cd,U+52d0-52d1,U+52d6-52d7,U+52db,U+52e0,U+52e3,U+52e6-52e7}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-82-wght-normal-_Ir9Q2vB.woff2) format("woff2-variations");unicode-range:U+5040-5041,U+5043,U+5045-5046,U+5048,U+504a-504e,U+5051-5053,U+505d-5060,U+5063,U+506a,U+506f-5072,U+5078,U+507a-507b,U+507f-5080,U+5088-5089,U+508b-508c,U+508e,U+5092,U+5095-5096,U+509a-509d,U+50a3,U+50a5,U+50a8,U+50af,U+50b1,U+50b4,U+50ba,U+50c2,U+50c6-50ca,U+50cd-50ce,U+50d6,U+50d9,U+50dd-50df,U+50e1,U+50e3,U+50e5-50e6,U+50e8-50ea,U+50ec-50f0,U+50f3,U+50fb,U+50fe,U+5101-5102,U+5105-5109,U+510b-510e,U+5110,U+5113-5115,U+5117,U+511a-511c,U+511e,U+5120-5121,U+5125,U+512b,U+5131,U+5134-5135,U+5138-513c,U+5140,U+514e,U+5150-5151,U+5155-5157,U+515a,U+515f,U+5162,U+516a,U+516e,U+5172,U+5174,U+5179,U+517b,U+517d,U+5182,U+5186,U+5188-5189,U+518b,U+518f,U+5191,U+5193,U+5195-5196}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-83-wght-normal-BKaoQorn.woff2) format("woff2-variations");unicode-range:U+4f2d,U+4f31-4f32,U+4f35,U+4f37,U+4f39,U+4f3b,U+4f3e,U+4f41-4f43,U+4f47,U+4f49,U+4f4c,U+4f52,U+4f57-4f58,U+4f5a,U+4f5d-4f5f,U+4f61,U+4f63-4f64,U+4f67,U+4f6a,U+4f6e-4f6f,U+4f72,U+4f74,U+4f76-4f7b,U+4f7d-4f7e,U+4f80-4f82,U+4f84,U+4f89-4f8a,U+4f8e-4f94,U+4f96-4f98,U+4f9a,U+4f9e,U+4fa0-4fa3,U+4fa5-4fa8,U+4faa-4fac,U+4fb2-4fb3,U+4fb7-4fba,U+4fc0-4fc1,U+4fc5-4fc7,U+4fcb,U+4fcd-4fce,U+4fd1,U+4fd3-4fd4,U+4fd8-4fdc,U+4fdf,U+4fe2-4fe5,U+4fe8-4fea,U+4fec-4fed,U+4ff3-4ff6,U+4ff8-4ffa,U+4ffd,U+5000,U+5002,U+5005,U+5008,U+500c,U+500f,U+5013-5015,U+501b-501c,U+501e,U+5022-5025,U+5027-5028,U+502c-502e,U+5030-5032,U+5036,U+503a-503b,U+503e}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-84-wght-normal-D9L0JLly.woff2) format("woff2-variations");unicode-range:U+3f97,U+4102,U+411b,U+4181,U+43c8,U+4552,U+4576,U+46e5,U+4837,U+493d,U+4a3b,U+4d09,U+4db6-4dbf,U+4e02,U+4e04-4e05,U+4e0c,U+4e0f-4e10,U+4e15,U+4e17,U+4e1b,U+4e21-4e22,U+4e25,U+4e27,U+4e31,U+4e34,U+4e36-4e37,U+4e3d,U+4e3f-4e42,U+4e44,U+4e47,U+4e49,U+4e4c,U+4e52-4e54,U+4e57,U+4e5a-4e5b,U+4e60-4e61,U+4e69,U+4e6d,U+4e78,U+4e80-4e81,U+4e85,U+4e87,U+4e89-4e8a,U+4e8d,U+4e8f,U+4e93,U+4e96,U+4e98-4e99,U+4e9c,U+4e9f-4ea0,U+4ea2,U+4ea5,U+4ea9,U+4eb0,U+4eb2-4eb3,U+4eb5-4eb7,U+4eb9,U+4ebb-4ebc,U+4ebf,U+4ec2-4ec6,U+4ec8-4ec9,U+4ecf,U+4ed1,U+4ed3,U+4edc-4ee1,U+4ee7-4eeb,U+4eee-4eef,U+4ef1,U+4ef3-4ef5,U+4efa,U+4efc,U+4f00,U+4f02-4f03,U+4f05,U+4f07-4f09,U+4f0b,U+4f0e,U+4f15,U+4f17,U+4f1d-4f1f,U+4f22,U+4f24,U+4f29-4f2b}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-85-wght-normal-D6VRmOzr.woff2) format("woff2-variations");unicode-range:U+3052,U+305c,U+3062,U+306d,U+307a,U+307c,U+3080,U+308e,U+3090-3091,U+3099-309e,U+30a5,U+30c2,U+30c5,U+30ee,U+30f0-30f2,U+30f4-30f6,U+30fd-30fe,U+3105-3106,U+3108,U+310a-310b,U+310d-3112,U+3115-3117,U+3119,U+3131,U+3134,U+3137,U+3139,U+3141-3142,U+3145,U+3147-3148,U+314b,U+314d-314f,U+3153,U+315c,U+3160-3161,U+3163-3164,U+3181,U+318d,U+3192-3193,U+3196-3198,U+319d-319f,U+3220-3226,U+3231,U+3268,U+3281,U+328b,U+3291-3292,U+3295-3297,U+3299,U+329d,U+329f,U+32a3-32a4,U+32d6,U+32e1,U+3314,U+3322,U+337f,U+338e-338f,U+339c-339e,U+33a1,U+33c4,U+33d1-33d2,U+3440,U+3449,U+3479,U+3551,U+3569,U+35ad,U+35ce,U+36ac,U+373a,U+3863,U+38ec,U+39b8,U+3a02,U+3a17,U+3a52,U+3b22,U+3bd7,U+3bff,U+3ca5,U+3d68,U+3ddb,U+3de7,U+3deb,U+3e03,U+3e74,U+3f08,U+3f0e,U+3f21}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-86-wght-normal-Cq_w8Em-.woff2) format("woff2-variations");unicode-range:U+2748-274f,U+2752-275b,U+275d-275e,U+2761,U+2763,U+2765-2769,U+276e-276f,U+2771,U+2776-277e,U+2780-2782,U+278a-278c,U+2794-2796,U+2798-2799,U+279c-27a6,U+27a8-27ab,U+27ad,U+27af-27b0,U+27b2-27b3,U+27b7-27b9,U+27bc-27bd,U+27bf,U+27e9-27eb,U+27f5-27f6,U+2800,U+28ec,U+2922,U+2934-2935,U+29bf,U+2a2f,U+2b05-2b07,U+2b1b,U+2b50,U+2b55,U+2cf5,U+2e1c-2e1d,U+2f00,U+2f08,U+2f12,U+2f24,U+2f29,U+2f2f,U+2f3c,U+2f3f,U+2f42,U+2f45,U+2f63-2f64,U+2f83,U+2f8f,U+3003-3007,U+3012-3013,U+3016-3019,U+3020-3025,U+3030,U+303d,U+3041,U+3043,U+3045,U+3047,U+3049}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-87-wght-normal-Yrph325E.woff2) format("woff2-variations");unicode-range:U+2649-2656,U+2658-265c,U+265e-2660,U+2662-2664,U+2666-2669,U+266b-266f,U+267b,U+2692-2696,U+2698,U+269b-269c,U+26a0-26a1,U+26a3-26a5,U+26aa-26ac,U+26bd-26be,U+26c4-26c5,U+26c8,U+26d1,U+26d3-26d4,U+26e4,U+26e9-26ea,U+26f0-26f5,U+26f9-26fa,U+26fd,U+2701-2702,U+2704-2706,U+2708,U+270a-2712,U+2714,U+2716-2727,U+2729-273e,U+2740-2747}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-88-wght-normal-qM37cYHV.woff2) format("woff2-variations");unicode-range:U+2566-2570,U+2572,U+2574,U+2579,U+2580-258a,U+258c-2595,U+2597,U+25a1,U+25a3-25a4,U+25a6-25ac,U+25b0,U+25b4,U+25b7-25b9,U+25bb,U+25bd,U+25bf-25c2,U+25c7-25ca,U+25cc-25cd,U+25d0-25d9,U+25dc-25e6,U+25ea-25eb,U+25ef,U+25fb-25fe,U+2600-2604,U+2607,U+2609-260b,U+260d-2615,U+2618,U+261a-2623,U+262a,U+262d-2630,U+2638-263e,U+2641-2642,U+2648}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-89-wght-normal-DQgsOy-T.woff2) format("woff2-variations");unicode-range:U+2475-2481,U+2488-2491,U+24b6-24c5,U+24c7-24ca,U+24cc,U+24ce,U+24d0-24df,U+24e1-24ea,U+24f5,U+24ff,U+2501,U+2503-250d,U+250f-2511,U+2513-2515,U+2517-2518,U+251b-251d,U+2520,U+2523-2524,U+2528,U+252b-252c,U+252f,U+2533-2534,U+2537,U+253b-253c,U+2541,U+2543-2545,U+254b,U+2550-2565}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-90-wght-normal-BLG28ssT.woff2) format("woff2-variations");unicode-range:U+2139,U+2153,U+2194-2197,U+2199,U+219d-219e,U+21a0,U+21a9-21aa,U+21ac,U+21af-21b1,U+21b3-21b5,U+21ba-21bb,U+21c4,U+21ca,U+21cc,U+21d0,U+21d2-21d4,U+21d8,U+21dd,U+21e2-21e9,U+2200,U+2202,U+2205-2208,U+220e-220f,U+2211-2212,U+2215,U+2217-221a,U+221d-2220,U+2225,U+2227-222b,U+222e,U+2234-2237,U+223c-223d,U+2248,U+2256,U+2260-2261,U+2264-2265,U+226a-226b,U+226e-226f,U+2282-2283,U+2295-2296,U+2299,U+22a5,U+22b0-22b1,U+22b9,U+22bf,U+22c5-22c6,U+22c8,U+22d0-22d1,U+22ee,U+2312-2313,U+2318,U+231a-231b,U+2323,U+2328,U+239d,U+23a0,U+23af,U+23e4,U+23e9-23ea,U+23ec,U+23f0-23f3,U+23fa,U+2445,U+2460-2471,U+2474}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-91-wght-normal-Dcrjozns.woff2) format("woff2-variations");unicode-range:U+1ec0-1ec3,U+1ec5-1ec6,U+1ec9,U+1ecb-1ecd,U+1ecf-1ed1,U+1ed3-1ed5,U+1ed7-1edd,U+1edf,U+1ee1,U+1ee3-1ee7,U+1ee9,U+1eeb,U+1eed,U+1eef-1ef1,U+1ef3,U+1ef7,U+1ef9,U+1f62,U+1fa2,U+2001-2006,U+2009-200a,U+200c-200d,U+200f-2012,U+2015-2016,U+201a,U+201e,U+2020-2021,U+2023-2025,U+2028,U+202a-202d,U+202f-2030,U+2032-2033,U+2035,U+2038,U+203e-203f,U+2042-2044,U+2049,U+204d-204e,U+2060-2061,U+2063,U+2070,U+2074-207b,U+207d-2083,U+208a,U+208d-208e,U+20a1,U+20a4,U+20a6,U+20a8-20ab,U+20ad-20ae,U+20b1-20b3,U+20b5,U+20b8-20ba,U+20bd,U+20dd,U+20e3,U+2105,U+2109,U+2112-2113,U+2115-2117,U+2120-2121,U+2126,U+212b}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(data:font/woff2;base64,d09GMgABAAAAAA4AABcAAAAAJXQAAA2MAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGYIKGjYbgwoccj9IVkFSgQQGYD9TVEFUgR4nKgCBFC9sEQgKnDSWUgs2ADCVeAE2AiQDaAQgBYYwByAMBxckGDYbzCAojtFL570kScqUKXqEJLM8/L8d7+9zZ/ICuoTYSZoJVGWlTg9XYi18qAK7rF/++YG2+e+4E5EjSkDiOCzKGiAm7kgrAROHiYX2snU/Ov1R5cT5o/ipy3b831pq5x9uooAVT0ogVIBsPYHQmzmc23fdK8ElW94rBgC2gKCI3BaAFKMwZcWga1RfpKwwMkIWysnQT6rvxoBrJRUIW5dayKK3iSK6CFjEtRxn7D6e91e1gOjHAv7ySo4+0V3RALmr1o8NQuq6se4BSF0fCPVB7qZAKAC5mwMTIUhFB8hgtBJtQqADJBgxnn4siHXQbBaCUNlCQjFaNEqVGEQS4eUEUe2DZgUuKaMAyKp3bwBHvqGzpyOlE/9rYRtjw0MhQIBW2rUBmn+AX9sT7TMWZQYok7YZBGjnp6Kv9v3vF1cwoW9aUE+hMoLhpypT1akKzLjsHnBT91gIGEAAAUN3aAaaBzlBgDdq0JOXtqsvqnNeQjXvMdM61Tl3tY3quDsWXoVdi1prgqCROtcquKyuTErKHIJ4pBTDxEArnqZNtilVIz1pJH56w8eHyTZVBmCDHJ4VmqOSWxDEwpIGEpiiGAVaPbF5uHOwVCMUCas4OocghP5dWjDxOdlKalxTjatrHmkCIMDUYWWVUaqOujYE5614tzbZplTpmt4Z2CDcf54twmoxIJ2nNQKYYW03loIxXACpPg1M811A5rKNm2ivBgrZ6T10JLoP5GcRco0AiQUgdab9BnRBh1AnRCHu0nVA29cbnEAQAM0Q9Czc6vj1m4IANNUFbvhFffjCtQGSBlnBhBY3AqTHDgmNkLPKuzGtUdrE0bspSno1Q3cRnLbnMMExNcEcJQLRISlI/yMh6ZssWPUPW3YSAnsLKKmemG1ahgfFkujBTvPEHyaeIl4gXiJmiVeJ14k3ibeJ96JRoItLo48Sz6B35aKRKhDpinRGOiLlpV4TaY/4I22R1khLpBkQhqSDm6BBGLYw2GWgi9R0FAeLugjzJmHTApqJBuSbiYaEx21GI4D4CqIxgPi0SYHHqKlT1sXeDICvs0OqKDQGaAcwEFgA8t0ANX2HMFFQi6YJaOQxNdqdlqMkprPodA7GMuIJDIzAz8IWcImikhdgkafj7naCDPHa8yTZnaVgfBHvUstYDIxO98Ty6f29nO7u2HXcnh56r68ZwaFx9vTTyPZn8JmnYNuVdi+CQ0P9j7c4gPcxmw8d8jLD4YbGFoQNje4luAj+dk+8fSb6yiJ/9dN3PYkbbxR/aH87H+6RepkevU/nmT70EbJ90ffAoYPM6bBW/8TXi/jMwgKkel7mO+GqmcVqJBwOQ/HZ37SUgZtug9fgIaq0WHWk4K0VugDFlTdiEJAYe0bwTX/1Vl+8U5p6z+x4Br98E5+5R55y571Ptlu6vpPK6TduIO0UNKwX+PV1/ruXZZr7FvCZRVXKnS9+402V0dY+nW9EQnPXS9/iM9/PylPuDYe9+iCkyytK6bvX1F/LKyDhgrlrznleXhqZKqqF0nVS0ECnH7J9cTGEUBQi1n+kG2QMCU+Ge9jbDzGnf9HZxrdMVOWXZfbs1jv9HmxU96Ii9Z7Z983vaj/4zKwq5c4H38Fj2MBKH9INo7XIUiK7au0SuXSDwnrnprYPV9Go+7hlk9mN2Rj1wYYn6G/uFPfhc77i7hGJ93B5e8SiPdDRnn6PI80Rc89o7MeW7tDuAU8LanRBe/vLYptmSujALpt2avNJuPPlMoR0kg/M87KFfDOP6+QLXQ1ejTfQ/ZdmpHL9i0p4oJ9C8fGrjRLFMU/3NZF5D53uLcMGWY7egSfhpwY6p/J+Y+NjzS8JZYKayZzcJsMtCvyGMomhyG1RNFk8BOZCR9as4mU2pRW8O4rvScuj0q2uVWjHPxNdquMF9M+YBxvhUr2bH0PwL+hj+fofrR0uNqQh7s7xpzevK6oOQ/FPT8WLZDtHKl+yE1rpAzY0VQLp3r0XRbLgqOxFe6JWen1d8P1VFqrFnyUIl7UvyR5OTqRfmQN45TJppHrkLZvUWzed3jyEQfKsflVBvyI5uf1B9fJK2jdch228jn5LKdcl5Du5vKH65fQAK+una9ZPmnPsOTkWe/Mn6dd+yu1U9YRuR/R/a9Sf6zCRZfb56mNBnS54bPW8UV1mN5X2GpvWvxZcTO0NTL7mypW/2apC05/1CWVf/qmErV0UCR/eEufQ5jP/5ISrnszLfaMorDn7t+T2wRP75pTK9SozYPOu4XCbDA3sQzZqg9eW3E2V1KSkWRtzsgarGHzZDpdxsKWoKN2VsHBtrlQVYwwMNPWVZdYas/2v5cMgc/Rnv/7v501f2pQgk72ohBv7KRSfvAp1JLiIfNFASlXvKQ6q2MEk1Yv6rJ08c45Y6YPQlz3qgFo7V1M3qBY8wp5PU5p6Bt6AjgtzPaIbrBkBvJ0+bNPJAGYC1JbCod9t3nE51IgfuRX5g5ZJ89MeoR1E5WgX+jrGxfzY7djBGGlMboyXgm0BDDFAIa7ceQuM8qnZ1fMU7Gq8JWglruJDWFu3HE0rbCiZNZ8olZ/URKM6R6sddhWryloduuhOAC4d4PLpbo+Nfhc8ar+dEYegsFRQCLKdig6hb8XHv2UrBo0oQwquw49/5yjY06FvgStJ1Ggy8uxbZLKiIh17GR+2zh08LDd4y22IULhd+uHr783Ovvv6h3D1LfFT33yzFJVmq580uvSKCl8JGV4XgYNHz1DdygWmqbqmC5UIG1bx6nALslOU/Djc5cxL0xFc5k6kz4Tm5NGegEGnHalt3ZhsF1FaLEqEwZBRFkYC4+KA/88cPYbMb3Pffhe5wk8S/LeKMrnG3S75o//+vXQxN/n03ByrbpTTrVCeXfKWq1WqrbUOCvYU4C4l0SiPVKp0GuHf71HdD98kZ2YZflv0/OPbZWfOnIsGg/WFP/9xmq+vCvLyrdZ8HooqKU8GnSb565O/aR6YxQkj0Tt4Gbz/Dff4xW70FA4dbcfodP4S2lrqXOSoLvc54Tq3FPH70yi9iJMOJDFnparFIjG1Wp+WKBFFhANjdxhVob62JI9s9qIKB+wwU8x+tqXn5SOTcqDM+ip7oVGf1txUXm7NTMcGd0TvmI++SEwYzPm5FhojSa9Vi+LwmFiGNU+X8BF+OmM2J7p4Ua83pOFvyi7oGmGGQ6mC3e2ODP0A4T0yhdejuqyzP23wq0uc5CMjxWEIYhKnTk122DZ2RnMg/rrQ15E9BFwJv+MDHYe1jH4e7fASN2vR6SzMSITZnjEBsh8FHcmOrgzOz9XJExSeepepmBbXlmRis2M5yVmmCrZjykrmxLI11Vvr1djbJ/XnnioevbySn2fSqsRMDLM5C/VWLD4Af5nlcgmRWUDVBXjj11EFmYREXhyk4BZtJwBXs6X9pitQtKmDMXmfPAtfWV5mLZ+/xNBZ8zX5RiXGqGXt19reUlW62pK3ccNgq69stVXOaHziQBIcw6xWg0oEtBEFZs3kHcS3XFxRFUQ1vtuRJQ8v2yzHPzHdQnkEypKeuBM0Gp1e/lnGvI4QMzSQqqezlTJoUI/l27ht2OnIN6iE6JUrugk3pdtii1Gn8drN0TxAx2aHKmERgB7ffp04lxKfQ/jSdMrFYVOrxzeOVJlTZXJ3bvzI3BxNbmwaEV88hM9FsdGzGyO4ysxoFONK5ElaA/5yFuvq3y5IUU/9/mYOEs3JOf/JpP4ST3UIjfGgqMLl84f/pLrlv49I86zrOZ0DrtIU+YDcfFMqKZMkBHvrsrVKLjM67IjymF80zhcIpMmmwoLDy1dEhEwq5dMvHDtB2TLiwVVacYgCAf3cMtVxZMr8Mrelrm+kKS0qULIFiMCSue0fS/n5U1PFxQ+2fFM8/EOZi8tmNZgpPzjLbWKh8IEHLJYPP5ychN1P4aMidPSHHbGpfUuPm7YrcIQOywdg1fng8RIet/psNJYVgmsNUtC/uF+7tZ1beI6BokuAH++kXAL8cvH1H6+qr/yHj8UKANSgAQTIz177E9S/32FWLs0EEObU2mVLsNqvRHMIxBS0piLAP+xSsFtqg9T+wKSKz7y5UNDDCCFwXfygduk58E0imAO1cF4GyeMAXIr7b2BEYmzCNJwIYRQVGVLMEcfo9wmmIzyOOczGgvkY+tMgCLD4Veg4KVNhHETKMAuYKJ6NihXmAIsZc4EnGfOAQYH5IMAk9tmB8QYFdBrgss6EMQF2wwZ1WRnrdRvSdxMqocsxaUiFlusVNAFS+EGCT/cN1wZBZehIJozIlynTuE5j+oyIlWuGcTpYrsawMb0yVXOrUGXYhGH1AkLGNXBIhx3s1W3M/9iHhZCMMmTJYpauhFGBIAjX6USnrFxFMwprmpsphwQM6HalPWlfpxuMZge1PJe3yGKCfx4K2DjZVSvAaHCn1c7pUqdbr0nm+TFvntQcqbXkYK1OOjw9s6wiRWxqtINk0xVcB96Rabnl1lYJGQKOXAYHdKjh0ElDOmWfCUEkMm6cR25K3J4kN1swMbhKwFCcxBr1hk12nXSm0MiAMq2qdjLa2/2I7r6DXQdIE0C+XmPNBL7RhpV1IwNNQ/uSbYfrTbq7erd6THLtTG6jIq7mTaq2AAOjOqoVXzRAsZ6WBQAAAAA=) format("woff2-variations");unicode-range:U+11af,U+11b7,U+11bc,U+121b,U+122d,U+129b,U+12a0,U+13a6,U+13a9,U+13ac,U+13af,U+13b3,U+13c2,U+13e3,U+141b,U+1555,U+1557,U+15dc,U+15e8,U+1780-1782,U+1784-1785,U+1787,U+178a,U+178e-1791,U+1793-179c,U+179f,U+17a2,U+17b6-17b9,U+17bb-17bc,U+17bf-17c7,U+17c9,U+17cb,U+17d0,U+17d2,U+17db,U+1871,U+18fa,U+1bff,U+1d00,U+1d04-1d05,U+1d07,U+1d0a-1d0b,U+1d0d,U+1d0f,U+1d17-1d18,U+1d1b-1d1c,U+1d20-1d22,U+1d25,U+1d2c,U+1d2e,U+1d30-1d31,U+1d33-1d3a,U+1d3c,U+1d3e-1d42,U+1d52,U+1d55,U+1d5b,U+1d5e,U+1d9c,U+1da0,U+1dc4-1dc5,U+1e3b,U+1e43,U+1e45,U+1e47,U+1e63,U+1e6d,U+1e73,U+1ea0,U+1ea2,U+1ea4-1ea9,U+1eab-1eaf,U+1eb1,U+1eb3,U+1eb5,U+1eb7,U+1eb9,U+1ebb,U+1ebd-1ebe}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(data:font/woff2;base64,d09GMgABAAAAAAZ4ABcAAAAADZwAAAYIAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGYIKGhYbgRgcgSI/SFZBUlQGYD9TVEFUgR4nKgBkL2wRCAqDMIIvCxYAMIJoATYCJAMoBCAFhjAHIAwHFyQYFht3CygeB7lJ80rMGL7AEQ/P11X9ue9FRlVlZIEN5fRAyjG5gnYSdsT/41XD4ZNrby8FwhQRlijbyeb/tgesUOjj8YCO1Al9408o7EGCvZBXY63+vkfRqPvSCFG0VEp78cOluvcbQvqhJEI090zCQzILienYKmcgWo9xtnFq9vh3+q9aCMdKwl8+USg333JxE72HncNdVB91quag+uhDmIXe4w5hEnqPP0QwVIsBWWEZ5a4pEQOSwpg0tiThbJH5aUeLtCaGzRF2NdXKNW1Z0sZH1FfLeX0xiIvJ9asWkFMcc5guMy3+a+FScN9jIBhD0JIQ/D4JEXSMQqAFCF2SLAs0bWD+BPyvZlVzqguj4LP6ezruCM4Qh0AoJIRuyTImwXpaRcjKtJAgmyDRgBwR6qS7E0EZrFuA7Lv1JpWgMSLPYNdsp8r5+JMUFwU/pZqMrDPrFdtlgTgFMNhEMQKhWygRVsPhYZWsPBWmgxEAZM3vzHK7ewSWQdDSFAL0ODdC6RWFGzVwkb90uGjStWlvsJ3oNg7UHltAqhIOnV2hTTYfX8Eomlv55PpqiqujffBQdEGalr5HW4wQugVGxGOyiLOOMgUJDClRr9u0dcdsYQQMUkFAVD6wTKcVK4CMJMXNpFeArL6YQdif9gZ6AMTB3AbZUL78DyN0v+ENMCBhwxFZ542XN6ut4stVtP3TMQokZIyIFBgRZWcwIE0kpnuSPkx/5yJ35VZdo21/2Prn+pCF6y+cuDAttGCBUPYVGBAhjIjXfbEuAFRwOOTLIXqiicMhKnxAtIgVIHqJm4k+YgbRT9obYiDrNAYhtyGG4PQ/d9S1ftAEI2AQ7A+uBBSgwSsDkZKKXKrKVlkW5tY6lnt0DZbHHpVyxBGxZ/cfeWTMUXvtk8reu99/KC55uLruQRc/cNCepLJ7leQcl6x1UPYEe1apeWD0Ou66t6fe+9Za174x4fY3z2ruvW/CPn1aPOz8V/uPmyZveNv5B3zZZK+27Nv7nZ+bDK7V2IdzX83fb7nkliPv+6j/ypGxK/sHrhwbudKhk8o7N1ths8adp3SJ6BU3o/2w5ovnTT3Pj+ObU5sDs6bNmebeXYs1F9Nw99Jf8O7Jy7zf3/eU8uP2S2u+sebU748l3zwOo7TzfgOBEFhOAlgB0GVJExbsOBW45Z6OW6FbAxfrueQyW8+rgTS0YFbHvf4Ljx6auqBUTN1w/wvHcogrlzR3fmfKlHd2rutlN9t/HPfS5vL+m9XVjCCY7P9Mb8d5B07hhWtcFj2R/XFxJ+KSTn1Cfml09KVNhD1ndOwMXdFXZUf8//6nZjxNihwppTxl/GYf5fXfLRd6lSUpysTXS8eepX2xk0GVekfHRquY8/dff85X/fTzf3Ma6O9vzPn351lg4D6N3Z6yw1PpskZRXNhovKSdOUVxJ84/qLVXrnV5VFH6M4LCYC+vLnFfxF7SHJ+IywikKB/qrH/vQf0bzOzO+Q/47okl58KPtz7/1YLN/191atcQKCUQFFcv+onqBYS/cG4TiHJtmvkPh/tJDJPiTIf5j1gr7e0z9cGX2MH7OAia6VF7AQINNuK3LIoe3BX3WDBMj/Mx6YsTMevESnQBYsOxvmNpqlfYZw1cOyjOsRUitBxIvnvoJmFlxDy2NHWwV1+ciH1a1sB+AypxQJzJOChDgkUuj025JArHlAsCJxnnc6lZ1Q0aj2WFJVBzQjyLVMVgEkaheLJ2aBbhJpPFehfO9GvRIqDgLKtbkLBZsF2uZj7O0GLFtEXLfIJvg4QJbJrQNG7eNg3vP34fQ7Vr1qpVpyaz2g0wRyEK5A7nrDZ3s0hp08vGHolDayjoNBe00dxdDWG3Lu9WHeNfhwFjJo1bMaDRjk9nxbgp6zSGEJeE946iOaE5j+bVUtTpSWvVdlIW6W7Pc6gxKgtlWmO1l5acV1nNJJA0XwK3B+TUaUTzshbBRJWR4DKS8M1No6YvFoi8ZRJvnhdWY4MvhFNoajSLBGpWU+7GC1Ff8URxgxhAZixqUb1Q777w7OpUEAAg8h/kkz3et/Xecl5bxgsA) format("woff2-variations");unicode-range:U+2c8-2c9,U+2cc-2cd,U+2d0,U+2d8,U+2da,U+2dc,U+2e1-2e3,U+2e7,U+2eb,U+2ee,U+2f1-2ff,U+302-304,U+306-309,U+30c-30d,U+311,U+31b,U+321,U+323-325,U+328-329,U+32b-32c,U+32e-32f,U+331-33a,U+33c-33f,U+348,U+353,U+358-359,U+35c,U+35e-35f,U+361,U+363,U+367-368,U+36c,U+36f,U+530-535,U+537-540,U+55e,U+561-565,U+568-56d,U+56f-576,U+578-582,U+584,U+5a1,U+5a3-5a4,U+5aa,U+5ae,U+5b0-5b4}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(data:font/woff2;base64,d09GMgABAAAAAAvsABcAAAAAF3AAAAt6AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGYIKGjsbg04cgSg/SFZBUmwGYD9TVEFUgR4nKgCBFC9sEQgKi3yJKAsmADCKCAE2AiQDSAQgBYYwByAMBxckGCYbaRRR1E1OaggAPxIyNy81K1TKzJFFdrezIh6JT0k+PG2r9/8MCAPSFtZYDVg15FYI4toYDWIUenuw2xcVXmZ5FdvuDUE1xvb+UYmaEo2QxSS5JlIkijZCpBQiQ+Tbvx+g519zb3ZfgdRPMZW0M5FthQI0tlNjMtvZHyoQpTE7PwXiO3aADin/gNGePw0oXOUZfVqcPJP9T7lnmVSuBEKw6t/2VzUIYoQS8IvXsaR9ro1uVM0sTI4he2GyfxTZi77AMKpWfAEfqlZ90wFkkwIABitXuiUppACAYsXSGKFEzGPyfYYwygUEakhpkS09jGeg6QmQcgCTay3M5ASY8oQO0Nml3oGedfL0f7VwhslxfwAEECucEg0h8EPHNxAQCEAwdMgwIlQ5QDLiSrsym0LRpN/bApw66zsZe7Zrtnu2C2t/6u210j8ZgAxSVlIsCiBkaCjhANJPyhBFjv5VxPejWFyJXATavrHaxT/9iSkGxQKklBhqahwAYQDISYh0AgSl0qJKlBEMcxIEkCGzEvNBEgYAJIsiQzqjAW7TCanraUSG17p5cPPqwhSh86zRlPbM6njvGIx/7msxDFsR2bLT+jWcSinjic6+RnQgWdHpvSkOpaH1aUmNAIB8kAzUCJbuVdz+eq5qSpUBVUeVkq63Z5YLBcFWG5XaxN+6WaVGADAfLEL38quz+SN9JEDvUguADfELknFYwgnQegpKzngn1j7bFgj49FIOigeAvQm+W0eiAID20C8AfI812SE0kAOSPvj24NA0IQB0UuSr4LJdpxGzCADQ6gMQAEg9Xta5BlIIzECKxjlAX/Ormsh/CGqmLZNb7IJaGT6wjdnDgJB9YsA70uB6DTDsxyP+j1/GtwnmH4EAAAUwAAOmT2WssPwZajCU0l0Td8Xb8W68H5/G53GMbqM++lh6qYgAeIuVWfym+HiUK1OqWBFtj3Zb7lwjiMDQoMj4qrKx9UZfWR/00ACpJVwaGUsVUksagJMDaQTI/djlAlJLmoFTLmkZWTJeuYB4kTZ6ejFSRKgBgA4AZAKygXwB3binEoAkg3IIg2JdqSvRKVLBkFOpUirVxLMyrUYWg2alMkbJSheWV6eppNKY7c15orTSkcUNqvr7o+bVAwPSQW8rUaDFfdqtJHKb4vRbEL65q5ko4FZ838xc/kOP3UUil8XWXnolwk+/PHTah3Qmwiho+IMPFKd/9JEqvw/nComC7Wwu8Ci8eW6fXTaJ5Is28gek4KRuNpYjGdncaVBQOKMLyJPmg3iTm7b9zXLN3OPvdxq4h4Y0ebJCH4XXwUa7eJsLPB4HLRKFR/FUc1tAOSbSzNyt9GtwR9hqRYaChi/Vmi+OS7jgAtTeSbjH+1XVyDy5yf1FSmsKHqk6mxCDDM6Bfd+UDb/fWsa8yLW0cjvmYiVdp91pfyy1eQ8/DXPDxRfPw8hGlr1zK/zK2Un1lyx1PBNptuQ917YkoipblggIPcF84cpy3bzqVfU+Q+w+tWZfrGEfehKll9sL7ZLLJ6K+s4vseNlY/8QR50ctSdGBpfRz9+hzSIHy3UJ3gr0xN+B+MevJ3qpgW1FZRXtRdbD3ycwX3TkXdzZ6EjCszlSnzUSuti6eyZ4uZQ5fjUxl44jQGPLuaFxcH6LEnSm4MgdtXiE0LHxd1VJXOrZ2Xam/pb5KZ+st/nVrLWPpVtm+yNXW0JmSxTOtysPjf+W2Tb7Bpswt3hq33by1Qn5apjqV2UFP8VTl7ApfbbZcIzb0bUmn4ob7tP1ets+btjiMT6kcKs2NrIHPXepctVoftZvFs9cVPFLPSN/QcmegYtHBf2ZYnSJpogc8lZXbNvUMNGVu9tZ4HOatpfrzX5u9+MYHz7kZBqXN11Ae2uERlkbsgmlt2iaazn+quZtjg8FA97NcwjNmCq/ZVOwuudWxvJHPq2yxlgYca/PHttUhEZU7UlqTlrYZC9wen+dU0lJaafPVl897GzP7rC53psm0hq+jAm9vHw32p/pxq37AhtJRx0jnLvBTJv7R8qfLU74YgfQ19QlG0vUTfFXxlkVDUW1JZWjhRk4VNOht6DnnboGkNC5ao32fQGp18eYlRDa5trjy4Gk3cNGRNr0dAAACIAighg4A1AGAKFnsZp3mMV9HMmkm8+Se+CNOUBnNpS46ICAckJEAwuSn5ylgsaZtq4eF7WneOVSfskp8ytt33k47Qqfc1ueTk5/fWsQ8e7sNe/bd5XZ7nrhbeVsnjj9sJBY7nbjBQbtDThisnAhBInsURD/zaEzMo9Y4FSTQBdoZrisnPiaJzPHG0Cl2nLZ32meczo769bsfgaYEzebshP8+Ql0vo7fTga2RnF/0KrrKRMfEVFYkR0sO/yYWTZ5js15futU/G4r9W0vVxs2OPE0rIeXZor/6yu//9FtNZlb10Dg2RsJcfj5S9cLQkKBPtYWW5nyjdvV3Eq5qjWmmepegKsPIfPCA4APGaO465Sa7zG9/JDEaS9p7URrJFUWJJi4pqyBcLDc9KU4jEQMBrynu5PuPh716/2ScyRuoBYTqlEMr3wIFGU9Z2omvvy71EKv//n346Fc/GHLzGvzT2BRRiaIxOT+/ZOMsslsblb2KKP7776joDYJxV9j+OZTIVHZ0c0e/X/ijnLGEN66ryuCr1rUGZmytxSXjIs61o6HQ6FrnoUNyY34DNsk3yg/ptHYYitsypNZtUp601tTskjqkli2VbJlZt0CtlfGrr7bvaHV7WwfGCH15c8cSiz1+P15Mt2NzJCzPz6+sNBcEoS46Il/9+v6zvPkz4rMF7EXrvRyGm/PE4//+hYj/Hfnvj99Wfjnke6y+gYFe3/jg5oaMk7/98ueRgrhf33vvF3lizZANkf1ijH8NKiPFoijTx6XmFCBKYVZWfv7OyYCNk4qW7JEjJ8Rg0O385o3HQscvuISCpuDuWWJMct3hX3RoK//77fc++vyPNqiHd+6nX/6pKyuI+6Xa4uqBU0ngQWOETXJMW7AjjAM7E9dh+ndVBzG9NDE5vRW2opycM60tSLIijDA34K277aeyZKeA8JiB5neTNN2LTffS3RKW3SmRPJoLFdWxDv5/ss7Y2rfdZjPz2XWO9oXAtmE+YhWb9otodt/x8iHm1bdeeOb8hx5+BtnXn5WFZoY8E7gk87vIUpezZZyGPURBpPg5ACvwYjmC5QyvhgSKyZX1ew00sZa07HpHR4jIM1CJTdzIF1lULz/91+rzrzz16Bn33PPoknvl/qeUj2LjbhAAlEhN7PHlLnXdIRnDrADA53dnHQPgq/Me+ng17cSPfCsmo3QApCgAIMDe/H8NKB4tvDq2ERDLi+vyij6fA2mHL2bRnp4x5lD5Oa1HbbKi+1t3YDi1pytNCGnBJij9iVCOxNO8h+nSHbyrIOhaBodlpEIO4Iq4SsdEeixhShUBzBCieDJrhyVGPI+lUixjlTKT4VoyI20IgVInossnc8AKGKzHSnAEHA1VBLAKSmVYDY1MrIFMEtZChyOnFwNsxvj0GuU0b9okH5txY/qOjk36+Q2nwSbo02f4bcROg4ZM+xicXuXVr3NuQ64BdlpQjRJ2akqvScOCpsEVm1LG4vq4SYM2kbdw2Wiz8RuNa+ITMMXNrsir0azfZOk7HxfAsyhmYlKmyFoWtYZ8aL2rMiuu5pJiZlaqFrOfz6h+y7YD+s3r96WUo6RC+e36JqXeP4daVg42W9S2kForW6Sn03b9Bs2Me9Zk2SxeNF48eSNXr7zWlJmY+0Q0xSI6z6pv4Xr0T5c7stocVxXz2WnFI6D48/U8hXgxD5s2hG+XNjWK2uzclvFcYwXTxmY+/lrYHE3GzVh66zXlKMag1MTdLC73cIh7H9gzkRaQ3/+VD/Pg4m5+OohCcDowmzjLTPnVWvYqf/Lqwu0AwQ0GPxYDAA==) format("woff2-variations");unicode-range:U+1af,U+1b1,U+1b4-1be,U+1d0,U+1d2,U+1d4,U+1da,U+1dc-1dd,U+1e1,U+1e3-1e4,U+1e7,U+1e9,U+1eb-1ec,U+1f0-1f1,U+1f3-1f5,U+1f7,U+1f9-1ff,U+219,U+221,U+225-226,U+228-22b,U+22e-22f,U+231-235,U+239,U+23b,U+23e,U+250-252,U+254-255,U+259-25e,U+261-263,U+268-26b,U+26d,U+26f-277,U+279-27a,U+27d-281,U+283,U+28a-28c,U+28f,U+292,U+294-296,U+298-29a,U+29c,U+29f,U+2a1-2a2,U+2a4-2a7,U+2a9-2aa,U+2ae-2b3,U+2b5-2b7,U+2b9-2bf,U+2c2-2c4,U+2c6-2c7}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-99-wght-normal-D9WNKjpg.woff2) format("woff2-variations");unicode-range:U+a1-a2,U+a4,U+a6-a8,U+aa,U+ac,U+af,U+b1,U+b5-b6,U+b8-ba,U+bc-be,U+c0-c8,U+ca-cc,U+ce-d5,U+d8-df,U+f0,U+f5,U+f8,U+fb,U+fe-100,U+102,U+105,U+107,U+109-10b,U+10f,U+112,U+115,U+117,U+119,U+11b,U+11f,U+121,U+123-124,U+127,U+129,U+12c-12d,U+130-13f,U+141-142,U+144,U+148,U+14b-14c,U+14f-153,U+159-15b,U+15e-160,U+163-166,U+169-16a,U+16d-171,U+173-17e,U+192,U+1a0,U+1a4,U+1aa,U+1ac-1ad}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-100-wght-normal-CeyvuWjh.woff2) format("woff2-variations");unicode-range:U+a3,U+2ca,U+2223,U+2640,U+273f,U+301c-301d,U+3107,U+310c,U+4e30,U+4e3e,U+4e5e,U+4e71,U+4f26,U+4f7c,U+4f83,U+50da,U+5243,U+5267,U+529e,U+5321,U+5352,U+5477,U+548b,U+54a6,U+54b2,U+54c2,U+54c4,U+54c6,U+54cd,U+54ee,U+5543,U+55d1,U+55d3,U+55f0,U+55fd,U+560d,U+5629,U+5660,U+57ae,U+57e0,U+57e4,U+5904,U+592d,U+5965,U+5a31,U+5a7f,U+5b5a,U+5bb8,U+5c14,U+5c3b,U+5c5c,U+5c5e,U+5d10,U+5e10,U+5e4c,U+603b,U+604d,U+611c,U+6137,U+61c8,U+6292,U+62c7,U+6371,U+6382,U+645f,U+64ae,U+64c2,U+651e,U+65f1,U+660a,U+663e,U+673d,U+6784,U+6789,U+67ff,U+6813,U+6854,U+68d8,U+68fa,U+697d,U+6a01,U+6a1e,U+6baf,U+6c08,U+6c17,U+6c2b,U+6c81,U+6cbd,U+6dc6,U+6df9,U+6ed9,U+6ee1,U+6f86,U+6fc1,U+6fdb,U+701f,U+7076,U+715c,U+7194,U+71fb,U+720d,U+72b6,U+7396,U+73af,U+745b,U+746f,U+748b,U+7647,U+7699,U+76bf,U+76ce,U+76de,U+77aa,U+786b,U+7881,U+78ca,U+793c,U+797a,U+79b9,U+79bb,U+79bf,U+7a92,U+7ac7,U+7ae3,U+7b19,U+7b20,U+7b51,U+7b94,U+7cbd,U+7cde,U+7cef,U+7d46,U+7dde,U+7f88,U+80da,U+814b,U+81cd,U+8235,U+8258,U+8282,U+82b9,U+846b,U+84c1,U+84d3,U+8518,U+8611,U+8783,U+8814,U+8a15,U+8aa6,U+8b2c,U+8ba8-8ba9,U+8bc6,U+8be2,U+8be6,U+8c22,U+8d05,U+8d27,U+8dbe,U+8e34,U+8e66,U+8ec0,U+9005,U+9082,U+9091,U+914b,U+916f,U+92c5,U+92f0,U+9318,U+9382,U+938a,U+93e2,U+964b,U+96c1,U+96cc-96cd,U+96db,U+973e,U+97a0,U+9803,U+9876,U+9879,U+9955,U+9986,U+99f1,U+9a5b,U+9abc,U+9c57,U+9c9c,U+9d1b,U+9d26,U+9d51,U+9eef,U+9f99,U+c2a4,U+e253,U+e313-e314,U+e5c7,U+e5c9,U+e8db-e8dc,U+ff25,U+ff2d-ff2e,U+ff34,U+ffe5,U+1f60a,U+1f618,U+1f62d}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-101-wght-normal-BazQQPpe.woff2) format("woff2-variations");unicode-range:U+b4,U+10d,U+2d9,U+641,U+6cc,U+e20,U+e29,U+200e,U+20ac,U+2266,U+25be,U+301e,U+3058,U+4e07,U+4e1d,U+4e66,U+4ece,U+4fde,U+5016,U+5180,U+5199,U+51aa,U+5306,U+5386,U+53d8,U+5413,U+541d,U+5436,U+54ce,U+54e8,U+54fc,U+5571,U+557e,U+558e,U+55a7,U+56a8,U+57a2-57a3,U+58b3,U+5960,U+5992-5993,U+59a4,U+5a55,U+5ab2,U+5afb,U+5b56,U+5bc5,U+5bc7,U+5bf0,U+5cb1,U+5cc7,U+5dff,U+5e93,U+5ed3,U+5f6a,U+60bc,U+61ff,U+6218,U+6254,U+634d,U+6467,U+64f1-64f2,U+6582,U+65fb,U+6615,U+6687,U+66e6,U+66f0,U+6781,U+67f5,U+68a7,U+6a1f,U+6b27,U+6b4e,U+6b73,U+6b79,U+6bcb,U+6c5d,U+6cf5,U+6dee,U+6ec4,U+6ecc,U+6f88,U+6fef,U+701d,U+703e,U+707c,U+7099,U+710a,U+725f,U+72d9,U+72e9,U+731d,U+7325,U+739f,U+7463,U+7480,U+74a8,U+7523,U+7526,U+75e0,U+7613,U+7656,U+76d4,U+773a,U+775c,U+775e,U+780c,U+78e1,U+78f7,U+7960,U+7a20,U+7aaf,U+7b08,U+7b71,U+7be4,U+7cec,U+7cf0,U+7d5e,U+7d62,U+7dbe,U+7e1b,U+7ea2,U+7ec4,U+7ec6,U+7edc,U+7eed,U+7efc,U+7f16,U+7f57,U+7fb9,U+7fca,U+803d,U+816e,U+82a5,U+82b7,U+8317,U+8338,U+834a,U+83d3,U+8401,U+8469,U+849e,U+854a,U+8559,U+865e,U+86e4,U+8700,U+8759,U+8760,U+8778,U+8782,U+879e,U+87d1,U+880d,U+8836,U+8944,U+89c8,U+8aac,U+8b74,U+8ba2,U+8ba4,U+8bae,U+8bfb,U+8c4e,U+8cb3,U+8cb6,U+8d16,U+8d28,U+8e44,U+8f3b,U+8f3f,U+8f91,U+8fb9,U+8fc4,U+8fde,U+8ff9,U+9076,U+90ae,U+90b8,U+9257,U+9310,U+93df,U+94fe,U+95a5,U+95a9,U+962e,U+968f-9690,U+9704,U+9713,U+97f6,U+9824,U+986b,U+9884,U+9886,U+98e2,U+991a,U+99a5,U+99dd,U+9ab8,U+9b41,U+9b77,U+9bad,U+c774,U+e5d4,U+fe52,U+ff02,U+1f389,U+1f449,U+1f495}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-102-wght-normal-DWn0bv9H.woff2) format("woff2-variations");unicode-range:U+2cb,U+5d1,U+5d9,U+5e2,U+5e8,U+5ea,U+633,U+e32,U+2252,U+2267,U+2573,U+25b3,U+25c4,U+2713,U+2715,U+30e2,U+4e28,U+4e3c,U+4e4d,U+4e70,U+4f88,U+4fef,U+5018,U+501a,U+5026,U+5137,U+513f,U+51f3,U+524b,U+5254,U+52d8,U+5308,U+5384,U+53cc,U+5443,U+5466,U+54a7-54a8,U+54bd,U+54c9,U+54cb,U+555e,U+556a,U+5580,U+560e,U+5614,U+561f,U+562f,U+566c,U+5679,U+56bc,U+56cd,U+56e7,U+56ed,U+572d,U+57d7,U+582f,U+589f,U+5b09,U+5ba5,U+5c51,U+5c90,U+5cef,U+5d16,U+5d84,U+5dd4,U+5e08,U+5e26,U+5f0a,U+5f20,U+606c,U+61c7,U+620f,U+625b,U+62a4,U+62d0,U+62f1,U+63a0,U+63c6,U+63f9,U+6413,U+6417,U+6483,U+64f7,U+650f,U+65a7,U+665f,U+66ae,U+66d6,U+66e0,U+6746,U+6756,U+67d1,U+6837,U+68d7,U+68e0,U+68f5,U+6977,U+6995,U+69a8,U+69b4,U+69d3,U+6a3d,U+6abb,U+6bb7,U+6bd3,U+6c47,U+6cc4,U+6cd3,U+6dae,U+6e26,U+6e29,U+6e5b,U+6eaf,U+6eba,U+7028,U+70b3,U+711a,U+733f,U+73c0,U+73ee,U+7444,U+745a,U+7487,U+7540,U+75a4,U+7729,U+779e,U+798e,U+79cd,U+79e9,U+7a3d,U+7a4c,U+7a9f,U+7ac4,U+7aff,U+7b77,U+7c27,U+7ca7,U+7cd9,U+7d76,U+7e43,U+7ea6,U+7ed9,U+7ff1,U+808b,U+809b,U+80fa,U+827a,U+8309,U+8328,U+832b,U+8396,U+83e0,U+840e,U+8425,U+852d,U+853b,U+8588,U+85e9,U+86b5,U+8718,U+87ec,U+8910,U+893b,U+89c1-89c2,U+8b3e,U+8baf,U+8bc1,U+8bcd,U+8bdd,U+8c41,U+8c48,U+8d2d,U+8d5e,U+8fbe,U+9015,U+90a8,U+90b5,U+90e1,U+9169,U+9183,U+91d0,U+91dc,U+9293,U+92f8,U+9472,U+9598,U+95ed,U+95fb,U+9605,U+96c7,U+9739,U+9742,U+9761,U+99ad,U+9ae6,U+9b1a,U+9b44,U+9bc9,U+9d3f,U+9dd7,U+9e7c,U+9e92,U+fe5d-fe5e,U+ff22-ff24,U+ff2f-ff30,U+ff33}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-103-wght-normal-tcQ1zu-u.woff2) format("woff2-variations");unicode-range:U+60,U+f7,U+161,U+2198,U+2571,U+258b,U+25b6,U+2661,U+3051,U+3109,U+4e11,U+4e1c,U+4e24,U+4e2b,U+4ef7,U+4f18,U+4f36,U+4fd0,U+5029-502a,U+5055,U+508d,U+50ad,U+50d5,U+50e7,U+50f1,U+50f5,U+51a5,U+51c8,U+51fb,U+5203,U+524e,U+5288,U+5323,U+53c2,U+5458,U+54b1,U+54b3,U+54b8,U+5582,U+55b2,U+55ba,U+55da,U+55dc,U+5662,U+5678,U+56c2,U+5742,U+57d5,U+5862,U+58e4,U+58f0,U+5907,U+590d,U+5934,U+5978,U+5984,U+5a25,U+5c06,U+5c62,U+5c91,U+5cfb,U+5d01,U+5d11,U+5d1b,U+5e87,U+5eff,U+5f27,U+5f3a,U+5f53,U+5f64,U+6001,U+6168,U+61a9,U+6233,U+62a5,U+62ce,U+62ed,U+638f,U+6399,U+63c0,U+646f,U+6590,U+6631,U+664f,U+6689,U+66dc,U+672f,U+67af,U+67ec,U+6807,U+6a44,U+6c14,U+6c40,U+6c70,U+6c76,U+6cb8,U+6ce3,U+6df3,U+6e20,U+6e43,U+6ebc,U+6eec,U+6f2c,U+6fb1,U+7009,U+7011,U+701a,U+7117,U+7184,U+72f9,U+7426,U+74bd,U+74cf,U+752b,U+7554,U+75b9,U+7621,U+7671-7672,U+7693,U+76ef,U+7737,U+77a7,U+77b3,U+77bb,U+77da,U+77e2,U+77e9,U+77ef,U+7801,U+7940,U+797f,U+79a7,U+79b1,U+79bd,U+7a6b,U+7ac5,U+7b1b,U+7dab,U+7db4,U+7db8,U+7dcb,U+7ddd,U+7de0,U+7e55,U+7e9c,U+7ed3,U+7ef4,U+803f,U+8046,U+8087,U+8116,U+81a8,U+8214,U+821c,U+82d4,U+8305,U+831c,U+8335,U+8339,U+8350,U+8354,U+8526,U+860a,U+86db,U+8713,U+873b,U+8822,U+8993,U+8a1f,U+8ab9,U+8ad7,U+8e72,U+8f4e,U+8f9c,U+8fd0,U+8fd8,U+8fe6,U+9042,U+907c,U+91ba,U+9452,U+9591,U+95e2,U+9631,U+9699,U+96b8,U+9709,U+978d,U+9811,U+9830,U+98ce,U+9945,U+99ed,U+9a8c,U+9ad3,U+9baa,U+9be8,U+9c77,U+9cf6,U+9d72,U+9e1f,U+9ec4,U+fe31,U+fe55,U+ff03,U+ff20,U+ff3b,U+ff3d,U+1f3fb,U+1f44d,U+1f60d}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-104-wght-normal-4GaPENTg.woff2) format("woff2-variations");unicode-range:U+10c,U+e44,U+2728,U+3081,U+4e13,U+4e19,U+4e1e,U+4e5c,U+4ea7,U+4ed7,U+4f20,U+4f8d,U+4ffe,U+5021,U+515c,U+51a4,U+51e0,U+521b,U+522b,U+532a,U+534e,U+5355,U+537f,U+5398,U+539d,U+541f,U+543c,U+544e,U+5509,U+5598,U+5622,U+5632,U+563f,U+5641,U+566a,U+5695,U+569f,U+56ae,U+56da,U+573a,U+574e,U+5835,U+584c,U+5885,U+58ae,U+5a1f,U+5ac2,U+5b24,U+5bb0,U+5bde,U+5be1,U+5bfc,U+5c39,U+5c4c,U+5c60,U+5e76,U+5e7f,U+5e9a,U+5eb8,U+5f13,U+5f6c,U+6127,U+61f2,U+6208,U+620a,U+620c,U+6252,U+62ef,U+6328,U+633d,U+6362,U+63b0,U+63c9,U+640f,U+64a9,U+6514,U+652c,U+655e,U+6583,U+658c,U+6627,U+66f3,U+6734,U+6743,U+676d,U+67c4,U+67da,U+68cd,U+68f2,U+690e,U+6ab3,U+6b16,U+6b38,U+6b3d,U+6bc6,U+6ca1,U+6cab,U+6d8c,U+6dea,U+6e32,U+6e3e,U+6e58,U+6eef,U+6ef2,U+6fe4,U+708a,U+7130,U+7165,U+7172,U+71c9,U+71ed,U+7232,U+7239,U+7261,U+7280,U+72a7,U+72f8,U+73c8,U+7464,U+753b,U+754f,U+755c,U+75d8,U+76ea,U+776b,U+7779,U+777f,U+7784,U+778e,U+77db,U+77ee,U+79e4,U+7a46,U+7a57,U+7aba,U+7aed,U+7b4d,U+7c7b,U+7c7d,U+7d13,U+7d33,U+7dbb,U+7df9,U+7e46,U+7ea7,U+8085,U+8165,U+81fb,U+82b8,U+82d3,U+8343,U+839e,U+83e9,U+840d,U+851a,U+853d,U+8543,U+859b,U+85fb,U+87fb,U+888d,U+88c5,U+8adc,U+8b0a,U+8bb0,U+8bbe,U+8bc4,U+8bf4,U+8c5a,U+8cc3,U+8ce4,U+8d44,U+8e81,U+8f44,U+8f66,U+8fdb,U+900d,U+9063,U+914c,U+9223,U+9226,U+923a,U+925b,U+9264,U+929c,U+92b9,U+9320,U+934d,U+935b,U+9444,U+957f,U+96a7,U+97ad,U+97cc,U+9898,U+98ea,U+9921,U+9952,U+9a55,U+9b0d,U+9b91,U+9bca,U+9ebd,U+9f4b,U+e60f-e610,U+ff1c-ff1d,U+ff21,U+ff38,U+ff9f,U+fffd,U+1f602}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-105-wght-normal-C1mWK2qa.woff2) format("woff2-variations");unicode-range:U+e17,U+e22,U+2103,U+25a0,U+266a,U+3014-3015,U+4e1a,U+4e50,U+4f10,U+4f6c,U+4f70,U+4fcf,U+5006,U+50d1,U+5170,U+518c,U+51f0,U+51f6,U+51f9,U+5219,U+5256,U+525d,U+52c9,U+5349,U+5351,U+5356,U+5375,U+53db,U+53ee,U+53f7,U+5492,U+54fa,U+5538,U+55bb,U+55e8,U+5757,U+58be,U+5937,U+59dc,U+59e8,U+5a49,U+5a9a-5a9b,U+5ab3,U+5b9b,U+5b9e,U+5be8,U+5c37,U+5c4e,U+5d14,U+5d19,U+5d4c,U+5d50,U+5deb,U+5e84,U+5e94,U+5ec2,U+5f17,U+5f26,U+5f55,U+5f77,U+5f7f,U+5fbd,U+6052,U+6064-6065,U+608d,U+609a,U+6101,U+611a,U+614c,U+621a,U+6237,U+6284,U+6296,U+62e9,U+632a-632b,U+634f,U+6488,U+6500,U+652a,U+6556,U+65e0,U+65ec,U+6643,U+679a,U+6850,U+6893,U+6897,U+68b3,U+68d5,U+6930,U+6960,U+6a11,U+6a38,U+6a3a,U+6b22,U+6b67,U+6b6a,U+6c59,U+6c83,U+6ccc,U+6df5,U+6ef7,U+6f3e,U+6f80,U+70ed,U+7164,U+722a,U+7260,U+7272,U+73b0,U+74ca,U+74e3,U+7538,U+7586,U+75b5,U+7624,U+7661-7662,U+7838,U+786e,U+788c,U+7950,U+79a6,U+79aa,U+7a40,U+7a62,U+7bf7,U+7c3e,U+7c98,U+7ca5,U+7d21,U+7d2e,U+7dba,U+7dec,U+7e79,U+7ecf,U+7edf,U+7f79,U+8086,U+810a,U+8139,U+813e,U+817a,U+81b3,U+821f,U+8247,U+8259,U+8271,U+8431,U+846c,U+849c,U+84b2,U+84c4,U+8513-8514,U+8549,U+8755,U+8877,U+8881,U+88f9,U+8a1d,U+8a3c,U+8a6d-8a6e,U+8a93,U+8ae7,U+8af7,U+8b17,U+8b5a,U+8ba1,U+8bba,U+8cdc,U+8dea,U+8f6c,U+8f7d,U+8fc7,U+8fd9,U+902e,U+90ca,U+916a,U+916c,U+921e,U+9245,U+947c,U+9594,U+95a8,U+95ee,U+95f4,U+9706,U+971e,U+9756,U+980c,U+9891,U+98b1,U+98fc,U+9903,U+9957,U+99ae,U+99ff,U+9db4,U+e602-e605,U+e611,U+ff16-ff19}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-106-wght-normal-Chq-ESxo.woff2) format("woff2-variations");unicode-range:U+a5,U+2190-2191,U+2193,U+22c1,U+2302,U+25cb,U+2699,U+2709,U+4e0e,U+4e18,U+4e3a,U+4e48,U+4e91,U+4eec,U+4f3d,U+5112,U+524a,U+52a3,U+52ab,U+52c3,U+52f3,U+52fb,U+5320,U+5339,U+533f,U+53e2,U+543e,U+5480,U+5495,U+5497,U+5564,U+5572,U+55c6,U+55ef,U+563b,U+5653,U+5657,U+56b7,U+5764,U+5824,U+58d8,U+5955,U+5983,U+598d,U+59a8,U+59da,U+59e6,U+5a36,U+5bb5,U+5bc2,U+5bee,U+5bf9,U+5cb3,U+5d17,U+5dbc,U+5e2e,U+6070,U+60df,U+6190,U+61a4,U+61be,U+61fc,U+62ac,U+62bc,U+636e,U+6398,U+63a9,U+6435,U+6487,U+6495,U+64ab,U+64bf,U+6577,U+65ac,U+6602,U+6652,U+66f9,U+672d,U+6761,U+683d,U+68ad,U+68b5,U+68da,U+68e7,U+6a59,U+6a61,U+6ae5,U+6b47,U+6bef,U+6c50,U+6c9b,U+6e23,U+6e34,U+6e4a,U+6e67,U+6ea2,U+6eb6,U+6f20,U+6feb,U+7149,U+714c,U+715e,U+7199,U+71ac,U+7231,U+7262,U+7409,U+745f,U+7469,U+7504,U+7535,U+753a,U+75f4,U+7682,U+76ba,U+76f2,U+77fd,U+780d,U+7832,U+78c5,U+78ef,U+7901,U+79be,U+79c9,U+79e6,U+7a1a,U+7a84,U+7aca,U+7cb5,U+7cb9,U+7cdf,U+7ce7,U+7d6e,U+7db1,U+7def,U+7e61,U+7e7d,U+7e8f,U+7f38,U+7f77,U+7fa8,U+7fc5,U+7fe1,U+7ff9,U+800d,U+8015,U+8054,U+80a2,U+80aa,U+80ba,U+814e,U+8180,U+819d,U+81c0,U+828b,U+82ad,U+82af,U+83f1,U+83f8,U+8403,U+8475,U+84bc,U+84c9,U+84ec,U+8523,U+8569,U+8591,U+85b0,U+86d9,U+8774,U+881f,U+884d,U+88d4,U+89c4,U+89c6,U+8a60,U+8a79,U+8b19,U+8bd5,U+8bf7,U+8c03,U+8c79,U+8cc8,U+8d9f,U+8e10,U+8e48,U+8faf,U+9009,U+9017,U+9175,U+9187,U+918b,U+91d8,U+9214,U+946b,U+9470,U+9640,U+9675,U+96ef,U+9716,U+97cb,U+97e9,U+985b,U+99b3,U+9b4f,U+9d09,U+9e9f,U+9edb,U+9f90,U+ff05,U+ff14,U+1f464}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-107-wght-normal-BC2EpFaE.woff2) format("woff2-variations");unicode-range:U+25ce,U+4e08,U+4e2a,U+4e56,U+4e9a,U+4ea8,U+4ead,U+4ec7,U+4f3a,U+4f51,U+4f62,U+4faf,U+507d,U+5098,U+50ac,U+5147,U+5173,U+5187,U+51f8,U+52a1,U+52a8,U+52f8,U+535c,U+53ed,U+541e,U+5435,U+5475,U+54a9,U+54c0,U+54c7,U+5589,U+5605,U+5690,U+5733,U+5782,U+57c3,U+5858,U+5893,U+589c,U+58e2,U+5974,U+599e,U+59a5,U+59ec,U+5b66,U+5b99,U+5b9d,U+5c2c,U+5c48,U+5c65,U+5cfd,U+5d0e,U+5dba,U+5de2,U+5e06,U+5e15,U+5ec1,U+5ed6,U+5f00,U+5f4c,U+5f65,U+6055,U+609f,U+60b6,U+6241,U+624e,U+626f,U+6291,U+62cc,U+62d3,U+62d8,U+62da,U+62fe,U+6349,U+6367,U+63ea,U+6454,U+64a4,U+64b2,U+64bc,U+64c5,U+64ce,U+6558,U+6572,U+65a5,U+65e8,U+65ed,U+6606,U+6614,U+6670,U+6688,U+673a,U+674f,U+6770,U+6795,U+68cb,U+6912,U+6953,U+6aac,U+6aaf,U+6ab8,U+6b20,U+6b96,U+6bbf,U+6bc5,U+6c6a,U+6cbe,U+6d59,U+6d78,U+6dc7,U+6deb,U+6e7e,U+6e9c,U+6f3f,U+6f51,U+6f70,U+6f84,U+704c,U+7051,U+70ab,U+70ad,U+70f9,U+7119,U+714e,U+71d9,U+71e5-71e6,U+72c4,U+72d0,U+72e0,U+7334,U+744b,U+7455,U+74f7,U+7529,U+75ab,U+75b2,U+766e,U+76c3,U+76fc,U+76fe,U+7891,U+7948,U+7a74,U+7b28,U+7c60,U+7c72,U+7cca,U+7ebf,U+7f55,U+7ff0,U+8154,U+81c2,U+81d8,U+81e3,U+81e5,U+8292,U+8299,U+8302,U+8304,U+8332,U+83c1,U+83c7,U+83ca,U+845b,U+8490,U+85af,U+8650,U+8667,U+8abc,U+8b0e,U+8b39,U+8bed,U+8c54,U+8c6b,U+8c9e,U+8ca7,U+8caa-8cab,U+8ce6,U+8cec-8ced,U+8eb2,U+8eba,U+8fb0,U+901d,U+908f,U+9127,U+91c0,U+9215,U+92b3,U+932b,U+93fd,U+95ca,U+964c,U+96c0,U+970d,U+9774,U+97fb,U+9812,U+9817,U+9913,U+9935,U+99c1,U+9b31,U+9d5d,U+9d6c,U+9e79,U+fe0f,U+fe30,U+ff0b,U+ff10,U+ff15}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-108-wght-normal-BExvVcn7.woff2) format("woff2-variations");unicode-range:U+b0,U+926,U+928,U+939,U+93f-940,U+94d,U+200b,U+22ef,U+25ba,U+25c6,U+2665,U+4e4f,U+4e59,U+4f0d,U+4f0f,U+4f19,U+4f59,U+4fae,U+5075,U+50b2,U+50b5,U+511f,U+5141,U+5146,U+514c,U+5185,U+51dd,U+51fd,U+522e,U+5319,U+533a,U+5378,U+53ad,U+53c9,U+53d1,U+53d4,U+543b,U+5442,U+5446,U+5481,U+54e9,U+5507,U+5565,U+559a,U+55aa,U+5606,U+56ca,U+56fe,U+582a,U+58fa,U+5915,U+5949,U+5962,U+5996,U+59fb,U+5a77,U+5b0c,U+5b5f,U+5bd3,U+5be2,U+5bfa,U+5c41,U+5ca9,U+5d07,U+5ec8,U+5eca,U+5f18,U+5f4e,U+5f59,U+5f6d,U+5f79,U+5fb9,U+6028,U+6062,U+6068,U+606d,U+6094,U+60f1,U+6108-6109,U+614e,U+6170,U+617e,U+61b2,U+61f8,U+6247,U+626d,U+6276,U+62ab,U+62cb,U+62f3,U+6368,U+6380,U+6492,U+64b0,U+64e0,U+6570,U+660f,U+6649,U+6691,U+66a8,U+6749,U+67f1,U+67f3-67f4,U+6842,U+6851,U+687f,U+68df,U+69fd,U+6a58,U+6c27,U+6c88,U+6cca,U+6cdb,U+6d29,U+6d66,U+6daf,U+6f01,U+6f06,U+6f58,U+6f62,U+6f6d,U+6fa1,U+6ff1,U+6ffe,U+7058,U+70ae,U+7235,U+7267,U+73ca,U+742a,U+758f,U+75bc,U+76c6,U+7740,U+7955,U+7a00,U+7a3b,U+7b4b,U+7bad,U+7be9,U+7c4c,U+7cfe,U+7dbf,U+7e2b,U+7e31,U+7f9e,U+7fc1,U+7ffc,U+8096,U+809d,U+80de,U+8108,U+8155,U+816b,U+81df,U+8277,U+82bd,U+8352,U+8393,U+8404,U+8525,U+856d,U+8587,U+8606,U+868a,U+8776,U+87ba,U+87f9,U+886b,U+8870,U+88d5,U+896a,U+896f,U+8a23,U+8a87,U+8ad2,U+8b00,U+8b20,U+8cb8,U+8cca,U+8ce0,U+8d39,U+8d6b,U+8d81,U+8db4,U+8e29,U+8ef8,U+8f1b,U+8f5f,U+8fa8,U+906e,U+9077,U+90aa,U+90b1,U+90c1,U+9165,U+919c,U+92c1,U+95d6,U+95e8,U+975a,U+98c6,U+9ecf,U+9f0e,U+9f52,U+feff,U+ff06,U+ff0a,U+ff12-ff13}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-109-wght-normal-CkWCzlGP.woff2) format("woff2-variations");unicode-range:U+627-629,U+631,U+639,U+644,U+64a,U+25cf,U+2606,U+2764,U+3008-3009,U+4e1f,U+4e38,U+4e43,U+4ed5,U+4ef0,U+4eff,U+4fb6,U+4fe0,U+5085,U+50a2,U+50be,U+5118,U+5211-5212,U+5272,U+52fe,U+5366,U+53b2,U+53ec,U+54ac,U+5587,U+55b5,U+561b,U+5751,U+576a,U+57cb,U+58ef,U+592f,U+594f,U+5951,U+5954,U+596e,U+59d1,U+5ac1,U+5acc,U+5b8b,U+5c4d,U+5c6f,U+5ca1,U+5d29,U+5de1,U+5dfe,U+5e7d,U+5edf,U+5ef7,U+5f7c,U+5f81,U+5fa1,U+5faa,U+5fcc,U+5ffd,U+6021,U+6046,U+6155,U+6212,U+62b9,U+6316,U+6350,U+6478,U+647a,U+6490,U+64e6,U+6524,U+6591,U+659c,U+65a4,U+65e6,U+65f6,U+6607,U+6674,U+6765,U+679d,U+68a8,U+6b3a,U+6c57,U+6c61,U+6c90,U+6cbf,U+6d69,U+6db5,U+6dcb,U+6dd1,U+6e21,U+70d8,U+71c3,U+71d5,U+722c,U+727d,U+72ac,U+72fc,U+731c,U+7336,U+7344,U+7384,U+73ab,U+7433-7434,U+745c,U+7470,U+758a,U+75d5,U+7652,U+76c8,U+76e7,U+7709,U+7720,U+7747,U+7763,U+77ac-77ad,U+7802,U+78a7,U+78a9,U+78b3,U+78c1,U+78da,U+7926,U+796d,U+798d,U+7aae,U+7b52,U+7c92,U+7d68,U+7d81,U+7e5e,U+7e69,U+7e73,U+7f50,U+7f70,U+7f75,U+8058,U+8070,U+80c3,U+8105-8106,U+8179,U+818f,U+81a9,U+81ed,U+820c-820d,U+82d1,U+838e,U+83cc,U+8461,U+84b8,U+852c,U+857e,U+85e4,U+863f,U+8679,U+86c7,U+8702,U+8896,U+88c2,U+88f8,U+8af8,U+8b7d,U+8ca2,U+8cc0,U+8d64,U+8d74,U+8d99,U+8e5f,U+8e8d,U+8ecc,U+8ed2,U+8fb1,U+8fc5,U+9022,U+9038,U+903e,U+905c,U+9072,U+9081,U+9189,U+9234,U+92d2,U+934a,U+95a3,U+962a,U+9646,U+9676,U+96d5,U+971c,U+9838,U+9875,U+98c4,U+99db,U+9a45,U+9a5f,U+9a6c,U+9ad2,U+9cf4,U+9d28,U+9daf,U+9df9,U+9e7d,U+9f9c,U+ff11,U+ff1e}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-110-wght-normal-CuMLARLR.woff2) format("woff2-variations");unicode-range:U+2500,U+25bc,U+4e95,U+4f50,U+4f54,U+4f69,U+4fc4,U+4fca,U+5009,U+50bb,U+5154,U+51cc,U+528d,U+5291,U+52d2,U+52e4,U+5353,U+5360,U+540a-540b,U+5410,U+54f2,U+5510,U+5514,U+5537,U+558a,U+55ac,U+5617,U+56fd,U+573e,U+5766,U+5783,U+57d4,U+5806,U+5821,U+5857,U+5875,U+58f9,U+596a,U+59ae,U+59c6,U+59ca,U+59ff,U+5a03,U+5ae9,U+5b64,U+5bb4,U+5c3f,U+5e16,U+5e45,U+5e72,U+5ec9,U+5f90-5f92,U+6012,U+6016,U+6084-6085,U+6089,U+60a0,U+60a3,U+60b2,U+60d1,U+60f9,U+6148,U+6158,U+6191,U+626e,U+62d4,U+632f,U+633a,U+6355,U+63aa,U+642c,U+64a5,U+64cb,U+6566,U+6575,U+6597,U+660c,U+66b1,U+66ec,U+6731,U+6735,U+675c,U+67ef,U+6846,U+6876,U+6881,U+68af-68b0,U+68c9,U+6905,U+6b98,U+6bc0,U+6beb,U+6c0f,U+6c1b,U+6c41,U+6ce5,U+6cf3,U+6d25,U+6d2a,U+6d3d,U+6d6e,U+6dd8,U+6dda,U+6dfa,U+6e9d,U+6eaa,U+6ec5,U+6ecb,U+6ef4,U+6f0f,U+6f32,U+707d,U+708e,U+7092,U+716e,U+723a,U+731b,U+7345,U+7375,U+7378,U+73b2,U+74e6,U+75be,U+75de,U+764c,U+76dc,U+788e,U+7897,U+789f,U+78b0,U+790e,U+7965,U+7a4e,U+7aa9,U+7c43,U+7d17,U+7dd2,U+7e96,U+7f51,U+7f69,U+7f72,U+7fd4,U+7fe0,U+8017,U+80a9,U+80d6,U+8102,U+8150,U+8178,U+81bd,U+829d,U+82ac,U+8303,U+840c,U+8482,U+8499,U+85a9-85aa,U+883b,U+8861,U+88c1,U+88cf,U+88d9,U+8a3a,U+8a98,U+8aee,U+8c8c,U+8ce2,U+8d0f,U+8da8,U+8dcc,U+8e0f,U+8e22,U+8f1d,U+8f29,U+8fad,U+9003,U+9006,U+903c,U+904d,U+9059,U+9075,U+90ce,U+90ed,U+9130,U+91ac,U+91e3,U+9285,U+9298,U+92ea,U+9326,U+937e,U+93c8,U+95c6,U+9677,U+9727,U+994b,U+99a8,U+99d0,U+9a30,U+9a37,U+9b42,U+9b45,U+9d3b,U+9e7f,U+9ee8,U+9f3b,U+c5b4}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-111-wght-normal-SqRJKajE.woff2) format("woff2-variations");unicode-range:U+5e,U+2502,U+2605,U+4e32,U+4e58,U+4ea1,U+4ef2,U+4f2f-4f30,U+4f75,U+4fd7,U+4ff1,U+501f,U+5049,U+5074,U+5091,U+5144,U+517c,U+51c6,U+51cd,U+5269-526a,U+52aa,U+52c1,U+52c7,U+52df,U+5377,U+541b,U+5439,U+5440,U+5448,U+54aa,U+54e6,U+54ed,U+5674,U+5687,U+585e,U+588a,U+58a8,U+58c1,U+5925,U+5948,U+5999,U+59b3,U+5a1c,U+5a46,U+5b54,U+5b5d,U+5b6b,U+5b8f,U+5bd2,U+5be9,U+5c0a,U+5c16,U+5c46,U+5cf0,U+5e25,U+5e3d,U+5e79,U+5ee2,U+5f04,U+5f31,U+5fcd,U+5fe0,U+60dc,U+6163,U+616e,U+6182,U+61f6,U+622a,U+6258,U+6293,U+62c6,U+62d2,U+6372,U+63da,U+63ed-63ee,U+6416,U+6458,U+649e,U+64ec,U+64f4,U+651c,U+65cb,U+65e2,U+65fa,U+6628,U+6668,U+66a2,U+66c9,U+66fc,U+6717,U+67cf,U+67d4,U+6817,U+6885,U+69cd,U+6a6b,U+6afb,U+6b32,U+6b49,U+6bbc,U+6c89,U+6c96,U+6cc9,U+6d1b,U+6d1e,U+6dfb,U+6efe,U+6f38,U+6f5b,U+6f64,U+6f8e,U+6fa4,U+7070,U+70b8,U+70cf,U+70e4,U+7159,U+7169,U+7210,U+721b,U+7238,U+737b,U+73bb,U+746a,U+7483,U+74dc,U+74f6,U+7518,U+756a,U+75c7,U+775b,U+78e8,U+7919,U+7956,U+795d,U+7a0d,U+7bc9,U+7c97,U+7cd5,U+7d10,U+7d1b,U+7de9,U+7dfb,U+7e3e,U+7e6a,U+7f6a,U+7f8a,U+7fbd,U+8000,U+8036,U+809a,U+80ce,U+80e1,U+80f8,U+8170,U+819c,U+8216,U+8239,U+8266,U+827e,U+82b3,U+8377,U+83ab,U+85c9,U+865b,U+8766,U+87a2,U+87f2,U+8972,U+8a17,U+8a50,U+8a95,U+8b02,U+8b6f,U+8c6c,U+8ca9,U+8cfa,U+8d95,U+8de1,U+8f14,U+8f9b,U+8fa3,U+8feb,U+8ff4,U+9010,U+901b,U+905e,U+9080,U+912d,U+9177,U+91c7,U+9336,U+9451,U+947d,U+963b,U+966a,U+9670,U+9769,U+9813,U+98fd,U+99d5,U+9a19,U+9b27,U+9b6f,U+9ece,U+9ed8,U+9f13,U+9f20,U+ad6d,U+d55c}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-112-wght-normal-BWioGL2B.woff2) format("woff2-variations");unicode-range:U+201c-201d,U+203b,U+2192,U+25b2,U+300f,U+4e01,U+4e39,U+4e73,U+4e88,U+4e8e,U+4ed9,U+4f0a,U+4f38,U+4f5b,U+4fc3,U+500d,U+504f,U+5076-5077,U+5100,U+5104,U+5132,U+5175,U+5192,U+51a0,U+51ac,U+51e1,U+51f1,U+5200,U+5224,U+5237-5238,U+523a,U+526f,U+5289,U+52de,U+52f5,U+5371,U+539a,U+53e5,U+540e,U+547c,U+552f,U+5531,U+5634,U+56c9,U+56f0,U+574a,U+5761,U+57f7,U+57f9,U+5805,U+5851,U+5854,U+586b,U+58fd,U+592e,U+5967,U+59bb,U+59d3,U+5a18,U+5b30,U+5b55,U+5b87,U+5b97,U+5be7,U+5bec,U+5bf8,U+5c24,U+5cb8,U+5df7,U+5e1d,U+5e2d,U+5e7b,U+5f1f,U+5f70,U+5fd9,U+61b6,U+6234,U+62b5,U+62d6,U+62dc,U+62fc,U+6383,U+63cf,U+63d2,U+63e1,U+640d,U+64cd,U+64fa,U+64fe,U+654f,U+6562,U+656c,U+65c1,U+65d7,U+6620,U+6676,U+6697,U+66ab,U+66c6,U+66dd,U+66ff,U+671d,U+672b,U+677e,U+67d0,U+67d3,U+68c4,U+690d,U+694a,U+695a,U+6ac3,U+6b04,U+6b23,U+6b78,U+6b8a,U+6c60,U+6d74,U+6d89,U+6db2,U+6dbc,U+6de1,U+6df7,U+6e38,U+6e6f,U+6f02,U+6fc3,U+6fd5,U+70c8,U+7126,U+718a,U+723d,U+7246,U+72af,U+73cd,U+760b,U+7626,U+7687,U+79df,U+7a05,U+7a3f,U+7a69,U+7af6,U+7c3d,U+7c3f,U+7c4d,U+7cd6,U+7d0b,U+7d2b,U+7de3,U+7e2e,U+8010,U+808c,U+80a5,U+80af,U+812b,U+817f,U+819a,U+82d7,U+8389-838a,U+83f2,U+840a,U+8463,U+8521,U+8584,U+860b,U+864e,U+871c,U+878d,U+885d,U+8932,U+89f8,U+8a69,U+8afe,U+8b5c,U+8c37,U+8c46,U+8cbf,U+8cd3,U+8cf4,U+8d08,U+8d0a,U+8ddd,U+8fea,U+9014,U+9055,U+907a,U+9178,U+92fc,U+934b,U+9396,U+93ae,U+9583,U+9663,U+96bb,U+9707,U+9738,U+9846,U+9905,U+9a0e,U+9aa8,U+9b25,U+9b3c,U+9ce5,U+9cf3,U+9ea5,U+9eb5,U+9f4a,U+9f61,U+ff0d}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-113-wght-normal-CRQfLReA.woff2) format("woff2-variations");unicode-range:U+3c,U+d7,U+300e,U+4e4e,U+4e82,U+4e92,U+4ec1,U+4ecd,U+4f48,U+4f53,U+4fb5,U+5012,U+502b,U+522a,U+52dd,U+52ff,U+532f,U+53eb,U+53f3,U+5409,U+5433,U+5496,U+54c8,U+554a,U+5561,U+5594,U+559d,U+56b4,U+56fa,U+5713,U+5750,U+57df,U+584a,U+58c7,U+58de,U+593e,U+5976,U+59d0,U+59d4,U+5a66,U+5b85,U+5b88,U+5ba3,U+5bae,U+5bbf,U+5bdf,U+5c01,U+5c04,U+5c3a,U+5c3e,U+5c4f,U+5ddd-5dde,U+5de8,U+5e63,U+5e7c,U+5e8a,U+5eda,U+5ef3,U+5ef6,U+5f48,U+6015,U+6025,U+602a,U+6050,U+6069,U+60e1,U+6162,U+6176,U+61c2,U+6200,U+6263,U+6279,U+6297,U+62b1,U+62bd,U+62ec,U+6311,U+6377,U+6388-6389,U+638c,U+63a2,U+63f4,U+641e,U+6436,U+64c1,U+6551,U+6557,U+6563,U+6696,U+66b4,U+66f2,U+6751,U+675f,U+676f,U+6790,U+6838,U+684c,U+68d2,U+6982,U+699c,U+69ae,U+69cb,U+6a39,U+6a4b,U+6b66,U+6bd2,U+6cb3,U+6ce1,U+6d3e,U+6de8,U+6ed1,U+6f22,U+6f54,U+6fc0,U+6fdf,U+719f,U+71c8,U+7236,U+7259,U+72d7,U+7389,U+73e0,U+745e,U+751a,U+7532-7533,U+7562,U+7591,U+75c5,U+75db,U+7686,U+76d2,U+76db,U+76df,U+76e3,U+7701,U+7761,U+786c,U+7981,U+79cb,U+79d2,U+79fb,U+7a81,U+7a97,U+7aef,U+7b26,U+7b80,U+7c64,U+7d0d,U+7d14,U+7d2f,U+7dca,U+7df4,U+7e54,U+7e6b,U+7f3a,U+8033,U+804a,U+805a,U+81a0,U+81e8,U+8212,U+821e,U+82e6,U+8336,U+8449,U+84cb,U+84ee,U+85e5,U+8607,U+888b,U+8a13,U+8a5e,U+8aa0,U+8aa4,U+8ab0,U+8ab2,U+8ac7,U+8b66,U+8c6a,U+8c93,U+8c9d,U+8de8,U+8f2a,U+8fb2,U+906d,U+907f,U+90a6,U+9109,U+9192,U+91cb,U+91dd,U+964d,U+9686,U+968e,U+9694,U+969c,U+96de,U+96e8,U+96ea,U+96f7,U+975c,U+9760,U+978b,U+9858,U+9918,U+9aee,U+9ebb,U+ff0e-ff0f,U+ff5c}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-114-wght-normal-D5H20qUS.woff2) format("woff2-variations");unicode-range:U+b7,U+2022,U+2027,U+3042,U+3044,U+3046,U+3048,U+304a-3050,U+3053-3057,U+3059-305b,U+305d-3061,U+3063-306c,U+306e-3079,U+307b,U+307d-307f,U+3082-308d,U+308f,U+3092-3093,U+30a1-30a4,U+30a6-30c1,U+30c3-30c4,U+30c6-30e1,U+30e3-30ed,U+30ef,U+30f3,U+30fb-30fc,U+4e7e,U+4ea6,U+4eac,U+4f34,U+50b7,U+51b0,U+523b,U+5283,U+5348,U+5354,U+54e5,U+5708,U+590f,U+592b,U+599d,U+59b9,U+5a01,U+5a5a,U+5de7,U+5e78,U+5e9c,U+5fb5,U+6167,U+61f7,U+627f,U+63a1,U+64d4,U+65bd,U+68ee,U+6b4c,U+6bba,U+6c5f,U+6d0b,U+6d6a,U+6e1b,U+6e56,U+6f6e,U+71d2,U+722d,U+72c2,U+751c,U+7530,U+7642,U+76e1,U+79c0,U+7adf,U+7af9,U+7d9c,U+7da0,U+7e23,U+7e41,U+8056,U+8173,U+822a,U+8349,U+83dc,U+8840,U+885b,U+8907,U+8a34,U+8cb4,U+8dd1,U+8fd4,U+8ff0,U+93e1,U+984f,U+98ef,U+9b54}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-115-wght-normal-BzydpMOE.woff2) format("woff2-variations");unicode-range:U+23-25,U+3d,U+2026,U+4e03,U+4e45,U+4e5d,U+4eae,U+4ed4,U+4ed8,U+4f01,U+4f11,U+4f3c,U+4f8b,U+4fc2,U+5019,U+505c,U+50c5,U+5145,U+51b7,U+5207,U+521d,U+525b,U+5287,U+52e2,U+535a,U+537b,U+5426,U+542b,U+5438,U+5462,U+54ea,U+555f,U+5566,U+5584,U+5609,U+570d,U+571f,U+5747,U+5802,U+58d3,U+591c,U+5920,U+5922,U+5957,U+5979,U+5a92,U+5abd,U+5b63,U+5b69,U+5b83,U+5b9c,U+5bb3,U+5bc4,U+5bf5,U+5c3c,U+5c40,U+5c4b,U+5c64,U+5cf6,U+5de6,U+5e0c,U+5e55,U+5eab,U+5ead,U+5ee0,U+5f85,U+5f8b,U+5fa9,U+5fd7-5fd8,U+5ff5,U+600e,U+6298,U+62db,U+62ff,U+639b,U+63a7,U+642d,U+6469,U+64ad,U+651d,U+653b,U+65b7,U+65cf,U+665a,U+666e,U+66fe,U+6728,U+674e,U+67b6,U+6821,U+6839,U+6843,U+6a94,U+6b50,U+6b62,U+6b72,U+6b7b,U+6bcd,U+6bdb,U+6c38,U+6c7a,U+6c7d,U+6c99,U+6cb9,U+6ce2,U+6cf0,U+6d17,U+6d32,U+6e2c,U+6fb3,U+7206,U+723e,U+725b,U+734e,U+7387,U+73ed,U+7565,U+7570,U+76ca,U+76e4,U+773e,U+77ed,U+77f3,U+7814,U+7834,U+7968,U+79d8,U+7a76,U+7a7f,U+7b11,U+7b46,U+7b54,U+7bc4,U+7d19,U+7d20,U+7d22,U+7d42,U+7d55,U+7e7c,U+7f85,U+7ffb,U+8077,U+8089,U+80cc,U+81c9,U+81f4,U+81fa,U+820a,U+822c,U+826f,U+85cd,U+86cb,U+88dc,U+8986,U+8a0e,U+8a2a,U+8a73,U+8a8c,U+8b1b,U+8b9a,U+8c50,U+8c61,U+8ca0,U+8cde,U+8cfd,U+8d8a,U+8df3,U+8e64,U+8ecd,U+8edf,U+8f38,U+8ff7,U+9000,U+9047,U+9060,U+90f5,U+9152,U+91ce,U+9280,U+9418,U+9435,U+9589,U+9592,U+9678,U+967d,U+968a,U+96aa,U+96c5,U+96d6,U+96dc,U+96f6,U+9732,U+9748,U+9802,U+9806,U+9808,U+9818,U+983b,U+984d,U+9867,U+98db,U+98f2,U+98fe,U+9a5a,U+9b06,U+9b5a,U+9bae,U+9e97,U+ff1b,U+ff5e}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-116-wght-normal-Df_sWUUP.woff2) format("woff2-variations");unicode-range:U+26,U+40,U+5f,U+4e14,U+4e9e,U+4ec0,U+4f4e-4f4f,U+4f73,U+4fee,U+503c,U+5047,U+514b,U+516b,U+516d,U+5178,U+520a,U+5236,U+5343,U+5347,U+534a,U+5370,U+53cd,U+53e4,U+53e6,U+53f2,U+5403,U+5411,U+5427,U+5468,U+5473,U+547d,U+552e,U+55ce,U+5740,U+57ce,U+5883,U+589e,U+5931,U+5947,U+59cb,U+5a1b,U+5b58,U+5b98,U+5ba4,U+5bc6,U+5bcc,U+5beb,U+5bf6,U+5c45,U+5c6c,U+5dee,U+5df4,U+5e03,U+5e33,U+5e6b,U+5e7e,U+5e8f,U+5e95,U+5ea7,U+5f15,U+5f62,U+5f69,U+5f80,U+5fae,U+5fb7,U+601d,U+60e0,U+614b,U+6230,U+6236,U+623f,U+628a,U+6295,U+62c9,U+6309,U+63db,U+64c7,U+64ca,U+64da,U+652f,U+6545,U+6548,U+65af,U+65e9,U+6625,U+666f,U+667a,U+670b,U+671b,U+6750,U+677f,U+6848,U+6975,U+6a13,U+6a21,U+6aa2,U+6b65,U+6b77,U+6bb5,U+6cc1,U+6ce8,U+6df1,U+6e90,U+6e96,U+6eab,U+6f14,U+6f2b,U+700f,U+706b,U+724c,U+72c0,U+7368,U+7372,U+74b0,U+756b,U+76ae,U+773c,U+78ba,U+78bc,U+798f,U+79ae,U+7a4d,U+7ae5,U+7b56,U+7b97,U+7bb1,U+7bc7,U+7c73,U+7c89,U+7d00,U+7d30,U+7d39,U+7d72,U+7dad,U+7e8c,U+7f6e,U+7fa4,U+7fa9,U+7fd2,U+8003,U+807d,U+80a1,U+80b2,U+8166,U+8208-8209,U+82e5,U+843d,U+85cf,U+85dd,U+862d,U+8857,U+8863,U+88e1,U+89ba,U+89d2,U+8a31,U+8a62,U+8a66,U+8a72,U+8abf,U+8b1d,U+8b58,U+8b70,U+8b80,U+8ca1,U+8ca8,U+8cac,U+8cbc,U+8d70,U+8da3,U+8db3,U+8ddf,U+8f03,U+8f15,U+8f2f,U+8fa6,U+8fce,U+8ffd,U+900f,U+9031,U+9069,U+908a,U+91ab,U+91cc,U+92b7,U+9322,U+932f,U+9375,U+9632,U+963f,U+9644,U+9662,U+9673,U+96a8,U+96c4,U+96d9,U+96e2-96e3,U+96f2,U+9752,U+97d3,U+97ff,U+9805,U+9810,U+986f,U+990a,U+9910,U+9928,U+9ec3,U+9ed1,U+9f8d}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-117-wght-normal-DxSUmn6U.woff2) format("woff2-variations");unicode-range:U+3e,U+7e,U+3000,U+300a-300b,U+3010-3011,U+4e16,U+4e26,U+4e94,U+4e9b,U+4ea4,U+4eca-4ecb,U+4efb,U+4efd,U+4f46,U+4f55,U+4f9b,U+4f9d,U+4fbf,U+505a,U+5065,U+5099,U+50cf,U+50f9,U+512a,U+5143,U+5148,U+514d,U+5152,U+5169,U+5171,U+5177,U+518a,U+5217,U+5225,U+5247,U+5275,U+529f,U+52a9,U+5305,U+5341,U+5357,U+5361,U+5373,U+53bb,U+53c3,U+53c8,U+53d6-53d7,U+53e3,U+53ea,U+53f8,U+5404,U+559c,U+5668,U+56db,U+56e0,U+5712,U+5718,U+578b,U+57fa,U+58eb,U+592a,U+5c0b,U+5c0e,U+5c11,U+5c1a,U+5c55,U+5c71,U+5df1,U+5e2b,U+5e36,U+5e97,U+5eb7,U+5ee3,U+5efa,U+5f35,U+5f37,U+5f88,U+5f9e,U+5fc5,U+606f,U+60a8,U+6232,U+624d,U+6253,U+627e,U+6280,U+62cd,U+6301,U+6307,U+6392,U+63a5,U+6539,U+653e-653f,U+6559,U+6574,U+65c5,U+6613,U+66f8,U+672a,U+6797,U+67e5,U+6a19,U+6a23,U+6b61,U+6bcf,U+6bd4,U+6c11,U+6c42,U+6d41,U+6d77,U+6d88,U+6e05,U+6e2f,U+6eff,U+7136,U+7167,U+71df,U+738b,U+73a9,U+7403,U+7531,U+7537,U+754c,U+7559,U+767d-767e,U+76f4,U+793a,U+795e,U+79c1,U+79d1,U+7a2e,U+7a31,U+7a7a,U+7ae0,U+7ba1,U+7bc0,U+7c21,U+7cfb,U+7d04-7d05,U+7d1a,U+7d44,U+7d66,U+7d71,U+7de8,U+7e3d,U+8001,U+800c,U+805e,U+8072,U+81f3,U+82b1,U+82f1,U+83ef,U+842c,U+8457,U+85a6,U+8655,U+8853,U+88ab,U+88dd,U+88fd,U+897f,U+898f,U+89aa,U+89bd,U+89c0,U+89e3,U+8a02,U+8a3b,U+8a55,U+8a8d,U+8a9e,U+8ad6,U+8b49,U+8b77,U+8b8a,U+8b93,U+8cb7,U+8ce3,U+8cea,U+8cfc,U+8f09,U+8fd1,U+9001,U+901f-9020,U+9054,U+90a3,U+914d,U+91cf,U+9304,U+95b1,U+9650,U+9664,U+969b,U+96b1,U+96c6,U+9700,U+975e,U+97f3,U+98a8,U+98df,U+9999,U+99ac,U+9a57,U+9ebc}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-118-wght-normal-CWrNe9UE.woff2) format("woff2-variations");unicode-range:U+d,U+2b,U+7c,U+a0,U+a9,U+300c-300d,U+4e09,U+4e3b,U+4e4b,U+4e5f,U+4e86,U+4e8b-4e8c,U+4eab,U+4ed6,U+4ee3-4ee4,U+4ef6,U+4f1a,U+4f4d,U+4f60,U+4f7f,U+4f86,U+4fdd,U+4fe1,U+5011,U+50b3,U+5149,U+5167,U+5176,U+518d,U+5229,U+524d,U+529b,U+52a0,U+52d9,U+5316-5317,U+5340,U+539f,U+53ca-53cb,U+5408,U+540c-540d,U+544a,U+548c,U+54c1,U+54e1,U+5546,U+554f,U+55ae,U+56de,U+5716,U+5831,U+5834,U+5916,U+5929,U+5973,U+597d,U+5982,U+5b57,U+5b78,U+5b89,U+5b8c,U+5b9a,U+5ba2,U+5bb9,U+5be6,U+5c07-5c08,U+5c0d,U+5c31,U+5de5,U+5df2,U+5e02,U+5e38,U+5e73-5e74,U+5ea6,U+5f0f,U+5f71,U+5f8c,U+5f97,U+5feb,U+6027,U+60c5,U+60f3,U+610f,U+611b,U+611f,U+61c9,U+6210,U+6216,U+6240,U+624b,U+63a8,U+63d0,U+641c,U+6536,U+6578,U+6599,U+65b9,U+660e,U+661f,U+662d,U+66f4,U+670d,U+671f,U+6771,U+679c,U+682a,U+683c,U+689d,U+696d,U+6a02,U+6a5f,U+6b0a,U+6b21,U+6b3e,U+6b64,U+6c23,U+6c34,U+6c92,U+6cbb,U+6cd5,U+6d3b,U+7063,U+7121,U+71b1,U+7247-7248,U+7269,U+7279,U+73fe,U+7406,U+7522,U+7576,U+767b,U+76ee,U+76f8,U+770b,U+771f,U+77e5,U+793e,U+7a0b,U+7acb,U+7ad9,U+7b2c,U+7b49,U+7cbe,U+7d50,U+7d61,U+7d93,U+7dda,U+7f8e,U+8005,U+806f,U+80fd,U+81ea,U+8207,U+8272,U+865f,U+8868,U+8981,U+898b,U+8996,U+8a00,U+8a08,U+8a0a,U+8a18,U+8a2d,U+8a71,U+8aaa,U+8acb,U+8cbb,U+8cc7,U+8d77,U+8d85,U+8def,U+8eab,U+8eca,U+8f49,U+9019-901a,U+9023,U+9032,U+904a-904b,U+904e,U+9053,U+9078,U+9084,U+90e8,U+90fd,U+91cd,U+91d1,U+9577,U+9580,U+9593,U+9762,U+982d,U+984c,U+985e,U+9996,U+9ad4,U+9ad8,U+9ede,U+ff01,U+ff08-ff09,U+ff1f}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-119-wght-normal-uK-ZmsBB.woff2) format("woff2-variations");unicode-range:U+20-22,U+27-2a,U+2c-3b,U+3f,U+41-5d,U+61-7b,U+7d,U+ab,U+ae,U+b2-b3,U+bb,U+bf,U+c9,U+cd,U+d6,U+e0-ef,U+f1-f4,U+f6,U+f9-fa,U+fc-fd,U+101,U+103,U+110-111,U+113,U+12b,U+14d,U+16b,U+1a1,U+1b0,U+1ce,U+300-301,U+1ea1,U+1ea3,U+1ebf,U+1ec7,U+2013-2014,U+2039-203a,U+203c,U+2122,U+3001-3002,U+3113-3114,U+3118,U+311a-3129,U+4e00,U+4e0a-4e0b,U+4e0d,U+4e2d,U+4eba,U+4ee5,U+4f5c,U+500b,U+5165,U+5168,U+516c,U+51fa,U+5206,U+5230,U+52d5,U+53ef-53f0,U+570b,U+5728,U+5730,U+591a,U+5927,U+5b50,U+5bb6,U+5c0f,U+5fc3,U+6211,U+6587,U+65b0,U+65bc,U+65e5,U+662f,U+6642,U+6700,U+6703,U+6708-6709,U+672c,U+6b63,U+70b9-70ba,U+751f,U+7528,U+767c,U+7684,U+7db2,U+884c,U+958b,U+95dc,U+96fb,U+9801,U+ff0c,U+ff1a}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-cyrillic-wght-normal-DHeihy9e.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-vietnamese-wght-normal-B77OGAeV.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-latin-ext-wght-normal-BFabhjDY.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Noto Sans TC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/noto-sans-tc-latin-wght-normal-CjMECRfU.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%;color:var(--vscode-editor-foreground);background-color:var(--vscode-editor-background);overflow-wrap:initial}.monaco-editor-background{background-color:var(--vscode-editor-background)}.monaco-editor .rangeHighlight{background-color:var(--vscode-editor-rangeHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-rangeHighlightBorder)}.monaco-editor.hc-black .rangeHighlight,.monaco-editor.hc-light .rangeHighlight{border-style:dotted}.monaco-editor .symbolHighlight{background-color:var(--vscode-editor-symbolHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-symbolHighlightBorder)}.monaco-editor.hc-black .symbolHighlight,.monaco-editor.hc-light .symbolHighlight{border-style:dotted}.monaco-editor .editorCanvas{position:absolute;width:100%;height:100%;z-index:0;pointer-events:none}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .view-overlays>div,.monaco-editor .margin-view-overlays>div{position:absolute;width:100%}.monaco-editor .squiggly-error{border-bottom:4px double var(--vscode-editorError-border)}.monaco-editor .squiggly-error:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorError-background)}.monaco-editor .squiggly-warning{border-bottom:4px double var(--vscode-editorWarning-border)}.monaco-editor .squiggly-warning:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorWarning-background)}.monaco-editor .squiggly-info{border-bottom:4px double var(--vscode-editorInfo-border)}.monaco-editor .squiggly-info:before{display:block;content:"";width:100%;height:100%;background:var(--vscode-editorInfo-background)}.monaco-editor .squiggly-hint{border-bottom:2px dotted var(--vscode-editorHint-border)}.monaco-editor.showUnused .squiggly-unnecessary{border-bottom:2px dashed var(--vscode-editorUnnecessaryCode-border)}.monaco-editor.showDeprecated .squiggly-inline-deprecated{text-decoration:line-through;text-decoration-color:var(--vscode-editor-foreground, inherit)}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset}.monaco-scrollable-element>.scrollbar{background:var(--vscode-scrollbar-background)}.monaco-scrollable-element>.scrollbar>.slider{background:var(--vscode-scrollbarSlider-background)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-scrollable-element>.scrollbar>.slider.active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .blockDecorations-container{position:absolute;top:0;pointer-events:none}.monaco-editor .blockDecorations-block{position:absolute;box-sizing:border-box}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box;height:100%}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute;height:100%}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .glyph-margin-widgets .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin:before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.monaco-editor .lines-content .core-guide{position:absolute;box-sizing:border-box;height:100%}.monaco-editor .margin-view-overlays .line-numbers{bottom:0;font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-editor .line-numbers{color:var(--vscode-editorLineNumber-foreground)}.monaco-editor .line-numbers.active-line-number{color:var(--vscode-editorLineNumber-activeForeground)}.monaco-mouse-cursor-text{cursor:text}.mtkcontrol{color:#fff!important;background:#960000!important}.mtkoverflow{background-color:var(--vscode-button-background, var(--vscode-editor-background));color:var(--vscode-button-foreground, var(--vscode-editor-foreground));border-width:1px;border-style:solid;border-color:var(--vscode-contrastBorder);border-radius:2px;padding:4px;cursor:pointer}.mtkoverflow:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none}.monaco-editor.mac .lines-content:hover,.monaco-editor.mac .view-line:hover,.monaco-editor.mac .view-lines:hover{user-select:text;-webkit-user-select:text;-ms-user-select:text}.monaco-editor.enable-user-select{user-select:initial;-webkit-user-select:initial}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{box-sizing:border-box;position:absolute;width:100%}.monaco-editor .lines-content>.view-lines>.view-line>span{top:0;bottom:0;position:absolute}.monaco-editor .mtkw{color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .mtkz{display:inline-block;color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin{background-color:var(--vscode-editorGutter-background)}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-slider .minimap-slider-horizontal{background:var(--vscode-minimapSlider-background)}.monaco-editor .minimap-slider:hover .minimap-slider-horizontal{background:var(--vscode-minimapSlider-hoverBackground)}.monaco-editor .minimap-slider.active .minimap-slider-horizontal{background:var(--vscode-minimapSlider-activeBackground)}.monaco-editor .minimap-shadow-visible{box-shadow:var(--vscode-scrollbar-shadow) -6px 0 6px -6px inset}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px;pointer-events:none}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.minimap.minimap-autohide-mouseover,.minimap.minimap-autohide-scroll{opacity:0;transition:opacity .5s}.minimap.minimap-autohide-scroll{pointer-events:none}.minimap.minimap-autohide-mouseover:hover,.minimap.minimap-autohide-scroll.active{opacity:1;pointer-events:auto}.monaco-editor .minimap{z-index:5}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0;box-shadow:1px 0 0 0 var(--vscode-editorRuler-foreground) inset}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px;box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.monaco-editor .selected-text{background-color:var(--vscode-editor-inactiveSelectionBackground)}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor.hc-light .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-light .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-light .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-light .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-editor .mwh{position:absolute;color:var(--vscode-editorWhitespace-foreground)!important}.monaco-editor .monaco-decoration-css-rule-extractor{visibility:hidden;pointer-events:none}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent;z-index:-10}.monaco-editor .inputarea.ime-input{z-index:10;caret-color:var(--vscode-editorCursor-foreground);color:var(--vscode-editor-foreground)}.monaco-editor .native-edit-context{margin:0;padding:0;position:absolute;overflow-y:scroll;scrollbar-width:none;z-index:-10;white-space:pre-wrap}.monaco-editor .ime-text-area{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent;z-index:-10}.monaco-editor .edit-context-composition-none{background-color:transparent;border-bottom:none}.monaco-editor :not(.hc-black,.hc-light) .edit-context-composition-secondary{border-bottom:1px solid var(--vscode-editor-compositionBorder)}.monaco-editor :not(.hc-black,.hc-light) .edit-context-composition-primary{border-bottom:2px solid var(--vscode-editor-compositionBorder)}.monaco-editor :is(.hc-black,.hc-light) .edit-context-composition-secondary{border:1px solid var(--vscode-editor-compositionBorder)}.monaco-editor :is(.hc-black,.hc-light) .edit-context-composition-primary{border:2px solid var(--vscode-editor-compositionBorder)}.monaco-editor .margin-view-overlays .gpu-mark{position:absolute;top:0;bottom:0;left:0;width:100%;display:inline-block;border-left:solid 2px var(--vscode-editorWarning-foreground);opacity:.2;transition:background-color .1s linear}.monaco-editor .margin-view-overlays .gpu-mark:hover{background-color:var(--vscode-editorWarning-foreground)}.monaco-select-box{width:100%;cursor:pointer;border-radius:2px}.monaco-select-box-dropdown-container{font-size:13px;font-weight:400;text-transform:none}.monaco-action-bar .action-item.select-container{cursor:default}.monaco-action-bar .action-item .monaco-select-box{cursor:pointer;min-width:100px;min-height:18px;padding:2px 23px 2px 8px}.mac .monaco-action-bar .action-item .monaco-select-box{font-size:11px;border-radius:3px;min-height:24px}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list .monaco-scrollable-element>.scrollbar.vertical,.monaco-pane-view>.monaco-split-view2.vertical>.monaco-scrollable-element>.scrollbar.vertical{z-index:14}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000;background-color:var(--vscode-list-activeSelectionBackground);color:var(--vscode-list-activeSelectionForeground);outline:1px solid var(--vscode-list-focusOutline);outline-offset:-1px;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-select-box-dropdown-padding{--dropdown-padding-top: 1px;--dropdown-padding-bottom: 1px}.hc-black .monaco-select-box-dropdown-padding,.hc-light .monaco-select-box-dropdown-padding{--dropdown-padding-top: 3px;--dropdown-padding-bottom: 4px}.monaco-select-box-dropdown-container{display:none;box-sizing:border-box}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown *{margin:0}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown a:focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-select-box-dropdown-container>.select-box-details-pane>.select-box-description-markdown code{line-height:15px;font-family:var(--monaco-monospace-font)}.monaco-select-box-dropdown-container.visible{display:flex;flex-direction:column;text-align:left;width:1px;overflow:hidden;border-bottom-left-radius:3px;border-bottom-right-radius:3px}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container{flex:0 0 auto;align-self:flex-start;padding-top:var(--dropdown-padding-top);padding-bottom:var(--dropdown-padding-bottom);padding-left:1px;padding-right:1px;width:100%;overflow:hidden;box-sizing:border-box}.monaco-select-box-dropdown-container>.select-box-details-pane{padding:5px}.hc-black .monaco-select-box-dropdown-container>.select-box-dropdown-list-container{padding-top:var(--dropdown-padding-top);padding-bottom:var(--dropdown-padding-bottom)}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row{cursor:pointer}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-text{text-overflow:ellipsis;overflow:hidden;padding-left:3.5px;white-space:nowrap;float:left}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-detail{text-overflow:ellipsis;overflow:hidden;padding-left:3.5px;white-space:nowrap;float:left;opacity:.7}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.option-decorator-right{text-overflow:ellipsis;overflow:hidden;padding-right:10px;white-space:nowrap;float:right}.monaco-select-box-dropdown-container>.select-box-dropdown-list-container .monaco-list .monaco-list-row>.visually-hidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control{flex:1 1 auto;align-self:flex-start;opacity:0}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div{overflow:hidden;max-height:0px}.monaco-select-box-dropdown-container>.select-box-dropdown-container-width-control>.width-control-div>.option-text-width-control{padding-left:4px;padding-right:8px;white-space:nowrap}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label{display:flex;font-size:11px;padding:3px;border-radius:5px}.monaco-action-bar .action-item.disabled .action-label:not(.icon),.monaco-action-bar .action-item.disabled .action-label:not(.icon):before,.monaco-action-bar .action-item.disabled .action-label:not(.icon):hover{color:var(--vscode-disabledForeground)}.monaco-action-bar .action-item.disabled .action-label.icon,.monaco-action-bar .action-item.disabled .action-label.icon:before,.monaco-action-bar .action-item.disabled .action-label.icon:hover{opacity:.6}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid var(--vscode-disabledForeground);padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:var(--vscode-disabledForeground)}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator{display:flex;align-items:center;cursor:default}.monaco-action-bar .action-item.action-dropdown-item>.action-dropdown-item-separator>div{width:1px}.monaco-diff-editor .diff-review{position:absolute}.monaco-component.diff-review{user-select:none;-webkit-user-select:none;z-index:99}.monaco-component.diff-review .diff-review-line-number{text-align:right;display:inline-block;color:var(--vscode-editorLineNumber-foreground)}.monaco-component.diff-review .diff-review-summary{padding-left:10px}.monaco-component.diff-review .diff-review-shadow{position:absolute;box-shadow:var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset}.monaco-component.diff-review .diff-review-row{white-space:pre}.monaco-component.diff-review .diff-review-table{display:table;min-width:100%}.monaco-component.diff-review .diff-review-row{display:table-row;width:100%}.monaco-component.diff-review .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-component.diff-review .diff-review-spacer>.codicon{font-size:9px!important}.monaco-component.diff-review .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px;z-index:100}.monaco-component.diff-review .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-component.diff-review .revertButton{cursor:pointer}.monaco-component.diff-review .action-label{background:var(--vscode-editorActionList-background)}:root{--vscode-sash-size: 4px;--vscode-sash-hover-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--vscode-sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--vscode-sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--vscode-sash-size) * 2);width:calc(var(--vscode-sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--vscode-sash-size) * -.5);top:calc(var(--vscode-sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--vscode-sash-size) * -.5);bottom:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--vscode-sash-size) * -.5);left:calc(var(--vscode-sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--vscode-sash-size) * -.5);right:calc(var(--vscode-sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;background:transparent}.monaco-enable-motion .monaco-sash:before{transition:background-color .1s ease-out}.monaco-sash.hover:before,.monaco-sash.active:before{background:var(--vscode-sash-hoverBorder)}.monaco-sash.vertical:before{width:var(--vscode-sash-hover-size);left:calc(50% - (var(--vscode-sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--vscode-sash-hover-size);top:calc(50% - (var(--vscode-sash-hover-size) / 2))}.pointer-events-disabled{pointer-events:none!important}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:#0ff3}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-toolbar{height:100%}.monaco-toolbar .toolbar-toggle-more{display:inline-block;padding:0}.monaco-toolbar.responsive .monaco-action-bar>.actions-container>.action-item{flex-shrink:1;min-width:20px}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-action-bar .action-item.menu-entry.text-only .action-label{color:var(--vscode-descriptionForeground);overflow:hidden;border-radius:2px}.monaco-action-bar .action-item.menu-entry.text-only.use-comma:not(:last-of-type) .action-label:after{content:", "}.monaco-action-bar .action-item.menu-entry.text-only+.action-item:not(.text-only)>.monaco-dropdown .action-label{color:var(--vscode-descriptionForeground)}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-editor .diff-hidden-lines-widget{width:100%}.monaco-editor .diff-hidden-lines{height:0px;transform:translateY(-10px);font-size:13px;line-height:14px}.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover,.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,.monaco-editor .diff-hidden-lines .top.dragging,.monaco-editor .diff-hidden-lines .bottom.dragging{background-color:var(--vscode-focusBorder)}.monaco-editor .diff-hidden-lines .top,.monaco-editor .diff-hidden-lines .bottom{transition:background-color .1s ease-out;height:4px;background-color:transparent;background-clip:padding-box;border-bottom:2px solid transparent;border-top:4px solid transparent}.monaco-editor.draggingUnchangedRegion.canMoveTop:not(.canMoveBottom) *,.monaco-editor .diff-hidden-lines .top.canMoveTop:not(.canMoveBottom),.monaco-editor .diff-hidden-lines .bottom.canMoveTop:not(.canMoveBottom){cursor:n-resize!important}.monaco-editor.draggingUnchangedRegion:not(.canMoveTop).canMoveBottom *,.monaco-editor .diff-hidden-lines .top:not(.canMoveTop).canMoveBottom,.monaco-editor .diff-hidden-lines .bottom:not(.canMoveTop).canMoveBottom{cursor:s-resize!important}.monaco-editor.draggingUnchangedRegion.canMoveTop.canMoveBottom *,.monaco-editor .diff-hidden-lines .top.canMoveTop.canMoveBottom,.monaco-editor .diff-hidden-lines .bottom.canMoveTop.canMoveBottom{cursor:ns-resize!important}.monaco-editor .diff-hidden-lines .top{transform:translateY(4px)}.monaco-editor .diff-hidden-lines .bottom{transform:translateY(-6px)}.monaco-editor .diff-unchanged-lines{background:var(--vscode-diffEditor-unchangedCodeBackground)}.monaco-editor .noModificationsOverlay{z-index:1;background:var(--vscode-editor-background);display:flex;justify-content:center;align-items:center}.monaco-editor .diff-hidden-lines .center{background:var(--vscode-diffEditor-unchangedRegionBackground);color:var(--vscode-diffEditor-unchangedRegionForeground);overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;height:24px;box-shadow:inset 0 -5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow),inset 0 5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow)}.monaco-editor .diff-hidden-lines .center span.codicon{vertical-align:middle}.monaco-editor .diff-hidden-lines .center a:hover .codicon{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .diff-hidden-lines div.breadcrumb-item{cursor:pointer}.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover{color:var(--vscode-editorLink-activeForeground)}.monaco-editor .movedOriginal,.monaco-editor .movedModified{border:2px solid var(--vscode-diffEditor-move-border)}.monaco-editor .movedOriginal.currentMove,.monaco-editor .movedModified.currentMove{border:2px solid var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path.currentMove{stroke:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines path{pointer-events:visiblestroke}.monaco-diff-editor .moved-blocks-lines .arrow{fill:var(--vscode-diffEditor-move-border)}.monaco-diff-editor .moved-blocks-lines .arrow.currentMove{fill:var(--vscode-diffEditor-moveActive-border)}.monaco-diff-editor .moved-blocks-lines .arrow-rectangle{fill:var(--vscode-editor-background)}.monaco-diff-editor .moved-blocks-lines{position:absolute;pointer-events:none}.monaco-diff-editor .moved-blocks-lines path{fill:none;stroke:var(--vscode-diffEditor-move-border);stroke-width:2}.monaco-editor .char-delete.diff-range-empty{margin-left:-1px;border-left:solid var(--vscode-diffEditor-removedTextBackground) 3px}.monaco-editor .char-insert.diff-range-empty{border-left:solid var(--vscode-diffEditor-insertedTextBackground) 3px}.monaco-editor .fold-unchanged{cursor:pointer}.monaco-diff-editor .diff-moved-code-block{display:flex;justify-content:flex-end;margin-top:-4px}.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon{width:12px;height:12px;font-size:12px}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:#00000008}.monaco-diff-editor.vs-dark .diffOverview{background:#ffffff03}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:#0000}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:#ababab66}.modified-in-monaco-diff-editor.hc-black .slider.active,.modified-in-monaco-diff-editor.hc-light .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign,.monaco-editor.hc-light .insert-sign,.monaco-diff-editor.hc-light .insert-sign,.monaco-editor.hc-light .delete-sign,.monaco-diff-editor.hc-light .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .arrow-revert-change{z-index:10;position:absolute}.monaco-editor .arrow-revert-change:hover{cursor:pointer}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}.monaco-editor .char-insert,.monaco-diff-editor .char-insert{background-color:var(--vscode-diffEditor-insertedTextBackground)}.monaco-editor .line-insert,.monaco-diff-editor .line-insert{background-color:var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .line-insert,.monaco-editor .char-insert{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-insertedTextBorder)}.monaco-editor.hc-black .line-insert,.monaco-editor.hc-light .line-insert,.monaco-editor.hc-black .char-insert,.monaco-editor.hc-light .char-insert{border-style:dashed}.monaco-editor .line-delete,.monaco-editor .char-delete{box-sizing:border-box;border:1px solid var(--vscode-diffEditor-removedTextBorder)}.monaco-editor.hc-black .line-delete,.monaco-editor.hc-light .line-delete,.monaco-editor.hc-black .char-delete,.monaco-editor.hc-light .char-delete{border-style:dashed}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .gutter-insert,.monaco-diff-editor .gutter-insert{background-color:var(--vscode-diffEditorGutter-insertedLineBackground, var(--vscode-diffEditor-insertedLineBackground), var(--vscode-diffEditor-insertedTextBackground))}.monaco-editor .char-delete,.monaco-diff-editor .char-delete,.monaco-editor .inline-deleted-text{background-color:var(--vscode-diffEditor-removedTextBackground)}.monaco-editor .inline-deleted-text{text-decoration:line-through}.monaco-editor .line-delete,.monaco-diff-editor .line-delete{background-color:var(--vscode-diffEditor-removedLineBackground, var(--vscode-diffEditor-removedTextBackground))}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .gutter-delete,.monaco-diff-editor .gutter-delete{background-color:var(--vscode-diffEditorGutter-removedLineBackground, var(--vscode-diffEditor-removedLineBackground), var(--vscode-diffEditor-removedTextBackground))}.monaco-diff-editor.side-by-side .editor.modified{box-shadow:-6px 0 5px -5px var(--vscode-scrollbar-shadow);border-left:1px solid var(--vscode-diffEditor-border)}.monaco-diff-editor.side-by-side .editor.original{box-shadow:6px 0 5px -5px var(--vscode-scrollbar-shadow);border-right:1px solid var(--vscode-diffEditor-border)}.monaco-diff-editor .diffViewport{background:var(--vscode-scrollbarSlider-background)}.monaco-diff-editor .diffViewport:hover{background:var(--vscode-scrollbarSlider-hoverBackground)}.monaco-diff-editor .diffViewport:active{background:var(--vscode-scrollbarSlider-activeBackground)}.monaco-editor .diagonal-fill{background-image:linear-gradient(-45deg,var(--vscode-diffEditor-diagonalFill) 12.5%,#0000 12.5%,#0000 50%,var(--vscode-diffEditor-diagonalFill) 50%,var(--vscode-diffEditor-diagonalFill) 62.5%,#0000 62.5%,#0000 100%);background-size:8px 8px}.monaco-diff-editor .gutter{position:relative;overflow:hidden;flex-shrink:0;flex-grow:0}.monaco-diff-editor .gutter>div{position:absolute}.monaco-diff-editor .gutter .gutterItem{opacity:0;transition:opacity .7s}.monaco-diff-editor .gutter .gutterItem.showAlways{opacity:1;transition:none}.monaco-diff-editor .gutter .gutterItem.noTransition{transition:none}.monaco-diff-editor .gutter:hover .gutterItem{opacity:1;transition:opacity .1s ease-in-out}.monaco-diff-editor .gutter .gutterItem .background{position:absolute;height:100%;left:50%;width:1px;border-left:2px var(--vscode-menu-separatorBackground) solid}.monaco-diff-editor .gutter .gutterItem .buttons{position:absolute;width:100%;display:flex;justify-content:center;align-items:center}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar{height:fit-content}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar{line-height:1}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container{width:fit-content;border-radius:4px;background:var(--vscode-editorGutter-itemBackground)}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container .action-item:hover{background:var(--vscode-toolbar-hoverBackground)}.monaco-diff-editor .gutter .gutterItem .buttons .monaco-toolbar .monaco-action-bar .actions-container .action-item .action-label{color:var(--vscode-editorGutter-itemGlyphForeground);padding:1px 2px}.monaco-diff-editor .diff-hidden-lines-compact{display:flex;height:11px}.monaco-diff-editor .diff-hidden-lines-compact .line-left,.monaco-diff-editor .diff-hidden-lines-compact .line-right{height:1px;border-top:1px solid;border-color:var(--vscode-editorCodeLens-foreground);opacity:.5;margin:auto;width:100%}.monaco-diff-editor .diff-hidden-lines-compact .line-left{width:20px}.monaco-diff-editor .diff-hidden-lines-compact .text{color:var(--vscode-editorCodeLens-foreground);text-wrap:nowrap;font-size:11px;line-height:11px;margin:0 4px}.monaco-editor .line-delete-selectable{user-select:text!important;-webkit-user-select:text!important;z-index:1!important}.line-delete-selectable .view-line{user-select:text!important;-webkit-user-select:text!important}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box;background-color:var(--vscode-editorBracketMatch-background);border:1px solid var(--vscode-editorBracketMatch-border)}.inline-editor-progress-decoration{display:inline-block;width:1em;height:1em}.inline-progress-widget{display:flex!important;justify-content:center;align-items:center}.inline-progress-widget .icon{font-size:80%!important}.inline-progress-widget:hover .icon{font-size:90%!important;animation:none}.inline-progress-widget:hover .icon:before{content:var(--vscode-icon-x-content);font-family:var(--vscode-icon-x-font-family)}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:2px 4px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-inputValidation-infoBorder);border-radius:3px}.monaco-editor .monaco-editor-overlaymessage .message p{margin-block:0px}.monaco-editor .monaco-editor-overlaymessage .message a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-editor-overlaymessage .message a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor.hc-black .monaco-editor-overlaymessage .message,.monaco-editor.hc-light .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute;left:2px}.monaco-editor .monaco-editor-overlaymessage .anchor.top{border-bottom-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage .anchor.below{border-top-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;border-radius:2px;text-align:center;cursor:pointer;justify-content:center;align-items:center;border:1px solid var(--vscode-button-border, transparent);line-height:18px}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button .codicon{margin:0 .2em;color:inherit!important}.monaco-text-button.monaco-text-button-with-short-label{flex-direction:row;flex-wrap:wrap;padding:0 4px;overflow:hidden;height:28px}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label{flex-basis:100%}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{flex-grow:1;width:0;overflow:hidden}.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label,.monaco-text-button.monaco-text-button-with-short-label>.monaco-button-label-short{display:flex;justify-content:center;align-items:center;font-weight:400;font-style:inherit;padding:4px 0}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown.disabled{cursor:default}.monaco-button-dropdown>.monaco-button:focus{outline-offset:-1px!important}.monaco-button-dropdown.disabled>.monaco-button.disabled,.monaco-button-dropdown.disabled>.monaco-button.disabled:focus,.monaco-button-dropdown.disabled>.monaco-button-dropdown-separator{opacity:.4!important}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-right-width:0!important}.monaco-button-dropdown .monaco-button-dropdown-separator{padding:4px 0;cursor:default}.monaco-button-dropdown .monaco-button-dropdown-separator>div{height:100%;width:1px}.monaco-button-dropdown>.monaco-button.monaco-dropdown-button{border:1px solid var(--vscode-button-border, transparent);border-left-width:0!important;border-radius:0 2px 2px 0;display:flex;align-items:center}.monaco-button-dropdown>.monaco-button.monaco-text-button{border-radius:2px 0 0 2px}.monaco-description-button{display:flex;flex-direction:column;align-items:center;margin:4px 5px}.monaco-description-button .monaco-button-description{font-style:italic;font-size:11px;padding:4px 20px}.monaco-description-button .monaco-button-label,.monaco-description-button .monaco-button-description{display:flex;justify-content:center;align-items:center}.monaco-description-button .monaco-button-label>.codicon,.monaco-description-button .monaco-button-description>.codicon{margin:0 .2em;color:inherit!important}.monaco-button.default-colors,.monaco-button-dropdown.default-colors>.monaco-button{color:var(--vscode-button-foreground);background-color:var(--vscode-button-background)}.monaco-button.default-colors:hover,.monaco-button-dropdown.default-colors>.monaco-button:hover{background-color:var(--vscode-button-hoverBackground)}.monaco-button.default-colors.secondary,.monaco-button-dropdown.default-colors>.monaco-button.secondary{color:var(--vscode-button-secondaryForeground);background-color:var(--vscode-button-secondaryBackground)}.monaco-button.default-colors.secondary:hover,.monaco-button-dropdown.default-colors>.monaco-button.secondary:hover{background-color:var(--vscode-button-secondaryHoverBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator{background-color:var(--vscode-button-background);border-top:1px solid var(--vscode-button-border);border-bottom:1px solid var(--vscode-button-border)}.monaco-button-dropdown.default-colors .monaco-button.secondary+.monaco-button-dropdown-separator{background-color:var(--vscode-button-secondaryBackground)}.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator>div{background-color:var(--vscode-button-separator)}.action-widget{font-size:13px;min-width:100px;max-width:80vw;z-index:40;display:block;width:100%;border:1px solid var(--vscode-menu-border)!important;border-radius:5px;background-color:var(--vscode-menu-background);color:var(--vscode-menu-foreground);padding:4px;box-shadow:0 2px 8px var(--vscode-widget-shadow)}.context-view-block{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:-1}.context-view-pointerBlock{position:fixed;cursor:initial;left:0;top:0;width:100%;height:100%;z-index:2}.action-widget .monaco-list{user-select:none;-webkit-user-select:none;border:none!important;border-width:0!important}.action-widget .monaco-list:focus:before{outline:0!important}.action-widget .monaco-list .monaco-scrollable-element{overflow:visible}.action-widget .monaco-list .monaco-list-row{padding:0 4px;white-space:nowrap;cursor:pointer;touch-action:none;width:100%;border-radius:3px}.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled){background-color:var(--vscode-list-activeSelectionBackground)!important;color:var(--vscode-list-activeSelectionForeground);outline:1px solid var(--vscode-menu-selectionBorder, transparent);outline-offset:-1px}.action-widget .monaco-list-row.group-header{color:var(--vscode-descriptionForeground)!important;font-weight:600;font-size:13px}.action-widget .monaco-list-row.group-header:not(:first-of-type){margin-top:2px}.action-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row.separator{border-top:1px solid var(--vscode-editorHoverWidget-border);color:var(--vscode-descriptionForeground);font-size:12px;padding:0;margin:4px 0 0;cursor:default;-webkit-user-select:none;user-select:none;border-radius:0}.action-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row.separator.focused{outline:0 solid;background-color:transparent;border-radius:0}.action-widget .monaco-list-row.separator:first-of-type{border-top:none;margin-top:0}.action-widget .monaco-list .group-header,.action-widget .monaco-list .option-disabled,.action-widget .monaco-list .option-disabled:before,.action-widget .monaco-list .option-disabled .focused,.action-widget .monaco-list .option-disabled .focused:before{cursor:default!important;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background-color:transparent!important;outline:0 solid!important}.action-widget .monaco-list-row.action{display:flex;gap:4px;align-items:center}.action-widget .monaco-list-row.action.option-disabled,.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,.action-widget .monaco-list-row.action.option-disabled .codicon,.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled{color:var(--vscode-disabledForeground)}.action-widget .monaco-list-row.action:not(.option-disabled) .codicon{color:inherit}.action-widget .monaco-list-row.action .title{flex:1;overflow:hidden;text-overflow:ellipsis}.action-widget .monaco-list-row.action .monaco-keybinding>.monaco-keybinding-key{background-color:var(--vscode-keybindingLabel-background);color:var(--vscode-keybindingLabel-foreground);border-style:solid;border-width:1px;border-radius:3px;border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow)}.action-widget .action-widget-action-bar{background-color:var(--vscode-menu-background);border-top:1px solid var(--vscode-menu-border);margin-top:2px}.action-widget .action-widget-action-bar:before{display:block;content:"";width:100%}.action-widget .action-widget-action-bar .actions-container{padding:4px 8px 2px 24px}.action-widget-action-bar .action-label{color:var(--vscode-textLink-activeForeground);font-size:13px;line-height:22px;padding:0;pointer-events:all}.action-widget-action-bar .action-item{margin-right:16px;pointer-events:none}.action-widget-action-bar .action-label:hover{background-color:transparent!important}.monaco-action-bar .actions-container.highlight-toggled .action-label.checked{background:var(--vscode-actionBar-toggledBackground)!important}.action-widget .monaco-list .monaco-list-row .description{opacity:.7;margin-left:.5em}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border-style:solid;border-width:1px;border-radius:3px;vertical-align:middle;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.post-edit-widget{box-shadow:0 0 8px 2px var(--vscode-widget-shadow);border:1px solid var(--vscode-widget-border, transparent);border-radius:4px;color:var(--vscode-button-foreground);background-color:var(--vscode-button-background);overflow:hidden}.post-edit-widget .monaco-button{padding:2px;border:none;border-radius:0}.post-edit-widget .monaco-button:hover{background-color:var(--vscode-button-hoverBackground)!important}.post-edit-widget .monaco-button .codicon{margin:0}@font-face{font-family:codicon;font-display:block;src:url(/assets/codicon-ngg6Pgfi.ttf) format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.monaco-editor .codicon.codicon-symbol-array,.monaco-workbench .codicon.codicon-symbol-array{color:var(--vscode-symbolIcon-arrayForeground)}.monaco-editor .codicon.codicon-symbol-boolean,.monaco-workbench .codicon.codicon-symbol-boolean{color:var(--vscode-symbolIcon-booleanForeground)}.monaco-editor .codicon.codicon-symbol-class,.monaco-workbench .codicon.codicon-symbol-class{color:var(--vscode-symbolIcon-classForeground)}.monaco-editor .codicon.codicon-symbol-method,.monaco-workbench .codicon.codicon-symbol-method{color:var(--vscode-symbolIcon-methodForeground)}.monaco-editor .codicon.codicon-symbol-color,.monaco-workbench .codicon.codicon-symbol-color{color:var(--vscode-symbolIcon-colorForeground)}.monaco-editor .codicon.codicon-symbol-constant,.monaco-workbench .codicon.codicon-symbol-constant{color:var(--vscode-symbolIcon-constantForeground)}.monaco-editor .codicon.codicon-symbol-constructor,.monaco-workbench .codicon.codicon-symbol-constructor{color:var(--vscode-symbolIcon-constructorForeground)}.monaco-editor .codicon.codicon-symbol-value,.monaco-workbench .codicon.codicon-symbol-value,.monaco-editor .codicon.codicon-symbol-enum,.monaco-workbench .codicon.codicon-symbol-enum{color:var(--vscode-symbolIcon-enumeratorForeground)}.monaco-editor .codicon.codicon-symbol-enum-member,.monaco-workbench .codicon.codicon-symbol-enum-member{color:var(--vscode-symbolIcon-enumeratorMemberForeground)}.monaco-editor .codicon.codicon-symbol-event,.monaco-workbench .codicon.codicon-symbol-event{color:var(--vscode-symbolIcon-eventForeground)}.monaco-editor .codicon.codicon-symbol-field,.monaco-workbench .codicon.codicon-symbol-field{color:var(--vscode-symbolIcon-fieldForeground)}.monaco-editor .codicon.codicon-symbol-file,.monaco-workbench .codicon.codicon-symbol-file{color:var(--vscode-symbolIcon-fileForeground)}.monaco-editor .codicon.codicon-symbol-folder,.monaco-workbench .codicon.codicon-symbol-folder{color:var(--vscode-symbolIcon-folderForeground)}.monaco-editor .codicon.codicon-symbol-function,.monaco-workbench .codicon.codicon-symbol-function{color:var(--vscode-symbolIcon-functionForeground)}.monaco-editor .codicon.codicon-symbol-interface,.monaco-workbench .codicon.codicon-symbol-interface{color:var(--vscode-symbolIcon-interfaceForeground)}.monaco-editor .codicon.codicon-symbol-key,.monaco-workbench .codicon.codicon-symbol-key{color:var(--vscode-symbolIcon-keyForeground)}.monaco-editor .codicon.codicon-symbol-keyword,.monaco-workbench .codicon.codicon-symbol-keyword{color:var(--vscode-symbolIcon-keywordForeground)}.monaco-editor .codicon.codicon-symbol-module,.monaco-workbench .codicon.codicon-symbol-module{color:var(--vscode-symbolIcon-moduleForeground)}.monaco-editor .codicon.codicon-symbol-namespace,.monaco-workbench .codicon.codicon-symbol-namespace{color:var(--vscode-symbolIcon-namespaceForeground)}.monaco-editor .codicon.codicon-symbol-null,.monaco-workbench .codicon.codicon-symbol-null{color:var(--vscode-symbolIcon-nullForeground)}.monaco-editor .codicon.codicon-symbol-number,.monaco-workbench .codicon.codicon-symbol-number{color:var(--vscode-symbolIcon-numberForeground)}.monaco-editor .codicon.codicon-symbol-object,.monaco-workbench .codicon.codicon-symbol-object{color:var(--vscode-symbolIcon-objectForeground)}.monaco-editor .codicon.codicon-symbol-operator,.monaco-workbench .codicon.codicon-symbol-operator{color:var(--vscode-symbolIcon-operatorForeground)}.monaco-editor .codicon.codicon-symbol-package,.monaco-workbench .codicon.codicon-symbol-package{color:var(--vscode-symbolIcon-packageForeground)}.monaco-editor .codicon.codicon-symbol-property,.monaco-workbench .codicon.codicon-symbol-property{color:var(--vscode-symbolIcon-propertyForeground)}.monaco-editor .codicon.codicon-symbol-reference,.monaco-workbench .codicon.codicon-symbol-reference{color:var(--vscode-symbolIcon-referenceForeground)}.monaco-editor .codicon.codicon-symbol-snippet,.monaco-workbench .codicon.codicon-symbol-snippet{color:var(--vscode-symbolIcon-snippetForeground)}.monaco-editor .codicon.codicon-symbol-string,.monaco-workbench .codicon.codicon-symbol-string{color:var(--vscode-symbolIcon-stringForeground)}.monaco-editor .codicon.codicon-symbol-struct,.monaco-workbench .codicon.codicon-symbol-struct{color:var(--vscode-symbolIcon-structForeground)}.monaco-editor .codicon.codicon-symbol-text,.monaco-workbench .codicon.codicon-symbol-text{color:var(--vscode-symbolIcon-textForeground)}.monaco-editor .codicon.codicon-symbol-type-parameter,.monaco-workbench .codicon.codicon-symbol-type-parameter{color:var(--vscode-symbolIcon-typeParameterForeground)}.monaco-editor .codicon.codicon-symbol-unit,.monaco-workbench .codicon.codicon-symbol-unit{color:var(--vscode-symbolIcon-unitForeground)}.monaco-editor .codicon.codicon-symbol-variable,.monaco-workbench .codicon.codicon-symbol-variable{color:var(--vscode-symbolIcon-variableForeground)}.monaco-editor .lightBulbWidget{display:flex;align-items:center;justify-content:center}.monaco-editor .lightBulbWidget:hover{cursor:pointer}.monaco-editor .lightBulbWidget.codicon-light-bulb,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix{color:var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground))}.monaco-editor .lightBulbWidget.codicon-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground))}.monaco-editor .lightBulbWidget:before{position:relative;z-index:2}.monaco-editor .lightBulbWidget:after{position:absolute;top:0;left:0;content:"";display:block;width:100%;height:100%;opacity:.3;z-index:1}.monaco-editor .glyph-margin-widgets .cgmr[class*=codicon-gutter-lightbulb]{display:block;cursor:pointer}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle{color:var(--vscode-editorLightBulb-foreground)}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-auto-fix,.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-aifix-auto-fix{color:var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground))}.monaco-editor .glyph-margin-widgets .cgmr.codicon-gutter-lightbulb-sparkle-filled{color:var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground))}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-flex!important;align-items:center;text-overflow:ellipsis;white-space:nowrap;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize);padding-right:calc(var(--vscode-editorCodeLens-fontSize)*.5);font-feature-settings:var(--vscode-editorCodeLens-fontFeatureSettings);font-family:var(--vscode-editorCodeLens-fontFamily),var(--vscode-editorCodeLens-fontFamilyDefault)}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;white-space:nowrap;vertical-align:sub;display:inline-flex;align-items:center}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration>a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration .codicon[class*=codicon-]{vertical-align:middle;color:currentColor!important;color:var(--vscode-editorCodeLens-foreground);line-height:var(--vscode-editorCodeLens-lineHeight);font-size:var(--vscode-editorCodeLens-fontSize)}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.monaco-editor .inlineSuggestionsHints{padding:4px}.monaco-editor .inlineSuggestionsHints .warningMessage p{margin:0}.monaco-editor .inlineSuggestionsHints.withBorder{z-index:39;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .inlineSuggestionsHints a,.monaco-editor .inlineSuggestionsHints a:hover{color:var(--vscode-foreground)!important}.monaco-editor .inlineSuggestionsHints .keybinding{display:flex;margin-left:4px;opacity:.6}.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key{font-size:8px;padding:2px 3px}.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a{display:flex;min-width:19px;justify-content:center}.monaco-editor .inlineSuggestionStatusBarItemLabel{margin-right:2px}.monaco-hover{cursor:default;position:absolute;overflow:hidden;user-select:text;-webkit-user-select:text;box-sizing:border-box;line-height:1.5em;white-space:var(--vscode-hover-whiteSpace, normal)}.monaco-hover.fade-in{animation:fadein .1s linear}.monaco-hover.hidden{display:none}.monaco-hover a:hover:not(.disabled){cursor:pointer}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:var(--vscode-hover-maxWidth, 500px);word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul,.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{margin:8px 0}.monaco-hover h1,.monaco-hover h2,.monaco-hover h3,.monaco-hover h4,.monaco-hover h5,.monaco-hover h6{line-height:1.1}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:var(--vscode-hover-sourceWhiteSpace, pre-wrap)}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .info{font-style:italic;padding:0 8px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px;width:100%}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px;vertical-align:middle}.monaco-hover .hover-row.status-bar .actions .action-container a{color:var(--vscode-textLink-foreground);text-decoration:var(--text-link-decoration)}.monaco-hover .hover-row.status-bar .actions .action-container a .icon.codicon{color:var(--vscode-textLink-foreground)}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-foreground)}.monaco-hover .hover-contents a.code-link>span:hover{color:var(--vscode-textLink-activeForeground)}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) p:last-child [style*=background-color]{margin-bottom:4px;display:inline-block}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span.codicon{margin-bottom:2px}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.monaco-hover .action-container,.monaco-hover .action,.monaco-hover button,.monaco-hover .monaco-button,.monaco-hover .monaco-text-button,.monaco-hover [role=button]{-webkit-user-select:none;user-select:none}.monaco-custom-toggle{margin-left:2px;float:left;cursor:pointer;overflow:hidden;width:20px;height:20px;border-radius:3px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none}.monaco-custom-toggle:hover{background-color:var(--vscode-inputOption-hoverBackground)}.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{border:1px dashed var(--vscode-focusBorder)}.hc-black .monaco-custom-toggle,.hc-light .monaco-custom-toggle,.hc-black .monaco-custom-toggle:hover,.hc-light .monaco-custom-toggle:hover{background:none}.monaco-custom-toggle.monaco-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-action-bar .checkbox-action-item{display:flex;align-items:center;border-radius:2px;padding-right:2px}.monaco-action-bar .checkbox-action-item:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-action-bar .checkbox-action-item>.monaco-custom-toggle.monaco-checkbox{margin-right:4px}.monaco-action-bar .checkbox-action-item>.checkbox-label{font-size:12px}.monaco-editor .find-widget{position:absolute;z-index:35;height:33px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px));box-shadow:0 0 8px 2px var(--vscode-widget-shadow);color:var(--vscode-editorWidget-foreground);border-left:1px solid var(--vscode-widget-border);border-right:1px solid var(--vscode-widget-border);border-bottom:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px;background-color:var(--vscode-editorWidget-background)}.monaco-reduce-motion .monaco-editor .find-widget{transition:transform 0ms linear}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px;outline-color:var(--vscode-focusBorder)}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:3px 25px 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:3px;width:18px;height:100%;border-radius:0;box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{color:var(--vscode-disabledForeground);cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .find-widget.no-results .matchesCount{color:var(--vscode-errorForeground)}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important;background-color:var(--vscode-editor-findMatchHighlightBackground)}.monaco-editor .currentFindMatch{background-color:var(--vscode-editor-findMatchBackground);border:2px solid var(--vscode-editor-findMatchBorder);padding:1px;box-sizing:border-box}.monaco-editor .findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}.monaco-editor .find-widget .monaco-sash{left:0!important;background-color:var(--vscode-editorWidget-resizeBorder, var(--vscode-editorWidget-border))}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-editor .find-widget .button:not(.disabled):hover,.monaco-editor .find-widget .codicon-find-selection:hover{background-color:var(--vscode-toolbar-hoverBackground)!important}.monaco-editor.findMatch{background-color:var(--vscode-editor-findMatchHighlightBackground)}.monaco-editor.currentFindMatch{background-color:var(--vscode-editor-findMatchBackground)}.monaco-editor.findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}.monaco-editor.findMatch{background-color:var(--vscode-editorWidget-background)}.monaco-editor .find-widget>.button.codicon-widget-close{position:absolute;top:5px;right:4px}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;border-radius:2px;font-size:inherit}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px 6px}.monaco-inputbox>.ibwrapper{position:relative;width:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls,.hc-light .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls,.hc-light .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:#fdff00cc}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:#fdff00cc}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:#ffffff70}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:#ffffff70}99%{background:transparent}}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none}.colorpicker-color-decoration,.hc-light .colorpicker-color-decoration{border:solid .1em #000;box-sizing:border-box;margin:.1em .2em 0;width:.8em;height:.8em;line-height:.8em;display:inline-block;cursor:pointer}.hc-black .colorpicker-color-decoration,.vs-dark .colorpicker-color-decoration{border:solid .1em #eee}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:240px;display:flex;align-items:center;justify-content:center;line-height:24px;cursor:pointer;color:#fff;flex:1;white-space:nowrap;overflow:hidden}.colorpicker-header .picked-color .picked-color-presentation{white-space:nowrap;margin-left:5px;margin-right:5px}.colorpicker-header .picked-color .codicon{color:inherit;font-size:14px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.standalone-colorpicker{color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header.standalone-colorpicker{border-bottom:none}.colorpicker-header .close-button{cursor:pointer;background-color:var(--vscode-editorHoverWidget-background);border-left:1px solid var(--vscode-editorHoverWidget-border)}.colorpicker-header .close-button-inner-div{width:100%;height:100%;text-align:center}.colorpicker-header .close-button-inner-div:hover{background-color:var(--vscode-toolbar-hoverBackground)}.colorpicker-header .close-icon{padding:3px}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px #000c;position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .standalone-strip{width:25px;height:122px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px #000000d9}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.colorpicker-body .standalone-strip .standalone-overlay{height:122px;pointer-events:none}.standalone-colorpicker-body{display:block;border:1px solid transparent;border-bottom:1px solid var(--vscode-editorHoverWidget-border);overflow:hidden}.colorpicker-body .insert-button{position:absolute;height:20px;width:58px;padding:0;right:8px;bottom:8px;background:var(--vscode-button-background);color:var(--vscode-button-foreground);border-radius:2px;border:none;cursor:pointer}.colorpicker-body .insert-button:hover{background:var(--vscode-button-hoverBackground)}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex;justify-content:space-between;flex-wrap:nowrap}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:baseline;font-size:13px;margin-left:20px;min-width:0;text-overflow:ellipsis;overflow:hidden}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px;align-self:center}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap;overflow:hidden}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--vscode-sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-enable-motion .monaco-table>.monaco-split-view2,.monaco-enable-motion .monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-row.disabled{cursor:default}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent;opacity:0}.monaco-enable-motion .monaco-tl-indent>.indent-guide{transition:opacity .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.monaco-tree-type-filter{position:absolute;top:0;right:0;display:flex;padding:3px;max-width:200px;z-index:100;margin:0 10px 0 6px;border:1px solid var(--vscode-widget-border);border-bottom-left-radius:4px;border-bottom-right-radius:4px}.monaco-enable-motion .monaco-tree-type-filter{transition:top .3s}.monaco-tree-type-filter.disabled{top:-40px!important}.monaco-tree-type-filter-input{flex:1}.monaco-tree-type-filter-input .monaco-inputbox{height:23px}.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.input,.monaco-tree-type-filter-input .monaco-inputbox>.ibwrapper>.mirror{padding:2px 4px}.monaco-tree-type-filter-input .monaco-findInput>.controls{top:2px}.monaco-tree-type-filter-actionbar{margin-left:4px}.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label{padding:2px}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container{position:absolute;top:0;left:0;width:100%;height:0;z-index:13;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row.monaco-list-row{position:absolute;width:100%;opacity:1!important;overflow:hidden;background-color:var(--vscode-sideBar-background)}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row:hover{background-color:var(--vscode-list-hoverBackground)!important;cursor:pointer}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty,.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty .monaco-tree-sticky-container-shadow{display:none}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow{position:absolute;bottom:-3px;left:0;height:0px;width:100%}.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container[tabindex="0"]:focus{outline:none}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px;background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-lineForeground)}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%;color:var(--vscode-peekViewResult-fileForeground)}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight{color:var(--vscode-peekViewResult-fileForeground)!important;background-color:var(--vscode-peekViewResult-matchHighlightBackground)!important}.monaco-editor .reference-zone-widget .preview .reference-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .reference-zone-widget .preview .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight{border:1px dotted var(--vscode-contrastActiveBorder, transparent);box-sizing:border-box}.monaco-count-badge{padding:3px 5px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label-iconpath{width:16px;height:22px;margin-right:6px;display:flex}.monaco-icon-label-container.disabled{color:var(--vscode-disabledForeground)}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-suffix-container>.label-suffix{opacity:.7;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.bold>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.bold>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-weight:700}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under;color:var(--vscode-textLink-activeForeground)}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer;color:var(--vscode-textLink-activeForeground)}.monaco-editor .zone-widget .codicon.codicon-error,.markers-panel .marker-icon.error,.markers-panel .marker-icon .codicon.codicon-error,.text-search-provider-messages .providerMessage .codicon.codicon-error,.extensions-viewlet>.extensions .codicon.codicon-error,.extension-editor .codicon.codicon-error,.chat-attached-context-attachment .codicon.codicon-error{color:var(--vscode-problemsErrorIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-warning,.markers-panel .marker-icon.warning,.markers-panel .marker-icon .codicon.codicon-warning,.text-search-provider-messages .providerMessage .codicon.codicon-warning,.extensions-viewlet>.extensions .codicon.codicon-warning,.extension-editor .codicon.codicon-warning,.preferences-editor .codicon.codicon-warning{color:var(--vscode-problemsWarningIcon-foreground)}.monaco-editor .zone-widget .codicon.codicon-info,.markers-panel .marker-icon.info,.markers-panel .marker-icon .codicon.codicon-info,.text-search-provider-messages .providerMessage .codicon.codicon-info,.extensions-viewlet>.extensions .codicon.codicon-info,.extension-editor .codicon.codicon-info{color:var(--vscode-problemsInfoIcon-foreground)}.monaco-editor .hoverHighlight{background-color:var(--vscode-editor-hoverHighlightBackground)}.monaco-editor .monaco-resizable-hover{border:1px solid var(--vscode-editorHoverWidget-border);border-radius:3px;box-sizing:content-box}.monaco-editor .monaco-resizable-hover>.monaco-hover{border:none;border-radius:none}.monaco-editor .monaco-hover{border:1px solid var(--vscode-editorHoverWidget-border);border-radius:3px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background)}.monaco-editor .monaco-hover a{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .monaco-hover .hover-row{display:flex}.monaco-editor .monaco-hover .hover-row.hover-row-with-copy{position:relative;padding-right:20px}.monaco-editor .monaco-hover .hover-row .hover-row-contents{min-width:0;display:flex;flex-direction:column}.monaco-editor .monaco-hover .hover-row .verbosity-actions{border-right:1px solid var(--vscode-editorHoverWidget-border);width:22px;overflow-y:clip}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner{display:flex;flex-direction:column;padding-left:5px;padding-right:5px;justify-content:flex-end;position:relative}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon{cursor:pointer;font-size:11px}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon.enabled{color:var(--vscode-textLink-foreground)}.monaco-editor .monaco-hover .hover-row .verbosity-actions-inner .codicon.disabled{opacity:.6}.monaco-editor .monaco-hover .hover-row .actions{background-color:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-editor .monaco-hover code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .monaco-hover .hover-copy-button{position:absolute;top:4px;right:4px;padding:2px 4px;border-radius:3px;display:flex;align-items:center;justify-content:center;opacity:0}.monaco-editor .monaco-hover .hover-row-with-copy:hover .hover-copy-button,.monaco-editor .monaco-hover .hover-row-with-copy:focus-within .hover-copy-button{opacity:1}.monaco-editor .monaco-hover .hover-copy-button:hover{background-color:var(--vscode-toolbar-hoverBackground);cursor:pointer}.monaco-editor .monaco-hover .hover-copy-button:focus{outline:1px solid var(--vscode-focusBorder);outline-offset:-1px}.monaco-editor .monaco-hover .hover-copy-button .codicon{font-size:16px;color:var(--vscode-foreground)}.monaco-editor.vs .dnd-target,.monaco-editor.hc-light .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.hc-light.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.hc-light.mac.mouse-copy .view-lines{cursor:copy}.monaco-editor .findOptionsWidget{background-color:var(--vscode-editorWidget-background);color:var(--vscode-editorWidget-foreground);box-shadow:0 0 8px 2px var(--vscode-widget-shadow);border:2px solid var(--vscode-contrastBorder)}.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed{transition:initial}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:var(--vscode-editor-foldPlaceholderForeground);margin:.1em .2em 0;content:"⋯";display:inline;line-height:1em;cursor:pointer}.monaco-editor .folded-background{background-color:var(--vscode-editor-foldBackground)}.monaco-editor .cldr.codicon.codicon-folding-expanded,.monaco-editor .cldr.codicon.codicon-folding-collapsed,.monaco-editor .cldr.codicon.codicon-folding-manual-expanded,.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed{color:var(--vscode-editorGutter-foldingControlForeground)!important}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetTabstopHighlightBorder, transparent)}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px;background-color:var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);outline-color:var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent)}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column;border-radius:3px}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px;border-color:var(--vscode-editorSuggestWidget-border);background-color:var(--vscode-editorSuggestWidget-background)}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-light .suggest-widget,.monaco-editor.hc-light .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid var(--vscode-editorSuggestWidget-border);overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:var(--vscode-editorSuggestWidgetStatus-foreground)}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon{color:var(--vscode-editorSuggestWidget-selectedIconForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-highlightForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-focusHighlightForeground)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default;color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-details:focus{border-color:var(--vscode-focusBorder)}.monaco-editor .suggest-details a{color:var(--vscode-textLink-foreground)}.monaco-editor .suggest-details a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .suggest-details code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 4px 5px}.monaco-editor .suggest-details.detail-and-doc>.monaco-scrollable-element>.body>.header>.type{padding-bottom:12px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px;overflow:hidden}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source{white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text .ghost-text{font-style:italic}.monaco-editor .suggest-preview-text.clickable .view-line{z-index:1}.monaco-editor .ghost-text-decoration.clickable,.monaco-editor .ghost-text-decoration-preview.clickable,.monaco-editor .suggest-preview-text.clickable .ghost-text{cursor:pointer}.monaco-editor .inline-completion-text-to-replace{text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-decoration,.monaco-editor .ghost-text-decoration-preview,.monaco-editor .suggest-preview-text .ghost-text{background-color:var(--vscode-editorGhostText-background);border:1px solid var(--vscode-editorGhostText-border)}.monaco-editor .ghost-text-decoration.syntax-highlighted,.monaco-editor .ghost-text-decoration-preview.syntax-highlighted,.monaco-editor .suggest-preview-text .ghost-text.syntax-highlighted{opacity:.7}.monaco-editor .ghost-text-decoration:not(.syntax-highlighted),.monaco-editor .ghost-text-decoration-preview:not(.syntax-highlighted),.monaco-editor .suggest-preview-text .ghost-text:not(.syntax-highlighted){color:var(--vscode-editorGhostText-foreground)}.monaco-editor .ghost-text-decoration.warning,.monaco-editor .ghost-text-decoration-preview.warning,.monaco-editor .suggest-preview-text .ghost-text.warning{background:var(--monaco-editor-warning-decoration) repeat-x bottom left;border-bottom:4px double var(--vscode-editorWarning-border)}.ghost-text-view-warning-widget-icon .codicon{color:var(--vscode-editorWarning-foreground)!important}.monaco-editor .edits-fadeout-decoration{opacity:var(--animation-opacity, 1);background-color:var(--vscode-inlineEdit-modifiedChangedTextBackground)}.monaco-editor .sticky-widget{overflow:hidden;border-bottom:1px solid var(--vscode-editorStickyScroll-border);width:100%;box-shadow:var(--vscode-editorStickyScroll-shadow) 0 4px 2px -2px;z-index:4;right:initial!important;margin-left:"0px"}.monaco-editor .sticky-widget .sticky-widget-line-numbers{float:left;background-color:var(--vscode-editorStickyScrollGutter-background)}.monaco-editor .sticky-widget.peek .sticky-widget-line-numbers{background-color:var(--vscode-peekViewEditorStickyScrollGutter-background)}.monaco-editor .sticky-widget .sticky-widget-lines-scrollable{display:inline-block;position:absolute;overflow:hidden;width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:var(--vscode-editorStickyScroll-background)}.monaco-editor .sticky-widget.peek .sticky-widget-lines-scrollable{background-color:var(--vscode-peekViewEditorStickyScroll-background)}.monaco-editor .sticky-widget .sticky-widget-lines{position:absolute;background-color:inherit}.monaco-editor .sticky-widget .sticky-line-number,.monaco-editor .sticky-widget .sticky-line-content{color:var(--vscode-editorLineNumber-foreground);white-space:nowrap;display:inline-block;position:absolute;background-color:inherit}.monaco-editor .sticky-widget .sticky-line-number .codicon-folding-expanded,.monaco-editor .sticky-widget .sticky-line-number .codicon-folding-collapsed{float:right;transition:var(--vscode-editorStickyScroll-foldingOpacityTransition);position:absolute;margin-left:2px}.monaco-editor .sticky-widget .sticky-line-content{width:var(--vscode-editorStickyScroll-scrollableWidth);background-color:inherit;white-space:nowrap}.monaco-editor .sticky-widget .sticky-line-number-inner{display:inline-block;text-align:right}.monaco-editor .sticky-widget .sticky-line-content:hover{background-color:var(--vscode-editorStickyScrollHover-background);cursor:pointer}.monaco-editor .inline-edits-view-indicator{display:flex;z-index:34;height:20px;color:var(--vscode-inlineEdit-gutterIndicator-primaryForeground);background-color:var(--vscode-inlineEdit-gutterIndicator-background);border:1px solid var(--vscode-inlineEdit-gutterIndicator-primaryBorder);border-radius:3px;align-items:center;padding:2px 10px 2px 2px;margin:0 4px;opacity:0}.monaco-editor .inline-edits-view-indicator.contained{transition:opacity .2s ease-in-out;transition-delay:.4s}.monaco-editor .inline-edits-view-indicator.visible,.monaco-editor .inline-edits-view-indicator.top{opacity:1}.monaco-editor .inline-edits-view-indicator.top .icon{transform:rotate(90deg)}.monaco-editor .inline-edits-view-indicator.bottom{opacity:1}.monaco-editor .inline-edits-view-indicator.bottom .icon{transform:rotate(-90deg)}.monaco-editor .inline-edits-view-indicator .icon{display:flex;align-items:center;margin:0 2px;transform:none;transition:transform .2s ease-in-out}.monaco-editor .inline-edits-view-indicator .icon .codicon{color:var(--vscode-inlineEdit-gutterIndicator-primaryForeground)}.monaco-editor .inline-edits-view-indicator .label{margin:0 2px;display:flex;justify-content:center;width:100%}.monaco-editor .inline-edits-view .editorContainer .preview .monaco-editor .view-overlays .current-line-exact,.monaco-editor .inline-edits-view .editorContainer .preview .monaco-editor .current-line-margin{border:none}.monaco-editor .inline-edits-view .editorContainer .inline-edits-view-zone.diagonal-fill{opacity:.5}.monaco-editor .strike-through{text-decoration:line-through}.monaco-editor .inlineCompletions-line-insert{background:var(--vscode-inlineEdit-modifiedChangedLineBackground)}.monaco-editor .inlineCompletions-line-delete{background:var(--vscode-inlineEdit-originalChangedLineBackground)}.monaco-editor .inlineCompletions-char-insert{background:var(--vscode-inlineEdit-modifiedChangedTextBackground);cursor:pointer}.monaco-editor .inlineCompletions-char-delete{background:var(--vscode-inlineEdit-originalChangedTextBackground)}.monaco-editor .inlineCompletions-char-delete.diff-range-empty{margin-left:-1px;border-left:solid var(--vscode-inlineEdit-originalChangedTextBackground) 3px}.monaco-editor .inlineCompletions-char-insert.diff-range-empty{border-left:solid var(--vscode-inlineEdit-modifiedChangedTextBackground) 3px}.monaco-editor .inlineCompletions-char-delete.single-line-inline{border:1px solid var(--vscode-editorHoverWidget-border);margin:-2px 0 0 -2px}.monaco-editor .inlineCompletions-char-insert.single-line-inline{border-top:1px solid var(--vscode-inlineEdit-modifiedBorder);border-bottom:1px solid var(--vscode-inlineEdit-modifiedBorder)}.monaco-editor .inlineCompletions-char-insert.single-line-inline.start{border-top-left-radius:4px;border-bottom-left-radius:4px;border-left:1px solid var(--vscode-inlineEdit-modifiedBorder)}.monaco-editor .inlineCompletions-char-insert.single-line-inline.end{border-top-right-radius:4px;border-bottom-right-radius:4px;border-right:1px solid var(--vscode-inlineEdit-modifiedBorder)}.monaco-editor .inlineCompletions-char-delete.single-line-inline.empty,.monaco-editor .inlineCompletions-char-insert.single-line-inline.empty{display:none}.monaco-editor .inlineCompletions.strike-through{text-decoration-thickness:1px}.monaco-editor .inlineCompletions-modified-bubble{background:var(--vscode-inlineEdit-modifiedChangedTextBackground)}.monaco-editor .inlineCompletions-original-bubble{background:var(--vscode-inlineEdit-originalChangedTextBackground)}.monaco-editor .inlineCompletions-modified-bubble,.monaco-editor .inlineCompletions-original-bubble{pointer-events:none;display:inline-block}.monaco-editor .inline-edit.ghost-text,.monaco-editor .inline-edit.ghost-text-decoration,.monaco-editor .inline-edit.ghost-text-decoration-preview,.monaco-editor .inline-edit.suggest-preview-text .ghost-text{font-style:normal!important}.monaco-editor .inline-edit.ghost-text.syntax-highlighted,.monaco-editor .inline-edit.ghost-text-decoration.syntax-highlighted,.monaco-editor .inline-edit.ghost-text-decoration-preview.syntax-highlighted,.monaco-editor .inline-edit.suggest-preview-text .ghost-text.syntax-highlighted{opacity:1!important}.monaco-editor .inline-edit.modified-background.ghost-text,.monaco-editor .inline-edit.modified-background.ghost-text-decoration,.monaco-editor .inline-edit.modified-background.ghost-text-decoration-preview,.monaco-editor .inline-edit.modified-background.suggest-preview-text .ghost-text{background:var(--vscode-inlineEdit-modifiedChangedTextBackground)!important;display:inline-block!important}.monaco-editor .inlineCompletions-original-lines{background:var(--vscode-editor-background)}.monaco-menu-option{color:var(--vscode-editorActionList-foreground);font-size:13px;padding:0 4px;line-height:28px;display:flex;gap:4px;align-items:center;border-radius:3px;cursor:pointer}.monaco-menu-option .monaco-keybinding-key{font-size:13px;opacity:.7}.monaco-menu-option.active{background:var(--vscode-editorActionList-focusBackground);color:var(--vscode-editorActionList-focusForeground);outline:1px solid var(--vscode-menu-selectionBorder, transparent);outline-offset:-1px}.monaco-menu-option.active .monaco-keybinding-key{color:var(--vscode-editorActionList-focusForeground)}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor.vs .valueSetReplacement{outline:solid 2px var(--vscode-editorBracketMatch-border)}.monaco-editor .linked-editing-decoration{background-color:var(--vscode-editor-linkedEditingBackground);min-width:1px}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer;color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .scroll-editor-on-middle-click-dot{cursor:all-scroll;position:absolute;z-index:1;background-color:var(--vscode-editor-foreground, white);border:1px solid var(--vscode-editor-background, black);opacity:.5;width:5px;height:5px;border-radius:50%;transform:translate(-50%,-50%)}.monaco-editor .scroll-editor-on-middle-click-dot.hidden{display:none}.monaco-editor.scroll-editor-on-middle-click-editor *{cursor:all-scroll}.monaco-editor .focused .selectionHighlight{background-color:var(--vscode-editor-selectionHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-selectionHighlightBorder)}.monaco-editor.hc-black .focused .selectionHighlight,.monaco-editor.hc-light .focused .selectionHighlight{border-style:dotted}.monaco-editor .wordHighlight{background-color:var(--vscode-editor-wordHighlightBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightBorder)}.monaco-editor.hc-black .wordHighlight,.monaco-editor.hc-light .wordHighlight{border-style:dotted}.monaco-editor .wordHighlightStrong{background-color:var(--vscode-editor-wordHighlightStrongBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightStrongBorder)}.monaco-editor.hc-black .wordHighlightStrong,.monaco-editor.hc-light .wordHighlightStrong{border-style:dotted}.monaco-editor .wordHighlightText{background-color:var(--vscode-editor-wordHighlightTextBackground);box-sizing:border-box;border:1px solid var(--vscode-editor-wordHighlightTextBorder)}.monaco-editor.hc-black .wordHighlightText,.monaco-editor.hc-light .wordHighlightText{border-style:dotted}.monaco-editor .parameter-hints-widget{z-index:39;display:flex;flex-direction:column;line-height:1.5em;cursor:default;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.hc-black .monaco-editor .parameter-hints-widget,.hc-light .monaco-editor .parameter-hints-widget{border-width:2px}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.multiple .body:before{content:"";display:block;height:100%;position:absolute;opacity:.5;border-left:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px;position:relative}.monaco-editor .parameter-hints-widget .signature.has-docs:after{content:"";display:block;position:absolute;left:0;width:100%;padding-top:4px;opacity:.5;border-bottom:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor .parameter-hints-widget .code{font-family:var(--vscode-parameterHintsWidget-editorFontFamily),var(--vscode-parameterHintsWidget-editorFontFamilyDefault)}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs a{color:var(--vscode-textLink-foreground)}.monaco-editor .parameter-hints-widget .docs a:hover{color:var(--vscode-textLink-activeForeground);cursor:pointer}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial}.monaco-editor .parameter-hints-widget .docs code{font-family:var(--monaco-monospace-font);border-radius:3px;padding:0 .4em;background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{color:var(--vscode-editorHoverWidget-highlightForeground);font-weight:700}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .editorPlaceholder{top:0;position:absolute;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap;pointer-events:none;color:var(--vscode-editor-placeholder-foreground)}.monaco-editor .rename-box{z-index:100;color:inherit;border-radius:4px}.monaco-editor .rename-box.preview{padding:4px 4px 0}.monaco-editor .rename-box .rename-input-with-button{padding:3px;border-radius:2px;width:calc(100% - 8px)}.monaco-editor .rename-box .rename-input{width:calc(100% - 8px);padding:0}.monaco-editor .rename-box .rename-input:focus{outline:none}.monaco-editor .rename-box .rename-suggestions-button{display:flex;align-items:center;padding:3px;background-color:transparent;border:none;border-radius:5px;cursor:pointer}.monaco-editor .rename-box .rename-suggestions-button:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-editor .rename-box .rename-candidate-list-container .monaco-list-row{border-radius:2px}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .unicode-highlight{border:1px solid var(--vscode-editorUnicodeHighlight-border);background-color:var(--vscode-editorUnicodeHighlight-background);box-sizing:border-box}.editor-banner{box-sizing:border-box;cursor:default;width:100%;font-size:12px;display:flex;overflow:visible;height:26px;background:var(--vscode-banner-background)}.editor-banner .icon-container{display:flex;flex-shrink:0;align-items:center;padding:0 6px 0 10px}.editor-banner .icon-container.custom-icon{background-repeat:no-repeat;background-position:center center;background-size:16px;width:16px;padding:0;margin:0 6px 0 10px}.editor-banner .message-container{display:flex;align-items:center;line-height:26px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.editor-banner .message-container p{margin-block-start:0;margin-block-end:0}.editor-banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px;margin:0 4px}.editor-banner .message-actions-container a.monaco-button{width:inherit;margin:2px 8px;padding:0 12px}.editor-banner .message-actions-container a{padding:3px;margin-left:12px;text-decoration:underline}.editor-banner .action-container{padding:0 10px 0 6px}.editor-banner{background-color:var(--vscode-banner-background)}.editor-banner,.editor-banner .action-container .codicon,.editor-banner .message-actions-container .monaco-link{color:var(--vscode-banner-foreground)}.editor-banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}.monaco-link{color:var(--vscode-textLink-foreground)}.monaco-link:hover{color:var(--vscode-textLink-activeForeground)}.floating-menu-overlay-widget{padding:0;color:var(--vscode-button-foreground);background-color:var(--vscode-button-background);border-radius:2px;border:1px solid var(--vscode-contrastBorder);display:flex;align-items:center;z-index:10;box-shadow:0 2px 8px var(--vscode-widget-shadow);overflow:hidden}.floating-menu-overlay-widget .action-item>.action-label{padding:5px;font-size:12px;border-radius:2px}.floating-menu-overlay-widget .action-item>.action-label.codicon{color:var(--vscode-button-foreground)}.floating-menu-overlay-widget .action-item>.action-label.codicon:not(.separator){padding-top:6px;padding-bottom:6px}.floating-menu-overlay-widget .action-item:first-child>.action-label{padding-left:7px}.floating-menu-overlay-widget .action-item:last-child>.action-label{padding-right:7px}.floating-menu-overlay-widget .action-item .action-label.separator{background-color:var(--vscode-menu-separatorBackground)}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;padding:10px;color:var(--vscode-editorHoverWidget-foreground);background-color:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border)}.monaco-editor.hc-black .tokens-inspect-widget,.monaco-editor.hc-light .tokens-inspect-widget{border-width:2px}.monaco-editor .tokens-inspect-widget .tokens-inspect-separator{height:1px;border:0;background-color:var(--vscode-editorHoverWidget-border)}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-editor .synthetic-focus,.monaco-diff-editor .synthetic-focus,.monaco-editor [tabindex="0"]:focus,.monaco-diff-editor [tabindex="0"]:focus,.monaco-editor [tabindex="-1"]:focus,.monaco-diff-editor [tabindex="-1"]:focus,.monaco-editor button:focus,.monaco-diff-editor button:focus,.monaco-editor input[type=button]:focus,.monaco-diff-editor input[type=button]:focus,.monaco-editor input[type=checkbox]:focus,.monaco-diff-editor input[type=checkbox]:focus,.monaco-editor input[type=search]:focus,.monaco-diff-editor input[type=search]:focus,.monaco-editor input[type=text]:focus,.monaco-diff-editor input[type=text]:focus,.monaco-editor select:focus,.monaco-diff-editor select:focus,.monaco-editor textarea:focus,.monaco-diff-editor textarea:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:var(--vscode-focusBorder);opacity:1}.monaco-hover.workbench-hover{position:relative;font-size:13px;line-height:19px;z-index:40;overflow:hidden;max-width:700px;background:var(--vscode-editorHoverWidget-background);border:1px solid var(--vscode-editorHoverWidget-border);border-radius:5px;color:var(--vscode-editorHoverWidget-foreground);box-shadow:0 2px 8px var(--vscode-widget-shadow)}.monaco-hover.workbench-hover .monaco-action-bar .action-item .codicon{width:13px;height:13px}.monaco-hover.workbench-hover hr{border-bottom:none}.monaco-hover.workbench-hover.compact{font-size:12px}.monaco-hover.workbench-hover.compact .monaco-action-bar .action-item .codicon{width:12px;height:12px}.monaco-hover.workbench-hover.compact .hover-contents{padding:2px 8px}.workbench-hover-container.locked .monaco-hover.workbench-hover{outline:1px solid var(--vscode-editorHoverWidget-border)}.workbench-hover-container:focus-within.locked .monaco-hover.workbench-hover{outline-color:var(--vscode-focusBorder)}.workbench-hover-pointer{position:absolute;z-index:41;pointer-events:none}.workbench-hover-pointer:after{content:"";position:absolute;width:5px;height:5px;background-color:var(--vscode-editorHoverWidget-background);border-right:1px solid var(--vscode-editorHoverWidget-border);border-bottom:1px solid var(--vscode-editorHoverWidget-border)}.workbench-hover-container:not(:focus-within).locked .workbench-hover-pointer:after{width:4px;height:4px;border-right-width:2px;border-bottom-width:2px}.workbench-hover-container:focus-within .workbench-hover-pointer:after{border-right:1px solid var(--vscode-focusBorder);border-bottom:1px solid var(--vscode-focusBorder)}.workbench-hover-pointer.left{left:-3px}.workbench-hover-pointer.right{right:3px}.workbench-hover-pointer.top{top:-3px}.workbench-hover-pointer.bottom{bottom:3px}.workbench-hover-pointer.left:after{transform:rotate(135deg)}.workbench-hover-pointer.right:after{transform:rotate(315deg)}.workbench-hover-pointer.top:after{transform:rotate(225deg)}.workbench-hover-pointer.bottom:after{transform:rotate(45deg)}.monaco-hover.workbench-hover a{color:var(--vscode-textLink-foreground)}.monaco-hover.workbench-hover a:focus{outline:1px solid;outline-offset:-1px;text-decoration:underline;outline-color:var(--vscode-focusBorder)}.monaco-hover.workbench-hover a.codicon:focus,.monaco-hover.workbench-hover a.monaco-button:focus{text-decoration:none}.monaco-hover.workbench-hover a:hover,.monaco-hover.workbench-hover a:active{color:var(--vscode-textLink-activeForeground)}.monaco-hover.workbench-hover code{background:var(--vscode-textCodeBlock-background)}.monaco-hover.workbench-hover .hover-row .actions{background:var(--vscode-editorHoverWidget-statusBarBackground)}.monaco-hover.workbench-hover.right-aligned{left:1px}.monaco-hover.workbench-hover.right-aligned .hover-row.status-bar .actions{flex-direction:row-reverse}.monaco-hover.workbench-hover.right-aligned .hover-row.status-bar .actions .action-container{margin-right:0;margin-left:16px}.context-view{position:absolute}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;color:inherit}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.hc-light .quick-input-widget .monaco-highlighted-label .highlight{color:#0f4a85}.monaco-keybinding>.monaco-keybinding-key{background-color:#ddd6;border:solid 1px rgba(204,204,204,.4);border-bottom-color:#bbb6;box-shadow:inset 0 -1px #bbb6;color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.hc-light .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px #0F4A85;box-shadow:none;color:#292929}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:#8080802b;border:solid 1px rgba(51,51,51,.6);border-bottom-color:#4449;box-shadow:inset 0 -1px #4449;color:#ccc}.quick-input-widget{position:absolute;width:600px;z-index:2550;left:50%;-webkit-app-region:no-drag;border-radius:6px}.quick-input-titlebar{cursor:grab;display:flex;align-items:center;border-top-right-radius:5px;border-top-left-radius:5px}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1}.quick-input-inline-action-bar>.actions-container>.action-item:first-child{margin-left:5px}.quick-input-inline-action-bar>.actions-container>.action-item{margin-top:2px}.quick-input-title{cursor:grab;padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-right-action-bar>.actions-container>.action-item{margin-left:4px}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px 6px 6px 11px}.quick-input-header .quick-input-description{margin:4px 2px;flex:1}.quick-input-header{cursor:grab;display:flex;padding:6px 6px 2px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-widget .quick-input-header .monaco-checkbox{margin-top:6px}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:25px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-message a{color:inherit}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-list{line-height:22px}.quick-input-widget.hidden-input .quick-input-list{margin-top:4px;padding-bottom:4px}.quick-input-list .monaco-list{overflow:hidden;max-height:440px;padding-bottom:5px}.quick-input-list .monaco-scrollable-element{padding:0 6px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row{border-radius:3px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-widget .monaco-checkbox{margin-right:0}.quick-input-widget .quick-input-list .monaco-checkbox,.quick-input-widget .quick-input-tree .monaco-checkbox{margin-top:4px}.quick-input-list .quick-input-list-icon{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;display:flex;align-items:center;justify-content:center}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label>span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-list .monaco-list-row .monaco-highlighted-label .highlight{font-weight:700;background-color:unset;color:var(--vscode-list-highlightForeground)!important}.quick-input-list .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight{color:var(--vscode-list-focusHighlightForeground)!important}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:4px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry.focus-inside .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.passive-focused .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list>.monaco-list:focus .monaco-list-row.focused{outline:1px solid var(--vscode-list-focusOutline)!important;outline-offset:-1px}.quick-input-list>.monaco-list:focus .monaco-list-row.focused .quick-input-list-entry.quick-input-list-separator-border{border-color:transparent}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.quick-input-list .quick-input-list-separator-as-item{padding:4px 6px;font-size:12px}.quick-input-list .quick-input-list-separator-as-item .label-name{font-weight:600}.quick-input-list .quick-input-list-separator-as-item .label-description{opacity:1!important}.quick-input-list .monaco-tree-sticky-row .quick-input-list-entry.quick-input-list-separator-as-item.quick-input-list-separator-border{border-top-style:none}.quick-input-list .monaco-tree-sticky-row{padding:0 5px}.quick-input-list .monaco-tl-twistie{display:none!important}.quick-input-tree .monaco-list{overflow:hidden;max-height:440px;padding-bottom:5px}.quick-input-tree .quick-input-tree-entry{box-sizing:border-box;overflow:hidden;display:flex;padding:0 6px}.quick-input-tree .quick-input-tree-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-tree .quick-input-tree-icon{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;display:flex;align-items:center;justify-content:center}.quick-input-tree .quick-input-tree-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row{display:flex;align-items:center}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .monaco-icon-label,.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-tree .quick-input-tree-rows>.quick-input-tree-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-tree .quick-input-tree-rows .monaco-highlighted-label>span{opacity:1}.quick-input-tree .quick-input-tree-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-tree .quick-input-tree-entry-action-bar .action-label{display:none}.quick-input-tree .quick-input-tree-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-tree .quick-input-tree-entry-action-bar{margin-top:1px}.quick-input-tree .quick-input-tree-entry-action-bar{margin-right:4px}.quick-input-tree .quick-input-tree-entry .quick-input-tree-entry-action-bar .action-label.always-visible,.quick-input-tree .quick-input-tree-entry:hover .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .quick-input-tree-entry.focus-inside .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .monaco-list-row.focused .quick-input-tree-entry-action-bar .action-label,.quick-input-tree .monaco-list-row.passive-focused .quick-input-tree-entry-action-bar .action-label{display:flex}.quick-input-tree>.monaco-list:focus .monaco-list-row.focused{outline:1px solid var(--vscode-list-focusOutline)!important;outline-offset:-1px}.monaco-progress-container{width:100%;height:2px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:2px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;transform:translateZ(0);animation-timing-function:linear}.monaco-progress-container.infinite.infinite-long-running .progress-bit{animation-timing-function:steps(100)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.monaco-editor .rendered-markdown kbd{background-color:var(--vscode-keybindingLabel-background);color:var(--vscode-keybindingLabel-foreground);border-style:solid;border-width:1px;border-radius:3px;border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);vertical-align:middle;padding:1px 3px}.rendered-markdown li:has(input[type=checkbox]){list-style-type:none}.monaco-component.multiDiffEditor{background:var(--vscode-multiDiffEditor-background);position:relative;height:100%;width:100%;overflow-y:hidden}.monaco-component.multiDiffEditor>div{position:absolute;top:0;left:0;height:100%;width:100%}.monaco-component.multiDiffEditor>div.placeholder{visibility:hidden;display:grid;place-items:center;place-content:center}.monaco-component.multiDiffEditor>div.placeholder.visible{visibility:visible}.monaco-component.multiDiffEditor .active{--vscode-multiDiffEditor-border: var(--vscode-focusBorder)}.monaco-component.multiDiffEditor .multiDiffEntry{display:flex;flex-direction:column;flex:1;overflow:hidden}.monaco-component.multiDiffEditor .multiDiffEntry .collapse-button{margin:0 5px;cursor:pointer}.monaco-component.multiDiffEditor .multiDiffEntry .collapse-button a{display:block}.monaco-component.multiDiffEditor .multiDiffEntry .header{z-index:1000;background:var(--vscode-editor-background)}.monaco-component.multiDiffEditor .multiDiffEntry .header:not(.collapsed) .header-content{border-bottom:1px solid var(--vscode-sideBarSectionHeader-border)}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content{margin:8px 0 0;padding:4px 5px;border-top:1px solid var(--vscode-multiDiffEditor-border);display:flex;align-items:center;color:var(--vscode-foreground);background:var(--vscode-multiDiffEditor-headerBackground)}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content.shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path{display:flex;flex:1;min-width:0}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .title{font-size:14px;line-height:22px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .title.original{flex:1;min-width:0;text-overflow:ellipsis}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .file-path .status{font-weight:600;opacity:.75;margin:0 10px;line-height:22px}.monaco-component.multiDiffEditor .multiDiffEntry .header .header-content .actions{padding:0 8px}.monaco-component.multiDiffEditor .multiDiffEntry .editorParent{flex:1;display:flex;flex-direction:column;border-bottom:1px solid var(--vscode-multiDiffEditor-border);overflow:hidden}.monaco-component.multiDiffEditor .multiDiffEntry .editorContainer{flex:1} diff --git a/src/main/resources/META-INF/resources/assets/javascript-D1_HFFyG.js b/src/main/resources/META-INF/resources/assets/javascript-D1_HFFyG.js new file mode 100644 index 0000000000..c4314057c2 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/javascript-D1_HFFyG.js @@ -0,0 +1 @@ +import{conf as t,language as e}from"./typescript-DvHGjc3l.js";import"./index-CHgQ1fX-.js";const o=t,r={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{o as conf,r as language}; diff --git a/src/main/resources/META-INF/resources/assets/jsonMode-rox_nk1D.js b/src/main/resources/META-INF/resources/assets/jsonMode-rox_nk1D.js new file mode 100644 index 0000000000..9ec9002474 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/jsonMode-rox_nk1D.js @@ -0,0 +1,7 @@ +import{c as P,l as _,e as B}from"./index-CHgQ1fX-.js";import{f as y,g as J,C as Q,H as Y,b as G,d as X,F as Z,S as $,e as K}from"./lspLanguageFeatures-DhacLp9m.js";import{a as Ae,D as Oe,h as Ie,R as Ne,c as Le,i as Ee,j as Ue,t as De,k as Be}from"./lspLanguageFeatures-DhacLp9m.js";const x=120*1e3;class C{constructor(i){this._defaults=i,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>x&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=P({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(new URL("/assets/json.worker-leyajbqV.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...i){let t;return this._getClient().then(n=>{t=n}).then(n=>{if(this._worker)return this._worker.withSyncedResources(i)}).then(n=>t)}}function ee(e,i=!1){const t=e.length;let n=0,u="",p=0,l=16,o=0,g=0,w=0,v=0,c=0;function O(s,m){let a=0,r=0;for(;a=48&&f<=57)r=r*16+f-48;else if(f>=65&&f<=70)r=r*16+f-65+10;else if(f>=97&&f<=102)r=r*16+f-97+10;else break;n++,a++}return a=t){s+=e.substring(m,n),c=2;break}const a=e.charCodeAt(n);if(a===34){s+=e.substring(m,n),n++;break}if(a===92){if(s+=e.substring(m,n),n++,n>=t){c=2;break}switch(e.charCodeAt(n++)){case 34:s+='"';break;case 92:s+="\\";break;case 47:s+="/";break;case 98:s+="\b";break;case 102:s+="\f";break;case 110:s+=` +`;break;case 114:s+="\r";break;case 116:s+=" ";break;case 117:const f=O(4);f>=0?s+=String.fromCharCode(f):c=4;break;default:c=5}m=n;continue}if(a>=0&&a<=31)if(I(a)){s+=e.substring(m,n),c=2;break}else c=6;n++}return s}function D(){if(u="",c=0,p=n,g=o,v=w,n>=t)return p=t,l=17;let s=e.charCodeAt(n);if(E(s)){do n++,u+=String.fromCharCode(s),s=e.charCodeAt(n);while(E(s));return l=15}if(I(s))return n++,u+=String.fromCharCode(s),s===13&&e.charCodeAt(n)===10&&(n++,u+=` +`),o++,w=n,l=14;switch(s){case 123:return n++,l=1;case 125:return n++,l=2;case 91:return n++,l=3;case 93:return n++,l=4;case 58:return n++,l=6;case 44:return n++,l=5;case 34:return n++,u=H(),l=10;case 47:const m=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n=12&&s<=15);return s}return{setPosition:U,getPosition:()=>n,scan:i?z:D,getToken:()=>l,getTokenValue:()=>u,getTokenOffset:()=>p,getTokenLength:()=>n-p,getTokenStartLine:()=>g,getTokenStartCharacter:()=>p-v,getTokenError:()=>c}}function E(e){return e===32||e===9}function I(e){return e===10||e===13}function T(e){return e>=48&&e<=57}var R;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(R||(R={}));new Array(20).fill(0).map((e,i)=>" ".repeat(i));const A=200;new Array(A).fill(0).map((e,i)=>` +`+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>"\r"+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>`\r +`+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>` +`+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>"\r"+" ".repeat(i)),new Array(A).fill(0).map((e,i)=>`\r +`+" ".repeat(i));var F;(function(e){e.DEFAULT={allowTrailingComma:!1}})(F||(F={}));const ne=ee;var W;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(W||(W={}));var h;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(h||(h={}));var j;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(j||(j={}));function ie(e){return{getInitialState:()=>new N(null,null,!1,null),tokenize:(i,t)=>me(e,i,t)}}const M="delimiter.bracket.json",V="delimiter.array.json",te="delimiter.colon.json",se="delimiter.comma.json",le="keyword.json",ue="keyword.json",oe="string.value.json",ce="number.json",fe="string.key.json",pe="comment.block.json",ge="comment.line.json";class b{constructor(i,t){this.parent=i,this.type=t}static pop(i){return i?i.parent:null}static push(i,t){return new b(i,t)}static equals(i,t){if(!i&&!t)return!0;if(!i||!t)return!1;for(;i&&t;){if(i===t)return!0;if(i.type!==t.type)return!1;i=i.parent,t=t.parent}return!0}}class N{constructor(i,t,n,u){this._state=i,this.scanError=t,this.lastWasColon=n,this.parents=u}clone(){return new N(this._state,this.scanError,this.lastWasColon,this.parents)}equals(i){return i===this?!0:!i||!(i instanceof N)?!1:this.scanError===i.scanError&&this.lastWasColon===i.lastWasColon&&b.equals(this.parents,i.parents)}getStateData(){return this._state}setStateData(i){this._state=i}}function me(e,i,t,n=0){let u=0,p=!1;switch(t.scanError){case 2:i='"'+i,u=1;break;case 1:i="/*"+i,u=2;break}const l=ne(i);let o=t.lastWasColon,g=t.parents;const w={tokens:[],endState:t.clone()};for(;;){let v=n+l.getPosition(),c="";const O=l.scan();if(O===17)break;if(v===n+l.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+i.substr(l.getPosition(),3));switch(p&&(v-=u),p=u>0,O){case 1:g=b.push(g,0),c=M,o=!1;break;case 2:g=b.pop(g),c=M,o=!1;break;case 3:g=b.push(g,1),c=V,o=!1;break;case 4:g=b.pop(g),c=V,o=!1;break;case 6:c=te,o=!0;break;case 5:c=se,o=!1;break;case 8:case 9:c=le,o=!1;break;case 7:c=ue,o=!1;break;case 10:const L=(g?g.type:0)===1;c=o||L?oe:fe,o=!1;break;case 11:c=ce,o=!1;break}switch(O){case 12:c=ge;break;case 13:c=pe;break}w.endState=new N(t.getStateData(),l.getTokenError(),o,g),w.tokens.push({startIndex:v,scopes:c})}return w}let k;function we(){return new Promise((e,i)=>{if(!k)return i("JSON not registered!");e(k)})}class re extends K{constructor(i,t,n){super(i,t,n.onDidChange),this._disposables.push(B.onWillDisposeModel(u=>{this._resetSchema(u.uri)})),this._disposables.push(B.onDidChangeModelLanguage(u=>{this._resetSchema(u.model.uri)}))}_resetSchema(i){this._worker().then(t=>{t.resetSchema(i.toString())})}}function be(e){const i=[],t=[],n=new C(e);i.push(n),k=(...l)=>n.getLanguageServiceWorker(...l);function u(){const{languageId:l,modeConfiguration:o}=e;q(t),o.documentFormattingEdits&&t.push(_.registerDocumentFormattingEditProvider(l,new y(k))),o.documentRangeFormattingEdits&&t.push(_.registerDocumentRangeFormattingEditProvider(l,new J(k))),o.completionItems&&t.push(_.registerCompletionItemProvider(l,new Q(k,[" ",":",'"']))),o.hovers&&t.push(_.registerHoverProvider(l,new Y(k))),o.documentSymbols&&t.push(_.registerDocumentSymbolProvider(l,new G(k))),o.tokens&&t.push(_.setTokensProvider(l,ie(!0))),o.colors&&t.push(_.registerColorProvider(l,new X(k))),o.foldingRanges&&t.push(_.registerFoldingRangeProvider(l,new Z(k))),o.diagnostics&&t.push(new re(l,k,e)),o.selectionRanges&&t.push(_.registerSelectionRangeProvider(l,new $(k)))}u(),i.push(_.setLanguageConfiguration(e.languageId,ke));let p=e.modeConfiguration;return e.onDidChange(l=>{l.modeConfiguration!==p&&(p=l.modeConfiguration,u())}),i.push(S(t)),S(i)}function S(e){return{dispose:()=>q(e)}}function q(e){for(;e.length;)e.pop().dispose()}const ke={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]};export{Q as CompletionAdapter,Ae as DefinitionAdapter,K as DiagnosticsAdapter,X as DocumentColorAdapter,y as DocumentFormattingEditProvider,Oe as DocumentHighlightAdapter,Ie as DocumentLinkAdapter,J as DocumentRangeFormattingEditProvider,G as DocumentSymbolAdapter,Z as FoldingRangeAdapter,Y as HoverAdapter,Ne as ReferenceAdapter,Le as RenameAdapter,$ as SelectionRangeAdapter,C as WorkerManager,Ee as fromPosition,Ue as fromRange,we as getWorker,be as setupMode,De as toRange,Be as toTextEdit}; diff --git a/src/main/resources/META-INF/resources/assets/liquid-C_DzB6CA.js b/src/main/resources/META-INF/resources/assets/liquid-C_DzB6CA.js new file mode 100644 index 0000000000..494462e473 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/liquid-C_DzB6CA.js @@ -0,0 +1 @@ +import{l as e}from"./index-CHgQ1fX-.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{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}}]},o={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};export{n as conf,o as language}; diff --git a/src/main/resources/META-INF/resources/assets/lspLanguageFeatures-DhacLp9m.js b/src/main/resources/META-INF/resources/assets/lspLanguageFeatures-DhacLp9m.js new file mode 100644 index 0000000000..23e08a99ec --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/lspLanguageFeatures-DhacLp9m.js @@ -0,0 +1,4 @@ +import{R as Ge,l as x,e as w,U as Je,M as R}from"./index-CHgQ1fX-.js";var T;(function(e){function n(i){return typeof i=="string"}e.is=n})(T||(T={}));var O;(function(e){function n(i){return typeof i=="string"}e.is=n})(O||(O={}));var K;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(K||(K={}));var j;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(j||(j={}));var _;(function(e){function n(r,t){return r===Number.MAX_VALUE&&(r=j.MAX_VALUE),t===Number.MAX_VALUE&&(t=j.MAX_VALUE),{line:r,character:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&o.uinteger(t.line)&&o.uinteger(t.character)}e.is=i})(_||(_={}));var h;(function(e){function n(r,t,a,u){if(o.uinteger(r)&&o.uinteger(t)&&o.uinteger(a)&&o.uinteger(u))return{start:_.create(r,t),end:_.create(a,u)};if(_.is(r)&&_.is(t))return{start:r,end:t};throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${a}, ${u}]`)}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&_.is(t.start)&&_.is(t.end)}e.is=i})(h||(h={}));var N;(function(e){function n(r,t){return{uri:r,range:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(o.string(t.uri)||o.undefined(t.uri))}e.is=i})(N||(N={}));var ee;(function(e){function n(r,t,a,u){return{targetUri:r,targetRange:t,targetSelectionRange:a,originSelectionRange:u}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.targetRange)&&o.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||o.undefined(t.originSelectionRange))}e.is=i})(ee||(ee={}));var S;(function(e){function n(r,t,a,u){return{red:r,green:t,blue:a,alpha:u}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.numberRange(t.red,0,1)&&o.numberRange(t.green,0,1)&&o.numberRange(t.blue,0,1)&&o.numberRange(t.alpha,0,1)}e.is=i})(S||(S={}));var te;(function(e){function n(r,t){return{range:r,color:t}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&h.is(t.range)&&S.is(t.color)}e.is=i})(te||(te={}));var ne;(function(e){function n(r,t,a){return{label:r,textEdit:t,additionalTextEdits:a}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.undefined(t.textEdit)||L.is(t))&&(o.undefined(t.additionalTextEdits)||o.typedArray(t.additionalTextEdits,L.is))}e.is=i})(ne||(ne={}));var M;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(M||(M={}));var re;(function(e){function n(r,t,a,u,s,f){const l={startLine:r,endLine:t};return o.defined(a)&&(l.startCharacter=a),o.defined(u)&&(l.endCharacter=u),o.defined(s)&&(l.kind=s),o.defined(f)&&(l.collapsedText=f),l}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.uinteger(t.startLine)&&o.uinteger(t.startLine)&&(o.undefined(t.startCharacter)||o.uinteger(t.startCharacter))&&(o.undefined(t.endCharacter)||o.uinteger(t.endCharacter))&&(o.undefined(t.kind)||o.string(t.kind))}e.is=i})(re||(re={}));var H;(function(e){function n(r,t){return{location:r,message:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&N.is(t.location)&&o.string(t.message)}e.is=i})(H||(H={}));var A;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(A||(A={}));var ie;(function(e){e.Unnecessary=1,e.Deprecated=2})(ie||(ie={}));var ae;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&o.string(r.href)}e.is=n})(ae||(ae={}));var P;(function(e){function n(r,t,a,u,s,f){let l={range:r,message:t};return o.defined(a)&&(l.severity=a),o.defined(u)&&(l.code=u),o.defined(s)&&(l.source=s),o.defined(f)&&(l.relatedInformation=f),l}e.create=n;function i(r){var t;let a=r;return o.defined(a)&&h.is(a.range)&&o.string(a.message)&&(o.number(a.severity)||o.undefined(a.severity))&&(o.integer(a.code)||o.string(a.code)||o.undefined(a.code))&&(o.undefined(a.codeDescription)||o.string((t=a.codeDescription)===null||t===void 0?void 0:t.href))&&(o.string(a.source)||o.undefined(a.source))&&(o.undefined(a.relatedInformation)||o.typedArray(a.relatedInformation,H.is))}e.is=i})(P||(P={}));var E;(function(e){function n(r,t,...a){let u={title:r,command:t};return o.defined(a)&&a.length>0&&(u.arguments=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.title)&&o.string(t.command)}e.is=i})(E||(E={}));var L;(function(e){function n(a,u){return{range:a,newText:u}}e.replace=n;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function t(a){const u=a;return o.objectLiteral(u)&&o.string(u.newText)&&h.is(u.range)}e.is=t})(L||(L={}));var W;(function(e){function n(r,t,a){const u={label:r};return t!==void 0&&(u.needsConfirmation=t),a!==void 0&&(u.description=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(o.string(t.description)||t.description===void 0)}e.is=i})(W||(W={}));var I;(function(e){function n(i){const r=i;return o.string(r)}e.is=n})(I||(I={}));var oe;(function(e){function n(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=n;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function t(a){const u=a;return L.is(u)&&(W.is(u.annotationId)||I.is(u.annotationId))}e.is=t})(oe||(oe={}));var X;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,a){let u={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&o.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(r,t,a,u){let s={kind:"rename",oldUri:r,newUri:t};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&o.string(t.oldUri)&&o.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(z||(z={}));var B;(function(e){function n(r,t,a){let u={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&o.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||o.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||o.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(B||(B={}));var q;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>o.string(t.kind)?$.is(t)||z.is(t)||B.is(t):X.is(t)))}e.is=n})(q||(q={}));var ue;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)}e.is=i})(ue||(ue={}));var se;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.integer(t.version)}e.is=i})(se||(se={}));var Q;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&(t.version===null||o.integer(t.version))}e.is=i})(Q||(Q={}));var ce;(function(e){function n(r,t,a,u){return{uri:r,languageId:t,version:a,text:u}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.string(t.languageId)&&o.integer(t.version)&&o.string(t.text)}e.is=i})(ce||(ce={}));var G;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(G||(G={}));var F;(function(e){function n(i){const r=i;return o.objectLiteral(i)&&G.is(r.kind)&&o.string(r.value)}e.is=n})(F||(F={}));var p;(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})(p||(p={}));var J;(function(e){e.PlainText=1,e.Snippet=2})(J||(J={}));var de;(function(e){e.Deprecated=1})(de||(de={}));var fe;(function(e){function n(r,t,a){return{newText:r,insert:t,replace:a}}e.create=n;function i(r){const t=r;return t&&o.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(fe||(fe={}));var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||(le={}));var ge;(function(e){function n(i){const r=i;return r&&(o.string(r.detail)||r.detail===void 0)&&(o.string(r.description)||r.description===void 0)}e.is=n})(ge||(ge={}));var he;(function(e){function n(i){return{label:i}}e.create=n})(he||(he={}));var pe;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(pe||(pe={}));var y;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return o.string(t)||o.objectLiteral(t)&&o.string(t.language)&&o.string(t.value)}e.is=i})(y||(y={}));var me;(function(e){function n(i){let r=i;return!!r&&o.objectLiteral(r)&&(F.is(r.contents)||y.is(r.contents)||o.typedArray(r.contents,y.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(me||(me={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var be;(function(e){function n(i,r,...t){let a={label:i};return o.defined(r)&&(a.documentation=r),o.defined(t)?a.parameters=t:a.parameters=[],a}e.create=n})(be||(be={}));var D;(function(e){e.Text=1,e.Read=2,e.Write=3})(D||(D={}));var _e;(function(e){function n(i,r){let t={range:i};return o.number(r)&&(t.kind=r),t}e.create=n})(_e||(_e={}));var m;(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})(m||(m={}));var xe;(function(e){e.Deprecated=1})(xe||(xe={}));var we;(function(e){function n(i,r,t,a,u){let s={name:i,kind:r,location:{uri:a,range:t}};return u&&(s.containerName=u),s}e.create=n})(we||(we={}));var ke;(function(e){function n(i,r,t,a){return a!==void 0?{name:i,kind:r,location:{uri:t,range:a}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(ke||(ke={}));var Ae;(function(e){function n(r,t,a,u,s,f){let l={name:r,detail:t,kind:a,range:u,selectionRange:s};return f!==void 0&&(l.children=f),l}e.create=n;function i(r){let t=r;return t&&o.string(t.name)&&o.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||o.string(t.detail))&&(t.deprecated===void 0||o.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Ae||(Ae={}));var Ee;(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"})(Ee||(Ee={}));var V;(function(e){e.Invoked=1,e.Automatic=2})(V||(V={}));var Le;(function(e){function n(r,t,a){let u={diagnostics:r};return t!=null&&(u.only=t),a!=null&&(u.triggerKind=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.typedArray(t.diagnostics,P.is)&&(t.only===void 0||o.typedArray(t.only,o.string))&&(t.triggerKind===void 0||t.triggerKind===V.Invoked||t.triggerKind===V.Automatic)}e.is=i})(Le||(Le={}));var Ie;(function(e){function n(r,t,a){let u={title:r},s=!0;return typeof t=="string"?(s=!1,u.kind=t):E.is(t)?u.command=t:u.edit=t,s&&a!==void 0&&(u.kind=a),u}e.create=n;function i(r){let t=r;return t&&o.string(t.title)&&(t.diagnostics===void 0||o.typedArray(t.diagnostics,P.is))&&(t.kind===void 0||o.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||E.is(t.command))&&(t.isPreferred===void 0||o.boolean(t.isPreferred))&&(t.edit===void 0||q.is(t.edit))}e.is=i})(Ie||(Ie={}));var Re;(function(e){function n(r,t){let a={range:r};return o.defined(t)&&(a.data=t),a}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.command)||E.is(t.command))}e.is=i})(Re||(Re={}));var Me;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.uinteger(t.tabSize)&&o.boolean(t.insertSpaces)}e.is=i})(Me||(Me={}));var De;(function(e){function n(r,t,a){return{range:r,target:t,data:a}}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.target)||o.string(t.target))}e.is=i})(De||(De={}));var Fe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Fe||(Fe={}));var Ce;(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"})(Ce||(Ce={}));var je;(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"})(je||(je={}));var Ne;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ne||(Ne={}));var Pe;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.string(t.text)}e.is=i})(Pe||(Pe={}));var ye;(function(e){function n(r,t,a){return{range:r,variableName:t,caseSensitiveLookup:a}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.boolean(t.caseSensitiveLookup)&&(o.string(t.variableName)||t.variableName===void 0)}e.is=i})(ye||(ye={}));var Ve;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(o.string(t.expression)||t.expression===void 0)}e.is=i})(Ve||(Ve={}));var Ue;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return o.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ue||(Ue={}));var Y;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(Y||(Y={}));var Z;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.location===void 0||N.is(t.location))&&(t.command===void 0||E.is(t.command))}e.is=i})(Z||(Z={}));var Oe;(function(e){function n(r,t,a){const u={position:r,label:t};return a!==void 0&&(u.kind=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&_.is(t.position)&&(o.string(t.label)||o.typedArray(t.label,Z.is))&&(t.kind===void 0||Y.is(t.kind))&&t.textEdits===void 0||o.typedArray(t.textEdits,L.is)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.paddingLeft===void 0||o.boolean(t.paddingLeft))&&(t.paddingRight===void 0||o.boolean(t.paddingRight))}e.is=i})(Oe||(Oe={}));var Se;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Se||(Se={}));var He;(function(e){function n(i,r,t,a){return{insertText:i,filterText:r,range:t,command:a}}e.create=n})(He||(He={}));var We;(function(e){function n(i){return{items:i}}e.create=n})(We||(We={}));var Xe;(function(e){e.Invoked=0,e.Automatic=1})(Xe||(Xe={}));var $e;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})($e||($e={}));var ze;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(ze||(ze={}));var Be;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&O.is(r.uri)&&o.string(r.name)}e.is=n})(Be||(Be={}));var qe;(function(e){function n(a,u,s,f){return new nt(a,u,s,f)}e.create=n;function i(a){let u=a;return!!(o.defined(u)&&o.string(u.uri)&&(o.undefined(u.languageId)||o.string(u.languageId))&&o.uinteger(u.lineCount)&&o.func(u.getText)&&o.func(u.positionAt)&&o.func(u.offsetAt))}e.is=i;function r(a,u){let s=a.getText(),f=t(u,(d,g)=>{let b=d.range.start.line-g.range.start.line;return b===0?d.range.start.character-g.range.start.character:b}),l=s.length;for(let d=f.length-1;d>=0;d--){let g=f[d],b=a.offsetAt(g.range.start),c=a.offsetAt(g.range.end);if(c<=l)s=s.substring(0,b)+g.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}e.applyEdits=r;function t(a,u){if(a.length<=1)return a;const s=a.length/2|0,f=a.slice(0,s),l=a.slice(s);t(f,u),t(l,u);let d=0,g=0,b=0;for(;d0&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets}positionAt(n){n=Math.max(Math.min(n,this._content.length),0);let i=this.getLineOffsets(),r=0,t=i.length;if(t===0)return _.create(0,n);for(;rn?t=u:r=u+1}let a=r-1;return _.create(a,n-i[a])}offsetAt(n){let i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;let r=i[n.line],t=n.line+1"u"}e.undefined=r;function t(c){return c===!0||c===!1}e.boolean=t;function a(c){return n.call(c)==="[object String]"}e.string=a;function u(c){return n.call(c)==="[object Number]"}e.number=u;function s(c,U,tt){return n.call(c)==="[object Number]"&&U<=c&&c<=tt}e.numberRange=s;function f(c){return n.call(c)==="[object Number]"&&-2147483648<=c&&c<=2147483647}e.integer=f;function l(c){return n.call(c)==="[object Number]"&&0<=c&&c<=2147483647}e.uinteger=l;function d(c){return n.call(c)==="[object Function]"}e.func=d;function g(c){return c!==null&&typeof c=="object"}e.objectLiteral=g;function b(c,U){return Array.isArray(c)&&c.every(U)}e.typedArray=b})(o||(o={}));class pt{constructor(n,i,r){this._languageId=n,this._worker=i,this._disposables=[],this._listener=Object.create(null);const t=u=>{let s=u.getLanguageId();if(s!==this._languageId)return;let f;this._listener[u.uri.toString()]=u.onDidChangeContent(()=>{window.clearTimeout(f),f=window.setTimeout(()=>this._doValidate(u.uri,s),500)}),this._doValidate(u.uri,s)},a=u=>{w.setModelMarkers(u,this._languageId,[]);let s=u.uri.toString(),f=this._listener[s];f&&(f.dispose(),delete this._listener[s])};this._disposables.push(w.onDidCreateModel(t)),this._disposables.push(w.onWillDisposeModel(a)),this._disposables.push(w.onDidChangeModelLanguage(u=>{a(u.model),t(u.model)})),this._disposables.push(r(u=>{w.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(a(s),t(s))})})),this._disposables.push({dispose:()=>{w.getModels().forEach(a);for(let u in this._listener)this._listener[u].dispose()}}),w.getModels().forEach(t)}dispose(){this._disposables.forEach(n=>n&&n.dispose()),this._disposables.length=0}_doValidate(n,i){this._worker(n).then(r=>r.doValidation(n.toString())).then(r=>{const t=r.map(u=>it(n,u));let a=w.getModel(n);a&&a.getLanguageId()===i&&w.setModelMarkers(a,i,t)}).then(void 0,r=>{console.error(r)})}}function rt(e){switch(e){case A.Error:return R.Error;case A.Warning:return R.Warning;case A.Information:return R.Info;case A.Hint:return R.Hint;default:return R.Info}}function it(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:rt(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}class mt{constructor(n,i){this._worker=n,this._triggerCharacters=i}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.doComplete(a.toString(),k(i))).then(u=>{if(!u)return;const s=n.getWordUntilPosition(i),f=new Ge(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=u.items.map(d=>{const g={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:ut(d.command),range:f,kind:ot(d.kind)};return d.textEdit&&(at(d.textEdit)?g.range={insert:v(d.textEdit.insert),replace:v(d.textEdit.replace)}:g.range=v(d.textEdit.range),g.insertText=d.textEdit.newText),d.additionalTextEdits&&(g.additionalTextEdits=d.additionalTextEdits.map(C)),d.insertTextFormat===J.Snippet&&(g.insertTextRules=x.CompletionItemInsertTextRule.InsertAsSnippet),g});return{isIncomplete:u.isIncomplete,suggestions:l}})}}function k(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function Ye(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function v(e){if(e)return new Ge(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function at(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function ot(e){const n=x.CompletionItemKind;switch(e){case p.Text:return n.Text;case p.Method:return n.Method;case p.Function:return n.Function;case p.Constructor:return n.Constructor;case p.Field:return n.Field;case p.Variable:return n.Variable;case p.Class:return n.Class;case p.Interface:return n.Interface;case p.Module:return n.Module;case p.Property:return n.Property;case p.Unit:return n.Unit;case p.Value:return n.Value;case p.Enum:return n.Enum;case p.Keyword:return n.Keyword;case p.Snippet:return n.Snippet;case p.Color:return n.Color;case p.File:return n.File;case p.Reference:return n.Reference}return n.Property}function C(e){if(e)return{range:v(e.range),text:e.newText}}function ut(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}class vt{constructor(n){this._worker=n}provideHover(n,i,r){let t=n.uri;return this._worker(t).then(a=>a.doHover(t.toString(),k(i))).then(a=>{if(a)return{range:v(a.range),contents:ct(a.contents)}})}}function st(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Qe(e){return typeof e=="string"?{value:e}:st(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+` +`+e.value+"\n```\n"}}function ct(e){if(e)return Array.isArray(e)?e.map(Qe):[Qe(e)]}class bt{constructor(n){this._worker=n}provideDocumentHighlights(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDocumentHighlights(t.toString(),k(i))).then(a=>{if(a)return a.map(u=>({range:v(u.range),kind:dt(u.kind)}))})}}function dt(e){switch(e){case D.Read:return x.DocumentHighlightKind.Read;case D.Write:return x.DocumentHighlightKind.Write;case D.Text:return x.DocumentHighlightKind.Text}return x.DocumentHighlightKind.Text}class _t{constructor(n){this._worker=n}provideDefinition(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDefinition(t.toString(),k(i))).then(a=>{if(a)return[Ze(a)]})}}function Ze(e){return{uri:Je.parse(e.uri),range:v(e.range)}}class xt{constructor(n){this._worker=n}provideReferences(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.findReferences(a.toString(),k(i))).then(u=>{if(u)return u.map(Ze)})}}class wt{constructor(n){this._worker=n}provideRenameEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.doRename(a.toString(),k(i),r)).then(u=>ft(u))}}function ft(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=Je.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:v(t.range),text:t.newText}})}return{edits:n}}class kt{constructor(n){this._worker=n}provideDocumentSymbols(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentSymbols(r.toString())).then(t=>{if(t)return t.map(a=>lt(a)?Te(a):{name:a.name,detail:"",containerName:a.containerName,kind:Ke(a.kind),range:v(a.location.range),selectionRange:v(a.location.range),tags:[]})})}}function lt(e){return"children"in e}function Te(e){return{name:e.name,detail:e.detail??"",kind:Ke(e.kind),range:v(e.range),selectionRange:v(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(n=>Te(n))}}function Ke(e){let n=x.SymbolKind;switch(e){case m.File:return n.File;case m.Module:return n.Module;case m.Namespace:return n.Namespace;case m.Package:return n.Package;case m.Class:return n.Class;case m.Method:return n.Method;case m.Property:return n.Property;case m.Field:return n.Field;case m.Constructor:return n.Constructor;case m.Enum:return n.Enum;case m.Interface:return n.Interface;case m.Function:return n.Function;case m.Variable:return n.Variable;case m.Constant:return n.Constant;case m.String:return n.String;case m.Number:return n.Number;case m.Boolean:return n.Boolean;case m.Array:return n.Array}return n.Function}class At{constructor(n){this._worker=n}provideLinks(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentLinks(r.toString())).then(t=>{if(t)return{links:t.map(a=>({range:v(a.range),url:a.target}))}})}}class Et{constructor(n){this._worker=n}provideDocumentFormattingEdits(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.format(t.toString(),null,et(i)).then(u=>{if(!(!u||u.length===0))return u.map(C)}))}}class Lt{constructor(n){this._worker=n,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.format(a.toString(),Ye(i),et(r)).then(s=>{if(!(!s||s.length===0))return s.map(C)}))}}function et(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}class It{constructor(n){this._worker=n}provideDocumentColors(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentColors(r.toString())).then(t=>{if(t)return t.map(a=>({color:a.color,range:v(a.range)}))})}provideColorPresentations(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getColorPresentations(t.toString(),i.color,Ye(i.range))).then(a=>{if(a)return a.map(u=>{let s={label:u.label};return u.textEdit&&(s.textEdit=C(u.textEdit)),u.additionalTextEdits&&(s.additionalTextEdits=u.additionalTextEdits.map(C)),s})})}}class Rt{constructor(n){this._worker=n}provideFoldingRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getFoldingRanges(t.toString(),i)).then(a=>{if(a)return a.map(u=>{const s={start:u.startLine+1,end:u.endLine+1};return typeof u.kind<"u"&&(s.kind=gt(u.kind)),s})})}}function gt(e){switch(e){case M.Comment:return x.FoldingRangeKind.Comment;case M.Imports:return x.FoldingRangeKind.Imports;case M.Region:return x.FoldingRangeKind.Region}}class Mt{constructor(n){this._worker=n}provideSelectionRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getSelectionRanges(t.toString(),i.map(k))).then(a=>{if(a)return a.map(u=>{const s=[];for(;u;)s.push({range:v(u.range)}),u=u.parent;return s})})}}export{mt as C,bt as D,Rt as F,vt as H,xt as R,Mt as S,_t as a,kt as b,wt as c,It as d,pt as e,Et as f,Lt as g,At as h,k as i,Ye as j,C as k,v as t}; diff --git a/src/main/resources/META-INF/resources/assets/mdx-8p8awGLG.js b/src/main/resources/META-INF/resources/assets/mdx-8p8awGLG.js new file mode 100644 index 0000000000..6e211b25ef --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/mdx-8p8awGLG.js @@ -0,0 +1 @@ +import{l as e}from"./index-CHgQ1fX-.js";const i={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:e.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.IndentAction.Outdent}},...Array.from({length:100},(n,t)=>({beforeText:new RegExp(`^${t}\\. .+`),action:{indentAction:e.IndentAction.None,appendText:`${t+1}. `}}))]},s={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}};export{i as conf,s as language}; diff --git a/src/main/resources/META-INF/resources/assets/python-A86fUAQ6.js b/src/main/resources/META-INF/resources/assets/python-A86fUAQ6.js new file mode 100644 index 0000000000..7be018197f --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/python-A86fUAQ6.js @@ -0,0 +1 @@ +import{l as e}from"./index-CHgQ1fX-.js";const t={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},s={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{t as conf,s as language}; diff --git a/src/main/resources/META-INF/resources/assets/razor-DcsVbuVT.js b/src/main/resources/META-INF/resources/assets/razor-DcsVbuVT.js new file mode 100644 index 0000000000..63dc472ec4 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/razor-DcsVbuVT.js @@ -0,0 +1 @@ +import{l as t}from"./index-CHgQ1fX-.js";const e=["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:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.IndentAction.Indent}}]},m={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.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:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.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:"@razorInSimpleState.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:"@razorInSimpleState.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:"@razorInSimpleState.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:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.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:"@razorInSimpleState.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:"@razorInSimpleState.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:"@razorInSimpleState.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:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{o as conf,m as language}; diff --git a/src/main/resources/META-INF/resources/assets/tsMode-h_8MXSOk.js b/src/main/resources/META-INF/resources/assets/tsMode-h_8MXSOk.js new file mode 100644 index 0000000000..c8e5742f4a --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/tsMode-h_8MXSOk.js @@ -0,0 +1,11 @@ +import{c as R,e as w,U as F,a as P,M as v,l as f,t as K,R as O}from"./index-CHgQ1fX-.js";class E{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=R({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-59MjiAqk.js",import.meta.url),{type:"module"}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;ie.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=K.getExtraLibs()[e];return i?w.createModel(i.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class W extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,` +`),code:t.code.toString(),tags:u,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const o=[];return t.forEach(i=>{let l=e;if(i.file&&(l=this._libFiles.getOrCreateModel(i.file.fileName)),!l)return;const p=i.start||0,n=i.length||1,{lineNumber:r,column:u}=l.getPositionAt(p),{lineNumber:d,column:g}=l.getPositionAt(p+n);o.push({resource:l.uri,startLineNumber:r,startColumn:u,endLineNumber:d,endColumn:g,message:A(i.messageText,` +`)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return v.Error;case 3:return v.Info;case 0:return v.Warning;case 2:return v.Hint}return v.Info}}class C extends y{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,i){const l=e.getWordUntilPosition(t),p=new O(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),n=e.uri,r=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const d=await u.getCompletionsAtPosition(n.toString(),r);return!d||e.isDisposed()?void 0:{suggestions:d.entries.map(b=>{let h=p;if(b.replacementSpan){const x=e.getPositionAt(b.replacementSpan.start),D=e.getPositionAt(b.replacementSpan.start+b.replacementSpan.length);h=new O(x.lineNumber,x.column,D.lineNumber,D.column)}const k=[];return b.kindModifiers!==void 0&&b.kindModifiers.indexOf("deprecated")!==-1&&k.push(f.CompletionItemTag.Deprecated),{uri:n,position:t,offset:r,range:h,label:b.name,insertText:b.name,sortText:b.sortText,kind:C.convertKind(b.kind),tags:k}})}}async resolveCompletionItem(e,t){const o=e,i=o.uri,l=o.position,p=o.offset,r=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),p,o.label);return r?{uri:i,position:l,label:r.name,kind:C.convertKind(r.kind),detail:_(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(e){switch(e){case a.primitiveType:case a.keyword:return f.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return f.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return f.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return f.CompletionItemKind.Function;case a.enum:return f.CompletionItemKind.Enum;case a.module:return f.CompletionItemKind.Module;case a.class:return f.CompletionItemKind.Class;case a.interface:return f.CompletionItemKind.Interface;case a.warning:return f.CompletionItemKind.File}return f.CompletionItemKind.Property}static createDocumentationString(e){let t=_(e.documentation);if(e.tags)for(const o of e.tags)t+=` + +${N(o)}`;return t}}function N(c){let e=`*@${c.name}*`;if(c.name==="param"&&c.text){const[t,...o]=c.text;e+=`\`${t.text}\``,o.length>0&&(e+=` — ${o.map(i=>i.text).join(" ")}`)}else Array.isArray(c.text)?e+=` — ${c.text.map(t=>t.text).join(" ")}`:c.text&&(e+=` — ${c.text}`);return e}class I extends y{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case f.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case f.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case f.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(e,t,o,i){const l=e.uri,p=e.getOffsetAt(t),n=await this._worker(l);if(e.isDisposed())return;const r=await n.getSignatureHelpItems(l.toString(),p,{triggerReason:I._toSignatureHelpTriggerReason(i)});if(!r||e.isDisposed())return;const u={activeSignature:r.selectedItemIndex,activeParameter:r.argumentIndex,signatures:[]};return r.items.forEach(d=>{const g={label:"",parameters:[]};g.documentation={value:_(d.documentation)},g.label+=_(d.prefixDisplayParts),d.parameters.forEach((b,h,k)=>{const x=_(b.displayParts),D={label:x,documentation:{value:_(b.documentation)}};g.label+=x,g.parameters.push(D),hN(g)).join(` + +`):"",d=_(n.displayParts);return{range:this._textSpanToRange(e,n.textSpan),contents:[{value:"```typescript\n"+d+"\n```\n"},{value:r+(u?` + +`+u:"")}]}}}class j extends y{async provideDocumentHighlights(e,t,o){const i=e.uri,l=e.getOffsetAt(t),p=await this._worker(i);if(e.isDisposed())return;const n=await p.getDocumentHighlights(i.toString(),l,[i.toString()]);if(!(!n||e.isDisposed()))return n.flatMap(r=>r.highlightSpans.map(u=>({range:this._textSpanToRange(e,u.textSpan),kind:u.kind==="writtenReference"?f.DocumentHighlightKind.Write:f.DocumentHighlightKind.Text})))}}class B extends y{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,o){const i=e.uri,l=e.getOffsetAt(t),p=await this._worker(i);if(e.isDisposed())return;const n=await p.getDefinitionAtPosition(i.toString(),l);if(!n||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(n.map(u=>F.parse(u.fileName))),e.isDisposed()))return;const r=[];for(let u of n){const d=this._libFiles.getOrCreateModel(u.fileName);d&&r.push({uri:d.uri,range:this._textSpanToRange(d,u.textSpan)})}return r}}class U extends y{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,o,i){const l=e.uri,p=e.getOffsetAt(t),n=await this._worker(l);if(e.isDisposed())return;const r=await n.getReferencesAtPosition(l.toString(),p);if(!r||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(r.map(d=>F.parse(d.fileName))),e.isDisposed()))return;const u=[];for(let d of r){const g=this._libFiles.getOrCreateModel(d.fileName);g&&u.push({uri:g.uri,range:this._textSpanToRange(g,d.textSpan)})}return u}}class $ extends y{async provideDocumentSymbols(e,t){const o=e.uri,i=await this._worker(o);if(e.isDisposed())return;const l=await i.getNavigationTree(o.toString());if(!l||e.isDisposed())return;const p=(r,u)=>{var g;return{name:r.text,detail:"",kind:m[r.kind]||f.SymbolKind.Variable,range:this._textSpanToRange(e,r.spans[0]),selectionRange:this._textSpanToRange(e,r.spans[0]),tags:[],children:(g=r.childItems)==null?void 0:g.map(b=>p(b,r.text)),containerName:u}};return l.childItems?l.childItems.map(r=>p(r)):[]}}class a{}a.unknown="";a.keyword="keyword";a.script="script";a.module="module";a.class="class";a.interface="interface";a.type="type";a.enum="enum";a.variable="var";a.localVariable="local var";a.function="function";a.localFunction="local function";a.memberFunction="method";a.memberGetAccessor="getter";a.memberSetAccessor="setter";a.memberVariable="property";a.constructorImplementation="constructor";a.callSignature="call";a.indexSignature="index";a.constructSignature="construct";a.parameter="parameter";a.typeParameter="type parameter";a.primitiveType="primitive type";a.label="label";a.alias="alias";a.const="const";a.let="let";a.warning="warning";let m=Object.create(null);m[a.module]=f.SymbolKind.Module;m[a.class]=f.SymbolKind.Class;m[a.enum]=f.SymbolKind.Enum;m[a.interface]=f.SymbolKind.Interface;m[a.memberFunction]=f.SymbolKind.Method;m[a.memberVariable]=f.SymbolKind.Property;m[a.memberGetAccessor]=f.SymbolKind.Property;m[a.memberSetAccessor]=f.SymbolKind.Property;m[a.variable]=f.SymbolKind.Variable;m[a.const]=f.SymbolKind.Variable;m[a.localVariable]=f.SymbolKind.Variable;m[a.variable]=f.SymbolKind.Variable;m[a.function]=f.SymbolKind.Function;m[a.localFunction]=f.SymbolKind.Function;class S extends y{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:` +`,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}}class z extends S{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,o,i){const l=e.uri,p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),n=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=await this._worker(l);if(e.isDisposed())return;const u=await r.getFormattingEditsForRange(l.toString(),p,n,S._convertOptions(o));if(!(!u||e.isDisposed()))return u.map(d=>this._convertTextChanges(e,d))}}class G extends S{get autoFormatTriggerCharacters(){return[";","}",` +`]}async provideOnTypeFormattingEdits(e,t,o,i,l){const p=e.uri,n=e.getOffsetAt(t),r=await this._worker(p);if(e.isDisposed())return;const u=await r.getFormattingEditsAfterKeystroke(p.toString(),n,o,S._convertOptions(i));if(!(!u||e.isDisposed()))return u.map(d=>this._convertTextChanges(e,d))}}class J extends S{async provideCodeActions(e,t,o,i){const l=e.uri,p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),n=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=S._convertOptions(e.getOptions()),u=o.markers.filter(h=>h.code).map(h=>h.code).map(Number),d=await this._worker(l);if(e.isDisposed())return;const g=await d.getCodeFixesAtPosition(l.toString(),p,n,u,r);return!g||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:g.filter(h=>h.changes.filter(k=>k.isNewFile).length===0).map(h=>this._tsCodeFixActionToMonacoCodeAction(e,o,h)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,o){const i=[];for(const p of o.changes)for(const n of p.textChanges)i.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,n.span),text:n.newText}});return{title:o.description,edit:{edits:i},diagnostics:t.markers,kind:"quickfix"}}}class q extends y{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,o,i){const l=e.uri,p=l.toString(),n=e.getOffsetAt(t),r=await this._worker(l);if(e.isDisposed())return;const u=await r.getRenameInfo(p,n,{allowRenameOfImportPath:!1});if(u.canRename===!1)return{edits:[],rejectReason:u.localizedErrorMessage};if(u.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const d=await r.findRenameLocations(p,n,!1,!1,!1);if(!d||e.isDisposed())return;const g=[];for(const b of d){const h=this._libFiles.getOrCreateModel(b.fileName);if(h)g.push({resource:h.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(h,b.textSpan),text:o}});else throw new Error(`Unknown file ${b.fileName}.`)}return{edits:g}}}class Q extends y{async provideInlayHints(e,t,o){const i=e.uri,l=i.toString(),p=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),n=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),r=await this._worker(i);return e.isDisposed()?null:{hints:(await r.provideInlayHints(l,p,n)).map(g=>({...g,label:g.text,position:e.getPositionAt(g.position),kind:this._convertHintKind(g.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return f.InlayHintKind.Parameter;case"Type":return f.InlayHintKind.Type;default:return f.InlayHintKind.Type}}}let T,L;function Z(c){L=M(c,"typescript")}function ee(c){T=M(c,"javascript")}function te(){return new Promise((c,e)=>{if(!T)return e("JavaScript not registered!");c(T)})}function se(){return new Promise((c,e)=>{if(!L)return e("TypeScript not registered!");c(L)})}function M(c,e){const t=[],o=new E(e,c),i=(...n)=>o.getLanguageServiceWorker(...n),l=new H(i);function p(){const{modeConfiguration:n}=c;X(t),n.completionItems&&t.push(f.registerCompletionItemProvider(e,new C(i))),n.signatureHelp&&t.push(f.registerSignatureHelpProvider(e,new I(i))),n.hovers&&t.push(f.registerHoverProvider(e,new V(i))),n.documentHighlights&&t.push(f.registerDocumentHighlightProvider(e,new j(i))),n.definitions&&t.push(f.registerDefinitionProvider(e,new B(l,i))),n.references&&t.push(f.registerReferenceProvider(e,new U(l,i))),n.documentSymbols&&t.push(f.registerDocumentSymbolProvider(e,new $(i))),n.rename&&t.push(f.registerRenameProvider(e,new q(l,i))),n.documentRangeFormattingEdits&&t.push(f.registerDocumentRangeFormattingEditProvider(e,new z(i))),n.onTypeFormattingEdits&&t.push(f.registerOnTypeFormattingEditProvider(e,new G(i))),n.codeActions&&t.push(f.registerCodeActionProvider(e,new J(i))),n.inlayHints&&t.push(f.registerInlayHintsProvider(e,new Q(i))),n.diagnostics&&t.push(new W(l,c,e,i))}return p(),i}function X(c){for(;c.length;)c.pop().dispose()}export{y as Adapter,J as CodeActionAdaptor,B as DefinitionAdapter,W as DiagnosticsAdapter,j as DocumentHighlightAdapter,z as FormatAdapter,S as FormatHelper,G as FormatOnTypeAdapter,Q as InlayHintsAdapter,a as Kind,H as LibFiles,$ as OutlineAdapter,V as QuickInfoAdapter,U as ReferenceAdapter,q as RenameAdapter,I as SignatureHelpAdapter,C as SuggestAdapter,E as WorkerManager,A as flattenDiagnosticMessageText,te as getJavaScriptWorker,se as getTypeScriptWorker,ee as setupJavaScript,Z as setupTypeScript}; diff --git a/src/main/resources/META-INF/resources/assets/typescript-DvHGjc3l.js b/src/main/resources/META-INF/resources/assets/typescript-DvHGjc3l.js new file mode 100644 index 0000000000..e35f8fb98a --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/typescript-DvHGjc3l.js @@ -0,0 +1 @@ +import{l as e}from"./index-CHgQ1fX-.js";const n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},o={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{n as conf,o as language}; diff --git a/src/main/resources/META-INF/resources/assets/xml-Kir_yWKe.js b/src/main/resources/META-INF/resources/assets/xml-Kir_yWKe.js new file mode 100644 index 0000000000..04d6899701 --- /dev/null +++ b/src/main/resources/META-INF/resources/assets/xml-Kir_yWKe.js @@ -0,0 +1 @@ +import{l as e}from"./index-CHgQ1fX-.js";const n={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},o={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/